forked from OSchip/llvm-project
fix PR5869: mangle static symbols like gcc does to make it easier to diff symbol tables
llvm-svn: 92911
This commit is contained in:
parent
1949de7b81
commit
950d5b2cd3
|
@ -199,10 +199,13 @@ void CXXNameMangler::mangle(const NamedDecl *D, llvm::StringRef Prefix) {
|
|||
return;
|
||||
}
|
||||
|
||||
// <mangled-name> ::= _Z <encoding>
|
||||
// <mangled-name> ::= _Z [L] <encoding>
|
||||
// ::= <data name>
|
||||
// ::= <special-name>
|
||||
Out << Prefix;
|
||||
if (D->getLinkage() == NamedDecl::InternalLinkage) // match gcc behavior
|
||||
Out << 'L';
|
||||
|
||||
if (const FunctionDecl *FD = dyn_cast<FunctionDecl>(D))
|
||||
mangleFunctionEncoding(FD);
|
||||
else
|
||||
|
|
|
@ -308,4 +308,9 @@ template class Alloc<char>;
|
|||
}
|
||||
|
||||
// CHECK: define void @_Z1fU13block_pointerFiiiE
|
||||
void f(int (^)(int, int)) { }
|
||||
void f(int (^)(int, int)) { }
|
||||
|
||||
// PR5869
|
||||
// CHECK: define internal void @_ZL2f2v
|
||||
static void f2() {}
|
||||
void f3() { f2(); }
|
||||
|
|
Loading…
Reference in New Issue