blob: 00c35f8063385eb3e1ea0bfec393c58808dc6238 [file] [log] [blame]
Jim Ingham642036f2010-09-23 02:01:19 +00001//===-- LanguageRuntime.cpp -------------------------------------------------*- C++ -*-===//
2//
3// The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9
10#include "lldb/Target/LanguageRuntime.h"
11#include "lldb/Core/PluginManager.h"
12
13using namespace lldb;
14using namespace lldb_private;
15
16LanguageRuntime*
17LanguageRuntime::FindPlugin (Process *process, lldb::LanguageType language)
18{
19 std::auto_ptr<LanguageRuntime> language_runtime_ap;
20 LanguageRuntimeCreateInstance create_callback;
21
22 for (uint32_t idx = 0;
23 (create_callback = PluginManager::GetLanguageRuntimeCreateCallbackAtIndex(idx)) != NULL;
24 ++idx)
25 {
26 language_runtime_ap.reset (create_callback(process, language));
27
28 if (language_runtime_ap.get())
29 return language_runtime_ap.release();
30 }
31
32 return NULL;
33}
34
35//----------------------------------------------------------------------
36// Constructor
37//----------------------------------------------------------------------
38LanguageRuntime::LanguageRuntime(Process *process)
39{
40}
41
42//----------------------------------------------------------------------
43// Destructor
44//----------------------------------------------------------------------
45LanguageRuntime::~LanguageRuntime()
46{
47}