mirror of
https://github.com/RPCS3/llvm.git
synced 2025-01-05 19:29:54 +00:00
[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:
parent
257136b174
commit
8ff688d055
@ -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();
|
||||
|
@ -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.
|
||||
|
@ -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);
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user