[llvm-commits] [llvm] r48021 - /llvm/trunk/tools/llvm-extract/llvm-extract.cpp
Andrew Lenharth
alenhar2 at cs.uiuc.edu
Fri Mar 7 12:07:24 PST 2008
Author: alenhar2
Date: Fri Mar 7 14:07:24 2008
New Revision: 48021
URL: http://llvm.org/viewvc/llvm-project?rev=48021&view=rev
Log:
make error message reflect default search function name
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=48021&r1=48020&r2=48021&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-extract/llvm-extract.cpp (original)
+++ llvm/trunk/tools/llvm-extract/llvm-extract.cpp Fri Mar 7 14:07:24 2008
@@ -81,9 +81,8 @@
M.get()->getNamedGlobal(ExtractGlobal) : 0;
// Figure out which function we should extract
- Function *F = ExtractFunc.size() ?
- M.get()->getFunction(ExtractFunc) :
- M.get()->getFunction("main");
+ if (!ExtractFunc.size()) ExtractFunc = "main";
+ Function *F = M.get()->getFunction(ExtractFunc);
if (F == 0 && G == 0) {
cerr << argv[0] << ": program doesn't contain function named '"
More information about the llvm-commits
mailing list