Skip to content

Commit d73be5a

Browse files
committed
[NFC] Factor out hasForceAttributes
This is a preparation for https://reviews.llvm.org/D85586. Differential Revision: https://reviews.llvm.org/D85793
1 parent 3a03392 commit d73be5a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

llvm/lib/Transforms/IPO/ForceFunctionAttrs.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,9 +88,11 @@ static void addForcedAttributes(Function &F) {
8888
}
8989
}
9090

91+
static bool hasForceAttributes() { return !ForceAttributes.empty(); }
92+
9193
PreservedAnalyses ForceFunctionAttrsPass::run(Module &M,
9294
ModuleAnalysisManager &) {
93-
if (ForceAttributes.empty())
95+
if (!hasForceAttributes())
9496
return PreservedAnalyses::all();
9597

9698
for (Function &F : M.functions())

0 commit comments

Comments
 (0)