37 assert(!Name.
empty() &&
"getNameWithPrefix requires non-empty name");
41 if (Name[0] ==
'\1') {
46 if (PrefixTy == Private)
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 = AnonGlobalIDs.size();
171 bool CannotUsePrivateLabel)
const {
A parsed version of the target data layout string in and methods for querying it. ...
StringRef getPrivateGlobalPrefix() const
StringRef getLinkerPrivateGlobalPrefix() const
unsigned getNumParams() const
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...
A raw_ostream that writes to an SmallVector or SmallString.
uint64_t alignTo(uint64_t Value, uint64_t Align, uint64_t Skew=0)
Returns the next integer (mod 2**64) that is greater than or equal to Value and is a multiple of Alig...
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
Class to represent function types.
LLVM_NODISCARD LLVM_ATTRIBUTE_ALWAYS_INLINE bool startswith(StringRef Prefix) const
Check if this string starts with the given Prefix.
bool hasStructRetAttr() const
Determine if the function returns a structure through first pointer argument.
X86_FastCall - 'fast' analog of X86_StdCall.
The instances of the Type class are immutable: once they are created, they are never changed...
C - The default llvm calling convention, compatible with C.
X86_StdCall - stdcall is the calling conventions mostly used by the Win32 API.
LLVM_NODISCARD LLVM_ATTRIBUTE_ALWAYS_INLINE StringRef substr(size_t Start, size_t N=npos) const
Return a reference to the substring from [Start, Start + N).
MSVC calling convention that passes vectors and vector aggregates in SSE registers.
Iterator for intrusive lists based on ilist_node.
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.
LLVM_NODISCARD LLVM_ATTRIBUTE_ALWAYS_INLINE bool empty() const
empty - Check if the string is empty.
static bool hasByteCountSuffix(CallingConv::ID CC)
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.
FunctionType * getFunctionType() const
Returns the FunctionType for me.
LLVM_NODISCARD std::enable_if<!is_simple_type< Y >::value, typename cast_retty< X, const Y >::ret_type >::type dyn_cast(const Y &Val)
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
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...
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...