From: Andrew Lenharth Date: Fri, 7 Mar 2008 20:07:24 +0000 (+0000) Subject: make error message reflect default search function name X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=6a021a4ddab1ef7eae07065861e833f3ca3c0ad7;p=oota-llvm.git make error message reflect default search function name git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48021 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/tools/llvm-extract/llvm-extract.cpp b/tools/llvm-extract/llvm-extract.cpp index 7a16acfc071..1950f53972b 100644 --- a/tools/llvm-extract/llvm-extract.cpp +++ b/tools/llvm-extract/llvm-extract.cpp @@ -81,9 +81,8 @@ int main(int argc, char **argv) { 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 '"