Write constexpr casts using the cast X to Y notation, not using the implicit
type result
llvm-svn: 3354
diff --git a/llvm/lib/VMCore/AsmWriter.cpp b/llvm/lib/VMCore/AsmWriter.cpp
index aeca6f7..4658908 100644
--- a/llvm/lib/VMCore/AsmWriter.cpp
+++ b/llvm/lib/VMCore/AsmWriter.cpp
@@ -337,7 +337,7 @@
Out << CE->getOpcodeName();
bool isGEP = CE->getOpcode() == Instruction::GetElementPtr;
- Out << (isGEP? " (" : " ");
+ Out << (isGEP ? " (" : " ");
for (User::const_op_iterator OI=CE->op_begin(); OI != CE->op_end(); ++OI) {
printTypeInt(Out, (*OI)->getType(), TypeTable);
@@ -348,6 +348,11 @@
if (isGEP)
Out << ")";
+ else if (CE->getOpcode() == Instruction::Cast) {
+ Out << " to ";
+ printTypeInt(Out, CE->getType(), TypeTable);
+ }
+
} else {
Out << "<placeholder or erroneous Constant>";
}