[llvm-commits] [llvm] r48023 - /llvm/trunk/tools/llvm-extract/llvm-extract.cpp
Andrew Lenharth
alenhar2 at cs.uiuc.edu
Fri Mar 7 12:10:54 PST 2008
Author: alenhar2
Date: Fri Mar 7 14:10:54 2008
New Revision: 48023
URL: http://llvm.org/viewvc/llvm-project?rev=48023&view=rev
Log:
only extract main if the user didn't specify anything to extract
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=48023&r1=48022&r2=48023&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-extract/llvm-extract.cpp (original)
+++ llvm/trunk/tools/llvm-extract/llvm-extract.cpp Fri Mar 7 14:10:54 2008
@@ -81,7 +81,7 @@
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) {
More information about the llvm-commits
mailing list