Restore the handling of the --arch argument passed to the Driver that was inadvertently

removed in r214319.

<rdar://problem/17948431>

llvm-svn: 215165
This commit is contained in:
Jim Ingham 2014-08-07 23:01:31 +00:00
parent b3e5654923
commit 5b1fe95dd7
1 changed files with 6 additions and 1 deletions

View File

@ -854,7 +854,12 @@ Driver::MainLoop ()
const size_t num_args = m_option_data.m_args.size();
if (num_args > 0)
{
commands_stream.Printf("target create \"%s\"", m_option_data.m_args[0].c_str());
char arch_name[64];
if (m_debugger.GetDefaultArchitecture (arch_name, sizeof (arch_name)))
commands_stream.Printf("target create --arch=%s \"%s\"", arch_name, m_option_data.m_args[0].c_str());
else
commands_stream.Printf("target create \"%s\"", m_option_data.m_args[0].c_str());
if (!m_option_data.m_core_file.empty())
{
commands_stream.Printf(" --core \"%s\"", m_option_data.m_core_file.c_str());