LLVM API Documentation
#include "llvm/Assembly/Writer.h"#include "llvm/Assembly/PrintModulePass.h"#include "llvm/Assembly/AsmAnnotationWriter.h"#include "llvm/CallingConv.h"#include "llvm/Constants.h"#include "llvm/DerivedTypes.h"#include "llvm/InlineAsm.h"#include "llvm/Instruction.h"#include "llvm/Instructions.h"#include "llvm/Operator.h"#include "llvm/Metadata.h"#include "llvm/Module.h"#include "llvm/ValueSymbolTable.h"#include "llvm/TypeSymbolTable.h"#include "llvm/ADT/DenseSet.h"#include "llvm/ADT/StringExtras.h"#include "llvm/ADT/STLExtras.h"#include "llvm/Support/CFG.h"#include "llvm/Support/ErrorHandling.h"#include "llvm/Support/MathExtras.h"#include "llvm/Support/FormattedStream.h"#include <algorithm>#include <cctype>#include <map>
Go to the source code of this file.
| #define ST_DEBUG | ( | X | ) |
Definition at line 586 of file AsmWriter.cpp.
| enum PrefixType |
Definition at line 80 of file AsmWriter.cpp.
| static void AddModuleTypesToPrinter | ( | TypePrinting & | TP, | |
| std::vector< const Type * > & | NumberedTypes, | |||
| const Module * | M | |||
| ) | [static] |
AddModuleTypesToPrinter - Add all of the symbolic type names for types in the specified module to the TypePrinter and all numbered types to it and the NumberedTypes table.
Definition at line 402 of file AsmWriter.cpp.
References llvm::TypePrinting::addTypeName(), llvm::TypeSymbolTable::begin(), E, llvm::TypeSymbolTable::end(), llvm::raw_ostream::flush(), llvm::SequentialType::getElementType(), llvm::Module::getTypeSymbolTable(), llvm::Type::isInteger(), llvm::Type::isPrimitiveType(), LocalPrefix, and PrintLLVMName().
Referenced by llvm::WriteAsOperand(), and llvm::WriteTypeSymbolic().
| static SlotTracker* createSlotTracker | ( | const Value * | V | ) | [static] |
Definition at line 561 of file AsmWriter.cpp.
References BB, llvm::GlobalValue::getParent(), llvm::MachineBasicBlock::getParent(), and GV.
Definition at line 50 of file AsmWriter.cpp.
References BB, llvm::GlobalValue::getParent(), llvm::MachineBasicBlock::getParent(), GV, and M.
Referenced by llvm::WriteAsOperand().
| static const char* getPredicateText | ( | unsigned | predicate | ) | [static] |
Definition at line 138 of file AsmWriter.cpp.
Referenced by llvm::TypePrinting::addTypeName(), llvm::TypePrinting::clear(), llvm::TypePrinting::hasTypeName(), and llvm::TypePrinting::~TypePrinting().
| static void PrintEscapedString | ( | const StringRef & | Name, | |
| raw_ostream & | Out | |||
| ) | [static] |
Definition at line 69 of file AsmWriter.cpp.
References llvm::CallingConv::C, llvm::hexdigit(), and llvm::StringRef::size().
| static void PrintLinkage | ( | GlobalValue::LinkageTypes | LT, | |
| formatted_raw_ostream & | Out | |||
| ) | [static] |
| static void PrintLLVMName | ( | raw_ostream & | OS, | |
| const Value * | V | |||
| ) | [static] |
PrintLLVMName - Turn the specified name into an 'LLVM name', which is either prefixed with % (if the string only contains simple characters) or is surrounded with ""'s (if it has special chars in it). Print it out.
Definition at line 129 of file AsmWriter.cpp.
References llvm::Value::getName(), GlobalPrefix, LocalPrefix, and PrintLLVMName().
| static void PrintLLVMName | ( | raw_ostream & | OS, | |
| const StringRef & | Name, | |||
| PrefixType | Prefix | |||
| ) | [static] |
PrintLLVMName - Turn the specified name into an 'LLVM name', which is either prefixed with % (if the string only contains simple characters) or is surrounded with ""'s (if it has special chars in it). Print it out.
Definition at line 90 of file AsmWriter.cpp.
References llvm::CallingConv::C, llvm::StringRef::data(), GlobalPrefix, LabelPrefix, llvm_unreachable, LocalPrefix, NoPrefix, PrintEscapedString(), and llvm::StringRef::size().
Referenced by AddModuleTypesToPrinter(), and PrintLLVMName().
| static void PrintVisibility | ( | GlobalValue::VisibilityTypes | Vis, | |
| formatted_raw_ostream & | Out | |||
| ) | [static] |
| static void WriteAsOperandInternal | ( | raw_ostream & | Out, | |
| const Value * | V, | |||
| TypePrinting * | TypePrinter, | |||
| SlotTracker * | Machine | |||
| ) | [static] |
WriteAsOperand - Write the name of the specified value out to the specified ostream. This can be useful when you just want to print int reg126, not the whole instruction that generated it.
Definition at line 1152 of file AsmWriter.cpp.
Referenced by llvm::WriteAsOperand(), WriteConstantInt(), and WriteMDNodes().
| static void WriteConstantInt | ( | raw_ostream & | Out, | |
| const Constant * | CV, | |||
| TypePrinting & | TypePrinter, | |||
| SlotTracker * | Machine | |||
| ) | [static] |
Definition at line 911 of file AsmWriter.cpp.
References llvm::APFloat::bitcastToAPInt(), CA, llvm::APFloat::convert(), CP, llvm::ftostr(), llvm::APInt::getBitWidth(), llvm::Value::getContext(), llvm::User::getNumOperands(), llvm::MDNode::getNumOperands(), llvm::Constant::getOperand(), llvm::APInt::getRawData(), llvm::Value::getType(), llvm::APInt::getZExtValue(), llvm_unreachable, llvm::TypePrinting::print(), PrintEscapedString(), llvm::utohex_buffer(), Val, and WriteAsOperandInternal().
Referenced by llvm::Value::print().
| static void WriteMDNodes | ( | formatted_raw_ostream & | Out, | |
| TypePrinting & | TypePrinter, | |||
| SlotTracker & | Machine | |||
| ) | [static] |
Definition at line 862 of file AsmWriter.cpp.
References E, llvm::MDNode::elem_begin(), llvm::MDNode::elem_end(), NE, Node, Nodes, llvm::TypePrinting::print(), llvm::SmallVectorImpl< T >::resize(), llvm::SmallVectorImpl< T >::size(), and WriteAsOperandInternal().
Referenced by llvm::Value::print().
| static void WriteOptimizationInfo | ( | raw_ostream & | Out, | |
| const User * | U | |||
| ) | [static] |
Definition at line 895 of file AsmWriter.cpp.
Definition at line 1262 of file AsmWriter.cpp.
fMap - The TypePlanes map for the function level data.
Definition at line 487 of file AsmWriter.cpp.
Definition at line 488 of file AsmWriter.cpp.
Definition at line 474 of file AsmWriter.cpp.
| SlotTracker& Machine |
Definition at line 1259 of file AsmWriter.cpp.
Definition at line 492 of file AsmWriter.cpp.
Definition at line 1266 of file AsmWriter.cpp.
Definition at line 1267 of file AsmWriter.cpp.
Definition at line 484 of file AsmWriter.cpp.
| std::vector<const Type*> NumberedTypes |
Definition at line 310 of file AsmWriter.cpp.
Referenced by llvm::WriteAsOperand(), and llvm::WriteTypeSymbolic().
Definition at line 1258 of file AsmWriter.cpp.
| const Function* TheFunction |
TheFunction - The function for which we are holding slot numbers.
Definition at line 473 of file AsmWriter.cpp.
TheMDNode - The MDNode for which we are holding slot numbers.
Definition at line 477 of file AsmWriter.cpp.
TheModule - The module for which we are holding slot numbers.
Definition at line 470 of file AsmWriter.cpp.
| const NamedMDNode* TheNamedMDNode |
TheNamedMDNode - The MDNode for which we are holding slot numbers.
Definition at line 480 of file AsmWriter.cpp.
Definition at line 309 of file AsmWriter.cpp.
Definition at line 1261 of file AsmWriter.cpp.
| DenseSet<const Value*> VisitedConstants |
Definition at line 306 of file AsmWriter.cpp.
| DenseSet<const Type*> VisitedTypes |