Daniel Dunbar | 3ede8d0 | 2009-03-02 19:59:07 +0000 | [diff] [blame] | 1 | //===-- driver.cpp - Clang GCC-Compatible Driver --------------------------===// |
| 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 | // |
Daniel Dunbar | 1eb4e64 | 2009-03-03 05:55:11 +0000 | [diff] [blame^] | 10 | // This is the entry point to the clang driver; it is a thin wrapper |
| 11 | // for functionality in the Driver clang library. |
Daniel Dunbar | 3ede8d0 | 2009-03-02 19:59:07 +0000 | [diff] [blame] | 12 | // |
| 13 | //===----------------------------------------------------------------------===// |
| 14 | |
| 15 | #include "clang/Driver/Compilation.h" |
| 16 | #include "clang/Driver/Driver.h" |
| 17 | #include "llvm/ADT/OwningPtr.h" |
| 18 | #include "llvm/System/Signals.h" |
| 19 | using namespace clang; |
| 20 | |
| 21 | int main(int argc, const char **argv) { |
| 22 | llvm::sys::PrintStackTraceOnErrorSignal(); |
| 23 | |
| 24 | llvm::OwningPtr<Driver> TheDriver(new Driver()); |
| 25 | |
| 26 | llvm::OwningPtr<Compilation> C(TheDriver->BuildCompilation(argc, argv)); |
| 27 | |
| 28 | return C->Execute(); |
| 29 | } |