1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 02:52:53 +02:00

[NFC] Factor out hasForceAttributes

This is a preparation for https://reviews.llvm.org/D85586.

Differential Revision: https://reviews.llvm.org/D85793
This commit is contained in:
Kyungwoo Lee 2020-08-12 02:14:35 -04:00
parent 8755dd12ec
commit 2beab8ee7a

View File

@ -88,9 +88,11 @@ static void addForcedAttributes(Function &F) {
}
}
static bool hasForceAttributes() { return !ForceAttributes.empty(); }
PreservedAnalyses ForceFunctionAttrsPass::run(Module &M,
ModuleAnalysisManager &) {
if (ForceAttributes.empty())
if (!hasForceAttributes())
return PreservedAnalyses::all();
for (Function &F : M.functions())