31 bool UseGlobalPrefix) {
34 assert(!Name.
empty() &&
"getNameWithPrefix requires non-empty name");
39 if (Name[0] ==
'\1') {
43 const char *
Prefix = MAI->getPrivateGlobalPrefix();
46 const char *
Prefix = MAI->getLinkerPrivateGlobalPrefix();
50 if (UseGlobalPrefix) {
51 const char *
Prefix = MAI->getGlobalPrefix();
54 else if (Prefix[1] == 0)
72 unsigned ArgWords = 0;
75 Type *Ty = AI->getType();
77 if (AI->hasByValAttr())
78 Ty = cast<PointerType>(Ty)->getElementType();
92 bool UseGlobalPrefix) {
110 unsigned &
ID = AnonGlobalIDs[GV];
111 if (ID == 0) ID = NextAnonGlobalID++;
121 if (
const Function *
F = dyn_cast<Function>(GV)) {
127 if (OutName[0] ==
'_')
void push_back(const T &Elt)
unsigned getNumParams() const
void getNameWithPrefix(SmallVectorImpl< char > &OutName, const GlobalValue *GV, bool isImplicitlyPrivate, bool UseGlobalPrefix=true)
StringRef substr(size_t Start, size_t N=npos) const
iterator insert(iterator I, const T &Elt)
StringRef getName() const
const MCAsmInfo * getMCAsmInfo() const
bool hasLinkerPrivateWeakLinkage() const
ID
LLVM Calling Convention Representation.
bool hasPrivateLinkage() const
Emit "linker private" prefix before each symbol.
bool hasLinkerPrivateLinkage() const
static void AddFastCallStdCallSuffix(SmallVectorImpl< char > &OutName, const Function *F, const DataLayout &TD)
void append(in_iter in_start, in_iter in_end)
bool hasMicrosoftFastStdCallMangling() const
uint64_t getTypeAllocSize(Type *Ty) const
StringRef toStringRef(SmallVectorImpl< char > &Out) const
size_t strlen(const char *s);
virtual const DataLayout * getDataLayout() const
Emit "private" prefix before each symbol.
Emit default string before each symbol.
INITIALIZE_PASS(GlobalMerge,"global-merge","Global Merge", false, false) bool GlobalMerge const DataLayout * TD
bool empty() const
empty - Check if the string is empty.