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
class BasicBlock;
class Instruction;
class raw_ostream;
class BasicBlock;
class Instruction;
class raw_ostream;
+class formatted_raw_ostream;
class AssemblyAnnotationWriter {
public:
class AssemblyAnnotationWriter {
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) {}
/// 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
};
} // End llvm namespace
/// which slot it occupies.
///
void AssemblyWriter::printInfoComment(const Value &V) {
/// which slot it occupies.
///
void AssemblyWriter::printInfoComment(const Value &V) {
+ if (AnnotationWriter) {
+ AnnotationWriter->printInfoComment(V, Out);
+ return;
+ }
+
if (V.getType()->isVoidTy()) return;
Out.PadToColumn(50);
if (V.getType()->isVoidTy()) return;
Out.PadToColumn(50);