aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/Frontend/CMakeLists.txt1
-rw-r--r--lib/Frontend/CompilerInstance.cpp25
2 files changed, 26 insertions, 0 deletions
diff --git a/lib/Frontend/CMakeLists.txt b/lib/Frontend/CMakeLists.txt
index 61df8721d9..676b067193 100644
--- a/lib/Frontend/CMakeLists.txt
+++ b/lib/Frontend/CMakeLists.txt
@@ -6,6 +6,7 @@ add_clang_library(clangFrontend
AnalysisConsumer.cpp
Backend.cpp
CacheTokens.cpp
+ CompilerInstance.cpp
DeclXML.cpp
DependencyFile.cpp
DiagChecker.cpp
diff --git a/lib/Frontend/CompilerInstance.cpp b/lib/Frontend/CompilerInstance.cpp
new file mode 100644
index 0000000000..e791f24ee8
--- /dev/null
+++ b/lib/Frontend/CompilerInstance.cpp
@@ -0,0 +1,25 @@
+//===--- CompilerInstance.cpp ---------------------------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#include "clang/Frontend/CompilerInstance.h"
+#include "clang/Basic/Diagnostic.h"
+#include "clang/Basic/TargetInfo.h"
+#include "llvm/LLVMContext.h"
+using namespace clang;
+
+CompilerInstance::CompilerInstance(llvm::LLVMContext *_LLVMContext,
+ bool _OwnsLLVMContext)
+ : LLVMContext(_LLVMContext),
+ OwnsLLVMContext(_OwnsLLVMContext) {
+}
+
+CompilerInstance::~CompilerInstance() {
+ if (OwnsLLVMContext)
+ delete LLVMContext;
+}