aboutsummaryrefslogtreecommitdiff
path: root/CodeGen
diff options
context:
space:
mode:
Diffstat (limited to 'CodeGen')
-rw-r--r--CodeGen/CGExpr.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/CodeGen/CGExpr.cpp b/CodeGen/CGExpr.cpp
index 51ad770dca..ff55e96086 100644
--- a/CodeGen/CGExpr.cpp
+++ b/CodeGen/CGExpr.cpp
@@ -97,7 +97,7 @@ RValue CodeGenFunction::EmitConversion(RValue Val, QualType ValTy,
if (isa<llvm::PointerType>(Val.getVal()->getType()))
return RValue::get(Builder.CreateBitCast(Val.getVal(), DestTy, "conv"));
assert(ValTy->isIntegerType() && "Not ptr->ptr or int->ptr conversion?");
- return RValue::get(Builder.CreatePtrToInt(Val.getVal(), DestTy, "conv"));
+ return RValue::get(Builder.CreateIntToPtr(Val.getVal(), DestTy, "conv"));
}
if (isa<PointerType>(ValTy)) {