diff options
Diffstat (limited to 'include/llvm/Analysis/GlobalsModRef.h')
-rw-r--r-- | include/llvm/Analysis/GlobalsModRef.h | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/include/llvm/Analysis/GlobalsModRef.h b/include/llvm/Analysis/GlobalsModRef.h index d3fcfc2d41ab..5d1c5a05206a 100644 --- a/include/llvm/Analysis/GlobalsModRef.h +++ b/include/llvm/Analysis/GlobalsModRef.h @@ -34,7 +34,7 @@ class GlobalsAAResult : public AAResultBase<GlobalsAAResult> { class FunctionInfo; const DataLayout &DL; - const TargetLibraryInfo &TLI; + std::function<const TargetLibraryInfo &(Function &F)> GetTLI; /// The globals that do not have their addresses taken. SmallPtrSet<const GlobalValue *, 8> NonAddressTakenGlobals; @@ -72,14 +72,18 @@ class GlobalsAAResult : public AAResultBase<GlobalsAAResult> { /// could perform to the memory utilization here if this becomes a problem. std::list<DeletionCallbackHandle> Handles; - explicit GlobalsAAResult(const DataLayout &DL, const TargetLibraryInfo &TLI); + explicit GlobalsAAResult( + const DataLayout &DL, + std::function<const TargetLibraryInfo &(Function &F)> GetTLI); public: GlobalsAAResult(GlobalsAAResult &&Arg); ~GlobalsAAResult(); - static GlobalsAAResult analyzeModule(Module &M, const TargetLibraryInfo &TLI, - CallGraph &CG); + static GlobalsAAResult + analyzeModule(Module &M, + std::function<const TargetLibraryInfo &(Function &F)> GetTLI, + CallGraph &CG); //------------------------------------------------ // Implement the AliasAnalysis API |