diff options
| author | Quentin Colombet <qcolombet@apple.com> | 2016-03-08 00:38:01 +0000 |
|---|---|---|
| committer | Quentin Colombet <qcolombet@apple.com> | 2016-03-08 00:38:01 +0000 |
| commit | d655483944a00f0dec07113a0ff8605a7806dc26 (patch) | |
| tree | 93135f42e98498f85d751500f4eb32dc768dbb5d /llvm/lib/CodeGen | |
| parent | dafed5d7d82613ca153c1bee70addb17d6d20c3a (diff) | |
| download | bcm5719-llvm-d655483944a00f0dec07113a0ff8605a7806dc26.tar.gz bcm5719-llvm-d655483944a00f0dec07113a0ff8605a7806dc26.zip | |
[MIR] Teach the printer how to print complex types for generic machine instructions.
Before this change, we would get the type definition in the middle
of the instruction.
E.g., %0(48) = G_ADD %struct_alias = type { i32, i16 } %edi, %edi
Now, we have just the expected type name:
%0(48) = G_ADD %struct_alias %edi, %edi
llvm-svn: 262885
Diffstat (limited to 'llvm/lib/CodeGen')
| -rw-r--r-- | llvm/lib/CodeGen/MIRPrinter.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/MIRPrinter.cpp b/llvm/lib/CodeGen/MIRPrinter.cpp index 6c3c63f919a..58036016a1e 100644 --- a/llvm/lib/CodeGen/MIRPrinter.cpp +++ b/llvm/lib/CodeGen/MIRPrinter.cpp @@ -554,7 +554,8 @@ void MIPrinter::print(const MachineInstr &MI) { OS << TII->getName(MI.getOpcode()); if (isPreISelGenericOpcode(MI.getOpcode())) { assert(MI.getType() && "Generic instructions must have a type"); - OS << ' ' << *MI.getType(); + OS << ' '; + MI.getType()->print(OS, /*IsForDebug*/ false, /*NoDetails*/ true); } if (I < E) OS << ' '; |

