diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/CodeGen/AsmPrinter.cpp | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/lib/CodeGen/AsmPrinter.cpp b/lib/CodeGen/AsmPrinter.cpp index ce89337..1b4a575 100644 --- a/lib/CodeGen/AsmPrinter.cpp +++ b/lib/CodeGen/AsmPrinter.cpp @@ -773,9 +773,32 @@ void AsmPrinter::EmitConstantValueOnly(const Constant *CV) { } case Instruction::Add: case Instruction::Sub: + case Instruction::And: + case Instruction::Or: + case Instruction::Xor: O << "("; EmitConstantValueOnly(CE->getOperand(0)); - O << (Opcode==Instruction::Add ? ") + (" : ") - ("); + O << ")"; + switch (Opcode) { + case Instruction::Add: + O << " + "; + break; + case Instruction::Sub: + O << " - "; + break; + case Instruction::And: + O << " & "; + break; + case Instruction::Or: + O << " | "; + break; + case Instruction::Xor: + O << " ^ "; + break; + default: + break; + } + O << "("; EmitConstantValueOnly(CE->getOperand(1)); O << ")"; break; |