[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
This commit is contained in:
Davide Italiano 2017-06-27 02:43:00 +00:00
parent 257136b174
commit 8ff688d055
3 changed files with 4 additions and 5 deletions

View File

@ -18,7 +18,8 @@
#include "llvm/IR/Function.h"
#include "llvm/IR/ValueHandle.h"
using namespace llvm;
namespace llvm {
namespace cflaa {
template <typename AAResult> 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<Instruction>(Val)) {
auto *Bb = Inst->getParent();

View File

@ -76,7 +76,7 @@ private:
/// that simply has empty sets.
DenseMap<const Function *, Optional<FunctionInfo>> Cache;
std::forward_list<FunctionHandle<CFLAndersAAResult>> Handles;
std::forward_list<cflaa::FunctionHandle<CFLAndersAAResult>> Handles;
};
/// Analysis pass providing a never-invalidated alias analysis result.

View File

@ -94,7 +94,7 @@ private:
/// have any kind of recursion, it is discernable from a function
/// that simply has empty sets.
DenseMap<Function *, Optional<FunctionInfo>> Cache;
std::forward_list<FunctionHandle<CFLSteensAAResult>> Handles;
std::forward_list<cflaa::FunctionHandle<CFLSteensAAResult>> Handles;
FunctionInfo buildSetsFrom(Function *F);
};