File tree Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -114,7 +114,11 @@ void SourceDebugger::getDebugSections(
114
114
115
115
void SourceDebugger::dump () {
116
116
string Error;
117
+ #if LLVM_VERSION_MAJOR >= 21
118
+ string TripleStr (mod_->getTargetTriple ().str ());
119
+ #else
117
120
string TripleStr (mod_->getTargetTriple ());
121
+ #endif
118
122
Triple TheTriple (TripleStr);
119
123
const Target *T = TargetRegistry::lookupTarget (TripleStr, Error);
120
124
if (!T) {
Original file line number Diff line number Diff line change @@ -543,7 +543,11 @@ int BPFModule::finalize() {
543
543
sec_map_def tmp_sections,
544
544
*sections_p;
545
545
546
+ #if LLVM_VERSION_MAJOR >= 21
547
+ mod->setTargetTriple (Triple (" bpf-pc-linux" ));
548
+ #else
546
549
mod->setTargetTriple (" bpf-pc-linux" );
550
+ #endif
547
551
#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
548
552
mod->setDataLayout (" e-m:e-p:64:64-i64:64-i128:128-n32:64-S128" );
549
553
#else
You can’t perform that action at this time.
0 commit comments