diff options
author | Stephen Hines <srhines@google.com> | 2014-12-04 20:05:14 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2014-12-04 20:05:14 +0000 |
commit | 591bcffe8fa3b416fbb39cbf397bfbd2aa693228 (patch) | |
tree | 8d32ff2094b47e15a8def30d62fd7dee6e009de3 /lib/Analysis/LazyCallGraph.cpp | |
parent | 7e6f824dbb10004cdb7ba6942022ea72c0ca6db6 (diff) | |
parent | a21bbdfad461e957fa42ac9d6860ddc9de2da3e9 (diff) | |
download | external_llvm-591bcffe8fa3b416fbb39cbf397bfbd2aa693228.zip external_llvm-591bcffe8fa3b416fbb39cbf397bfbd2aa693228.tar.gz external_llvm-591bcffe8fa3b416fbb39cbf397bfbd2aa693228.tar.bz2 |
am a21bbdfa: am 876d6995: Merge "Update aosp/master LLVM for rebase to r222494."
* commit 'a21bbdfad461e957fa42ac9d6860ddc9de2da3e9':
Update aosp/master LLVM for rebase to r222494.
Diffstat (limited to 'lib/Analysis/LazyCallGraph.cpp')
-rw-r--r-- | lib/Analysis/LazyCallGraph.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/Analysis/LazyCallGraph.cpp b/lib/Analysis/LazyCallGraph.cpp index e073616..767da4e 100644 --- a/lib/Analysis/LazyCallGraph.cpp +++ b/lib/Analysis/LazyCallGraph.cpp @@ -48,7 +48,7 @@ static void findCallees( } for (Value *Op : C->operand_values()) - if (Visited.insert(cast<Constant>(Op))) + if (Visited.insert(cast<Constant>(Op)).second) Worklist.push_back(cast<Constant>(Op)); } } @@ -66,7 +66,7 @@ LazyCallGraph::Node::Node(LazyCallGraph &G, Function &F) for (Instruction &I : BB) for (Value *Op : I.operand_values()) if (Constant *C = dyn_cast<Constant>(Op)) - if (Visited.insert(C)) + if (Visited.insert(C).second) Worklist.push_back(C); // We've collected all the constant (and thus potentially function or @@ -113,7 +113,7 @@ LazyCallGraph::LazyCallGraph(Module &M) : NextDFSNumber(0) { SmallPtrSet<Constant *, 16> Visited; for (GlobalVariable &GV : M.globals()) if (GV.hasInitializer()) - if (Visited.insert(GV.getInitializer())) + if (Visited.insert(GV.getInitializer()).second) Worklist.push_back(GV.getInitializer()); DEBUG(dbgs() << " Adding functions referenced by global initializers to the " @@ -688,7 +688,7 @@ static void printNodes(raw_ostream &OS, LazyCallGraph::Node &N, SmallPtrSetImpl<LazyCallGraph::Node *> &Printed) { // Recurse depth first through the nodes. for (LazyCallGraph::Node &ChildN : N) - if (Printed.insert(&ChildN)) + if (Printed.insert(&ChildN).second) printNodes(OS, ChildN, Printed); OS << " Call edges in function: " << N.getFunction().getName() << "\n"; @@ -717,7 +717,7 @@ PreservedAnalyses LazyCallGraphPrinterPass::run(Module *M, SmallPtrSet<LazyCallGraph::Node *, 16> Printed; for (LazyCallGraph::Node &N : G) - if (Printed.insert(&N)) + if (Printed.insert(&N).second) printNodes(OS, N, Printed); for (LazyCallGraph::SCC &SCC : G.postorder_sccs()) |