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

Nick Lewycky nicholas at mxc.ca
Thu Jun 3 10:13:23 PDT 2010


Author: nicholas
Date: Thu Jun  3 12:13:23 2010
New Revision: 105397

URL: http://llvm.org/viewvc/llvm-project?rev=105397&view=rev
Log:
Perfer !string.empty() over string != "".

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=105397&r1=105396&r2=105397&view=diff
==============================================================================
--- llvm/trunk/tools/gold/gold-plugin.cpp (original)
+++ llvm/trunk/tools/gold/gold-plugin.cpp Thu Jun  3 12:13:23 2010
@@ -84,7 +84,7 @@
       }
     } else if (llvm::StringRef(opt).startswith("also-emit-llvm=")) {
       const char *path = opt + strlen("also-emit-llvm=");
-      if (bc_path != "") {
+      if (!bc_path.empty()) {
         (*message)(LDPL_WARNING, "Path to the output IL file specified twice. "
                    "Discarding %s", opt);
       } else {
@@ -381,7 +381,7 @@
     }
   }
 
-  if (options::bc_path != "") {
+  if (!options::bc_path.empty()) {
     bool err = lto_codegen_write_merged_modules(cg, options::bc_path.c_str());
     if (err)
       (*message)(LDPL_FATAL, "Failed to write the output file.");





More information about the llvm-commits mailing list