Skip to content

Commit

Permalink
[InstCombine] Fix a crash in -kcfi debug block
Browse files Browse the repository at this point in the history
Don't attempt to print out DebugLoc as we may not have one.
  • Loading branch information
samitolvanen committed Sep 7, 2022
1 parent cce2947 commit 52967a5
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3116,8 +3116,7 @@ Instruction *InstCombinerImpl::visitCallBase(CallBase &Call) {

if (FunctionType &&
FunctionType->getZExtValue() != ExpectedType->getZExtValue())
dbgs() << Call.getModule()->getName() << ":"
<< Call.getDebugLoc().getLine()
dbgs() << Call.getModule()->getName()
<< ": warning: kcfi: " << Call.getCaller()->getName()
<< ": call to " << CalleeF->getName()
<< " using a mismatching function pointer type\n";
Expand Down

0 comments on commit 52967a5

Please sign in to comment.