mirror of
https://github.com/intel/llvm.git
synced 2026-01-15 12:25:46 +08:00
respective ABI plugins as they were plug-ins that supplied ABI specfic info. Also hookep up the UnwindAssemblyInstEmulation so that it can generate the unwind plans for ARM. Changed the way ABI plug-ins are handed out when you get an instance from the plug-in manager. They used to return pointers that would be mananged individually by each client that requested them, but now they are handed out as shared pointers since there is no state in the ABI objects, they can be shared. llvm-svn: 131193
48 lines
1.2 KiB
C++
48 lines
1.2 KiB
C++
//===-- ABI.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/ABI.h"
|
|
#include "lldb/Core/PluginManager.h"
|
|
|
|
using namespace lldb;
|
|
using namespace lldb_private;
|
|
|
|
ABISP
|
|
ABI::FindPlugin (const ArchSpec &arch)
|
|
{
|
|
ABISP abi_sp;
|
|
ABICreateInstance create_callback;
|
|
|
|
for (uint32_t idx = 0;
|
|
(create_callback = PluginManager::GetABICreateCallbackAtIndex(idx)) != NULL;
|
|
++idx)
|
|
{
|
|
abi_sp = create_callback(arch);
|
|
|
|
if (abi_sp)
|
|
return abi_sp;
|
|
}
|
|
abi_sp.reset();
|
|
return abi_sp;
|
|
}
|
|
|
|
//----------------------------------------------------------------------
|
|
// Constructor
|
|
//----------------------------------------------------------------------
|
|
ABI::ABI()
|
|
{
|
|
}
|
|
|
|
//----------------------------------------------------------------------
|
|
// Destructor
|
|
//----------------------------------------------------------------------
|
|
ABI::~ABI()
|
|
{
|
|
}
|