diff options
author | Mikhail Glushenkov <foldr@codedgers.com> | 2009-02-27 06:46:55 +0000 |
---|---|---|
committer | Mikhail Glushenkov <foldr@codedgers.com> | 2009-02-27 06:46:55 +0000 |
commit | f6281fb47c4104abda48130a72285ac1d481e108 (patch) | |
tree | 51d6e725ebb3ca5b5ba3e4e28abd8d2c4b048408 /llvm/utils/TableGen/LLVMCConfigurationEmitter.cpp | |
parent | 988a16b9b842b23f98d6df0b9141bcd4462fdfd8 (diff) | |
download | bcm5719-llvm-f6281fb47c4104abda48130a72285ac1d481e108.tar.gz bcm5719-llvm-f6281fb47c4104abda48130a72285ac1d481e108.zip |
'append_cmd' should split its argument.
Makes '(append_cmd "-foo a b c")' work.
llvm-svn: 65623
Diffstat (limited to 'llvm/utils/TableGen/LLVMCConfigurationEmitter.cpp')
-rw-r--r-- | llvm/utils/TableGen/LLVMCConfigurationEmitter.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/llvm/utils/TableGen/LLVMCConfigurationEmitter.cpp b/llvm/utils/TableGen/LLVMCConfigurationEmitter.cpp index fc166ef3093..bb4321c9b40 100644 --- a/llvm/utils/TableGen/LLVMCConfigurationEmitter.cpp +++ b/llvm/utils/TableGen/LLVMCConfigurationEmitter.cpp @@ -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(\"" << |