forked from OSchip/llvm-project
When mangling names, always use the canonical decl. Fixes PR5144.
llvm-svn: 83420
This commit is contained in:
parent
542ab5f551
commit
11d00cf972
|
@ -1303,7 +1303,7 @@ namespace clang {
|
||||||
"Mangling declaration");
|
"Mangling declaration");
|
||||||
|
|
||||||
CXXNameMangler Mangler(Context, os);
|
CXXNameMangler Mangler(Context, os);
|
||||||
if (!Mangler.mangle(D))
|
if (!Mangler.mangle(cast<NamedDecl>(D->getCanonicalDecl())))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
os.flush();
|
os.flush();
|
||||||
|
|
|
@ -198,3 +198,12 @@ template<typename T> typename __enable_if<__is_scalar<T>::__value, void>::__type
|
||||||
template void ft7<int>();
|
template void ft7<int>();
|
||||||
// CHECK: @_Z3ft7IPvEN11__enable_ifIXsr11__is_scalarIT_E7__valueEvE6__typeEv
|
// CHECK: @_Z3ft7IPvEN11__enable_ifIXsr11__is_scalarIT_E7__valueEvE6__typeEv
|
||||||
template void ft7<void*>();
|
template void ft7<void*>();
|
||||||
|
|
||||||
|
// PR5144
|
||||||
|
extern "C" {
|
||||||
|
void extern_f(void);
|
||||||
|
};
|
||||||
|
|
||||||
|
// CHECK: @extern_f
|
||||||
|
void extern_f(void) { }
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue