[llvm-commits] [llvm] r74193 - /llvm/trunk/utils/TableGen/LLVMCConfigurationEmitter.cpp
Mikhail Glushenkov
foldr at codedgers.com
Thu Jun 25 11:21:34 PDT 2009
Author: foldr
Date: Thu Jun 25 13:21:34 2009
New Revision: 74193
URL: http://llvm.org/viewvc/llvm-project?rev=74193&view=rev
Log:
Better error message.
Modified:
llvm/trunk/utils/TableGen/LLVMCConfigurationEmitter.cpp
Modified: llvm/trunk/utils/TableGen/LLVMCConfigurationEmitter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/LLVMCConfigurationEmitter.cpp?rev=74193&r1=74192&r2=74193&view=diff
==============================================================================
--- llvm/trunk/utils/TableGen/LLVMCConfigurationEmitter.cpp (original)
+++ llvm/trunk/utils/TableGen/LLVMCConfigurationEmitter.cpp Thu Jun 25 13:21:34 2009
@@ -1132,12 +1132,14 @@
enum TokenizerState
{ Normal, SpecialCommand, InsideSpecialCommand, InsideQuotationMarks }
cur_st = Normal;
+
+ if (CmdLine.empty())
+ return;
Out.push_back("");
std::string::size_type B = CmdLine.find_first_not_of(Delimiters),
E = CmdLine.size();
- if (B == std::string::npos)
- throw "Empty command-line string!";
+
for (; B != E; ++B) {
char cur_ch = CmdLine[B];
@@ -1278,7 +1280,7 @@
TokenizeCmdline(InitPtrToString(CmdLine), StrVec);
if (StrVec.empty())
- throw "Tool " + ToolName + " has empty command line!";
+ throw "Tool '" + ToolName + "' has empty command line!";
StrVector::const_iterator I = StrVec.begin(), E = StrVec.end();
More information about the llvm-commits
mailing list