Initial scaffolding for an -emit-llvm mode.  This requires the LLVM VMCore
library to be built for the driver to link.

llvm-svn: 39495
diff --git a/clang/CodeGen/ModuleBuilder.cpp b/clang/CodeGen/ModuleBuilder.cpp
new file mode 100644
index 0000000..309a357
--- /dev/null
+++ b/clang/CodeGen/ModuleBuilder.cpp
@@ -0,0 +1,40 @@
+//===--- ModuleBuilder.cpp - Emit LLVM Code from ASTs ---------------------===//
+//
+//                     The LLVM Compiler Infrastructure
+//
+// This file was developed by Chris Lattner and is distributed under
+// the University of Illinois Open Source License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+//
+// This builds an AST and converts it to LLVM Code.
+//
+//===----------------------------------------------------------------------===//
+
+#include "clang/CodeGen/ModuleBuilder.h"
+#include "Builder.h"
+using namespace llvm;
+using namespace clang;
+
+
+/// Init - Create an ModuleBuilder with the specified ASTContext.
+llvm::clang::CodeGen::BuilderTy *
+llvm::clang::CodeGen::Init(ASTContext &Context, Module &M) {
+  return new Builder(Context, M);
+}
+
+void llvm::clang::CodeGen::Terminate(BuilderTy *B) {
+  delete static_cast<Builder*>(B);
+}
+
+/// CodeGenFunction - Convert the AST node for a FunctionDecl into LLVM.
+///
+void llvm::clang::CodeGen::CodeGenFunction(BuilderTy *B, FunctionDecl *D) {
+  static_cast<Builder*>(B)->CodeGenFunction(D);
+}
+
+/// PrintStats - Emit statistic information to stderr.
+///
+void llvm::clang::CodeGen::PrintStats(BuilderTy *B) {
+  static_cast<Builder*>(B)->PrintStats();
+}