[llvm] r245523 - Fix test failure introduced by r245521.

Alex Lorenz via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 19 16:56:37 PDT 2015


Author: arphaman
Date: Wed Aug 19 18:56:37 2015
New Revision: 245523

URL: http://llvm.org/viewvc/llvm-project?rev=245523&view=rev
Log:
Fix test failure introduced by r245521.

Machine memory operands can contain pointer values that are constants, and
the 'getLocalSlot' method requires non-constant values.

The constant pointer values will have to be serialized in a different patch.

Modified:
    llvm/trunk/lib/CodeGen/MIRPrinter.cpp

Modified: llvm/trunk/lib/CodeGen/MIRPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MIRPrinter.cpp?rev=245523&r1=245522&r2=245523&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/MIRPrinter.cpp (original)
+++ llvm/trunk/lib/CodeGen/MIRPrinter.cpp Wed Aug 19 18:56:37 2015
@@ -614,6 +614,12 @@ void MIPrinter::printIRValueReference(co
     printLLVMNameWithoutPrefix(OS, V.getName());
     return;
   }
+  if (isa<Constant>(V)) {
+    // Machine memory operands can load/store to/from constant value pointers.
+    // TODO: Serialize the constant values.
+    OS << "<unserializable ir value>";
+    return;
+  }
   printIRSlotNumber(OS, MST.getLocalSlot(&V));
 }
 




More information about the llvm-commits mailing list