Use .empty() instead of .size().
authorDan Gohman <gohman@apple.com>
Mon, 20 Apr 2009 16:19:02 +0000 (16:19 +0000)
committerDan Gohman <gohman@apple.com>
Mon, 20 Apr 2009 16:19:02 +0000 (16:19 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69599 91177308-0d34-0410-b5e6-96231b3b80d8

tools/llvm-extract/llvm-extract.cpp

index 014d231a29c4d34d049c4d66bef5f4c361bf9c4e..46840f2e223a8215f6afcc40a2cdc7cf9e319bd9 100644 (file)
@@ -81,11 +81,11 @@ int main(int argc, char **argv) {
   }
 
   // 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) {