[llvm-commits] [llvm] r105962 - /llvm/trunk/tools/gold/gold-plugin.cpp

Rafael Espindola rafael.espindola at gmail.com
Mon Jun 14 14:20:52 PDT 2010


Author: rafael
Date: Mon Jun 14 16:20:52 2010
New Revision: 105962

URL: http://llvm.org/viewvc/llvm-project?rev=105962&view=rev
Log:
Don't produce output only if *all* files are unused.

Modified:
    llvm/trunk/tools/gold/gold-plugin.cpp

Modified: llvm/trunk/tools/gold/gold-plugin.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/gold/gold-plugin.cpp?rev=105962&r1=105961&r2=105962&view=diff
==============================================================================
--- llvm/trunk/tools/gold/gold-plugin.cpp (original)
+++ llvm/trunk/tools/gold/gold-plugin.cpp Mon Jun 14 16:20:52 2010
@@ -368,15 +368,15 @@
           api_file << I->syms[i].name << "\n";
       }
     }
+  }
 
-    if (options::generate_api_file)
-      api_file.close();
+  if (options::generate_api_file)
+    api_file.close();
 
-    if (!anySymbolsPreserved) {
-      // This entire file is unnecessary!
-      lto_codegen_dispose(cg);
-      return LDPS_OK;
-    }
+  if (!anySymbolsPreserved) {
+    // All of the IL is unnecessary!
+    lto_codegen_dispose(cg);
+    return LDPS_OK;
   }
 
   lto_codegen_set_pic_model(cg, output_type);





More information about the llvm-commits mailing list