diff options
author | David Greene <greened@obbligato.org> | 2009-07-13 20:25:48 +0000 |
---|---|---|
committer | David Greene <greened@obbligato.org> | 2009-07-13 20:25:48 +0000 |
commit | 014700c1a8cba203fd21ff129426ba8a426ab244 (patch) | |
tree | 0459af1b54ae0b03b14896eb77b53801d40d4997 /lib/CodeGen | |
parent | b8ac841c9a275cc8d4e1a92dd06cc99323e35fa2 (diff) | |
download | external_llvm-014700c1a8cba203fd21ff129426ba8a426ab244.zip external_llvm-014700c1a8cba203fd21ff129426ba8a426ab244.tar.gz external_llvm-014700c1a8cba203fd21ff129426ba8a426ab244.tar.bz2 |
Add infrastructure to allow post instruction printing action triggers.
We'll eventually use this to print comments in asm files and do other
fun things.
This adds interfaces to the AsmPrinter and changes TableGen to invoke
the postInstructionAction when appropriate. It also add parameters to
TargetAsmInfo to control comment layout.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75490 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen')
-rw-r--r-- | lib/CodeGen/AsmPrinter/AsmPrinter.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/lib/CodeGen/AsmPrinter/AsmPrinter.cpp index ea27490..c1cb97c 100644 --- a/lib/CodeGen/AsmPrinter/AsmPrinter.cpp +++ b/lib/CodeGen/AsmPrinter/AsmPrinter.cpp @@ -24,6 +24,7 @@ #include "llvm/Analysis/DebugInfo.h" #include "llvm/Support/CommandLine.h" #include "llvm/Support/ErrorHandling.h" +#include "llvm/Support/FormattedStream.h" #include "llvm/Support/Mangler.h" #include "llvm/Support/raw_ostream.h" #include "llvm/Target/TargetAsmInfo.h" @@ -1748,3 +1749,15 @@ GCMetadataPrinter *AsmPrinter::GetOrCreateGCPrinter(GCStrategy *S) { cerr << "no GCMetadataPrinter registered for GC: " << Name << "\n"; llvm_unreachable(); } + +/// EmitComments - Pretty-print comments for instructions +void AsmPrinter::EmitComments(const MachineInstr &MI) const +{ + // No comments in MachineInstr yet +} + +/// EmitComments - Pretty-print comments for instructions +void AsmPrinter::EmitComments(const MCInst &MI) const +{ + // No comments in MCInst yet +} |