diff options
author | Dan Gohman <gohman@apple.com> | 2009-04-20 16:19:02 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2009-04-20 16:19:02 +0000 |
commit | 5e0550b4acc13acbba8e65a8ca46fab0c1e71180 (patch) | |
tree | fb516a03ed8e6d32af1f8b5465608148970a4144 /tools/llvm-extract | |
parent | d1f134b7f887e3f492a2e866a69da13962128605 (diff) | |
download | external_llvm-5e0550b4acc13acbba8e65a8ca46fab0c1e71180.zip external_llvm-5e0550b4acc13acbba8e65a8ca46fab0c1e71180.tar.gz external_llvm-5e0550b4acc13acbba8e65a8ca46fab0c1e71180.tar.bz2 |
Use .empty() instead of .size().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69599 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/llvm-extract')
-rw-r--r-- | tools/llvm-extract/llvm-extract.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/llvm-extract/llvm-extract.cpp b/tools/llvm-extract/llvm-extract.cpp index 014d231..46840f2 100644 --- a/tools/llvm-extract/llvm-extract.cpp +++ b/tools/llvm-extract/llvm-extract.cpp @@ -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) { |