Add a LOG_TARGET log to Target::SetDefaultArchitecture
to track any architecture setting there.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@169958 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/Target/Target.cpp b/source/Target/Target.cpp
index 932ef72..a8cd131 100644
--- a/source/Target/Target.cpp
+++ b/source/Target/Target.cpp
@@ -96,9 +96,7 @@
         log->Printf ("%p Target::Target()", this);
     if (m_arch.IsValid())
     {
-        LogSP log_target(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_TARGET));
-        if (log_target)
-            log_target->Printf("Target::Target created with architecture %s (%s)", m_arch.GetArchitectureName(), m_arch.GetTriple().getTriple().c_str());
+        LogIfAnyCategoriesSet(LIBLLDB_LOG_TARGET, "Target::Target created with architecture %s (%s)", m_arch.GetArchitectureName(), m_arch.GetTriple().getTriple().c_str());
     }
 }
 
@@ -1672,7 +1670,10 @@
 {
     TargetPropertiesSP properties_sp(Target::GetGlobalProperties());
     if (properties_sp)
+    {
+        LogIfAnyCategoriesSet(LIBLLDB_LOG_TARGET, "Target::SetDefaultArchitecture setting target's default architecture to  %s (%s)", arch.GetArchitectureName(), arch.GetTriple().getTriple().c_str());
         return properties_sp->SetDefaultArchitecture(arch);
+    }
 }
 
 Target *