Added the ability to specify the symbol file for a module when adding it to a target.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@155384 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/API/SBTarget.cpp b/source/API/SBTarget.cpp
index 2502e93..1ec6397 100644
--- a/source/API/SBTarget.cpp
+++ b/source/API/SBTarget.cpp
@@ -1726,6 +1726,15 @@
                      const char *triple,
                      const char *uuid_cstr)
 {
+    return AddModule (path, triple, uuid_cstr, NULL);
+}
+
+lldb::SBModule
+SBTarget::AddModule (const char *path,
+                     const char *triple,
+                     const char *uuid_cstr,
+                     const char *symfile)
+{
     lldb::SBModule sb_module;
     TargetSP target_sp(GetSP());
     if (target_sp)
@@ -1733,12 +1742,15 @@
         ModuleSpec module_spec;
         if (path)
             module_spec.GetFileSpec().SetFile(path, false);
-
+        
         if (uuid_cstr)
             module_spec.GetUUID().SetfromCString(uuid_cstr);
-
+        
         if (triple)
             module_spec.GetArchitecture().SetTriple (triple, target_sp->GetPlatform ().get());
+        
+        if (symfile)
+            module_spec.GetSymbolFileSpec ().SetFile(symfile, false);
 
         sb_module.SetSP(target_sp->GetSharedModule (module_spec));
     }