Home | History | Annotate | Download | only in clang-interpreter

Lines Matching defs: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;
79 TheDriver.setTitle("clang interpreter");
104 if (llvm::StringRef(Cmd->getCreator().getName()) != "clang") {
109 // Initialize a compiler invocation object from the clang (-cc1) arguments.
120 llvm::errs() << "clang invocation:\n";
128 CompilerInstance Clang;
129 Clang.setInvocation(CI.take());
132 Clang.createDiagnostics();
133 if (!Clang.hasDiagnostics())
137 if (Clang.getHeaderSearchOpts().UseBuiltinIncludes &&
138 Clang.getHeaderSearchOpts().ResourceDir.empty())
139 Clang.getHeaderSearchOpts().ResourceDir =
144 if (!Clang.ExecuteAction(*Act))