diff options
| author | Owen Reynolds <gbreynoo@gmail.com> | 2019-09-19 11:22:59 +0000 |
|---|---|---|
| committer | Owen Reynolds <gbreynoo@gmail.com> | 2019-09-19 11:22:59 +0000 |
| commit | aa03c14827fab3caba6306fc2e5d7f1757230f73 (patch) | |
| tree | 8f1cbbbdbaae9e191ec3611061f75c8a0cbfa511 /llvm/tools/llvm-ar/llvm-ar.cpp | |
| parent | cce2342d4691ab34915025b9959c3f12589dce51 (diff) | |
| download | bcm5719-llvm-aa03c14827fab3caba6306fc2e5d7f1757230f73.tar.gz bcm5719-llvm-aa03c14827fab3caba6306fc2e5d7f1757230f73.zip | |
Revert [llvm-ar] Include a line number when failing to parse an MRI script
Revert r372309 due to buildbot failures
Differential Revision: https://reviews.llvm.org/D67449
llvm-svn: 372311
Diffstat (limited to 'llvm/tools/llvm-ar/llvm-ar.cpp')
| -rw-r--r-- | llvm/tools/llvm-ar/llvm-ar.cpp | 19 |
1 files changed, 3 insertions, 16 deletions
diff --git a/llvm/tools/llvm-ar/llvm-ar.cpp b/llvm/tools/llvm-ar/llvm-ar.cpp index 568c603fc32..006d8ed74cf 100644 --- a/llvm/tools/llvm-ar/llvm-ar.cpp +++ b/llvm/tools/llvm-ar/llvm-ar.cpp @@ -116,19 +116,10 @@ void printHelpMessage() { outs() << ArHelp; } -static unsigned MRILineNumber; -static bool ParsingMRIScript; - // Show the error message and exit. LLVM_ATTRIBUTE_NORETURN static void fail(Twine Error) { - if (ParsingMRIScript) { - WithColor::error(errs(), ToolName) - << "script line " << MRILineNumber << ": " << Error << "\n"; - } else { - WithColor::error(errs(), ToolName) << Error << "\n"; - printHelpMessage(); - } - + WithColor::error(errs(), ToolName) << Error << "\n"; + printHelpMessage(); exit(1); } @@ -968,10 +959,8 @@ static void runMRIScript() { const MemoryBuffer &Ref = *Buf.get(); bool Saved = false; std::vector<NewArchiveMember> NewMembers; - ParsingMRIScript = true; for (line_iterator I(Ref, /*SkipBlanks*/ false), E; I != E; ++I) { - ++MRILineNumber; StringRef Line = *I; Line = Line.split(';').first; Line = Line.split('*').first; @@ -1033,9 +1022,7 @@ static void runMRIScript() { fail("unknown command: " + CommandStr); } } - - ParsingMRIScript = false; - + // Nothing to do if not saved. if (Saved) performOperation(ReplaceOrInsert, &NewMembers); |

