aboutsummaryrefslogtreecommitdiffstats
path: root/utils
diff options
context:
space:
mode:
authorMikhail Glushenkov <foldr@codedgers.com>2009-12-07 19:15:57 +0000
committerMikhail Glushenkov <foldr@codedgers.com>2009-12-07 19:15:57 +0000
commit43f5c616b9938842aebaa8de4451aca52c408f04 (patch)
tree4bf75aea7cbbeced99c38564a7013ed66e03eb37 /utils
parent726e81006a54d5ee21372b593b6d0aebed32eade (diff)
downloadexternal_llvm-43f5c616b9938842aebaa8de4451aca52c408f04.zip
external_llvm-43f5c616b9938842aebaa8de4451aca52c408f04.tar.gz
external_llvm-43f5c616b9938842aebaa8de4451aca52c408f04.tar.bz2
Throw 'const char*' instead of 'std::string'.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90784 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils')
-rw-r--r--utils/TableGen/LLVMCConfigurationEmitter.cpp21
1 files changed, 10 insertions, 11 deletions
diff --git a/utils/TableGen/LLVMCConfigurationEmitter.cpp b/utils/TableGen/LLVMCConfigurationEmitter.cpp
index f8a9640..2453035 100644
--- a/utils/TableGen/LLVMCConfigurationEmitter.cpp
+++ b/utils/TableGen/LLVMCConfigurationEmitter.cpp
@@ -796,8 +796,7 @@ private:
Init* Case = d->getArg(0);
if (typeid(*Case) != typeid(DagInit) ||
GetOperatorName(static_cast<DagInit*>(Case)) != "case")
- throw
- std::string("The argument to (actions) should be a 'case' construct!");
+ throw "The argument to (actions) should be a 'case' construct!";
toolDesc_.Actions = Case;
}
@@ -898,8 +897,8 @@ int CalculatePriority(RecordVector::const_iterator B,
priority = static_cast<int>((*B)->getValueAsInt("priority"));
if (++B != E)
- throw std::string("More than one 'PluginPriority' instance found: "
- "most probably an error!");
+ throw "More than one 'PluginPriority' instance found: "
+ "most probably an error!";
}
return priority;
@@ -990,7 +989,7 @@ void TypecheckGraph (const RecordVector& EdgeVector,
}
if (NodeB == "root")
- throw std::string("Edges back to the root are not allowed!");
+ throw "Edges back to the root are not allowed!";
}
}
@@ -1010,7 +1009,7 @@ void WalkCase(const Init* Case, F1 TestCallback, F2 StatementCallback,
// Error checks.
if (GetOperatorName(d) != "case")
- throw std::string("WalkCase should be invoked only on 'case' expressions!");
+ throw "WalkCase should be invoked only on 'case' expressions!";
if (d.getNumArgs() < 2)
throw "There should be at least one clause in the 'case' expression:\n"
@@ -1030,8 +1029,8 @@ void WalkCase(const Init* Case, F1 TestCallback, F2 StatementCallback,
const DagInit& Test = InitPtrToDag(arg);
if (GetOperatorName(Test) == "default" && (i+1 != numArgs))
- throw std::string("The 'default' clause should be the last in the"
- "'case' construct!");
+ throw "The 'default' clause should be the last in the "
+ "'case' construct!";
if (i == numArgs)
throw "Case construct handler: no corresponding action "
"found for the test " + Test.getAsString() + '!';
@@ -1551,7 +1550,7 @@ StrVector::const_iterator SubstituteSpecialCommands
const std::string& CmdName = *Pos;
if (CmdName == ")")
- throw std::string("$CALL invocation: empty argument list!");
+ throw "$CALL invocation: empty argument list!";
O << "hooks::";
O << CmdName << "(";
@@ -1746,7 +1745,7 @@ void EmitForwardOptionPropertyHandlingCode (const OptionDescription& D,
break;
case OptionType::Alias:
default:
- throw std::string("Aliases are not allowed in tool option descriptions!");
+ throw "Aliases are not allowed in tool option descriptions!";
}
}
@@ -2330,7 +2329,7 @@ void EmitPopulateLanguageMap (const RecordKeeper& Records, raw_ostream& O)
ListInit* LangsToSuffixesList = LangMapRecord->getValueAsListInit("map");
if (!LangsToSuffixesList)
- throw std::string("Error in the language map definition!");
+ throw "Error in the language map definition!";
for (unsigned i = 0; i < LangsToSuffixesList->size(); ++i) {
const Record* LangToSuffixes = LangsToSuffixesList->getElementAsRecord(i);