llvm.org GIT mirror llvm / 1dbb387
lets get crazy and name the header file the exact class name, not a scrunched version of it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112904 91177308-0d34-0410-b5e6-96231b3b80d8 Chris Lattner 10 years ago
4 changed file(s) with 65 addition(s) and 65 deletion(s). Raw diff Collapse all Expand all
+0
-63
include/llvm/Assembly/AsmAnnotationWriter.h less more
None //===-- AsmAnnotationWriter.h - Itf for annotation .ll files - --*- C++ -*-===//
1 //
2 // The LLVM Compiler Infrastructure
3 //
4 // This file is distributed under the University of Illinois Open Source
5 // License. See LICENSE.TXT for details.
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // Clients of the assembly writer can use this interface to add their own
10 // special-purpose annotations to LLVM assembly language printouts. Note that
11 // the assembly parser won't be able to parse these, in general, so
12 // implementations are advised to print stuff as LLVM comments.
13 //
14 //===----------------------------------------------------------------------===//
15
16 #ifndef LLVM_ASSEMBLY_ASMANNOTATIONWRITER_H
17 #define LLVM_ASSEMBLY_ASMANNOTATIONWRITER_H
18
19 namespace llvm {
20
21 class Function;
22 class BasicBlock;
23 class Instruction;
24 class raw_ostream;
25 class formatted_raw_ostream;
26
27 class AssemblyAnnotationWriter {
28 public:
29
30 virtual ~AssemblyAnnotationWriter();
31
32 /// emitFunctionAnnot - This may be implemented to emit a string right before
33 /// the start of a function.
34 virtual void emitFunctionAnnot(const Function *F,
35 formatted_raw_ostream &OS) {}
36
37 /// emitBasicBlockStartAnnot - This may be implemented to emit a string right
38 /// after the basic block label, but before the first instruction in the
39 /// block.
40 virtual void emitBasicBlockStartAnnot(const BasicBlock *BB,
41 formatted_raw_ostream &OS){
42 }
43
44 /// emitBasicBlockEndAnnot - This may be implemented to emit a string right
45 /// after the basic block.
46 virtual void emitBasicBlockEndAnnot(const BasicBlock *BB,
47 formatted_raw_ostream &OS){
48 }
49
50 /// emitInstructionAnnot - This may be implemented to emit a string right
51 /// before an instruction is emitted.
52 virtual void emitInstructionAnnot(const Instruction *I,
53 formatted_raw_ostream &OS) {}
54
55 /// printInfoComment - This may be implemented to emit a comment to the
56 /// right of an instruction or global value.
57 virtual void printInfoComment(const Value &V, formatted_raw_ostream &OS) {}
58 };
59
60 } // End llvm namespace
61
62 #endif
0 //===-- AssemblyAnnotationWriter.h - Annotation .ll files -------*- C++ -*-===//
1 //
2 // The LLVM Compiler Infrastructure
3 //
4 // This file is distributed under the University of Illinois Open Source
5 // License. See LICENSE.TXT for details.
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // Clients of the assembly writer can use this interface to add their own
10 // special-purpose annotations to LLVM assembly language printouts. Note that
11 // the assembly parser won't be able to parse these, in general, so
12 // implementations are advised to print stuff as LLVM comments.
13 //
14 //===----------------------------------------------------------------------===//
15
16 #ifndef LLVM_ASSEMBLY_ASMANNOTATIONWRITER_H
17 #define LLVM_ASSEMBLY_ASMANNOTATIONWRITER_H
18
19 namespace llvm {
20
21 class Function;
22 class BasicBlock;
23 class Instruction;
24 class raw_ostream;
25 class formatted_raw_ostream;
26
27 class AssemblyAnnotationWriter {
28 public:
29
30 virtual ~AssemblyAnnotationWriter();
31
32 /// emitFunctionAnnot - This may be implemented to emit a string right before
33 /// the start of a function.
34 virtual void emitFunctionAnnot(const Function *F,
35 formatted_raw_ostream &OS) {}
36
37 /// emitBasicBlockStartAnnot - This may be implemented to emit a string right
38 /// after the basic block label, but before the first instruction in the
39 /// block.
40 virtual void emitBasicBlockStartAnnot(const BasicBlock *BB,
41 formatted_raw_ostream &OS) {
42 }
43
44 /// emitBasicBlockEndAnnot - This may be implemented to emit a string right
45 /// after the basic block.
46 virtual void emitBasicBlockEndAnnot(const BasicBlock *BB,
47 formatted_raw_ostream &OS) {
48 }
49
50 /// emitInstructionAnnot - This may be implemented to emit a string right
51 /// before an instruction is emitted.
52 virtual void emitInstructionAnnot(const Instruction *I,
53 formatted_raw_ostream &OS) {}
54
55 /// printInfoComment - This may be implemented to emit a comment to the
56 /// right of an instruction or global value.
57 virtual void printInfoComment(const Value &V, formatted_raw_ostream &OS) {}
58 };
59
60 } // End llvm namespace
61
62 #endif
1515
1616 #include "llvm/Assembly/Writer.h"
1717 #include "llvm/Assembly/PrintModulePass.h"
18 #include "llvm/Assembly/AsmAnnotationWriter.h"
18 #include "llvm/Assembly/AssemblyAnnotationWriter.h"
1919 #include "llvm/LLVMContext.h"
2020 #include "llvm/CallingConv.h"
2121 #include "llvm/Constants.h"
1616 #include "llvm/LLVMContext.h"
1717 #include "llvm/Module.h"
1818 #include "llvm/PassManager.h"
19 #include "llvm/Assembly/AsmAnnotationWriter.h"
19 #include "llvm/Assembly/AssemblyAnnotationWriter.h"
2020 #include "llvm/Analysis/ProfileInfo.h"
2121 #include "llvm/Analysis/ProfileInfoLoader.h"
2222 #include "llvm/Analysis/Passes.h"