LLVM API Documentation

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Namespaces | Macros | Enumerations | Functions
AsmWriter.cpp File Reference
#include "AsmWriter.h"
#include "llvm/Assembly/Writer.h"
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/SmallString.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/Assembly/AssemblyAnnotationWriter.h"
#include "llvm/Assembly/PrintModulePass.h"
#include "llvm/DebugInfo.h"
#include "llvm/IR/CallingConv.h"
#include "llvm/IR/Constants.h"
#include "llvm/IR/DerivedTypes.h"
#include "llvm/IR/InlineAsm.h"
#include "llvm/IR/IntrinsicInst.h"
#include "llvm/IR/LLVMContext.h"
#include "llvm/IR/Module.h"
#include "llvm/IR/Operator.h"
#include "llvm/IR/TypeFinder.h"
#include "llvm/IR/ValueSymbolTable.h"
#include "llvm/Support/CFG.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/Dwarf.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/FormattedStream.h"
#include "llvm/Support/MathExtras.h"
#include <algorithm>
#include <cctype>
Include dependency graph for AsmWriter.cpp:

Go to the source code of this file.

Classes

class  llvm::SlotTracker
 

Namespaces

 llvm
 List of target independent CodeGen pass IDs.
 

Macros

#define ST_DEBUG(X)
 

Enumerations

enum  PrefixType { GlobalPrefix, LabelPrefix, LocalPrefix, NoPrefix }
 

Functions

static const ModulegetModuleFromVal (const Value *V)
 
static void PrintCallingConv (unsigned cc, raw_ostream &Out)
 
static void PrintEscapedString (StringRef Name, raw_ostream &Out)
 
static void PrintLLVMName (raw_ostream &OS, StringRef Name, PrefixType Prefix)
 
static void PrintLLVMName (raw_ostream &OS, const Value *V)
 
SlotTrackerllvm::createSlotTracker (const Module *M)
 Create a new SlotTracker for a Module. More...
 
static SlotTrackerllvm::createSlotTracker (const Value *V)
 
static void llvm::WriteAsOperandInternal (raw_ostream &Out, const Value *V, TypePrinting *TypePrinter, SlotTracker *Machine, const Module *Context)
 
static const char * llvm::getPredicateText (unsigned predicate)
 
static void llvm::writeAtomicRMWOperation (raw_ostream &Out, AtomicRMWInst::BinOp Op)
 
static void llvm::WriteOptimizationInfo (raw_ostream &Out, const User *U)
 
static void llvm::WriteConstantInternal (raw_ostream &Out, const Constant *CV, TypePrinting &TypePrinter, SlotTracker *Machine, const Module *Context)
 
static void llvm::WriteMDNodeBodyInternal (raw_ostream &Out, const MDNode *Node, TypePrinting *TypePrinter, SlotTracker *Machine, const Module *Context)
 
void llvm::WriteAsOperand (raw_ostream &, const Value *, bool PrintTy=true, const Module *Context=0)
 
static void llvm::PrintLinkage (GlobalValue::LinkageTypes LT, formatted_raw_ostream &Out)
 
static void llvm::PrintVisibility (GlobalValue::VisibilityTypes Vis, formatted_raw_ostream &Out)
 
static void llvm::PrintThreadLocalModel (GlobalVariable::ThreadLocalMode TLM, formatted_raw_ostream &Out)
 
static void llvm::WriteMDNodeComment (const MDNode *Node, formatted_raw_ostream &Out)
 

Macro Definition Documentation

#define ST_DEBUG (   X)

Definition at line 433 of file AsmWriter.cpp.

Referenced by llvm::SlotTracker::purgeFunction().

Enumeration Type Documentation

enum PrefixType
Enumerator
GlobalPrefix 
LabelPrefix 
LocalPrefix 
NoPrefix 

Definition at line 106 of file AsmWriter.cpp.

Function Documentation

static const Module* getModuleFromVal ( const Value V)
static

Definition at line 55 of file AsmWriter.cpp.

References llvm::GlobalValue::getParent(), and I.

Referenced by llvm::Value::print(), and llvm::WriteAsOperand().

static void PrintCallingConv ( unsigned  cc,
raw_ostream Out 
)
static
static void PrintEscapedString ( StringRef  Name,
raw_ostream Out 
)
static
static void PrintLLVMName ( raw_ostream OS,
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 116 of file AsmWriter.cpp.

References llvm::CallingConv::C, llvm::StringRef::empty(), GlobalPrefix, llvm::LibFunc::isdigit, LabelPrefix, LocalPrefix, NoPrefix, PrintEscapedString(), and llvm::StringRef::size().

Referenced by llvm::TypePrinting::print(), llvm::AssemblyWriter::printAlias(), llvm::AssemblyWriter::printArgument(), llvm::AssemblyWriter::printBasicBlock(), llvm::AssemblyWriter::printInstruction(), PrintLLVMName(), and llvm::AssemblyWriter::printTypeIdentities().

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 158 of file AsmWriter.cpp.

References llvm::Value::getName(), GlobalPrefix, LocalPrefix, and PrintLLVMName().