summaryrefslogtreecommitdiff
path: root/lib/Transforms
diff options
context:
space:
mode:
authorNick Lewycky <nicholas@mxc.ca>2014-02-20 23:00:15 +0000
committerNick Lewycky <nicholas@mxc.ca>2014-02-20 23:00:15 +0000
commit0aabe661a4315def30ddb2b4dbf290b513ffb747 (patch)
tree854d8bc55946a41d418cc9b20e2694928b618f25 /lib/Transforms
parentf17f214145c8e3b7d57cc3e11e836b4b1bf5ccbb (diff)
downloadllvm-0aabe661a4315def30ddb2b4dbf290b513ffb747.tar.gz
llvm-0aabe661a4315def30ddb2b4dbf290b513ffb747.tar.bz2
llvm-0aabe661a4315def30ddb2b4dbf290b513ffb747.tar.xz
Make sure that value handle users see the transformation of an indirect call to a direct call. This is important for the CallGraph iteration. Patch by Björn Steinbrink!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201822 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms')
-rw-r--r--lib/Transforms/InstCombine/InstCombineCalls.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/Transforms/InstCombine/InstCombineCalls.cpp b/lib/Transforms/InstCombine/InstCombineCalls.cpp
index 9e8d1bc3bd..fe8c1b0baf 100644
--- a/lib/Transforms/InstCombine/InstCombineCalls.cpp
+++ b/lib/Transforms/InstCombine/InstCombineCalls.cpp
@@ -1212,6 +1212,8 @@ bool InstCombiner::transformConstExprCastCall(CallSite CS) {
if (!Caller->use_empty())
ReplaceInstUsesWith(*Caller, NV);
+ else if (Caller->hasValueHandle())
+ ValueHandleBase::ValueIsRAUWd(Caller, NV);
EraseInstFromFunction(*Caller);
return true;