mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-06 01:24:35 +00:00
Since the old llvmc was removed, rename llvmc2 to llvmc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60048 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
30
tools/llvmc/plugins/Hello/Hello.cpp
Normal file
30
tools/llvmc/plugins/Hello/Hello.cpp
Normal file
@ -0,0 +1,30 @@
|
||||
//===- Hello.cpp - Example code from "Writing an LLVM Pass" ---------------===//
|
||||
//
|
||||
// The LLVM Compiler Infrastructure
|
||||
//
|
||||
// This file is distributed under the University of Illinois Open Source
|
||||
// License. See LICENSE.TXT for details.
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
//
|
||||
// Test plugin for LLVMC.
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "llvm/CompilerDriver/CompilationGraph.h"
|
||||
#include "llvm/CompilerDriver/Plugin.h"
|
||||
|
||||
#include <iostream>
|
||||
|
||||
namespace {
|
||||
struct MyPlugin : public llvmc::BasePlugin {
|
||||
void PopulateLanguageMap(llvmc::LanguageMap&) const
|
||||
{ std::cout << "Hello!\n"; }
|
||||
|
||||
void PopulateCompilationGraph(llvmc::CompilationGraph&) const
|
||||
{}
|
||||
};
|
||||
|
||||
static llvmc::RegisterPlugin<MyPlugin> RP("Hello", "Hello World plugin");
|
||||
|
||||
}
|
Reference in New Issue
Block a user