From d66828daf633bfc74742339ed6e0e214cb6c959e Mon Sep 17 00:00:00 2001 From: Douglas Gregor Date: Sat, 19 Feb 2011 21:54:50 +0000 Subject: In addition to in-class member functions marked with the "used" attribute, we also care about those with the "constructor" attribute. Fixes PR6521. llvm-svn: 126055 --- clang/lib/CodeGen/ModuleBuilder.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'clang/lib/CodeGen/ModuleBuilder.cpp') diff --git a/clang/lib/CodeGen/ModuleBuilder.cpp b/clang/lib/CodeGen/ModuleBuilder.cpp index d41d3ac..8945028 100644 --- a/clang/lib/CodeGen/ModuleBuilder.cpp +++ b/clang/lib/CodeGen/ModuleBuilder.cpp @@ -80,7 +80,8 @@ namespace { M != MEnd; ++M) if (CXXMethodDecl *Method = dyn_cast(*M)) if (Method->isThisDeclarationADefinition() && - Method->hasAttr()) + (Method->hasAttr() || + Method->hasAttr())) Builder->EmitTopLevelDecl(Method); } } -- cgit v1.1