From 81a3a8ea7914ffc25c112189a10a967116e8c0d1 Mon Sep 17 00:00:00 2001 From: Alex Lorenz Date: Wed, 19 Aug 2015 23:56:37 +0000 Subject: [PATCH] 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@245523 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/MIRPrinter.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/CodeGen/MIRPrinter.cpp b/lib/CodeGen/MIRPrinter.cpp index e9ecba404b6..2440a4103d8 100644 --- a/lib/CodeGen/MIRPrinter.cpp +++ b/lib/CodeGen/MIRPrinter.cpp @@ -614,6 +614,12 @@ void MIPrinter::printIRValueReference(const Value &V) { printLLVMNameWithoutPrefix(OS, V.getName()); return; } + if (isa(V)) { + // Machine memory operands can load/store to/from constant value pointers. + // TODO: Serialize the constant values. + OS << ""; + return; + } printIRSlotNumber(OS, MST.getLocalSlot(&V)); } -- 2.34.1