diff options
author | Daniel Dunbar <daniel@zuster.org> | 2009-11-13 03:51:44 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2009-11-13 03:51:44 +0000 |
commit | 636404a330b72b0ac4a61b7ef82b1f702af88301 (patch) | |
tree | 47cb99c61f80d5c4e0de8356051ba057b2cfc9dc /clang/lib/Frontend/CompilerInstance.cpp | |
parent | 2466e0d92f6a411d588a91f46e0e669c471e3ad2 (diff) | |
download | bcm5719-llvm-636404a330b72b0ac4a61b7ef82b1f702af88301.tar.gz bcm5719-llvm-636404a330b72b0ac4a61b7ef82b1f702af88301.zip |
Add CompilerInstance, and starting moving clang-cc to it.
- The design philosophy is in the CompilerInstance doxyment, if you don't agree
with it now would be a good time to speak up.
llvm-svn: 87078
Diffstat (limited to 'clang/lib/Frontend/CompilerInstance.cpp')
-rw-r--r-- | clang/lib/Frontend/CompilerInstance.cpp | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/clang/lib/Frontend/CompilerInstance.cpp b/clang/lib/Frontend/CompilerInstance.cpp new file mode 100644 index 00000000000..e791f24ee80 --- /dev/null +++ b/clang/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; +} |