Mikhail Glushenkov | b57326c | 2010-08-19 20:04:19 +0000 | [diff] [blame] | 1 | //===- Hello.cpp - Example code from "Writing an LLVMC Plugin" ------------===// |
| 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 | // Shows how to write llvmc-based drivers without using TableGen. |
| 11 | // |
| 12 | //===----------------------------------------------------------------------===// |
| 13 | |
| 14 | #include "llvm/CompilerDriver/AutoGenerated.h" |
| 15 | #include "llvm/CompilerDriver/Main.inc" |
| 16 | |
| 17 | #include "llvm/Support/raw_ostream.h" |
| 18 | |
| 19 | namespace llvmc { |
| 20 | namespace autogenerated { |
| 21 | |
| 22 | int PreprocessOptions () { return 0; } |
| 23 | |
| 24 | int PopulateLanguageMap (LanguageMap&) { llvm::outs() << "Hello!\n"; return 0; } |
| 25 | |
| 26 | int PopulateCompilationGraph (CompilationGraph&) { return 0; } |
| 27 | |
| 28 | } |
| 29 | } |