mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-22 10:33:23 +00:00
c82ce4a8a7
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56465 91177308-0d34-0410-b5e6-96231b3b80d8
42 lines
1.2 KiB
C++
42 lines
1.2 KiB
C++
//===--- Plugin.cpp - The LLVM Compiler Driver ------------------*- C++ -*-===//
|
|
//
|
|
// The LLVM Compiler Infrastructure
|
|
//
|
|
// This file is distributed under the University of Illinois Open
|
|
// Source License. See LICENSE.TXT for details.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
//
|
|
// Plugin support for llvmc2.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#include "Plugin.h"
|
|
|
|
#include <vector>
|
|
|
|
namespace {
|
|
typedef std::vector<llvmc::BasePlugin*> PluginRegistry;
|
|
static PluginRegistry GlobalPluginRegistry;
|
|
}
|
|
|
|
namespace llvmc {
|
|
|
|
RegisterPluginImpl::RegisterPluginImpl(BasePlugin* plugin) {
|
|
GlobalPluginRegistry.push_back(plugin);
|
|
}
|
|
|
|
void PopulateLanguageMap(LanguageMap& langMap) {
|
|
for (PluginRegistry::const_iterator B = GlobalPluginRegistry.begin(),
|
|
E = GlobalPluginRegistry.end(); B != E; ++B)
|
|
(*B)->PopulateLanguageMap(langMap);
|
|
}
|
|
|
|
void PopulateCompilationGraph(CompilationGraph& graph) {
|
|
for (PluginRegistry::const_iterator B = GlobalPluginRegistry.begin(),
|
|
E = GlobalPluginRegistry.end(); B != E; ++B)
|
|
(*B)->PopulateCompilationGraph(graph);
|
|
}
|
|
|
|
}
|