llvm-capstone/clang
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
..
bindings/python cindex.py: Remove more ternary operator + whitespace fixes 2011-10-31 02:06:50 +00:00
docs docs/UsersManual.html: Remove obsolete mingw issue. 2011-11-17 07:54:13 +00:00
examples rename getHostTriple into getDefaultTargetTriple in clang 2011-11-01 21:33:06 +00:00
include 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
INPUTS Enhance the CFG construction to detect no-return destructors for 2011-09-13 06:09:01 +00:00
lib 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
runtime clang/Darwin: Use the compiler-rt provided profile library. 2011-11-17 00:36:57 +00:00
test Constant expression evaluation: add support for evaluation of member pointers 2011-11-17 22:56:20 +00:00
tools 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
unittests Attempt to fix unit tests 2011-09-29 00:53:49 +00:00
utils Fix Neon builtin pointer argument checking for "sret" builtins. 2011-11-16 21:32:23 +00:00
www Stop claiming that Visual Studio 2005 is a viable basis for building 2011-11-16 19:29:07 +00:00
.gitignore Revert "Test commit" 2011-10-24 10:03:25 +00:00
CMakeLists.txt Add the Clang tblgen backends to Clang, and flip the switch to cause 2011-10-06 13:03:08 +00:00
INSTALL.txt
LICENSE.TXT My calendar says it's 2011. 2011-06-12 15:26:54 +00:00
Makefile Add the Clang tblgen backends to Clang, and flip the switch to cause 2011-10-06 13:03:08 +00:00
ModuleInfo.txt
NOTES.txt Make a note about a missing optimization. 2011-07-28 07:41:22 +00:00
README.txt

//===----------------------------------------------------------------------===//
// C Language Family Front-end
//===----------------------------------------------------------------------===//

Welcome to Clang.  This is a compiler front-end for the C family of languages
(C, C++, Objective-C, and Objective-C++) which is built as part of the LLVM
compiler infrastructure project.

Unlike many other compiler frontends, Clang is useful for a number of things
beyond just compiling code: we intend for Clang to be host to a number of
different source level tools.  One example of this is the Clang Static Analyzer.

If you're interested in more (including how to build Clang) it is best to read
the relevant web sites.  Here are some pointers:

Information on Clang:              http://clang.llvm.org/
Building and using Clang:          http://clang.llvm.org/get_started.html
Clang Static Analyzer:             http://clang-analyzer.llvm.org/
Information on the LLVM project:   http://llvm.org/

If you have questions or comments about Clang, a great place to discuss them is
on the Clang development mailing list:
  http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev

If you find a bug in Clang, please file it in the LLVM bug tracker:
  http://llvm.org/bugs/