From 8ff688d055417831d5a09b3063a6b55a9ec64c17 Mon Sep 17 00:00:00 2001 From: Davide Italiano Date: Tue, 27 Jun 2017 02:43:00 +0000 Subject: [PATCH] [CFLAA] Move FunctionHandle to llvm::cflaa. Also, while here, remove an unneeded `using namespace llvm`. Thanks to George for the suggestion. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@306355 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/Analysis/CFLAliasAnalysisUtils.h | 5 ++--- include/llvm/Analysis/CFLAndersAliasAnalysis.h | 2 +- include/llvm/Analysis/CFLSteensAliasAnalysis.h | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/include/llvm/Analysis/CFLAliasAnalysisUtils.h b/include/llvm/Analysis/CFLAliasAnalysisUtils.h index e21817852e6..981a8ddc228 100644 --- a/include/llvm/Analysis/CFLAliasAnalysisUtils.h +++ b/include/llvm/Analysis/CFLAliasAnalysisUtils.h @@ -18,7 +18,8 @@ #include "llvm/IR/Function.h" #include "llvm/IR/ValueHandle.h" -using namespace llvm; +namespace llvm { +namespace cflaa { template struct FunctionHandle final : public CallbackVH { FunctionHandle(Function *Fn, AAResult *Result) @@ -41,8 +42,6 @@ private: } }; -namespace llvm { -namespace cflaa { static inline const Function *parentFunctionOfValue(const Value *Val) { if (auto *Inst = dyn_cast(Val)) { auto *Bb = Inst->getParent(); diff --git a/include/llvm/Analysis/CFLAndersAliasAnalysis.h b/include/llvm/Analysis/CFLAndersAliasAnalysis.h index 5d11a427afb..4146ad4d18a 100644 --- a/include/llvm/Analysis/CFLAndersAliasAnalysis.h +++ b/include/llvm/Analysis/CFLAndersAliasAnalysis.h @@ -76,7 +76,7 @@ private: /// that simply has empty sets. DenseMap> Cache; - std::forward_list> Handles; + std::forward_list> Handles; }; /// Analysis pass providing a never-invalidated alias analysis result. diff --git a/include/llvm/Analysis/CFLSteensAliasAnalysis.h b/include/llvm/Analysis/CFLSteensAliasAnalysis.h index 1dfdcc7c371..fd3fa5febcd 100644 --- a/include/llvm/Analysis/CFLSteensAliasAnalysis.h +++ b/include/llvm/Analysis/CFLSteensAliasAnalysis.h @@ -94,7 +94,7 @@ private: /// have any kind of recursion, it is discernable from a function /// that simply has empty sets. DenseMap> Cache; - std::forward_list> Handles; + std::forward_list> Handles; FunctionInfo buildSetsFrom(Function *F); };