diff options
author | Chris Lattner <sabre@nondot.org> | 2009-09-01 06:31:31 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-09-01 06:31:31 +0000 |
commit | 063d06527e4e74be341d45866723edcace817337 (patch) | |
tree | 0c5bbbf3e68d9628e246e39bc8f36ee3eca4c4cc /llvm/lib/Transforms/Utils/InlineFunction.cpp | |
parent | bcec05c9fda9cfcc2fa11837ea8aae075db41668 (diff) | |
download | bcm5719-llvm-063d06527e4e74be341d45866723edcace817337.tar.gz bcm5719-llvm-063d06527e4e74be341d45866723edcace817337.zip |
Change CallGraphNode to maintain it's Function as an AssertingVH
for sanity. This didn't turn up any bugs.
Change CallGraphNode to maintain its "callsite" information in the
call edges list as a WeakVH instead of as an instruction*. This fixes
a broad class of dangling pointer bugs, and makes CallGraph have a number
of useful invariants again. This fixes the class of problem indicated
by PR4029 and PR3601.
llvm-svn: 80663
Diffstat (limited to 'llvm/lib/Transforms/Utils/InlineFunction.cpp')
-rw-r--r-- | llvm/lib/Transforms/Utils/InlineFunction.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Utils/InlineFunction.cpp b/llvm/lib/Transforms/Utils/InlineFunction.cpp index 4e738e498b3..00ccaf8fcff 100644 --- a/llvm/lib/Transforms/Utils/InlineFunction.cpp +++ b/llvm/lib/Transforms/Utils/InlineFunction.cpp @@ -212,7 +212,7 @@ static void UpdateCallGraphAfterInlining(CallSite CS, } for (; I != E; ++I) { - const Instruction *OrigCall = I->first.getInstruction(); + const Value *OrigCall = I->first; DenseMap<const Value*, Value*>::iterator VMI = ValueMap.find(OrigCall); // Only copy the edge if the call was inlined! |