[cfe-commits] r70783 - /cfe/trunk/lib/CodeGen/Mangle.cpp
Anders Carlsson
andersca at mac.com
Sun May 3 09:51:04 PDT 2009
Author: andersca
Date: Sun May 3 11:51:04 2009
New Revision: 70783
URL: http://llvm.org/viewvc/llvm-project?rev=70783&view=rev
Log:
assert that mangleName is not called for C++ ctors/dtors.
Modified:
cfe/trunk/lib/CodeGen/Mangle.cpp
Modified: cfe/trunk/lib/CodeGen/Mangle.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/Mangle.cpp?rev=70783&r1=70782&r2=70783&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/Mangle.cpp (original)
+++ cfe/trunk/lib/CodeGen/Mangle.cpp Sun May 3 11:51:04 2009
@@ -657,6 +657,11 @@
/// (\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;
More information about the cfe-commits
mailing list