aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/CodeGen/AsmPrinter.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/CodeGen/AsmPrinter.cpp b/lib/CodeGen/AsmPrinter.cpp
index 498339c014..a9e94a01f7 100644
--- a/lib/CodeGen/AsmPrinter.cpp
+++ b/lib/CodeGen/AsmPrinter.cpp
@@ -450,7 +450,7 @@ void AsmPrinter::EmitConstantValueOnly(const Constant *CV) {
if (opcode == Instruction::IntToPtr)
Op = ConstantExpr::getIntegerCast(Op, IntPtrTy, false /*ZExt*/);
else
- Op = ConstantExpr::getCast(Instruction::PtrToInt, Op, IntPtrTy);
+ Op = ConstantExpr::getPtrToInt(Op, IntPtrTy);
return EmitConstantValueOnly(Op);
}