diff options
author | Nick Lewycky <nicholas@mxc.ca> | 2010-06-03 17:13:23 +0000 |
---|---|---|
committer | Nick Lewycky <nicholas@mxc.ca> | 2010-06-03 17:13:23 +0000 |
commit | 662f738ec3f9f4c77052b5a593cb30c28069713e (patch) | |
tree | d04b0eb87ac7e3252b9bf977446b6b58ac3b189f | |
parent | aede8118ad8e151971de78952b37a1468d72f795 (diff) | |
download | external_llvm-662f738ec3f9f4c77052b5a593cb30c28069713e.zip external_llvm-662f738ec3f9f4c77052b5a593cb30c28069713e.tar.gz external_llvm-662f738ec3f9f4c77052b5a593cb30c28069713e.tar.bz2 |
Perfer !string.empty() over string != "".
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@105397 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | tools/gold/gold-plugin.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/gold/gold-plugin.cpp b/tools/gold/gold-plugin.cpp index 9dd00ee..f04d935 100644 --- a/tools/gold/gold-plugin.cpp +++ b/tools/gold/gold-plugin.cpp @@ -84,7 +84,7 @@ namespace options { } } 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 @@ static ld_plugin_status all_symbols_read_hook(void) { } } - 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."); |