diff options
| author | Chris Lattner <sabre@nondot.org> | 2002-08-15 19:37:43 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2002-08-15 19:37:43 +0000 |
| commit | 83b396b830973e254d7a66a6b6f19200fd5c6413 (patch) | |
| tree | 42dc48e6899992dc41481fdcdc1f9ae16c72e18e /llvm/lib | |
| parent | d8ecff793a34fb08f7c7171cc0f0408e374f2724 (diff) | |
| download | bcm5719-llvm-83b396b830973e254d7a66a6b6f19200fd5c6413.tar.gz bcm5719-llvm-83b396b830973e254d7a66a6b6f19200fd5c6413.zip | |
Write constexpr casts using the cast X to Y notation, not using the implicit
type result
llvm-svn: 3354
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/VMCore/AsmWriter.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/llvm/lib/VMCore/AsmWriter.cpp b/llvm/lib/VMCore/AsmWriter.cpp index aeca6f7e21e..465890858ff 100644 --- a/llvm/lib/VMCore/AsmWriter.cpp +++ b/llvm/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>"; } |

