aboutsummaryrefslogtreecommitdiffstats
path: root/utils/TableGen
diff options
context:
space:
mode:
authorMikhail Glushenkov <foldr@codedgers.com>2009-06-25 18:21:34 +0000
committerMikhail Glushenkov <foldr@codedgers.com>2009-06-25 18:21:34 +0000
commit7bba2333fbfa24e69da87987d84eb4b97e25f037 (patch)
tree78205b7a4abbcda519b6b038b277013b0b0b2f41 /utils/TableGen
parentd7acf73094b6569f41264128eb4d3c262fe029fb (diff)
downloadexternal_llvm-7bba2333fbfa24e69da87987d84eb4b97e25f037.zip
external_llvm-7bba2333fbfa24e69da87987d84eb4b97e25f037.tar.gz
external_llvm-7bba2333fbfa24e69da87987d84eb4b97e25f037.tar.bz2
Better error message.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74193 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/TableGen')
-rw-r--r--utils/TableGen/LLVMCConfigurationEmitter.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/utils/TableGen/LLVMCConfigurationEmitter.cpp b/utils/TableGen/LLVMCConfigurationEmitter.cpp
index e9acd96..9fcfd05 100644
--- a/utils/TableGen/LLVMCConfigurationEmitter.cpp
+++ b/utils/TableGen/LLVMCConfigurationEmitter.cpp
@@ -1132,12 +1132,14 @@ void TokenizeCmdline(const std::string& CmdLine, StrVector& Out) {
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 @@ void EmitCmdLineVecFill(const Init* CmdLine, const std::string& ToolName,
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();