38 assert(!Name.
empty() &&
"getNameWithPrefix requires non-empty name");
42 if (Name[0] ==
'\1') {
47 if (PrefixTy == Private)
49 else if (PrefixTy == LinkerPrivate)
94 unsigned ArgWords = 0;
97 Type *Ty = AI->getType();
99 if (AI->hasByValOrInAllocaAttr())
100 Ty = cast<PointerType>(Ty)->getElementType();
106 OS <<
'@' << ArgWords;
110 bool CannotUsePrivateLabel)
const {
113 if (CannotUsePrivateLabel)
114 PrefixTy = LinkerPrivate;
123 unsigned &
ID = AnonGlobalIDs[GV];
125 ID = AnonGlobalIDs.size();
172 bool CannotUsePrivateLabel)
const {
193 OS << Flag.substr(1);
A parsed version of the target data layout string in and methods for querying it. ...
StringRef getPrivateGlobalPrefix() const
This class represents an incoming formal argument to a Function.
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...
Type * getValueType() const
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 hasDLLExportStorageClass() const
bool hasMicrosoftFastStdCallMangling() const
Twine - A lightweight data structure for efficiently representing the concatenation of temporary valu...
MSVC calling convention that passes vectors and vector aggregates in SSE registers.
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 or second pointer argument.
Flag
These should be considered private to the implementation of the MCInstrDesc class.
bool isWindowsGNUEnvironment() const
The instances of the Type class are immutable: once they are created, they are never changed...
FunctionType * getFunctionType() const
Returns the FunctionType for me.
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).
void emitLinkerFlagsForGlobalCOFF(raw_ostream &OS, const GlobalValue *GV, const Triple &TT, Mangler &Mangler)
X86_FastCall - 'fast' analog of X86_StdCall.
Triple - Helper class for working with autoconf configuration names.
bool isFunctionTy() const
True if this is an instance of FunctionType.
X86_StdCall - stdcall is the calling conventions mostly used by the Win32 API.
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.
C - The default llvm calling convention, compatible with C.
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.
bool isDeclaration() const
Return true if the primary definition of this global value is outside of the current translation unit...
void getNameWithPrefix(raw_ostream &OS, const GlobalValue *GV, bool CannotUsePrivateLabel) const
Print the appropriate prefix and the specified global variable's name.
bool isWindowsCygwinEnvironment() const
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())
A raw_ostream that writes to an std::string.
Module * getParent()
Get the module that this global value is contained inside of...
bool isKnownWindowsMSVCEnvironment() const
Checks if the environment is MSVC.
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...