37 assert(!Name.
empty() &&
"getNameWithPrefix requires non-empty name");
41 if (Name[0] ==
'\1') {
49 if (PrefixTy == Private)
51 else if (PrefixTy == LinkerPrivate)
96 unsigned ArgWords = 0;
99 Type *Ty = AI->getType();
101 if (AI->hasByValOrInAllocaAttr())
102 Ty = cast<PointerType>(Ty)->getElementType();
108 OS <<
'@' << ArgWords;
112 bool CannotUsePrivateLabel)
const {
115 if (CannotUsePrivateLabel)
116 PrefixTy = LinkerPrivate;
125 unsigned &
ID = AnonGlobalIDs[GV];
127 ID = AnonGlobalIDs.size();
179 bool CannotUsePrivateLabel)
const {
200 OS << Flag.substr(1);
MSVC calling convention that passes vectors and vector aggregates in SSE registers.
A parsed version of the target data layout string in and methods for querying it. ...
bool hasDLLExportStorageClass() const
This class represents an incoming formal argument to a Function.
bool hasPrivateLinkage() const
This class represents lattice values for constants.
StringRef getPrivateGlobalPrefix() const
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...
amdgpu Simplify well known AMD library false FunctionCallee Value const Twine & Name
LLVM_NODISCARD bool startswith(StringRef Prefix) const
Check if this string starts with the given Prefix.
StringRef toStringRef(SmallVectorImpl< char > &Out) const
This returns the twine as a single StringRef if it can be represented as such.
A raw_ostream that writes to an SmallVector or SmallString.
C - The default llvm calling convention, compatible with C.
char getGlobalPrefix() const
bool isWindowsCygwinEnvironment() const
StringRef getLinkerPrivateGlobalPrefix() const
bool hasStructRetAttr() const
Determine if the function returns a structure through first or second pointer argument.
const DataLayout & getDataLayout() const
Get the data layout for the module's target platform.
Twine - A lightweight data structure for efficiently representing the concatenation of temporary valu...
LLVM_NODISCARD StringRef substr(size_t Start, size_t N=npos) const
Return a reference to the substring from [Start, Start + N).
LLVM_NODISCARD bool empty() const
empty - Check if the string is empty.
Class to represent function types.
bool isWindowsGNUEnvironment() const
Flag
These should be considered private to the implementation of the MCInstrDesc class.
The instances of the Type class are immutable: once they are created, they are never changed...
unsigned getPointerSize(unsigned AS=0) const
Layout pointer size FIXME: The defaults need to be removed once all of the backends/clients are updat...
TypeSize getTypeAllocSize(Type *Ty) const
Returns the offset in bytes between successive objects of the specified type, including alignment pad...
unsigned getNumParams() const
Return the number of fixed parameters this function type requires.
void emitLinkerFlagsForGlobalCOFF(raw_ostream &OS, const GlobalValue *GV, const Triple &TT, Mangler &Mangler)
Triple - Helper class for working with autoconf configuration names.
CallingConv::ID getCallingConv() const
getCallingConv()/setCallingConv(CC) - These method get and set the calling convention of this functio...
Module.h This file contains the declarations for the Module class.
X86_StdCall - stdcall is the calling conventions mostly used by the Win32 API.
bool hasMicrosoftFastStdCallMangling() const
FunctionType * getFunctionType() const
Returns the FunctionType for me.
X86_FastCall - 'fast' analog of X86_StdCall.
static bool hasByteCountSuffix(CallingConv::ID CC)
static void getNameWithPrefixImpl(raw_ostream &OS, const Twine &GVName, ManglerPrefixTy PrefixTy, const DataLayout &DL, char Prefix)
uint64_t alignTo(uint64_t Size, Align A)
Returns a multiple of A needed to store Size bytes.
bool isFunctionTy() const
True if this is an instance of FunctionType.
StringRef getName() const
Return a constant reference to the value's name.
LLVM_NODISCARD std::enable_if<!is_simple_type< Y >::value, typename cast_retty< X, const Y >::ret_type >::type dyn_cast(const Y &Val)
Type * getValueType() const
void emitLinkerFlagsForUsedCOFF(raw_ostream &OS, const GlobalValue *GV, const Triple &T, Mangler &M)
bool isDeclaration() const
Return true if the primary definition of this global value is outside of the current translation unit...
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
A raw_ostream that writes to an std::string.
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...
void getNameWithPrefix(raw_ostream &OS, const GlobalValue *GV, bool CannotUsePrivateLabel) const
Print the appropriate prefix and the specified global variable's name.
StringRef - Represent a constant reference to a string, i.e.
bool isWindowsMSVCEnvironment() const
Checks if the environment could be MSVC.
bool doNotMangleLeadingQuestionMark() const
Returns true if symbols with leading question marks should not receive IR mangling.