Skip to content

Commit

Permalink
dev/18.x linking error fixes (lanl#49)
Browse files Browse the repository at this point in the history
clang/lib/Frontend has a call to a Tapir << operator, which means it has
to be linked against TapirOpts.

There's unguarded checks to Value::dump in HipABI, which is disabled for
release builds, so I've replaced them with LLVM_DEBUG calls. Note this
means you don't have that output before assertion failure for release
builds. Other options if that's important.
  • Loading branch information
stelleg authored and tarunprabhu committed Oct 1, 2024
1 parent 29a7d60 commit a47ef6e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions clang/lib/Frontend/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ set(LLVM_LINK_COMPONENTS
ProfileData
Support
TargetParser
TapirOpts
)

add_clang_library(clangFrontend
Expand Down
1 change: 1 addition & 0 deletions llvm/lib/Transforms/Tapir/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ add_llvm_component_library(LLVMTapirOpts
Support
TransformUtils
Vectorize
Passes
)

if (CUDAToolkit_FOUND)
Expand Down
4 changes: 2 additions & 2 deletions llvm/lib/Transforms/Tapir/HipABI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -637,8 +637,8 @@ void HipABI::transformConstants(Function *Fn) {
GEP->setOperand(GEP->getPointerOperandIndex(), asCast);
LLVM_DEBUG(dbgs() << "\t\t\t\tnew gep:\n\t\t\t\t " << *GEP << "\n");
} else {
U->get()->dump();
U->getUser()->dump();
LLVM_DEBUG(dbgs() << U->get());
LLVM_DEBUG(dbgs() << U->getUser());
assert(false && "unexpected use/user of gep.");
}
}
Expand Down

0 comments on commit a47ef6e

Please sign in to comment.