Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(528)

Unified Diff: lib/IR/Constants.cpp

Issue 14262011: PNaCl: Add ReplacePtrsWithInts pass for stripping out pointer types (Closed) Base URL: http://git.chromium.org/native_client/pnacl-llvm.git@master
Patch Set: Address Eli's review comments Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: lib/IR/Constants.cpp
diff --git a/lib/IR/Constants.cpp b/lib/IR/Constants.cpp
index 8093a09749fb1d702461cd1de72601a02f52fa0f..027946efd1b9f0d2dbc49b6dd5833febb77c5cca 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()); // @LOCALMOD
else
NewBB = cast<BasicBlock>(To);

Powered by Google App Engine
This is Rietveld 408576698