diff options
Diffstat (limited to 'CodeGen')
-rw-r--r-- | CodeGen/CGExprScalar.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/CodeGen/CGExprScalar.cpp b/CodeGen/CGExprScalar.cpp index dd3c2ed7f0..62b223f0ee 100644 --- a/CodeGen/CGExprScalar.cpp +++ b/CodeGen/CGExprScalar.cpp @@ -334,7 +334,7 @@ Value *ScalarExprEmitter::EmitScalarConversion(Value *Src, QualType SrcType, if (isa<PointerType>(SrcType)) { // Must be an ptr to int cast. assert(isa<llvm::IntegerType>(DstTy) && "not ptr->int?"); - return Builder.CreateIntToPtr(Src, DstTy, "conv"); + return Builder.CreatePtrToInt(Src, DstTy, "conv"); } // Finally, we have the arithmetic types: real int/float. |