Index: lib/IR/Constants.cpp |
diff --git a/lib/IR/Constants.cpp b/lib/IR/Constants.cpp |
index 8093a09749fb1d702461cd1de72601a02f52fa0f..f5442063f478362b9dc9e4e717fabe57b859a67d 100644 |
--- a/lib/IR/Constants.cpp |
+++ b/lib/IR/Constants.cpp |
@@ -1371,7 +1371,7 @@ void BlockAddress::replaceUsesOfWithOnConstant(Value *From, Value *To, Use *U) { |
BasicBlock *NewBB = getBasicBlock(); |
if (U == &Op<0>()) |
- NewF = cast<Function>(To); |
+ NewF = cast<Function>(To->stripPointerCasts()); |
Derek Schuff
2013/05/17 23:16:05
LOCALMOD with comment?
Mark Seaborn
2013/05/20 15:08:12
Done: LOCALMOD comment added.
|
else |
NewBB = cast<BasicBlock>(To); |