[PATCH] D85793: [NFC] Factor out hasForceAttributes

Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 11 23:17:45 PDT 2020


This revision was automatically updated to reflect the committed changes.
Closed by commit rGd73be5af0ae7: [NFC] Factor out hasForceAttributes (authored by Kyungwoo Lee <kyulee.llvm at gmail.com>).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D85793/new/

https://reviews.llvm.org/D85793

Files:
  llvm/lib/Transforms/IPO/ForceFunctionAttrs.cpp


Index: llvm/lib/Transforms/IPO/ForceFunctionAttrs.cpp
===================================================================
--- llvm/lib/Transforms/IPO/ForceFunctionAttrs.cpp
+++ llvm/lib/Transforms/IPO/ForceFunctionAttrs.cpp
@@ -88,9 +88,11 @@
   }
 }
 
+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())


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D85793.284975.patch
Type: text/x-patch
Size: 597 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200812/bec76fe8/attachment.bin>


More information about the llvm-commits mailing list