Skip to content

Commit 5ac026f

Browse files
authored
Update Instruction.cpp
1 parent 328ce32 commit 5ac026f

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

llvm/lib/IR/Instruction.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1094,11 +1094,9 @@ bool Instruction::mayThrow(bool IncludePhaseOneUnwind) const {
10941094
bool Instruction::mayHaveSideEffects() const {
10951095
// Lambda function to check 'NoInline' attribute.
10961096
auto hasNoInline = [](const Instruction &I) -> bool {
1097-
if (const CallOrInvokeInst *CI = dyn_cast<CallOrInvokeInst>(&I)) {
1098-
if (CI->getCalledFunction()) {
1097+
if (const CallOrInvokeInst *CI = dyn_cast<CallOrInvokeInst>(&I))
1098+
if (CI->getCalledFunction())
10991099
return CI->getCalledFunction()->hasFnAttribute(Attribute::NoInline);
1100-
}
1101-
}
11021100
return false;
11031101
};
11041102
return mayWriteToMemory() || mayThrow() || !willReturn() ||

0 commit comments

Comments
 (0)