Skip to content

Commit

Permalink
[CFLAA] Move FunctionHandle to llvm::cflaa.
Browse files Browse the repository at this point in the history
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
  • Loading branch information
dcci committed Jun 27, 2017
1 parent 257136b commit 8ff688d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
5 changes: 2 additions & 3 deletions include/llvm/Analysis/CFLAliasAnalysisUtils.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -41,8 +42,6 @@ template <typename AAResult> struct FunctionHandle final : public CallbackVH {
}
};

namespace llvm {
namespace cflaa {
static inline const Function *parentFunctionOfValue(const Value *Val) {
if (auto *Inst = dyn_cast<Instruction>(Val)) {
auto *Bb = Inst->getParent();
Expand Down
2 changes: 1 addition & 1 deletion include/llvm/Analysis/CFLAndersAliasAnalysis.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ class CFLAndersAAResult : public AAResultBase<CFLAndersAAResult> {
/// 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.
Expand Down
2 changes: 1 addition & 1 deletion include/llvm/Analysis/CFLSteensAliasAnalysis.h
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ class CFLSteensAAResult : public AAResultBase<CFLSteensAAResult> {
/// 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);
};
Expand Down

0 comments on commit 8ff688d

Please sign in to comment.