summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Transforms/IPO/Inliner.cpp6
-rw-r--r--llvm/lib/Transforms/Utils/InlineFunction.cpp2
2 files changed, 5 insertions, 3 deletions
diff --git a/llvm/lib/Transforms/IPO/Inliner.cpp b/llvm/lib/Transforms/IPO/Inliner.cpp
index 322b4698756..1ac609ddf2c 100644
--- a/llvm/lib/Transforms/IPO/Inliner.cpp
+++ b/llvm/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.
diff --git a/llvm/lib/Transforms/Utils/InlineFunction.cpp b/llvm/lib/Transforms/Utils/InlineFunction.cpp
index a913d157e24..481cacf5a19 100644
--- a/llvm/lib/Transforms/Utils/InlineFunction.cpp
+++ b/llvm/lib/Transforms/Utils/InlineFunction.cpp
@@ -72,7 +72,7 @@ static void HandleCallsInBlockInlinedThroughInvoke(BasicBlock *BB,
II->setAttributes(CI->getAttributes());
// Make sure that anything using the call now uses the invoke! This also
- // updates the CallGraph if present.
+ // updates the CallGraph if present, because it uses a WeakVH.
CI->replaceAllUsesWith(II);
// Delete the unconditional branch inserted by splitBasicBlock
OpenPOWER on IntegriCloud