llvm-project/clang/tools/clang-cc
Chris Lattner 83f095cc7e Introduce a new OpaquePtr<N> struct type, which is a simple POD wrapper for a
pointer.  Its purpose in life is to be a glorified void*, but which does not
implicitly convert to void* or other OpaquePtr's with a different UID.

Introduce Action::DeclPtrTy which is a typedef for OpaquePtr<0>.  Change the 
entire parser/sema interface to use DeclPtrTy instead of DeclTy*.  This
makes the C++ compiler enforce that these aren't convertible to other opaque
types.

We should also convert ExprTy, StmtTy, TypeTy, AttrTy, BaseTy, etc,
but I don't plan to do that in the short term.

The one outstanding known problem with this patch is that we lose the 
bitmangling optimization where ActionResult<DeclPtrTy> doesn't know how to
bitmangle the success bit into the low bit of DeclPtrTy.  I will rectify
this with a subsequent patch.

llvm-svn: 67952
2009-03-28 19:18:32 +00:00
..
ASTConsumers.cpp reduce indentation, no functionality change. 2009-03-28 05:44:17 +00:00
ASTConsumers.h Move <root>/Driver into <root>/tools/clang-cc. 2009-03-24 03:00:12 +00:00
Analyses.def Move <root>/Driver into <root>/tools/clang-cc. 2009-03-24 03:00:12 +00:00
AnalysisConsumer.cpp remove TranslationUnit. 2009-03-28 04:31:31 +00:00
Backend.cpp push more ASTContext goodness out through interfaces that use 2009-03-28 04:27:18 +00:00
CMakeLists.txt Really fix cmake style builds. 2009-03-24 17:52:34 +00:00
CacheTokens.cpp move StatListener out to top level. 2009-03-28 00:55:35 +00:00
DependencyFile.cpp Move <root>/Driver into <root>/tools/clang-cc. 2009-03-24 03:00:12 +00:00
DiagChecker.cpp Move <root>/Driver into <root>/tools/clang-cc. 2009-03-24 03:00:12 +00:00
HTMLPrint.cpp Move <root>/Driver into <root>/tools/clang-cc. 2009-03-24 03:00:12 +00:00
Makefile Install clang-cc to libexec/clang-cc (instead of bin/clang-cc). 2009-03-24 04:07:10 +00:00
PrintParserCallbacks.cpp Introduce a new OpaquePtr<N> struct type, which is a simple POD wrapper for a 2009-03-28 19:18:32 +00:00
PrintPreprocessedOutput.cpp push line markers through -E mode. 2009-03-27 17:13:49 +00:00
RewriteBlocks.cpp Move <root>/Driver into <root>/tools/clang-cc. 2009-03-24 03:00:12 +00:00
RewriteMacros.cpp Move <root>/Driver into <root>/tools/clang-cc. 2009-03-24 03:00:12 +00:00
RewriteObjC.cpp rename some methods. 2009-03-28 06:33:19 +00:00
RewriteTest.cpp Move <root>/Driver into <root>/tools/clang-cc. 2009-03-24 03:00:12 +00:00
SerializationTest.cpp remove TranslationUnit. 2009-03-28 04:31:31 +00:00
Warnings.cpp Move <root>/Driver into <root>/tools/clang-cc. 2009-03-24 03:00:12 +00:00
clang.cpp remove TranslationUnit. 2009-03-28 04:31:31 +00:00
clang.h Move <root>/Driver into <root>/tools/clang-cc. 2009-03-24 03:00:12 +00:00