forked from OSchip/llvm-project
When target module add/SBTarget::AddModule()'ing, if an architecture isn't specifically
requested, use the Target's architecture to pick the correct slice of a universal file. <rdar://problem/14813869> llvm-svn: 190550
This commit is contained in:
parent
71780ec4fd
commit
b019cd92b5
|
@ -1905,6 +1905,8 @@ SBTarget::AddModule (const char *path,
|
|||
|
||||
if (triple)
|
||||
module_spec.GetArchitecture().SetTriple (triple, target_sp->GetPlatform ().get());
|
||||
else
|
||||
module_spec.GetArchitecture() = target_sp->GetArchitecture();
|
||||
|
||||
if (symfile)
|
||||
module_spec.GetSymbolFileSpec ().SetFile(symfile, false);
|
||||
|
|
|
@ -2763,6 +2763,8 @@ protected:
|
|||
module_spec.GetUUID() = m_uuid_option_group.GetOptionValue ().GetCurrentValue();
|
||||
if (m_symbol_file.GetOptionValue().OptionWasSet())
|
||||
module_spec.GetSymbolFileSpec() = m_symbol_file.GetOptionValue().GetCurrentValue();
|
||||
if (!module_spec.GetArchitecture().IsValid())
|
||||
module_spec.GetArchitecture() = target->GetArchitecture();
|
||||
Error error;
|
||||
ModuleSP module_sp (target->GetSharedModule (module_spec, &error));
|
||||
if (!module_sp)
|
||||
|
|
Loading…
Reference in New Issue