diff options
author | Chris Lattner <sabre@nondot.org> | 2010-04-23 18:37:01 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-04-23 18:37:01 +0000 |
commit | 076863225ce070345ff7048f48b3550e00598a10 (patch) | |
tree | 3dcc9895af7b024b61389b147692a32176c3f725 /lib/Transforms/IPO/Inliner.cpp | |
parent | a56c1c5d4c87896be2a04a855235cfa423252e32 (diff) | |
download | llvm-076863225ce070345ff7048f48b3550e00598a10.tar.gz llvm-076863225ce070345ff7048f48b3550e00598a10.tar.bz2 llvm-076863225ce070345ff7048f48b3550e00598a10.tar.xz |
switch InlineInfo.DevirtualizedCalls's list to be of WeakVH.
This fixes a bug where calls inlined into an invoke would get
changed into an invoke but the array would keep pointing to
the (now dead) call. The improved inliner behavior is still
disabled for now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102196 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/IPO/Inliner.cpp')
-rw-r--r-- | lib/Transforms/IPO/Inliner.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/Transforms/IPO/Inliner.cpp b/lib/Transforms/IPO/Inliner.cpp index 322b469875..1ac609ddf2 100644 --- a/lib/Transforms/IPO/Inliner.cpp +++ b/lib/Transforms/IPO/Inliner.cpp @@ -392,8 +392,10 @@ bool Inliner::runOnSCC(CallGraphSCC &SCC) { // onto our worklist to process. They are useful inline candidates. #if 0 for (unsigned i = 0, e = InlineInfo.DevirtualizedCalls.size(); - i != e; ++i) - CallSites.push_back(CallSite(InlineInfo.DevirtualizedCalls[i])); + i != e; ++i) { + Value *Ptr = InlineInfo.DevirtualizedCalls[i]; + CallSites.push_back(CallSite(Ptr)); + } #endif // Update the cached cost info with the inlined call. |