mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-02-03 02:43:51 +00:00
'append_cmd' should split its argument.
Makes '(append_cmd "-foo a b c")' work. llvm-svn: 65623
This commit is contained in:
parent
44b8675102
commit
65cb3e0861
@ -1422,7 +1422,12 @@ class EmitActionHandler {
|
||||
if (ActionName == "append_cmd") {
|
||||
checkNumberOfArguments(&Dag, 1);
|
||||
const std::string& Cmd = InitPtrToString(Dag.getArg(0));
|
||||
O << IndentLevel << "vec.push_back(\"" << Cmd << "\");\n";
|
||||
StrVector Out;
|
||||
llvm::SplitString(Cmd, Out);
|
||||
|
||||
for (StrVector::const_iterator B = Out.begin(), E = Out.end();
|
||||
B != E; ++B)
|
||||
O << IndentLevel << "vec.push_back(\"" << *B << "\");\n";
|
||||
}
|
||||
else if (ActionName == "error") {
|
||||
O << IndentLevel << "throw std::runtime_error(\"" <<
|
||||
|
Loading…
x
Reference in New Issue
Block a user