aboutsummaryrefslogtreecommitdiff
path: root/include/llvm/Analysis/GlobalsModRef.h
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2019-10-23 17:51:42 +0000
committerDimitry Andric <dim@FreeBSD.org>2019-10-23 17:51:42 +0000
commit1d5ae1026e831016fc29fd927877c86af904481f (patch)
tree2cdfd12620fcfa5d9e4a0389f85368e8e36f63f9 /include/llvm/Analysis/GlobalsModRef.h
parente6d1592492a3a379186bfb02bd0f4eda0669c0d5 (diff)
Notes
Diffstat (limited to 'include/llvm/Analysis/GlobalsModRef.h')
-rw-r--r--include/llvm/Analysis/GlobalsModRef.h12
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