LLVM API Documentation

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Protected Attributes | List of all members
llvm::AssemblyWriter Class Reference

#include <AsmWriter.h>

Collaboration diagram for llvm::AssemblyWriter:
Collaboration graph
[legend]

Public Member Functions

 AssemblyWriter (formatted_raw_ostream &o, SlotTracker &Mac, const Module *M, AssemblyAnnotationWriter *AAW)
 Construct an AssemblyWriter with an external SlotTracker. More...
 
 AssemblyWriter (formatted_raw_ostream &o, const Module *M, AssemblyAnnotationWriter *AAW)
 Construct an AssemblyWriter with an internally allocated SlotTracker. More...
 
virtual ~AssemblyWriter ()
 
void printMDNodeBody (const MDNode *MD)
 
void printNamedMDNode (const NamedMDNode *NMD)
 
void printModule (const Module *M)
 
void writeOperand (const Value *Op, bool PrintType)
 
void writeParamOperand (const Value *Operand, AttributeSet Attrs, unsigned Idx)
 
void writeAtomic (AtomicOrdering Ordering, SynchronizationScope SynchScope)
 
void writeAllMDNodes ()
 
void writeMDNode (unsigned Slot, const MDNode *Node)
 
void writeAllAttributeGroups ()
 
void printTypeIdentities ()
 
void printGlobal (const GlobalVariable *GV)
 
void printAlias (const GlobalAlias *GV)
 
void printFunction (const Function *F)
 
void printArgument (const Argument *FA, AttributeSet Attrs, unsigned Idx)
 
void printBasicBlock (const BasicBlock *BB)
 
void printInstructionLine (const Instruction &I)
 printInstructionLine - Print an instruction and a newline character. More...
 
void printInstruction (const Instruction &I)
 

Protected Attributes

formatted_raw_ostreamOut
 
const ModuleTheModule
 

Detailed Description

Definition at line 64 of file AsmWriter.h.

Constructor & Destructor Documentation

llvm::AssemblyWriter::AssemblyWriter ( formatted_raw_ostream o,
SlotTracker Mac,
const Module M,
AssemblyAnnotationWriter AAW 
)

Construct an AssemblyWriter with an external SlotTracker.

Definition at line 1210 of file AsmWriter.cpp.

llvm::AssemblyWriter::AssemblyWriter ( formatted_raw_ostream o,
const Module M,
AssemblyAnnotationWriter AAW 
)

Construct an AssemblyWriter with an internally allocated SlotTracker.

Definition at line 1217 of file AsmWriter.cpp.

llvm::AssemblyWriter::~AssemblyWriter ( )
virtual

Definition at line 1224 of file AsmWriter.cpp.

Member Function Documentation

void llvm::AssemblyWriter::printAlias ( const GlobalAlias GV)
void llvm::AssemblyWriter::printArgument ( const Argument Arg,
AttributeSet  Attrs,
unsigned  Idx 
)

printArgument - This member is called for every argument that is passed into the function. Simply print it out

Definition at line 1670 of file AsmWriter.cpp.

References llvm::AttributeSet::getAsString(), llvm::Value::getType(), llvm::AttributeSet::hasAttributes(), llvm::Value::hasName(), Out, llvm::TypePrinting::print(), and PrintLLVMName().

Referenced by printFunction().

void llvm::AssemblyWriter::printBasicBlock ( const BasicBlock BB)
void llvm::AssemblyWriter::printFunction ( const Function F)

printFunction - Print all aspects of a function.

Definition at line 1549 of file AsmWriter.cpp.

References llvm::Function::arg_begin(), llvm::Function::arg_end(), llvm::AttributeSet::begin(), llvm::Function::begin(), llvm::CallingConv::C, llvm::AssemblyAnnotationWriter::emitFunctionAnnot(), llvm::AttributeSet::end(), llvm::Function::end(), llvm::GlobalValue::getAlignment(), llvm::Attribute::getAsString(), llvm::AttributeSet::getAsString(), llvm::Function::getAttributes(), llvm::Function::getCallingConv(), llvm::AttributeSet::getFnAttributes(), llvm::Function::getFunctionType(), llvm::Function::getGC(), llvm::GlobalValue::getLinkage(), llvm::FunctionType::getNumParams(), llvm::AttributeSet::getNumSlots(), llvm::FunctionType::getParamType(), llvm::GlobalValue::getParent(), llvm::Function::getPrefixData(), llvm::Function::getReturnType(), llvm::GlobalValue::getSection(), llvm::AttributeSet::getSlotIndex(), llvm::GlobalValue::getVisibility(), llvm::AttributeSet::hasAttributes(), llvm::Function::hasGC(), llvm::Function::hasPrefixData(), llvm::GlobalValue::hasSection(), llvm::GlobalValue::hasUnnamedAddr(), I, llvm::GlobalValue::isDeclaration(), llvm::GlobalValue::isMaterializable(), llvm::Attribute::isStringAttribute(), llvm::FunctionType::isVarArg(), Out, llvm::TypePrinting::print(), printArgument(), printBasicBlock(), PrintCallingConv(), PrintEscapedString(), llvm::PrintLinkage(), llvm::PrintVisibility(), llvm::WriteAsOperandInternal(), and writeOperand().

Referenced by printModule().

void llvm::AssemblyWriter::printGlobal ( const GlobalVariable GV)
void llvm::AssemblyWriter::printInstruction ( const Instruction I)
void llvm::AssemblyWriter::printInstructionLine ( const Instruction I)

printInstructionLine - Print an instruction and a newline character.

Definition at line 1736 of file AsmWriter.cpp.

References printInstruction().

Referenced by printBasicBlock().

void llvm::AssemblyWriter::printMDNodeBody ( const MDNode MD)
void llvm::AssemblyWriter::printModule ( const Module M)
void llvm::AssemblyWriter::printNamedMDNode ( const NamedMDNode NMD)
void llvm::AssemblyWriter::printTypeIdentities ( )
void llvm::AssemblyWriter::writeAllAttributeGroups ( )

Definition at line 2112 of file AsmWriter.cpp.

References for(), and I.

Referenced by printModule().

void llvm::AssemblyWriter::writeAllMDNodes ( )
void llvm::AssemblyWriter::writeAtomic ( AtomicOrdering  Ordering,
SynchronizationScope  SynchScope 
)
void llvm::AssemblyWriter::writeMDNode ( unsigned  Slot,
const MDNode Node 
)

Definition at line 2089 of file AsmWriter.cpp.

References printMDNodeBody().

Referenced by writeAllMDNodes().

void llvm::AssemblyWriter::writeOperand ( const Value Op,
bool  PrintType 
)
void llvm::AssemblyWriter::writeParamOperand ( const Value Operand,
AttributeSet  Attrs,
unsigned  Idx 
)

Member Data Documentation

formatted_raw_ostream& llvm::AssemblyWriter::Out
protected
const Module* llvm::AssemblyWriter::TheModule
protected

Definition at line 67 of file AsmWriter.h.

Referenced by printInstruction(), printMDNodeBody(), writeOperand(), and writeParamOperand().


The documentation for this class was generated from the following files: