diff options
author | Andrew Lenharth <alenhar2@cs.uiuc.edu> | 2008-03-07 20:10:54 +0000 |
---|---|---|
committer | Andrew Lenharth <alenhar2@cs.uiuc.edu> | 2008-03-07 20:10:54 +0000 |
commit | d9312407ce3b868fb596c2bcb61fd94aac0a5030 (patch) | |
tree | 6004f67d375b4c2fe058a59ed5283414c8c0dadd /tools/llvm-extract | |
parent | 8c4d2d1b384f384b5f06d70cbab0836a64715d1f (diff) | |
download | external_llvm-d9312407ce3b868fb596c2bcb61fd94aac0a5030.zip external_llvm-d9312407ce3b868fb596c2bcb61fd94aac0a5030.tar.gz external_llvm-d9312407ce3b868fb596c2bcb61fd94aac0a5030.tar.bz2 |
only extract main if the user didn't specify anything to extract
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48023 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/llvm-extract')
-rw-r--r-- | tools/llvm-extract/llvm-extract.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/llvm-extract/llvm-extract.cpp b/tools/llvm-extract/llvm-extract.cpp index 1950f53..360630b 100644 --- a/tools/llvm-extract/llvm-extract.cpp +++ b/tools/llvm-extract/llvm-extract.cpp @@ -81,7 +81,7 @@ int main(int argc, char **argv) { M.get()->getNamedGlobal(ExtractGlobal) : 0; // Figure out which function we should extract - if (!ExtractFunc.size()) ExtractFunc = "main"; + if (!ExtractFunc.size() && !ExtractGlobal.size()) ExtractFunc = "main"; Function *F = M.get()->getFunction(ExtractFunc); if (F == 0 && G == 0) { |