blob: ac739bf492e0139a6e766f837297a03be4c9c8a0 [file] [log] [blame]
Daniel Dunbar63c4da92009-03-02 19:59:07 +00001//===-- 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 Dunbar16090d42009-03-03 05:55:11 +000010// This is the entry point to the clang driver; it is a thin wrapper
11// for functionality in the Driver clang library.
Daniel Dunbar63c4da92009-03-02 19:59:07 +000012//
13//===----------------------------------------------------------------------===//
14
15#include "clang/Driver/Compilation.h"
16#include "clang/Driver/Driver.h"
Daniel Dunbara5aa4b02009-03-04 08:33:23 +000017#include "clang/Driver/Option.h"
18#include "clang/Driver/Options.h"
19
Daniel Dunbar63c4da92009-03-02 19:59:07 +000020#include "llvm/ADT/OwningPtr.h"
21#include "llvm/System/Signals.h"
22using namespace clang;
23
24int main(int argc, const char **argv) {
25 llvm::sys::PrintStackTraceOnErrorSignal();
26
27 llvm::OwningPtr<Driver> TheDriver(new Driver());
28
29 llvm::OwningPtr<Compilation> C(TheDriver->BuildCompilation(argc, argv));
30
31 return C->Execute();
32}