aboutsummaryrefslogtreecommitdiff
path: root/examples/clang-interpreter/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'examples/clang-interpreter/main.cpp')
-rw-r--r--examples/clang-interpreter/main.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/examples/clang-interpreter/main.cpp b/examples/clang-interpreter/main.cpp
index a99766f9a3..835a5a90ad 100644
--- a/examples/clang-interpreter/main.cpp
+++ b/examples/clang-interpreter/main.cpp
@@ -17,6 +17,7 @@
#include "clang/Frontend/FrontendDiagnostic.h"
#include "clang/Frontend/TextDiagnosticPrinter.h"
+#include "llvm/LLVMContext.h"
#include "llvm/Module.h"
#include "llvm/Config/config.h"
#include "llvm/ADT/OwningPtr.h"
@@ -129,6 +130,7 @@ int main(int argc, const char **argv, char * const *envp) {
// Create a compiler instance to handle the actual work.
CompilerInstance Clang;
+ Clang.setLLVMContext(new llvm::LLVMContext);
Clang.setInvocation(CI.take());
// Create the compilers actual diagnostics engine.