forked from OSchip/llvm-project
Correctly mangle variadic functions that don't have any other parameters.
llvm-svn: 105311
This commit is contained in:
parent
d563923cf1
commit
728fe444f1
|
@ -1143,7 +1143,8 @@ void CXXNameMangler::mangleBareFunctionType(const FunctionType *T,
|
|||
if (MangleReturnType)
|
||||
mangleType(Proto->getResultType());
|
||||
|
||||
if (Proto->getNumArgs() == 0) {
|
||||
if (Proto->getNumArgs() == 0 && !Proto->isVariadic()) {
|
||||
// <builtin-type> ::= v # void
|
||||
Out << 'v';
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -477,3 +477,15 @@ namespace test10 {
|
|||
// CHECK: define weak_odr void @_ZN6test101fILc3EEEvNS_1SIXquLb0ELc97ET_EEE(
|
||||
template void f<(char) 3>(struct S<3>);
|
||||
}
|
||||
|
||||
namespace test11 {
|
||||
// CHECK: @_ZN6test111fEz
|
||||
void f(...) { }
|
||||
|
||||
struct A {
|
||||
void f(...);
|
||||
};
|
||||
|
||||
// CHECK: @_ZN6test111A1fEz
|
||||
void A::f(...) { }
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue