mirror of
https://github.com/RPCSX/llvm.git
synced 2025-02-28 17:06:31 +00:00
Fixing silly "not-implemented" bug in AsmPrinter. This fixes PR1169.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33888 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
54100d7370
commit
13b7d3d499
@ -608,7 +608,8 @@ void AsmPrinter::EmitConstantValueOnly(const Constant *CV) {
|
|||||||
}
|
}
|
||||||
} else if (const ConstantExpr *CE = dyn_cast<ConstantExpr>(CV)) {
|
} else if (const ConstantExpr *CE = dyn_cast<ConstantExpr>(CV)) {
|
||||||
const TargetData *TD = TM.getTargetData();
|
const TargetData *TD = TM.getTargetData();
|
||||||
switch(CE->getOpcode()) {
|
unsigned Opcode = CE->getOpcode();
|
||||||
|
switch (Opcode) {
|
||||||
case Instruction::GetElementPtr: {
|
case Instruction::GetElementPtr: {
|
||||||
// generate a symbolic expression for the byte address
|
// generate a symbolic expression for the byte address
|
||||||
const Constant *ptrVal = CE->getOperand(0);
|
const Constant *ptrVal = CE->getOperand(0);
|
||||||
@ -666,9 +667,10 @@ void AsmPrinter::EmitConstantValueOnly(const Constant *CV) {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case Instruction::Add:
|
case Instruction::Add:
|
||||||
|
case Instruction::Sub:
|
||||||
O << "(";
|
O << "(";
|
||||||
EmitConstantValueOnly(CE->getOperand(0));
|
EmitConstantValueOnly(CE->getOperand(0));
|
||||||
O << ") + (";
|
O << (Opcode==Instruction::Add ? ") + (" : ") - (");
|
||||||
EmitConstantValueOnly(CE->getOperand(1));
|
EmitConstantValueOnly(CE->getOperand(1));
|
||||||
O << ")";
|
O << ")";
|
||||||
break;
|
break;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user