llvm-capstone/clang/include
Ted Kremenek 8cf47df72f Make 'LangOptions' in CompilerInvocation a heap-allocated, reference counted object. I discovered that llvm::RefCountedBase<T> has
a bug where the reference count is copied in the copy constructor, which means that there were cases when the CompilerInvocation
objects created by ASTUnit were actually leaked.  When I fixed that bug locally, it showed that a whole bunch of code assumed
that the LangOptions object that was part of CompilerInvocation was still alive.  By making it heap-allocated and reference counted,
we can keep it around after the CompilerInvocation object goes away.

As part of this change, change CompilerInvocation:getLangOptions() to return a pointer, acting as another clue that this
object may outlive the CompilerInvocation object.

This commit doesn't fix the CompilerInvocation leak itself.  That will come when I commit the fix to llvm::RefCountedBase<T> to
mainline LLVM.

llvm-svn: 144930
2011-11-17 23:01:24 +00:00
..
clang Make 'LangOptions' in CompilerInvocation a heap-allocated, reference counted object. I discovered that llvm::RefCountedBase<T> has 2011-11-17 23:01:24 +00:00
clang-c [libclang] Introduce a new function to apply the indexing callbacks on an existing 2011-11-15 06:20:16 +00:00
CMakeLists.txt Build system changes to use TableGen to generate the various 2009-03-16 23:06:59 +00:00
Makefile Makefile: Switch Clang Makefiles to always include the top-level Clang Makefile. 2010-06-08 20:34:18 +00:00