]> granicus.if.org Git - clang/commitdiff
Tell ASTMerge to merge every declaration it sees, rather than cherry-picking those...
authorDouglas Gregor <dgregor@apple.com>
Mon, 15 Feb 2010 22:05:17 +0000 (22:05 +0000)
committerDouglas Gregor <dgregor@apple.com>
Mon, 15 Feb 2010 22:05:17 +0000 (22:05 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96280 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Frontend/ASTMerge.cpp

index fbb87669d9a76a52ef1cd847bedd52765e3baa1e..821863e0762dd76605f58d375076016decbfb1a4 100644 (file)
@@ -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<VarDecl>(*D)) {
-        if (VD->getIdentifier() && 
-            *VD->getIdentifier()->getNameStart() == 'x') {
-          Decl *Merged = Importer.Import(VD);
-          (void)Merged;
-        }
-      } else if (FunctionDecl *FD = dyn_cast<FunctionDecl>(*D)) {
-        if (FD->getIdentifier() &&
-            *FD->getIdentifier()->getNameStart() == 'f') {
-          Decl *Merged = Importer.Import(FD);
-          (void)Merged;
-        }
-      }
+      Importer.Import(*D);
     }
 
     delete Unit;