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(
114114
115115void SourceDebugger::dump () {
116116 string Error;
117+ #if LLVM_VERSION_MAJOR >= 21
118+ string TripleStr (mod_->getTargetTriple ().str ());
119+ #else
117120 string TripleStr (mod_->getTargetTriple ());
121+ #endif
118122 Triple TheTriple (TripleStr);
119123 const Target *T = TargetRegistry::lookupTarget (TripleStr, Error);
120124 if (!T) {
Original file line number Diff line number Diff line change @@ -543,7 +543,11 @@ int BPFModule::finalize() {
543543 sec_map_def tmp_sections,
544544 *sections_p;
545545
546+ #if LLVM_VERSION_MAJOR >= 21
547+ mod->setTargetTriple (Triple (" bpf-pc-linux" ));
548+ #else
546549 mod->setTargetTriple (" bpf-pc-linux" );
550+ #endif
547551#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
548552 mod->setDataLayout (" e-m:e-p:64:64-i64:64-i128:128-n32:64-S128" );
549553#else
You can’t perform that action at this time.
0 commit comments