forked from OSchip/llvm-project
assert that mangleName is not called for C++ ctors/dtors.
llvm-svn: 70783
This commit is contained in:
parent
4ff60e0cc2
commit
4c78596182
|
@ -657,6 +657,11 @@ namespace clang {
|
|||
/// (\c D->getIdentifier()) as its name.
|
||||
bool mangleName(const NamedDecl *D, ASTContext &Context,
|
||||
llvm::raw_ostream &os) {
|
||||
assert(!isa<CXXConstructorDecl>(D) &&
|
||||
"Use mangleCXXCtor for constructor decls!");
|
||||
assert(!isa<CXXDestructorDecl>(D) &&
|
||||
"Use mangleCXXDtor for destructor decls!");
|
||||
|
||||
CXXNameMangler Mangler(Context, os);
|
||||
if (!Mangler.mangle(D))
|
||||
return false;
|
||||
|
|
Loading…
Reference in New Issue