driver.cpp (199482) | driver.cpp (199512) |
---|---|
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// 10// This is the entry point to the clang driver; it is a thin wrapper 11// for functionality in the Driver clang library. 12// 13//===----------------------------------------------------------------------===// 14 15#include "clang/Driver/Compilation.h" 16#include "clang/Driver/Driver.h" 17#include "clang/Driver/Option.h" | 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// 10// This is the entry point to the clang driver; it is a thin wrapper 11// for functionality in the Driver clang library. 12// 13//===----------------------------------------------------------------------===// 14 15#include "clang/Driver/Compilation.h" 16#include "clang/Driver/Driver.h" 17#include "clang/Driver/Option.h" |
18#include "clang/Driver/Options.h" | |
19 20#include "llvm/ADT/SmallString.h" 21#include "llvm/ADT/OwningPtr.h" 22#include "llvm/Config/config.h" 23#include "llvm/Support/ManagedStatic.h" 24#include "llvm/Support/PrettyStackTrace.h" 25#include "llvm/Support/raw_ostream.h" 26#include "llvm/System/Host.h" --- 147 unchanged lines hidden (view full) --- 174 if (End != S) 175 ApplyOneQAOverride(*OS, Args, std::string(S, End), SavedStrings); 176 S = End; 177 if (*S != '\0') 178 ++S; 179 } 180} 181 | 18 19#include "llvm/ADT/SmallString.h" 20#include "llvm/ADT/OwningPtr.h" 21#include "llvm/Config/config.h" 22#include "llvm/Support/ManagedStatic.h" 23#include "llvm/Support/PrettyStackTrace.h" 24#include "llvm/Support/raw_ostream.h" 25#include "llvm/System/Host.h" --- 147 unchanged lines hidden (view full) --- 173 if (End != S) 174 ApplyOneQAOverride(*OS, Args, std::string(S, End), SavedStrings); 175 S = End; 176 if (*S != '\0') 177 ++S; 178 } 179} 180 |
181extern int cc1_main(Diagnostic &Diags, 182 const char **ArgBegin, const char **ArgEnd); 183 |
|
182int main(int argc, const char **argv) { 183 llvm::sys::PrintStackTraceOnErrorSignal(); 184 llvm::PrettyStackTraceProgram X(argc, argv); 185 186 llvm::sys::Path Path = GetExecutablePath(argv[0]); 187 DriverDiagnosticPrinter DiagClient(Path.getBasename(), llvm::errs()); 188 189 Diagnostic Diags(&DiagClient); 190 | 184int main(int argc, const char **argv) { 185 llvm::sys::PrintStackTraceOnErrorSignal(); 186 llvm::PrettyStackTraceProgram X(argc, argv); 187 188 llvm::sys::Path Path = GetExecutablePath(argv[0]); 189 DriverDiagnosticPrinter DiagClient(Path.getBasename(), llvm::errs()); 190 191 Diagnostic Diags(&DiagClient); 192 |
193 // Dispatch to cc1_main if appropriate. 194 if (argc > 1 && llvm::StringRef(argv[1]) == "-cc1") 195 return cc1_main(Diags, argv+2, argv+argc); 196 |
|
191#ifdef CLANG_IS_PRODUCTION 192 bool IsProduction = true; 193#else 194 bool IsProduction = false; 195#endif 196 Driver TheDriver(Path.getBasename().c_str(), Path.getDirname().c_str(), 197 llvm::sys::getHostTriple().c_str(), 198 "a.out", IsProduction, Diags); --- 60 unchanged lines hidden --- | 197#ifdef CLANG_IS_PRODUCTION 198 bool IsProduction = true; 199#else 200 bool IsProduction = false; 201#endif 202 Driver TheDriver(Path.getBasename().c_str(), Path.getDirname().c_str(), 203 llvm::sys::getHostTriple().c_str(), 204 "a.out", IsProduction, Diags); --- 60 unchanged lines hidden --- |