LLVM API Documentation
#include <AsmPrinter.h>
Inheritance diagram for llvm::AsmPrinter:
Protected Member Functions | |
AsmPrinter (std::ostream &o, TargetMachine &tm) | |
bool | doInitialization (Module &M) |
bool | doFinalization (Module &M) |
void | setupMachineFunction (MachineFunction &MF) |
void | emitAlignment (unsigned NumBits) const |
void | emitZeros (unsigned NumZeros) const |
void | emitConstantValueOnly (const Constant *CV) |
void | emitGlobalConstant (const Constant *CV) |
Protected Attributes | |
std::ostream & | O |
TargetMachine & | TM |
Mangler * | Mang |
std::string | CurrentFnName |
const char * | CommentString |
const char * | GlobalPrefix |
const char * | ZeroDirective |
const char * | AsciiDirective |
const char * | Data8bitsDirective |
const char * | Data16bitsDirective |
const char * | Data32bitsDirective |
const char * | Data64bitsDirective |
const char * | AlignDirective |
bool | AlignmentIsInBytes |
Definition at line 25 of file AsmPrinter.h.
|
Definition at line 85 of file AsmPrinter.h. |
|
doFinalization - Shut down the asmprinter. If you override this in your pass, you must make sure to call it explicitly. Reimplemented from llvm::FunctionPass. Definition at line 26 of file AsmPrinter.cpp. References Mang. |
|
doInitialization - Set up the AsmPrinter when we are working on a new module. If your pass overrides this, it must make sure to explicitly call this implementation. Reimplemented from llvm::FunctionPass. Definition at line 21 of file AsmPrinter.cpp. References GlobalPrefix, and Mang. |
|
emitAlignment - Emit an alignment directive to the specified power of two boundary. For example, if you pass in 3 here, you will get an 8 byte alignment. Definition at line 37 of file AsmPrinter.cpp. References AlignDirective, AlignmentIsInBytes, and O. |
|
emitConstantValueOnly - Print out the specified constant, without a storage class. Only constants of first-class type are allowed here. Definition at line 57 of file AsmPrinter.cpp. References Add(), llvm::Instruction::Cast, llvm::TargetData::getIndexedOffset(), llvm::TargetMachine::getTargetData(), llvm::Value::getType(), llvm::TargetData::getTypeSize(), llvm::Mangler::getValueName(), llvm::Type::IntTy, llvm::Constant::isNullValue(), llvm::Type::LongTy, Mang, O, TM, llvm::ConstantBool::True, llvm::Type::UIntTy, and llvm::Type::ULongTy. Referenced by emitGlobalConstant(). |
|
|
emitZeros - Emit a block of zeros. Definition at line 44 of file AsmPrinter.cpp. References Data8bitsDirective, O, and ZeroDirective. Referenced by emitGlobalConstant(). |
|
setupMachineFunction - This should be called when a new MachineFunction is being processed from runOnMachineFunction. Definition at line 31 of file AsmPrinter.cpp. References CurrentFnName, llvm::MachineFunction::getFunction(), llvm::Mangler::getValueName(), and Mang. |
|
AlignDirective - The directive used to emit round up to an alignment boundary. Definition at line 77 of file AsmPrinter.h. Referenced by emitAlignment(). |
|
AlignmentIsInBytes - If this is true (the default) then the asmprinter emits ".align N" directives, where N is the number of bytes to align to. Otherwise, it emits ".align log2(N)", e.g. 3 to align to an 8 byte boundary. Definition at line 83 of file AsmPrinter.h. Referenced by emitAlignment(). |
|
AsciiDirective - This directive allows emission of an ascii string with the standard C escape characters embedded into it. Definition at line 64 of file AsmPrinter.h. Referenced by emitGlobalConstant(). |
|
CommentString - This indicates the comment character used by the assembler. Definition at line 50 of file AsmPrinter.h. Referenced by emitGlobalConstant(). |
|
Cache of mangled name for current function. This is recalculated at the beginning of each call to runOnMachineFunction(). Definition at line 42 of file AsmPrinter.h. Referenced by setupMachineFunction(). |
|
Definition at line 70 of file AsmPrinter.h. Referenced by emitGlobalConstant(). |
|
Definition at line 71 of file AsmPrinter.h. Referenced by emitGlobalConstant(). |
|
Definition at line 72 of file AsmPrinter.h. Referenced by emitGlobalConstant(). |
|
DataDirectives - These directives are used to output some unit of integer data to the current section. If a data directive is set to null, smaller data directives will be used to emit the large sizes. Definition at line 69 of file AsmPrinter.h. Referenced by emitGlobalConstant(), and emitZeros(). |
|
GlobalPrefix - If this is set to a non-empty string, it is prepended onto all global symbols. This is often used for "_" or ".". Definition at line 54 of file AsmPrinter.h. Referenced by doInitialization(). |
|
Name-mangler for global names. Definition at line 37 of file AsmPrinter.h. Referenced by doFinalization(), doInitialization(), emitConstantValueOnly(), and setupMachineFunction(). |
|
Output stream on which we're printing assembly code. Definition at line 29 of file AsmPrinter.h. Referenced by emitAlignment(), emitConstantValueOnly(), emitGlobalConstant(), and emitZeros(). |
|
Target machine description. Definition at line 33 of file AsmPrinter.h. Referenced by emitConstantValueOnly(), and emitGlobalConstant(). |
|
ZeroDirective - this should be set to the directive used to get some number of zero bytes emitted to the current section. Common cases are "\t.zero\t" and "\t.space\t". If this is set to null, the Data*bitsDirective's will be used to emit zero bytes. Definition at line 60 of file AsmPrinter.h. Referenced by emitZeros(). |