[llvm-commits] [llvm] r69599 - /llvm/trunk/tools/llvm-extract/llvm-extract.cpp
Dan Gohman
gohman at apple.com
Mon Apr 20 09:19:02 PDT 2009
Author: djg
Date: Mon Apr 20 11:19:02 2009
New Revision: 69599
URL: http://llvm.org/viewvc/llvm-project?rev=69599&view=rev
Log:
Use .empty() instead of .size().
Modified:
llvm/trunk/tools/llvm-extract/llvm-extract.cpp
Modified: llvm/trunk/tools/llvm-extract/llvm-extract.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-extract/llvm-extract.cpp?rev=69599&r1=69598&r2=69599&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-extract/llvm-extract.cpp (original)
+++ llvm/trunk/tools/llvm-extract/llvm-extract.cpp Mon Apr 20 11:19:02 2009
@@ -81,11 +81,11 @@
}
// Figure out which function we should extract
- GlobalVariable *G = ExtractGlobal.size() ?
+ GlobalVariable *G = !ExtractGlobal.empty() ?
M.get()->getNamedGlobal(ExtractGlobal) : 0;
// Figure out which function we should extract
- if (!ExtractFunc.size() && !ExtractGlobal.size()) ExtractFunc = "main";
+ if (ExtractFunc.empty() && ExtractGlobal.empty()) ExtractFunc = "main";
Function *F = M.get()->getFunction(ExtractFunc);
if (F == 0 && G == 0) {
More information about the llvm-commits
mailing list