LLVM API Documentation
#include <AsmWriter.h>
Protected Attributes | |
formatted_raw_ostream & | Out |
const Module * | TheModule |
Definition at line 64 of file AsmWriter.h.
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.
|
virtual |
Definition at line 1224 of file AsmWriter.cpp.
void llvm::AssemblyWriter::printAlias | ( | const GlobalAlias * | GV | ) |
Definition at line 1479 of file AsmWriter.cpp.
References llvm::GlobalAlias::getAliasee(), llvm::GlobalValue::getLinkage(), llvm::GlobalValue::getType(), llvm::GlobalValue::getVisibility(), llvm::Value::hasName(), llvm::GlobalValue::isMaterializable(), Out, llvm::TypePrinting::print(), llvm::PrintLinkage(), PrintLLVMName(), llvm::PrintVisibility(), and writeOperand().
Referenced by printModule().
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 | ) |
printBasicBlock - This member is called for each basic block in a method.
Definition at line 1688 of file AsmWriter.cpp.
References llvm::BasicBlock::begin(), llvm::AssemblyAnnotationWriter::emitBasicBlockEndAnnot(), llvm::AssemblyAnnotationWriter::emitBasicBlockStartAnnot(), llvm::BasicBlock::end(), llvm::Function::getEntryBlock(), llvm::Value::getName(), llvm::BasicBlock::getParent(), llvm::Value::hasName(), I, LabelPrefix, llvm::pred_begin(), llvm::pred_end(), printInstructionLine(), PrintLLVMName(), llvm::Value::use_empty(), and writeOperand().
Referenced by printFunction().
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 | ) |
Definition at line 1442 of file AsmWriter.cpp.
References llvm::PointerType::getAddressSpace(), llvm::GlobalValue::getAlignment(), llvm::SequentialType::getElementType(), llvm::GlobalVariable::getInitializer(), llvm::GlobalValue::getLinkage(), llvm::GlobalValue::getParent(), llvm::GlobalValue::getSection(), llvm::GlobalVariable::getThreadLocalMode(), llvm::GlobalValue::getType(), llvm::GlobalValue::getVisibility(), llvm::GlobalValue::hasExternalLinkage(), llvm::GlobalVariable::hasInitializer(), llvm::GlobalValue::hasSection(), llvm::GlobalValue::hasUnnamedAddr(), llvm::GlobalVariable::isConstant(), llvm::GlobalVariable::isExternallyInitialized(), llvm::GlobalValue::isMaterializable(), Out, llvm::TypePrinting::print(), PrintEscapedString(), llvm::PrintLinkage(), llvm::PrintThreadLocalModel(), llvm::PrintVisibility(), llvm::WriteAsOperandInternal(), and writeOperand().
Referenced by llvm::Value::print(), and printModule().
void llvm::AssemblyWriter::printInstruction | ( | const Instruction & | I | ) |
Definition at line 1750 of file AsmWriter.cpp.
References llvm::CallingConv::C, llvm::SwitchInst::case_begin(), llvm::SwitchInst::case_end(), llvm::AssemblyAnnotationWriter::emitInstructionAnnot(), llvm::SmallVectorBase::empty(), llvm::Instruction::getAllMetadata(), llvm::AttributeSet::getAsString(), llvm::BranchInst::getCondition(), llvm::SwitchInst::getCondition(), llvm::Type::getContext(), llvm::SwitchInst::getDefaultDest(), llvm::SequentialType::getElementType(), llvm::AttributeSet::getFnAttributes(), llvm::LLVMContext::getMDKindNames(), llvm::User::getNumOperands(), llvm::Instruction::getOpcodeName(), llvm::User::getOperand(), llvm::getPredicateText(), llvm::BranchInst::getSuccessor(), llvm::Value::getType(), llvm::AttributeSet::hasAttributes(), llvm::Value::hasName(), isAtomic(), llvm::Type::isVoidTy(), LI, Out, llvm::TypePrinting::print(), PrintCallingConv(), PrintLLVMName(), llvm::SmallVectorTemplateCommon< T >::size(), TheModule, llvm::WriteAsOperandInternal(), writeAtomic(), llvm::writeAtomicRMWOperation(), writeOperand(), llvm::WriteOptimizationInfo(), and writeParamOperand().
Referenced by llvm::Value::print(), and printInstructionLine().
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 | ) |
Definition at line 2106 of file AsmWriter.cpp.
References TheModule, llvm::WriteMDNodeBodyInternal(), and llvm::WriteMDNodeComment().
Referenced by llvm::Value::print(), and writeMDNode().
void llvm::AssemblyWriter::printModule | ( | const Module * | M | ) |
Definition at line 1276 of file AsmWriter.cpp.
References llvm::Module::alias_begin(), llvm::Module::alias_empty(), llvm::Module::alias_end(), llvm::HexStyle::Asm, llvm::Module::begin(), llvm::Module::end(), llvm::Module::getDataLayout(), llvm::Module::getModuleIdentifier(), llvm::Module::getModuleInlineAsm(), llvm::Module::getTargetTriple(), llvm::Module::global_begin(), llvm::Module::global_empty(), llvm::Module::global_end(), I, llvm::Module::named_metadata_begin(), llvm::Module::named_metadata_empty(), llvm::Module::named_metadata_end(), printAlias(), PrintEscapedString(), printFunction(), printGlobal(), printNamedMDNode(), printTypeIdentities(), writeAllAttributeGroups(), and writeAllMDNodes().
Referenced by llvm::Module::print().
void llvm::AssemblyWriter::printNamedMDNode | ( | const NamedMDNode * | NMD | ) |
Definition at line 1353 of file AsmWriter.cpp.
References llvm::CallingConv::C, llvm::StringRef::empty(), llvm::NamedMDNode::getName(), llvm::NamedMDNode::getNumOperands(), llvm::NamedMDNode::getOperand(), llvm::hexdigit(), and llvm::StringRef::size().
Referenced by llvm::NamedMDNode::print(), and printModule().
void llvm::AssemblyWriter::printTypeIdentities | ( | ) |
Definition at line 1509 of file AsmWriter.cpp.
References llvm::TypeFinder::empty(), I, LocalPrefix, llvm::TypePrinting::NamedTypes, llvm::TypePrinting::NumberedTypes, PrintLLVMName(), llvm::TypePrinting::printStructBody(), and llvm::TypeFinder::size().
Referenced by printModule().
void llvm::AssemblyWriter::writeAllAttributeGroups | ( | ) |
Definition at line 2112 of file AsmWriter.cpp.
Referenced by printModule().
void llvm::AssemblyWriter::writeAllMDNodes | ( | ) |
Definition at line 2094 of file AsmWriter.cpp.
References I, llvm::SmallVectorImpl< T >::resize(), llvm::SmallVectorTemplateCommon< T >::size(), and writeMDNode().
Referenced by printModule().
void llvm::AssemblyWriter::writeAtomic | ( | AtomicOrdering | Ordering, |
SynchronizationScope | SynchScope | ||
) |
Definition at line 1238 of file AsmWriter.cpp.
References llvm::Acquire, llvm::AcquireRelease, llvm::CrossThread, llvm::Monotonic, llvm::NotAtomic, llvm::Release, llvm::SequentiallyConsistent, llvm::SingleThread, and llvm::Unordered.
Referenced by printInstruction().
Definition at line 2089 of file AsmWriter.cpp.
References printMDNodeBody().
Referenced by writeAllMDNodes().
Definition at line 1226 of file AsmWriter.cpp.
References llvm::Value::getType(), Out, llvm::TypePrinting::print(), TheModule, and llvm::WriteAsOperandInternal().
Referenced by printAlias(), printBasicBlock(), printFunction(), printGlobal(), and printInstruction().
void llvm::AssemblyWriter::writeParamOperand | ( | const Value * | Operand, |
AttributeSet | Attrs, | ||
unsigned | Idx | ||
) |
Definition at line 1259 of file AsmWriter.cpp.
References llvm::AttributeSet::getAsString(), llvm::Value::getType(), llvm::AttributeSet::hasAttributes(), Out, llvm::TypePrinting::print(), TheModule, and llvm::WriteAsOperandInternal().
Referenced by printInstruction().
|
protected |
Definition at line 66 of file AsmWriter.h.
Referenced by printAlias(), printArgument(), printFunction(), printGlobal(), printInstruction(), writeOperand(), and writeParamOperand().
|
protected |
Definition at line 67 of file AsmWriter.h.
Referenced by printInstruction(), printMDNodeBody(), writeOperand(), and writeParamOperand().