Skip to content

Commit

Permalink
[LLVM][Transforms] Add more conditions to setVolatileForInlinedBB
Browse files Browse the repository at this point in the history
  • Loading branch information
gmh5225 authored Jul 14, 2024
1 parent 06e9d66 commit 0264815
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions llvm/lib/Transforms/Utils/InlineFunction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2019,7 +2019,14 @@ inlineRetainOrClaimRVCalls(CallBase &CB, objcarc::ARCInstKind RVCallKind,
// This is used to preserve the volatile attribute of the original call instruction.
static void setVolatileForInlinedBB(BasicBlock *BB) {

if (!BB)
return;

// We need BBs belong to a function.
if (!BB->getParent())
return;

// We need BBs belong to a module.
if (!BB->getParent()->getParent())
return;

Expand Down

0 comments on commit 0264815

Please sign in to comment.