From: Douglas Gregor Date: Mon, 15 Feb 2010 22:05:17 +0000 (+0000) Subject: Tell ASTMerge to merge every declaration it sees, rather than cherry-picking those... X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=44703f59ed2ae7854a08cf67cb2474c31e0698ec;p=clang Tell ASTMerge to merge every declaration it sees, rather than cherry-picking those declarations that we know will work. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96280 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Frontend/ASTMerge.cpp b/lib/Frontend/ASTMerge.cpp index fbb87669d9..821863e076 100644 --- a/lib/Frontend/ASTMerge.cpp +++ b/lib/Frontend/ASTMerge.cpp @@ -52,21 +52,7 @@ void ASTMergeAction::ExecuteAction() { for (DeclContext::decl_iterator D = TU->decls_begin(), DEnd = TU->decls_end(); D != DEnd; ++D) { - // FIXME: We only merge variables whose names start with x and functions - // whose names start with 'f'. Why would anyone want anything else? - if (VarDecl *VD = dyn_cast(*D)) { - if (VD->getIdentifier() && - *VD->getIdentifier()->getNameStart() == 'x') { - Decl *Merged = Importer.Import(VD); - (void)Merged; - } - } else if (FunctionDecl *FD = dyn_cast(*D)) { - if (FD->getIdentifier() && - *FD->getIdentifier()->getNameStart() == 'f') { - Decl *Merged = Importer.Import(FD); - (void)Merged; - } - } + Importer.Import(*D); } delete Unit;