38 assert(!Name.
empty() &&
"getNameWithPrefix requires non-empty name");
42 if (Name[0] ==
'\1') {
50 if (PrefixTy == Private)
52 else if (PrefixTy == LinkerPrivate)
97 unsigned ArgWords = 0;
100 Type *Ty = AI->getType();
102 if (AI->hasByValOrInAllocaAttr())
103 Ty = cast<PointerType>(Ty)->getElementType();
109 OS <<
'@' << ArgWords;
113 bool CannotUsePrivateLabel)
const {
116 if (CannotUsePrivateLabel)
117 PrefixTy = LinkerPrivate;
126 unsigned &
ID = AnonGlobalIDs[GV];
128 ID = AnonGlobalIDs.size();
180 bool CannotUsePrivateLabel)
const {
201 OS << Flag.substr(1);
A parsed version of the target data layout string in and methods for querying it. ...
bool hasDLLExportStorageClass() const
C - The default llvm calling convention, compatible with C.
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...
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.
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
bool isWindowsCygwinEnvironment() const
StringRef getLinkerPrivateGlobalPrefix() const
bool hasStructRetAttr() const
Determine if the function returns a structure through first or second pointer argument.
amdgpu Simplify well known AMD library false Value Value const Twine & Name
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...
bool isKnownWindowsMSVCEnvironment() const
Checks if the environment is MSVC.
LLVM_NODISCARD LLVM_ATTRIBUTE_ALWAYS_INLINE bool startswith(StringRef Prefix) const
Check if this string starts with the given Prefix.
Class to represent function types.
LLVM_NODISCARD LLVM_ATTRIBUTE_ALWAYS_INLINE bool empty() const
empty - Check if the string is empty.
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).
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...
MSVC calling convention that passes vectors and vector aggregates in SSE registers.
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.
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 getTypeAllocSize(Type *Ty) const
Returns the offset in bytes between successive objects of the specified type, including alignment pad...
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())
X86_StdCall - stdcall is the calling conventions mostly used by the Win32 API.
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 doNotMangleLeadingQuestionMark() const
Returns true if symbols with leading question marks should not receive IR mangling.