From 014700c1a8cba203fd21ff129426ba8a426ab244 Mon Sep 17 00:00:00 2001 From: David Greene Date: Mon, 13 Jul 2009 20:25:48 +0000 Subject: 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 --- lib/CodeGen/AsmPrinter/AsmPrinter.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'lib/CodeGen') 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 +} -- cgit v1.1