//===--- clang.cpp - C-Language Front-end ---------------------------------===////// The LLVM Compiler Infrastructure//// This file is distributed under the University of Illinois Open Source// License. See LICENSE.TXT for details.////===----------------------------------------------------------------------===////// This utility may be invoked in the following manner:// clang --help - Output help info.// clang [options] - Read from stdin.// clang [options] file - Read from "file".// clang [options] file1 file2 - Read these files.////===----------------------------------------------------------------------===////// TODO: Options to support://// -ffatal-errors// -ftabstop=width////===----------------------------------------------------------------------===//#include"clang.h"#include"ASTConsumers.h"#include"TextDiagnosticBuffer.h"#include"TextDiagnosticPrinter.h"#include"HTMLDiagnostics.h"#include"clang/Analysis/PathDiagnostic.h"#include"clang/AST/TranslationUnit.h"#include"clang/CodeGen/ModuleBuilder.h"#include"clang/Sema/ParseAST.h"#include"clang/AST/ASTConsumer.h"#include"clang/Parse/Parser.h"#include"clang/Lex/HeaderSearch.h"#include"clang/Basic/FileManager.h"#include"clang/Basic/SourceManager.h"#include"clang/Basic/TargetInfo.h"#include"llvm/Module.h"#include"llvm/ADT/SmallPtrSet.h"#include"llvm/Bitcode/ReaderWriter.h"#include"llvm/Support/CommandLine.h"#include"llvm/Support/MemoryBuffer.h"#include"llvm/System/Signals.h"#include"llvm/Config/config.h"#include"llvm/ADT/OwningPtr.h"#include"llvm/System/Path.h"#include<memory>#include<fstream>#include<algorithm>usingnamespaceclang;//===----------------------------------------------------------------------===//// Global options.//===----------------------------------------------------------------------===//staticllvm::cl::opt<bool>Verbose("v