From 0b5bdceabfeaf67c91e5ccfed0320a82781f555c Mon Sep 17 00:00:00 2001 From: Francis Visoiu Mistrih Date: Fri, 15 Dec 2017 16:33:45 +0000 Subject: [CodeGen] Print stack object references as %(fixed-)stack.0 in both MIR and debug output Work towards the unification of MIR and debug output by printing `%stack.0` instead of ``, and `%fixed-stack.0` instead of `` (supposing there are 4 fixed stack objects). Only debug syntax is affected. Differential Revision: https://reviews.llvm.org/D41027 llvm-svn: 320827 --- llvm/lib/CodeGen/MIRPrinter.cpp | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'llvm/lib/CodeGen/MIRPrinter.cpp') diff --git a/llvm/lib/CodeGen/MIRPrinter.cpp b/llvm/lib/CodeGen/MIRPrinter.cpp index 8cc9ad28c2a..7c4e098b564 100644 --- a/llvm/lib/CodeGen/MIRPrinter.cpp +++ b/llvm/lib/CodeGen/MIRPrinter.cpp @@ -758,13 +758,8 @@ void MIPrinter::printStackObjectReference(int FrameIndex) { assert(ObjectInfo != StackObjectOperandMapping.end() && "Invalid frame index"); const FrameIndexOperand &Operand = ObjectInfo->second; - if (Operand.IsFixed) { - OS << "%fixed-stack." << Operand.ID; - return; - } - OS << "%stack." << Operand.ID; - if (!Operand.Name.empty()) - OS << '.' << Operand.Name; + MachineOperand::printStackObjectReference(OS, Operand.ID, Operand.IsFixed, + Operand.Name); } void MIPrinter::printOffset(int64_t Offset) { -- cgit v1.2.3