OSDN Git Service

IndirectCallSiteVisitor.h:findIndirectCallSites Don't mark header functions as file...
authorDavid Blaikie <dblaikie@gmail.com>
Tue, 24 Oct 2017 17:29:12 +0000 (17:29 +0000)
committerDavid Blaikie <dblaikie@gmail.com>
Tue, 24 Oct 2017 17:29:12 +0000 (17:29 +0000)
This creates ODR violations if the function is called from another inline                                                                   function in a header and also creates binary bloat from duplicate definitions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@316474 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Analysis/IndirectCallSiteVisitor.h

index 3c40cc0..dde56a1 100644 (file)
@@ -27,7 +27,7 @@ struct PGOIndirectCallSiteVisitor
 };
 
 // Helper function that finds all indirect call sites.
-static inline std::vector<Instruction *> findIndirectCallSites(Function &F) {
+inline std::vector<Instruction *> findIndirectCallSites(Function &F) {
   PGOIndirectCallSiteVisitor ICV;
   ICV.visit(F);
   return ICV.IndirectCallInsts;