aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/BackendUtil.cpp
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2011-03-22 16:48:17 +0000
committerDaniel Dunbar <daniel@zuster.org>2011-03-22 16:48:17 +0000
commit3c66d30d513106bb794990c5e4ba36a31ac19f15 (patch)
tree0dd0bcea893dcd50b730a9911825e8e64273212f /lib/CodeGen/BackendUtil.cpp
parente5a3ce6dd555788a49efaabc3bd46d704e5e9d65 (diff)
Frontend: Add a more explicit -backend-option flag for passing backend command
line options, instead of leveraging the blanket -mllvm option. - This allows using the frontend itself without requiring the backend have those options available (i.e., if the target wasn't built). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128087 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/BackendUtil.cpp')
-rw-r--r--lib/CodeGen/BackendUtil.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/CodeGen/BackendUtil.cpp b/lib/CodeGen/BackendUtil.cpp
index 9897b1b1a0..ce64dc7888 100644
--- a/lib/CodeGen/BackendUtil.cpp
+++ b/lib/CodeGen/BackendUtil.cpp
@@ -248,6 +248,8 @@ bool EmitAssemblyHelper::AddEmitPasses(BackendAction Action,
}
if (llvm::TimePassesIsEnabled)
BackendArgs.push_back("-time-passes");
+ for (unsigned i = 0, e = CodeGenOpts.BackendOptions.size(); i != e; ++i)
+ BackendArgs.push_back(CodeGenOpts.BackendOptions[i].c_str());
BackendArgs.push_back(0);
llvm::cl::ParseCommandLineOptions(BackendArgs.size() - 1,
const_cast<char **>(&BackendArgs[0]));