Lines Matching refs:Clang
1 //===-- examples/clang-interpreter/main.cpp - Clang C Interpreter Example -===//
10 #include "clang/CodeGen/CodeGenAction.h"
11 #include "clang/Basic/DiagnosticOptions.h"
12 #include "clang/Driver/Compilation.h"
13 #include "clang/Driver/Driver.h"
14 #include "clang/Driver/Tool.h"
15 #include "clang/Frontend/CompilerInstance.h"
16 #include "clang/Frontend/CompilerInvocation.h"
17 #include "clang/Frontend/FrontendDiagnostic.h"
18 #include "clang/Frontend/TextDiagnosticPrinter.h"
30 using namespace clang;
31 using namespace clang::driver;
97 TheDriver.setTitle("clang interpreter");
123 if (llvm::StringRef(Cmd.getCreator().getName()) != "clang") {
128 // Initialize a compiler invocation object from the clang (-cc1) arguments.
139 llvm::errs() << "clang invocation:\n";
147 CompilerInstance Clang;
148 Clang.setInvocation(CI.release());
151 Clang.createDiagnostics();
152 if (!Clang.hasDiagnostics())
156 if (Clang.getHeaderSearchOpts().UseBuiltinIncludes &&
157 Clang.getHeaderSearchOpts().ResourceDir.empty())
158 Clang.getHeaderSearchOpts().ResourceDir =
163 if (!Clang.ExecuteAction(*Act))