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 | a59b5decad2d3e3b9e2f565ff5d4e1857b9202a1 (patch) | |
tree | b552423321ef32d4577f0380d0ccc2575ab903be /lib/Transforms/Utils/InlineFunction.cpp | |
parent | e18cb0735189d79b73d3643f9bfda482a82f498d (diff) | |
download | external_llvm-a59b5decad2d3e3b9e2f565ff5d4e1857b9202a1.zip external_llvm-a59b5decad2d3e3b9e2f565ff5d4e1857b9202a1.tar.gz external_llvm-a59b5decad2d3e3b9e2f565ff5d4e1857b9202a1.tar.bz2 |
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80663 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Utils/InlineFunction.cpp')
-rw-r--r-- | lib/Transforms/Utils/InlineFunction.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Transforms/Utils/InlineFunction.cpp b/lib/Transforms/Utils/InlineFunction.cpp index 4e738e4..00ccaf8 100644 --- a/lib/Transforms/Utils/InlineFunction.cpp +++ b/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! |