summaryrefslogtreecommitdiffstats
path: root/clang/tools/driver/driver.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/tools/driver/driver.cpp')
-rw-r--r--clang/tools/driver/driver.cpp29
1 files changed, 29 insertions, 0 deletions
diff --git a/clang/tools/driver/driver.cpp b/clang/tools/driver/driver.cpp
new file mode 100644
index 00000000000..7c01e9b49b6
--- /dev/null
+++ b/clang/tools/driver/driver.cpp
@@ -0,0 +1,29 @@
+//===-- driver.cpp - Clang GCC-Compatible Driver --------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+//
+// This is the entry point to the clang driver; it is a thin
+// wrapper for functionality in the Driver clang library.
+//
+//===----------------------------------------------------------------------===//
+
+#include "clang/Driver/Compilation.h"
+#include "clang/Driver/Driver.h"
+#include "llvm/ADT/OwningPtr.h"
+#include "llvm/System/Signals.h"
+using namespace clang;
+
+int main(int argc, const char **argv) {
+ llvm::sys::PrintStackTraceOnErrorSignal();
+
+ llvm::OwningPtr<Driver> TheDriver(new Driver());
+
+ llvm::OwningPtr<Compilation> C(TheDriver->BuildCompilation(argc, argv));
+
+ return C->Execute();
+}
OpenPOWER on IntegriCloud