1 //===- Hello.cpp - Example code from "Writing an LLVM Pass" ---------------===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // Test plugin for LLVMC.
12 //===----------------------------------------------------------------------===//
14 #include "llvm/CompilerDriver/CompilationGraph.h"
15 #include "llvm/CompilerDriver/Plugin.h"
20 struct MyPlugin : public llvmc::BasePlugin {
21 void PopulateLanguageMap(llvmc::LanguageMap&) const
22 { std::cout << "Hello!\n"; }
24 void PopulateCompilationGraph(llvmc::CompilationGraph&) const
28 static llvmc::RegisterPlugin<MyPlugin> RP;