aboutsummaryrefslogtreecommitdiff
path: root/include/llvm/Assembly
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2010-02-10 20:41:46 +0000
committerDan Gohman <gohman@apple.com>2010-02-10 20:41:46 +0000
commit7a5666e7f3ba5d7825e5d65d601f9679d10a56bb (patch)
treece1cf6aa5fd453e5b98a548ec818f06928662d2f /include/llvm/Assembly
parent7c1dfb9df29f03c218296db51963fe9c37c471d2 (diff)
Add a hook to AssemblyAnnotationWriter to allow custom info comments
to be printed, in place of the familiar "uses=" comments. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95798 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Assembly')
-rw-r--r--include/llvm/Assembly/AsmAnnotationWriter.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/llvm/Assembly/AsmAnnotationWriter.h b/include/llvm/Assembly/AsmAnnotationWriter.h
index 8d7cbc6fac..6d75720164 100644
--- a/include/llvm/Assembly/AsmAnnotationWriter.h
+++ b/include/llvm/Assembly/AsmAnnotationWriter.h
@@ -23,6 +23,7 @@ class Function;
class BasicBlock;
class Instruction;
class raw_ostream;
+class formatted_raw_ostream;
class AssemblyAnnotationWriter {
public:
@@ -46,6 +47,10 @@ public:
/// emitInstructionAnnot - This may be implemented to emit a string right
/// before an instruction is emitted.
virtual void emitInstructionAnnot(const Instruction *I, raw_ostream &OS) {}
+
+ /// printInfoComment - This may be implemented to emit a comment to the
+ /// right of an instruction or global value.
+ virtual void printInfoComment(const Value &V, formatted_raw_ostream &OS) {}
};
} // End llvm namespace