LLVM API Documentation
#include <AsmWriter.h>
Definition at line 66 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 1391 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 1398 of file AsmWriter.cpp.
llvm::AssemblyWriter::~AssemblyWriter | ( | ) | [virtual] |
Definition at line 1405 of file AsmWriter.cpp.
void llvm::AssemblyWriter::printAlias | ( | const GlobalAlias * | GV | ) |
Definition at line 1717 of file AsmWriter.cpp.
References llvm::GlobalAlias::getAliasee(), llvm::GlobalValue::getDLLStorageClass(), llvm::GlobalValue::getLinkage(), llvm::GlobalValue::getThreadLocalMode(), llvm::GlobalValue::getType(), llvm::GlobalValue::getVisibility(), llvm::Value::hasName(), llvm::GlobalValue::hasUnnamedAddr(), llvm::GlobalValue::isMaterializable(), Out, llvm::TypePrinting::print(), llvm::PrintDLLStorageClass(), llvm::PrintLinkage(), PrintLLVMName(), llvm::PrintThreadLocalModel(), 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 1923 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 1941 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::printComdat | ( | const Comdat * | C | ) |
Definition at line 1750 of file AsmWriter.cpp.
References llvm::Comdat::print().
Referenced by printModule().
void llvm::AssemblyWriter::printFunction | ( | const Function * | F | ) |
printFunction - Print all aspects of a function.
Definition at line 1794 of file AsmWriter.cpp.
References llvm::Function::arg_begin(), llvm::Function::arg_end(), llvm::AttributeSet::begin(), llvm::Function::begin(), llvm::CallingConv::C, ComdatPrefix, llvm::AssemblyAnnotationWriter::emitFunctionAnnot(), llvm::AttributeSet::end(), llvm::Function::end(), llvm::AttributeSet::FunctionIndex, llvm::GlobalObject::getAlignment(), llvm::Attribute::getAsString(), llvm::AttributeSet::getAsString(), llvm::Function::getAttributes(), llvm::Function::getCallingConv(), llvm::GlobalObject::getComdat(), llvm::GlobalValue::getDLLStorageClass(), llvm::AttributeSet::getFnAttributes(), llvm::Function::getFunctionType(), llvm::Function::getGC(), llvm::GlobalValue::getLinkage(), llvm::Comdat::getName(), llvm::FunctionType::getNumParams(), llvm::AttributeSet::getNumSlots(), llvm::FunctionType::getParamType(), llvm::GlobalValue::getParent(), llvm::Function::getPrefixData(), llvm::Function::getReturnType(), llvm::GlobalObject::getSection(), llvm::AttributeSet::getSlotIndex(), llvm::GlobalValue::getVisibility(), llvm::AttributeSet::hasAttributes(), llvm::GlobalObject::hasComdat(), llvm::Function::hasGC(), llvm::Function::hasPrefixData(), llvm::GlobalObject::hasSection(), llvm::GlobalValue::hasUnnamedAddr(), I, llvm::GlobalValue::isDeclaration(), llvm::GlobalValue::isMaterializable(), llvm::Attribute::isStringAttribute(), llvm::FunctionType::isVarArg(), Out, llvm::TypePrinting::print(), printArgument(), printBasicBlock(), PrintCallingConv(), llvm::PrintDLLStorageClass(), PrintEscapedString(), llvm::PrintLinkage(), PrintLLVMName(), printUseLists(), llvm::PrintVisibility(), llvm::AttributeSet::ReturnIndex, llvm::WriteAsOperandInternal(), and writeOperand().
Referenced by printModule().
void llvm::AssemblyWriter::printGlobal | ( | const GlobalVariable * | GV | ) |
Definition at line 1674 of file AsmWriter.cpp.
References ComdatPrefix, llvm::PointerType::getAddressSpace(), llvm::GlobalObject::getAlignment(), llvm::GlobalObject::getComdat(), llvm::GlobalValue::getDLLStorageClass(), llvm::SequentialType::getElementType(), llvm::GlobalVariable::getInitializer(), llvm::GlobalValue::getLinkage(), llvm::Comdat::getName(), llvm::GlobalValue::getParent(), llvm::GlobalObject::getSection(), llvm::GlobalValue::getThreadLocalMode(), llvm::GlobalValue::getType(), llvm::GlobalValue::getVisibility(), llvm::GlobalObject::hasComdat(), llvm::GlobalValue::hasExternalLinkage(), llvm::GlobalVariable::hasInitializer(), llvm::GlobalObject::hasSection(), llvm::GlobalValue::hasUnnamedAddr(), llvm::GlobalVariable::isConstant(), llvm::GlobalVariable::isExternallyInitialized(), llvm::GlobalValue::isMaterializable(), Out, llvm::TypePrinting::print(), llvm::PrintDLLStorageClass(), PrintEscapedString(), llvm::PrintLinkage(), PrintLLVMName(), 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 2003 of file AsmWriter.cpp.
References llvm::CallingConv::C, llvm::SwitchInst::case_begin(), llvm::SwitchInst::case_end(), llvm::AssemblyAnnotationWriter::emitInstructionAnnot(), llvm::SmallVectorBase::empty(), llvm::AttributeSet::FunctionIndex, 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::AttributeSet::ReturnIndex, llvm::SmallVectorTemplateCommon< T >::size(), llvm::WriteAsOperandInternal(), writeAtomic(), writeAtomicCmpXchg(), llvm::writeAtomicRMWOperation(), writeOperand(), llvm::WriteOptimizationInfo(), and writeParamOperand().
Referenced by llvm::Value::print(), and printInstructionLine().
printInstructionLine - Print an instruction and a newline character.
Definition at line 1989 of file AsmWriter.cpp.
References printInstruction().
Referenced by printBasicBlock().
void llvm::AssemblyWriter::printMDNodeBody | ( | const MDNode * | MD | ) |
Definition at line 2377 of file AsmWriter.cpp.
References llvm::WriteMDNodeBodyInternal(), and llvm::WriteMDNodeComment().
Referenced by llvm::Value::print(), and writeMDNode().
void llvm::AssemblyWriter::printModule | ( | const Module * | M | ) |
Definition at line 1488 of file AsmWriter.cpp.
References llvm::Module::alias_begin(), llvm::Module::alias_empty(), llvm::Module::alias_end(), llvm::HexStyle::Asm, llvm::Module::begin(), llvm::CallingConv::C, llvm::SetVector< T, Vector, Set >::empty(), llvm::Module::end(), llvm::Module::getDataLayoutStr(), 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(), predictUseListOrder(), printAlias(), printComdat(), PrintEscapedString(), printFunction(), printGlobal(), printNamedMDNode(), printTypeIdentities(), printUseLists(), llvm::shouldPreserveAssemblyUseListOrder(), writeAllAttributeGroups(), and writeAllMDNodes().
Referenced by llvm::Module::print().
void llvm::AssemblyWriter::printNamedMDNode | ( | const NamedMDNode * | NMD | ) |
Definition at line 1582 of file AsmWriter.cpp.
References llvm::CallingConv::C, llvm::StringRef::empty(), llvm::NamedMDNode::getName(), llvm::NamedMDNode::getNumOperands(), llvm::NamedMDNode::getOperand(), llvm::hexdigit(), Name, and llvm::StringRef::size().
Referenced by llvm::NamedMDNode::print(), and printModule().
Definition at line 1754 of file AsmWriter.cpp.
References llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT >::begin(), llvm::TypeFinder::empty(), llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT >::empty(), llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT >::end(), I, LocalPrefix, llvm::TypePrinting::NamedTypes, llvm::TypePrinting::NumberedTypes, PrintLLVMName(), llvm::TypePrinting::printStructBody(), llvm::TypeFinder::size(), and llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT >::size().
Referenced by printModule().
void AssemblyWriter::printUseListOrder | ( | const UseListOrder & | Order | ) |
Definition at line 2399 of file AsmWriter.cpp.
References I, llvm::UseListOrder::Shuffle, llvm::UseListOrder::V, and writeOperand().
Referenced by printUseLists().
void AssemblyWriter::printUseLists | ( | const Function * | F | ) |
Definition at line 2424 of file AsmWriter.cpp.
References F(), and printUseListOrder().
Referenced by printFunction(), and printModule().
Definition at line 2383 of file AsmWriter.cpp.
References llvm::AttributeSet::FunctionIndex, and I.
Referenced by printModule().
Definition at line 2365 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 1419 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().
void llvm::AssemblyWriter::writeAtomicCmpXchg | ( | AtomicOrdering | SuccessOrdering, |
AtomicOrdering | FailureOrdering, | ||
SynchronizationScope | SynchScope | ||
) |
Definition at line 1440 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().
void llvm::AssemblyWriter::writeMDNode | ( | unsigned | Slot, |
const MDNode * | Node | ||
) |
Definition at line 2360 of file AsmWriter.cpp.
References printMDNodeBody().
Referenced by writeAllMDNodes().
void llvm::AssemblyWriter::writeOperand | ( | const Value * | Op, |
bool | PrintType | ||
) |
Definition at line 1407 of file AsmWriter.cpp.
References llvm::Value::getType(), Out, llvm::TypePrinting::print(), and llvm::WriteAsOperandInternal().
Referenced by printAlias(), printBasicBlock(), printFunction(), printGlobal(), printInstruction(), and printUseListOrder().
void llvm::AssemblyWriter::writeParamOperand | ( | const Value * | Operand, |
AttributeSet | Attrs, | ||
unsigned | Idx | ||
) |
Definition at line 1471 of file AsmWriter.cpp.
References llvm::AttributeSet::getAsString(), llvm::Value::getType(), llvm::AttributeSet::hasAttributes(), Out, llvm::TypePrinting::print(), and llvm::WriteAsOperandInternal().
Referenced by printInstruction().
formatted_raw_ostream& llvm::AssemblyWriter::Out [protected] |
Definition at line 68 of file AsmWriter.h.
Referenced by printAlias(), printArgument(), printFunction(), printGlobal(), printInstruction(), writeOperand(), and writeParamOperand().
const Module* llvm::AssemblyWriter::TheModule [protected] |
Definition at line 69 of file AsmWriter.h.