aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2002-08-15 19:37:43 +0000
committerChris Lattner <sabre@nondot.org>2002-08-15 19:37:43 +0000
commit95586b8c833aeca112907e69f545a6ea6e2103ff (patch)
tree93d451a4e540373408970dd9022fa46a184a147c /lib
parentec1b8a07961bfae1e0d569f57cd8b55d91d01efc (diff)
Write constexpr casts using the cast X to Y notation, not using the implicit
type result git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3354 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/VMCore/AsmWriter.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/VMCore/AsmWriter.cpp b/lib/VMCore/AsmWriter.cpp
index aeca6f7e21..465890858f 100644
--- a/lib/VMCore/AsmWriter.cpp
+++ b/lib/VMCore/AsmWriter.cpp
@@ -337,7 +337,7 @@ static void WriteConstantInt(ostream &Out, const Constant *CV, bool PrintName,
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 @@ static void WriteConstantInt(ostream &Out, const Constant *CV, bool PrintName,
if (isGEP)
Out << ")";
+ else if (CE->getOpcode() == Instruction::Cast) {
+ Out << " to ";
+ printTypeInt(Out, CE->getType(), TypeTable);
+ }
+
} else {
Out << "<placeholder or erroneous Constant>";
}