Skip to content

Commit 0264815

Browse files
authored
[LLVM][Transforms] Add more conditions to setVolatileForInlinedBB
1 parent 06e9d66 commit 0264815

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

llvm/lib/Transforms/Utils/InlineFunction.cpp

+7
Original file line numberDiff line numberDiff line change
@@ -2019,7 +2019,14 @@ inlineRetainOrClaimRVCalls(CallBase &CB, objcarc::ARCInstKind RVCallKind,
20192019
// This is used to preserve the volatile attribute of the original call instruction.
20202020
static void setVolatileForInlinedBB(BasicBlock *BB) {
20212021

2022+
if (!BB)
2023+
return;
2024+
20222025
// We need BBs belong to a function.
2026+
if (!BB->getParent())
2027+
return;
2028+
2029+
// We need BBs belong to a module.
20232030
if (!BB->getParent()->getParent())
20242031
return;
20252032

0 commit comments

Comments
 (0)