<rdar://problem/12462048>
<rdar://problem/12068650>
More fixes to how we handle paths that are used to create a target.
This modification centralizes the location where and how what the user specifies gets resolved. Prior to this fix, the TargetList::CreateTarget variants took a FileSpec object which meant everyone had the opportunity to resolve the path their own way. Now both CreateTarget variants take a "const char *use_exe_path" which allows the TargetList::CreateTarget to centralize where the resolving happens and "do the right thing".
git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@166186 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/API/SBDebugger.cpp b/source/API/SBDebugger.cpp
index 3540b28..94af679 100644
--- a/source/API/SBDebugger.cpp
+++ b/source/API/SBDebugger.cpp
@@ -511,12 +511,11 @@
if (m_opaque_sp)
{
sb_error.Clear();
- FileSpec filename_spec (filename, true);
OptionGroupPlatform platform_options (false);
platform_options.SetPlatformName (platform_name);
sb_error.ref() = m_opaque_sp->GetTargetList().CreateTarget (*m_opaque_sp,
- filename_spec,
+ filename,
target_triple,
add_dependent_modules,
&platform_options,
@@ -554,10 +553,9 @@
TargetSP target_sp;
if (m_opaque_sp)
{
- FileSpec file_spec (filename, true);
const bool add_dependent_modules = true;
Error error (m_opaque_sp->GetTargetList().CreateTarget (*m_opaque_sp,
- file_spec,
+ filename,
target_triple,
add_dependent_modules,
NULL,
@@ -584,12 +582,11 @@
TargetSP target_sp;
if (m_opaque_sp)
{
- FileSpec file (filename, true);
Error error;
const bool add_dependent_modules = true;
- error = m_opaque_sp->GetTargetList().CreateTarget (*m_opaque_sp,
- file,
+ error = m_opaque_sp->GetTargetList().CreateTarget (*m_opaque_sp,
+ filename,
arch_cstr,
add_dependent_modules,
NULL,
@@ -618,14 +615,13 @@
TargetSP target_sp;
if (m_opaque_sp)
{
- FileSpec file (filename, true);
ArchSpec arch = Target::GetDefaultArchitecture ();
Error error;
const bool add_dependent_modules = true;
PlatformSP platform_sp(m_opaque_sp->GetPlatformList().GetSelectedPlatform());
error = m_opaque_sp->GetTargetList().CreateTarget (*m_opaque_sp,
- file,
+ filename,
arch,
add_dependent_modules,
platform_sp,