Committing the skeleton of Language runtime plugin classes.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@114620 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/Target/LanguageRuntime.cpp b/source/Target/LanguageRuntime.cpp
new file mode 100644
index 0000000..00c35f8
--- /dev/null
+++ b/source/Target/LanguageRuntime.cpp
@@ -0,0 +1,47 @@
+//===-- LanguageRuntime.cpp -------------------------------------------------*- C++ -*-===//
+//
+//                     The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#include "lldb/Target/LanguageRuntime.h"
+#include "lldb/Core/PluginManager.h"
+
+using namespace lldb;
+using namespace lldb_private;
+
+LanguageRuntime*
+LanguageRuntime::FindPlugin (Process *process, lldb::LanguageType language)
+{
+    std::auto_ptr<LanguageRuntime> language_runtime_ap;
+    LanguageRuntimeCreateInstance create_callback;
+
+    for (uint32_t idx = 0;
+         (create_callback = PluginManager::GetLanguageRuntimeCreateCallbackAtIndex(idx)) != NULL;
+         ++idx)
+    {
+        language_runtime_ap.reset (create_callback(process, language));
+
+        if (language_runtime_ap.get())
+            return language_runtime_ap.release();
+    }
+
+    return NULL;
+}
+
+//----------------------------------------------------------------------
+// Constructor
+//----------------------------------------------------------------------
+LanguageRuntime::LanguageRuntime(Process *process)
+{
+}
+
+//----------------------------------------------------------------------
+// Destructor
+//----------------------------------------------------------------------
+LanguageRuntime::~LanguageRuntime()
+{
+}