After a recent fix to not set the default architecture to "x86_64", the string value for the default arch was coming out as a value that shouldn't be user visible. Now we don't show any value when it isn't set.
git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@117432 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/Target/Target.cpp b/source/Target/Target.cpp
index 17e2c87..f9242b1 100644
--- a/source/Target/Target.cpp
+++ b/source/Target/Target.cpp
@@ -845,10 +845,11 @@
ModuleSP module_sp = GetExecutableModule();
if (module_sp)
{
- sstr.Printf ("%s_%s", module_sp->GetFileSpec().GetFilename().AsCString(),
+ sstr.Printf ("%s_%s",
+ module_sp->GetFileSpec().GetFilename().AsCString(),
module_sp->GetArchitecture().AsCString());
- Target::GetSettingsController()->RenameInstanceSettings (GetInstanceName().AsCString(),
- sstr.GetData());
+ Target::GetSettingsController()->RenameInstanceSettings (GetInstanceName().AsCString(),
+ sstr.GetData());
}
}
@@ -912,7 +913,9 @@
{
if (var_name == DefArchVarName())
{
- value.AppendString (m_default_architecture.AsCString());
+ // If the arch is invalid (the default), don't show a string for it
+ if (m_default_architecture.IsValid())
+ value.AppendString (m_default_architecture.AsCString());
return true;
}
else