37 assert(!Name.
empty() &&
"getNameWithPrefix requires non-empty name");
41 if (Name[0] ==
'\1') {
48 else if (PrefixTy == LinkerPrivate)
93 unsigned ArgWords = 0;
96 Type *Ty = AI->getType();
98 if (AI->hasByValOrInAllocaAttr())
99 Ty = cast<PointerType>(Ty)->getElementType();
105 OS <<
'@' << ArgWords;
109 bool CannotUsePrivateLabel)
const {
112 if (CannotUsePrivateLabel)
113 PrefixTy = LinkerPrivate;
122 unsigned &
ID = AnonGlobalIDs[GV];
124 ID = NextAnonGlobalID++;
171 bool CannotUsePrivateLabel)
const {
A parsed version of the target data layout string in and methods for querying it. ...
unsigned getNumParams() const
getNumParams - Return the number of fixed parameters this function type requires. ...
static void addByteCountSuffix(raw_ostream &OS, const Function *F, const DataLayout &DL)
Microsoft fastcall and stdcall functions require a suffix on their name indicating the number of word...
const char * getPrivateGlobalPrefix() const
StringRef substr(size_t Start, size_t N=npos) const
Return a reference to the substring from [Start, Start + N).
A raw_ostream that writes to an SmallVector or SmallString.
char getGlobalPrefix() const
CallingConv::ID getCallingConv() const
getCallingConv()/setCallingConv(CC) - These method get and set the calling convention of this functio...
StringRef getName() const
Return a constant reference to the value's name.
bool hasMicrosoftFastStdCallMangling() const
Twine - A lightweight data structure for efficiently representing the concatenation of temporary valu...
bool hasPrivateLinkage() const
FunctionType - Class to represent function types.
bool hasStructRetAttr() const
Determine if the function returns a structure through first pointer argument.
The instances of the Type class are immutable: once they are created, they are never changed...
X86_StdCall - stdcall is the calling conventions mostly used by the Win32 API.
bool startswith(StringRef Prefix) const
Check if this string starts with the given Prefix.
uint64_t getTypeAllocSize(Type *Ty) const
Returns the offset in bytes between successive objects of the specified type, including alignment pad...
StringRef toStringRef(SmallVectorImpl< char > &Out) const
This returns the twine as a single StringRef if it can be represented as such.
Module.h This file contains the declarations for the Module class.
const char * getLinkerPrivateGlobalPrefix() const
X86_FastCall - 'fast' analog of X86_StdCall.
LLVM_ATTRIBUTE_UNUSED_RESULT std::enable_if< !is_simple_type< Y >::value, typename cast_retty< X, const Y >::ret_type >::type dyn_cast(const Y &Val)
static bool hasByteCountSuffix(CallingConv::ID CC)
uint64_t RoundUpToAlignment(uint64_t Value, uint64_t Align)
Returns the next integer (mod 2**64) that is greater than or equal to Value and is a multiple of Alig...
static void getNameWithPrefixImpl(raw_ostream &OS, const Twine &GVName, ManglerPrefixTy PrefixTy, const DataLayout &DL, char Prefix)
const DataLayout & getDataLayout() const
Get the data layout for the module's target platform.
void getNameWithPrefix(raw_ostream &OS, const GlobalValue *GV, bool CannotUsePrivateLabel) const
Print the appropriate prefix and the specified global variable's name.
MSVC calling convention that passes vectors and vector aggregates in SSE registers.
FunctionType * getFunctionType() const
Module * getParent()
Get the module that this global value is contained inside of...
This class implements an extremely fast bulk output stream that can only output to a stream...
C - The default llvm calling convention, compatible with C.
StringRef - Represent a constant reference to a string, i.e.
unsigned getPointerSize(unsigned AS=0) const
Layout pointer size FIXME: The defaults need to be removed once all of the backends/clients are updat...
bool empty() const
empty - Check if the string is empty.