svn commit: r198402 - in projects/clangbsd/contrib/llvm/tools/clang: . include/clang-c include/clang/AST include/clang/Analysis/PathSensitive include/clang/Analysis/Support include/clang/Basic incl...

Roman Divacky rdivacky at FreeBSD.org
Fri Oct 23 14:31:48 UTC 2009


Author: rdivacky
Date: Fri Oct 23 14:31:47 2009
New Revision: 198402
URL: http://svn.freebsd.org/changeset/base/198402

Log:
  Merge clang from vendor.

Added:
  projects/clangbsd/contrib/llvm/tools/clang/include/clang/AST/TypeLocBuilder.h
     - copied unchanged from r198401, vendor/clang/dist/include/clang/AST/TypeLocBuilder.h
  projects/clangbsd/contrib/llvm/tools/clang/test/CXX/dcl.decl/dcl.init/dcl.init.aggr/p4.cpp
     - copied unchanged from r198401, vendor/clang/dist/test/CXX/dcl.decl/dcl.init/dcl.init.aggr/p4.cpp
  projects/clangbsd/contrib/llvm/tools/clang/test/CXX/temp/temp.spec/p5.cpp
     - copied unchanged from r198401, vendor/clang/dist/test/CXX/temp/temp.spec/p5.cpp
  projects/clangbsd/contrib/llvm/tools/clang/test/CXX/temp/temp.spec/temp.explicit/p1-0x.cpp
     - copied unchanged from r198401, vendor/clang/dist/test/CXX/temp/temp.spec/temp.explicit/p1-0x.cpp
  projects/clangbsd/contrib/llvm/tools/clang/test/CXX/temp/temp.spec/temp.explicit/p1-emit.cpp
     - copied unchanged from r198401, vendor/clang/dist/test/CXX/temp/temp.spec/temp.explicit/p1-emit.cpp
  projects/clangbsd/contrib/llvm/tools/clang/test/CXX/temp/temp.spec/temp.explicit/p1.cpp
     - copied unchanged from r198401, vendor/clang/dist/test/CXX/temp/temp.spec/temp.explicit/p1.cpp
  projects/clangbsd/contrib/llvm/tools/clang/test/CXX/temp/temp.spec/temp.explicit/p2.cpp
     - copied unchanged from r198401, vendor/clang/dist/test/CXX/temp/temp.spec/temp.explicit/p2.cpp
  projects/clangbsd/contrib/llvm/tools/clang/test/CXX/temp/temp.spec/temp.explicit/p3.cpp
     - copied unchanged from r198401, vendor/clang/dist/test/CXX/temp/temp.spec/temp.explicit/p3.cpp
  projects/clangbsd/contrib/llvm/tools/clang/test/CXX/temp/temp.spec/temp.explicit/p4.cpp
     - copied unchanged from r198401, vendor/clang/dist/test/CXX/temp/temp.spec/temp.explicit/p4.cpp
  projects/clangbsd/contrib/llvm/tools/clang/test/CodeGen/2009-10-20-GlobalDebug.c
     - copied unchanged from r198401, vendor/clang/dist/test/CodeGen/2009-10-20-GlobalDebug.c
  projects/clangbsd/contrib/llvm/tools/clang/test/CodeGenCXX/address-of-fntemplate.cpp
     - copied unchanged from r198401, vendor/clang/dist/test/CodeGenCXX/address-of-fntemplate.cpp
  projects/clangbsd/contrib/llvm/tools/clang/test/CodeGenCXX/call-arg-zero-temp.cpp
     - copied unchanged from r198401, vendor/clang/dist/test/CodeGenCXX/call-arg-zero-temp.cpp
  projects/clangbsd/contrib/llvm/tools/clang/test/CodeGenCXX/casts.cpp
     - copied unchanged from r198401, vendor/clang/dist/test/CodeGenCXX/casts.cpp
  projects/clangbsd/contrib/llvm/tools/clang/test/CodeGenCXX/derived-to-base-conv.cpp
     - copied unchanged from r198401, vendor/clang/dist/test/CodeGenCXX/derived-to-base-conv.cpp
  projects/clangbsd/contrib/llvm/tools/clang/test/CodeGenCXX/ptr-to-datamember.cpp
     - copied unchanged from r198401, vendor/clang/dist/test/CodeGenCXX/ptr-to-datamember.cpp
  projects/clangbsd/contrib/llvm/tools/clang/test/CodeGenCXX/temporaries.cpp
     - copied unchanged from r198401, vendor/clang/dist/test/CodeGenCXX/temporaries.cpp
  projects/clangbsd/contrib/llvm/tools/clang/test/Driver/cxx-pth.cpp
     - copied unchanged from r198401, vendor/clang/dist/test/Driver/cxx-pth.cpp
  projects/clangbsd/contrib/llvm/tools/clang/test/Index/c-index-pch.c
     - copied unchanged from r198401, vendor/clang/dist/test/Index/c-index-pch.c
  projects/clangbsd/contrib/llvm/tools/clang/test/Index/c-index-pch.h
     - copied unchanged from r198401, vendor/clang/dist/test/Index/c-index-pch.h
  projects/clangbsd/contrib/llvm/tools/clang/test/SemaCXX/ptrtomember-overload-resolution.cpp
     - copied unchanged from r198401, vendor/clang/dist/test/SemaCXX/ptrtomember-overload-resolution.cpp
  projects/clangbsd/contrib/llvm/tools/clang/test/SemaCXX/switch.cpp
     - copied unchanged from r198401, vendor/clang/dist/test/SemaCXX/switch.cpp
  projects/clangbsd/contrib/llvm/tools/clang/www/UniversalDriver.html
     - copied unchanged from r198401, vendor/clang/dist/www/UniversalDriver.html
Modified:
  projects/clangbsd/contrib/llvm/tools/clang/   (props changed)
  projects/clangbsd/contrib/llvm/tools/clang/include/clang-c/Index.h
  projects/clangbsd/contrib/llvm/tools/clang/include/clang/AST/ASTContext.h
  projects/clangbsd/contrib/llvm/tools/clang/include/clang/AST/Attr.h
  projects/clangbsd/contrib/llvm/tools/clang/include/clang/AST/CXXInheritance.h
  projects/clangbsd/contrib/llvm/tools/clang/include/clang/AST/CanonicalType.h
  projects/clangbsd/contrib/llvm/tools/clang/include/clang/AST/Decl.h
  projects/clangbsd/contrib/llvm/tools/clang/include/clang/AST/DeclBase.h
  projects/clangbsd/contrib/llvm/tools/clang/include/clang/AST/DeclObjC.h
  projects/clangbsd/contrib/llvm/tools/clang/include/clang/AST/Expr.h
  projects/clangbsd/contrib/llvm/tools/clang/include/clang/AST/Type.h
  projects/clangbsd/contrib/llvm/tools/clang/include/clang/AST/TypeLoc.h
  projects/clangbsd/contrib/llvm/tools/clang/include/clang/AST/TypeLocNodes.def
  projects/clangbsd/contrib/llvm/tools/clang/include/clang/AST/TypeLocVisitor.h
  projects/clangbsd/contrib/llvm/tools/clang/include/clang/AST/TypeNodes.def
  projects/clangbsd/contrib/llvm/tools/clang/include/clang/Analysis/PathSensitive/AnalysisContext.h
  projects/clangbsd/contrib/llvm/tools/clang/include/clang/Analysis/PathSensitive/AnalysisManager.h
  projects/clangbsd/contrib/llvm/tools/clang/include/clang/Analysis/PathSensitive/Store.h
  projects/clangbsd/contrib/llvm/tools/clang/include/clang/Analysis/Support/BumpVector.h
  projects/clangbsd/contrib/llvm/tools/clang/include/clang/Basic/Diagnostic.h
  projects/clangbsd/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticParseKinds.td
  projects/clangbsd/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticSemaKinds.td
  projects/clangbsd/contrib/llvm/tools/clang/include/clang/Basic/FileManager.h
  projects/clangbsd/contrib/llvm/tools/clang/include/clang/Basic/IdentifierTable.h
  projects/clangbsd/contrib/llvm/tools/clang/include/clang/Basic/OnDiskHashTable.h
  projects/clangbsd/contrib/llvm/tools/clang/include/clang/Basic/SourceManager.h
  projects/clangbsd/contrib/llvm/tools/clang/include/clang/Basic/TargetInfo.h
  projects/clangbsd/contrib/llvm/tools/clang/include/clang/Frontend/ASTUnit.h
  projects/clangbsd/contrib/llvm/tools/clang/include/clang/Frontend/PCHBitCodes.h
  projects/clangbsd/contrib/llvm/tools/clang/include/clang/Frontend/PCHReader.h
  projects/clangbsd/contrib/llvm/tools/clang/include/clang/Frontend/PCHWriter.h
  projects/clangbsd/contrib/llvm/tools/clang/include/clang/Index/ASTLocation.h
  projects/clangbsd/contrib/llvm/tools/clang/include/clang/Index/Indexer.h
  projects/clangbsd/contrib/llvm/tools/clang/include/clang/Index/Utils.h
  projects/clangbsd/contrib/llvm/tools/clang/include/clang/Parse/Action.h
  projects/clangbsd/contrib/llvm/tools/clang/lib/AST/ASTContext.cpp
  projects/clangbsd/contrib/llvm/tools/clang/lib/AST/CXXInheritance.cpp
  projects/clangbsd/contrib/llvm/tools/clang/lib/AST/Decl.cpp
  projects/clangbsd/contrib/llvm/tools/clang/lib/AST/DeclTemplate.cpp
  projects/clangbsd/contrib/llvm/tools/clang/lib/AST/DeclarationName.cpp
  projects/clangbsd/contrib/llvm/tools/clang/lib/AST/Expr.cpp
  projects/clangbsd/contrib/llvm/tools/clang/lib/AST/Stmt.cpp
  projects/clangbsd/contrib/llvm/tools/clang/lib/AST/StmtDumper.cpp
  projects/clangbsd/contrib/llvm/tools/clang/lib/AST/StmtPrinter.cpp
  projects/clangbsd/contrib/llvm/tools/clang/lib/AST/Type.cpp
  projects/clangbsd/contrib/llvm/tools/clang/lib/AST/TypeLoc.cpp
  projects/clangbsd/contrib/llvm/tools/clang/lib/Analysis/AnalysisContext.cpp
  projects/clangbsd/contrib/llvm/tools/clang/lib/Analysis/BasicObjCFoundationChecks.cpp
  projects/clangbsd/contrib/llvm/tools/clang/lib/Analysis/BasicStore.cpp
  projects/clangbsd/contrib/llvm/tools/clang/lib/Analysis/CFG.cpp
  projects/clangbsd/contrib/llvm/tools/clang/lib/Analysis/CFRefCount.cpp
  projects/clangbsd/contrib/llvm/tools/clang/lib/Analysis/GRExprEngine.cpp
  projects/clangbsd/contrib/llvm/tools/clang/lib/Analysis/GRExprEngineInternalChecks.cpp
  projects/clangbsd/contrib/llvm/tools/clang/lib/Analysis/LiveVariables.cpp
  projects/clangbsd/contrib/llvm/tools/clang/lib/Analysis/RegionStore.cpp
  projects/clangbsd/contrib/llvm/tools/clang/lib/Analysis/SimpleSValuator.cpp
  projects/clangbsd/contrib/llvm/tools/clang/lib/Basic/Diagnostic.cpp
  projects/clangbsd/contrib/llvm/tools/clang/lib/Basic/FileManager.cpp
  projects/clangbsd/contrib/llvm/tools/clang/lib/Basic/IdentifierTable.cpp
  projects/clangbsd/contrib/llvm/tools/clang/lib/Basic/TargetInfo.cpp
  projects/clangbsd/contrib/llvm/tools/clang/lib/Basic/Targets.cpp
  projects/clangbsd/contrib/llvm/tools/clang/lib/CodeGen/CGBlocks.cpp
  projects/clangbsd/contrib/llvm/tools/clang/lib/CodeGen/CGBlocks.h
  projects/clangbsd/contrib/llvm/tools/clang/lib/CodeGen/CGCXX.cpp
  projects/clangbsd/contrib/llvm/tools/clang/lib/CodeGen/CGCall.cpp
  projects/clangbsd/contrib/llvm/tools/clang/lib/CodeGen/CGDebugInfo.cpp
  projects/clangbsd/contrib/llvm/tools/clang/lib/CodeGen/CGDebugInfo.h
  projects/clangbsd/contrib/llvm/tools/clang/lib/CodeGen/CGDecl.cpp
  projects/clangbsd/contrib/llvm/tools/clang/lib/CodeGen/CGExpr.cpp
  projects/clangbsd/contrib/llvm/tools/clang/lib/CodeGen/CGExprAgg.cpp
  projects/clangbsd/contrib/llvm/tools/clang/lib/CodeGen/CGExprConstant.cpp
  projects/clangbsd/contrib/llvm/tools/clang/lib/CodeGen/CGExprScalar.cpp
  projects/clangbsd/contrib/llvm/tools/clang/lib/CodeGen/CGObjCMac.cpp
  projects/clangbsd/contrib/llvm/tools/clang/lib/CodeGen/CGVtable.cpp
  projects/clangbsd/contrib/llvm/tools/clang/lib/CodeGen/CodeGenFunction.cpp
  projects/clangbsd/contrib/llvm/tools/clang/lib/CodeGen/CodeGenFunction.h
  projects/clangbsd/contrib/llvm/tools/clang/lib/CodeGen/CodeGenModule.cpp
  projects/clangbsd/contrib/llvm/tools/clang/lib/CodeGen/Mangle.cpp
  projects/clangbsd/contrib/llvm/tools/clang/lib/CodeGen/TargetABIInfo.cpp
  projects/clangbsd/contrib/llvm/tools/clang/lib/Driver/ToolChains.cpp
  projects/clangbsd/contrib/llvm/tools/clang/lib/Driver/Tools.cpp
  projects/clangbsd/contrib/llvm/tools/clang/lib/Frontend/ASTUnit.cpp
  projects/clangbsd/contrib/llvm/tools/clang/lib/Frontend/AnalysisConsumer.cpp
  projects/clangbsd/contrib/llvm/tools/clang/lib/Frontend/CacheTokens.cpp
  projects/clangbsd/contrib/llvm/tools/clang/lib/Frontend/GeneratePCH.cpp
  projects/clangbsd/contrib/llvm/tools/clang/lib/Frontend/InitHeaderSearch.cpp
  projects/clangbsd/contrib/llvm/tools/clang/lib/Frontend/InitPreprocessor.cpp
  projects/clangbsd/contrib/llvm/tools/clang/lib/Frontend/PCHReader.cpp
  projects/clangbsd/contrib/llvm/tools/clang/lib/Frontend/PCHReaderDecl.cpp
  projects/clangbsd/contrib/llvm/tools/clang/lib/Frontend/PCHWriter.cpp
  projects/clangbsd/contrib/llvm/tools/clang/lib/Frontend/PCHWriterDecl.cpp
  projects/clangbsd/contrib/llvm/tools/clang/lib/Frontend/PrintPreprocessedOutput.cpp
  projects/clangbsd/contrib/llvm/tools/clang/lib/Frontend/RewriteMacros.cpp
  projects/clangbsd/contrib/llvm/tools/clang/lib/Frontend/RewriteObjC.cpp
  projects/clangbsd/contrib/llvm/tools/clang/lib/Frontend/TextDiagnosticPrinter.cpp
  projects/clangbsd/contrib/llvm/tools/clang/lib/Index/ASTLocation.cpp
  projects/clangbsd/contrib/llvm/tools/clang/lib/Index/ASTVisitor.h
  projects/clangbsd/contrib/llvm/tools/clang/lib/Index/DeclReferenceMap.cpp
  projects/clangbsd/contrib/llvm/tools/clang/lib/Index/Entity.cpp
  projects/clangbsd/contrib/llvm/tools/clang/lib/Index/GlobalSelector.cpp
  projects/clangbsd/contrib/llvm/tools/clang/lib/Index/ResolveLocation.cpp
  projects/clangbsd/contrib/llvm/tools/clang/lib/Lex/PPDirectives.cpp
  projects/clangbsd/contrib/llvm/tools/clang/lib/Lex/PTHLexer.cpp
  projects/clangbsd/contrib/llvm/tools/clang/lib/Lex/Preprocessor.cpp
  projects/clangbsd/contrib/llvm/tools/clang/lib/Lex/TokenConcatenation.cpp
  projects/clangbsd/contrib/llvm/tools/clang/lib/Parse/AttributeList.cpp
  projects/clangbsd/contrib/llvm/tools/clang/lib/Parse/ParseExpr.cpp
  projects/clangbsd/contrib/llvm/tools/clang/lib/Parse/ParseExprCXX.cpp
  projects/clangbsd/contrib/llvm/tools/clang/lib/Parse/ParseInit.cpp
  projects/clangbsd/contrib/llvm/tools/clang/lib/Parse/ParseObjc.cpp
  projects/clangbsd/contrib/llvm/tools/clang/lib/Parse/ParseStmt.cpp
  projects/clangbsd/contrib/llvm/tools/clang/lib/Parse/Parser.cpp
  projects/clangbsd/contrib/llvm/tools/clang/lib/Rewrite/RewriteRope.cpp
  projects/clangbsd/contrib/llvm/tools/clang/lib/Sema/Sema.cpp
  projects/clangbsd/contrib/llvm/tools/clang/lib/Sema/Sema.h
  projects/clangbsd/contrib/llvm/tools/clang/lib/Sema/SemaCXXCast.cpp
  projects/clangbsd/contrib/llvm/tools/clang/lib/Sema/SemaChecking.cpp
  projects/clangbsd/contrib/llvm/tools/clang/lib/Sema/SemaCodeComplete.cpp
  projects/clangbsd/contrib/llvm/tools/clang/lib/Sema/SemaDecl.cpp
  projects/clangbsd/contrib/llvm/tools/clang/lib/Sema/SemaDeclAttr.cpp
  projects/clangbsd/contrib/llvm/tools/clang/lib/Sema/SemaDeclCXX.cpp
  projects/clangbsd/contrib/llvm/tools/clang/lib/Sema/SemaExpr.cpp
  projects/clangbsd/contrib/llvm/tools/clang/lib/Sema/SemaExprCXX.cpp
  projects/clangbsd/contrib/llvm/tools/clang/lib/Sema/SemaExprObjC.cpp
  projects/clangbsd/contrib/llvm/tools/clang/lib/Sema/SemaInit.cpp
  projects/clangbsd/contrib/llvm/tools/clang/lib/Sema/SemaOverload.cpp
  projects/clangbsd/contrib/llvm/tools/clang/lib/Sema/SemaStmt.cpp
  projects/clangbsd/contrib/llvm/tools/clang/lib/Sema/SemaTemplate.cpp
  projects/clangbsd/contrib/llvm/tools/clang/lib/Sema/SemaTemplateDeduction.cpp
  projects/clangbsd/contrib/llvm/tools/clang/lib/Sema/SemaTemplateInstantiate.cpp
  projects/clangbsd/contrib/llvm/tools/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp
  projects/clangbsd/contrib/llvm/tools/clang/lib/Sema/SemaType.cpp
  projects/clangbsd/contrib/llvm/tools/clang/lib/Sema/TreeTransform.h
  projects/clangbsd/contrib/llvm/tools/clang/test/Analysis/misc-ps-region-store.m
  projects/clangbsd/contrib/llvm/tools/clang/test/Analysis/misc-ps.m
  projects/clangbsd/contrib/llvm/tools/clang/test/Analysis/refcnt_naming.m
  projects/clangbsd/contrib/llvm/tools/clang/test/Analysis/retain-release-region-store.m
  projects/clangbsd/contrib/llvm/tools/clang/test/Analysis/retain-release.m
  projects/clangbsd/contrib/llvm/tools/clang/test/CMakeLists.txt
  projects/clangbsd/contrib/llvm/tools/clang/test/CodeGen/builtins.c
  projects/clangbsd/contrib/llvm/tools/clang/test/CodeGen/debug-info.c
  projects/clangbsd/contrib/llvm/tools/clang/test/CodeGen/ext-vector-shuffle.c
  projects/clangbsd/contrib/llvm/tools/clang/test/CodeGen/vector.c
  projects/clangbsd/contrib/llvm/tools/clang/test/CodeGenCXX/default-arg-temps.cpp
  projects/clangbsd/contrib/llvm/tools/clang/test/CodeGenCXX/expr.cpp
  projects/clangbsd/contrib/llvm/tools/clang/test/CodeGenCXX/mangle-subst.cpp
  projects/clangbsd/contrib/llvm/tools/clang/test/CodeGenCXX/member-function-pointers.cpp
  projects/clangbsd/contrib/llvm/tools/clang/test/CodeGenCXX/references.cpp
  projects/clangbsd/contrib/llvm/tools/clang/test/Driver/darwin-ld.c
  projects/clangbsd/contrib/llvm/tools/clang/test/Misc/message-length.c
  projects/clangbsd/contrib/llvm/tools/clang/test/Preprocessor/macro_paste_bcpl_comment.c
  projects/clangbsd/contrib/llvm/tools/clang/test/Sema/attr-noreturn.c
  projects/clangbsd/contrib/llvm/tools/clang/test/Sema/exprs.c
  projects/clangbsd/contrib/llvm/tools/clang/test/Sema/switch.c
  projects/clangbsd/contrib/llvm/tools/clang/test/Sema/vector-assign.c
  projects/clangbsd/contrib/llvm/tools/clang/test/Sema/vector-init.c
  projects/clangbsd/contrib/llvm/tools/clang/test/SemaCXX/abstract.cpp
  projects/clangbsd/contrib/llvm/tools/clang/test/SemaCXX/ambiguous-builtin-unary-operator.cpp
  projects/clangbsd/contrib/llvm/tools/clang/test/SemaCXX/bool.cpp
  projects/clangbsd/contrib/llvm/tools/clang/test/SemaCXX/builtin-ptrtomember-ambig.cpp
  projects/clangbsd/contrib/llvm/tools/clang/test/SemaCXX/builtin-ptrtomember-overload.cpp
  projects/clangbsd/contrib/llvm/tools/clang/test/SemaCXX/exception-spec.cpp
  projects/clangbsd/contrib/llvm/tools/clang/test/SemaCXX/incomplete-call.cpp
  projects/clangbsd/contrib/llvm/tools/clang/test/SemaCXX/member-expr.cpp
  projects/clangbsd/contrib/llvm/tools/clang/test/SemaCXX/overloaded-builtin-operators.cpp
  projects/clangbsd/contrib/llvm/tools/clang/test/SemaCXX/overloaded-operator.cpp
  projects/clangbsd/contrib/llvm/tools/clang/test/SemaCXX/static-cast.cpp
  projects/clangbsd/contrib/llvm/tools/clang/test/SemaObjC/objc-string-constant.m
  projects/clangbsd/contrib/llvm/tools/clang/test/SemaObjC/try-catch.m
  projects/clangbsd/contrib/llvm/tools/clang/test/SemaTemplate/extern-templates.cpp
  projects/clangbsd/contrib/llvm/tools/clang/test/SemaTemplate/fun-template-def.cpp
  projects/clangbsd/contrib/llvm/tools/clang/test/SemaTemplate/instantiate-expr-2.cpp
  projects/clangbsd/contrib/llvm/tools/clang/test/SemaTemplate/member-access-expr.cpp
  projects/clangbsd/contrib/llvm/tools/clang/test/SemaTemplate/member-template-access-expr.cpp
  projects/clangbsd/contrib/llvm/tools/clang/test/SemaTemplate/variadic-class-template-2.cpp
  projects/clangbsd/contrib/llvm/tools/clang/tools/CIndex/CIndex.cpp
  projects/clangbsd/contrib/llvm/tools/clang/tools/CIndex/CIndex.exports
  projects/clangbsd/contrib/llvm/tools/clang/tools/CIndex/CMakeLists.txt
  projects/clangbsd/contrib/llvm/tools/clang/tools/c-index-test/c-index-test.c
  projects/clangbsd/contrib/llvm/tools/clang/tools/clang-cc/clang-cc.cpp
  projects/clangbsd/contrib/llvm/tools/clang/tools/index-test/index-test.cpp
  projects/clangbsd/contrib/llvm/tools/clang/www/OpenProjects.html
  projects/clangbsd/contrib/llvm/tools/clang/www/analyzer/latest_checker.html.incl
  projects/clangbsd/contrib/llvm/tools/clang/www/comparison.html
  projects/clangbsd/contrib/llvm/tools/clang/www/cxx_status.html

Modified: projects/clangbsd/contrib/llvm/tools/clang/include/clang-c/Index.h
==============================================================================
--- projects/clangbsd/contrib/llvm/tools/clang/include/clang-c/Index.h	Fri Oct 23 14:28:06 2009	(r198401)
+++ projects/clangbsd/contrib/llvm/tools/clang/include/clang-c/Index.h	Fri Oct 23 14:31:47 2009	(r198402)
@@ -99,18 +99,84 @@ typedef struct {
 } CXCursor;  
 
 /* A unique token for looking up "visible" CXDecls from a CXTranslationUnit. */
-typedef void *CXEntity;     
+typedef void *CXEntity;
 
-CXIndex clang_createIndex();
+/**  
+ * \brief clang_createIndex() provides a shared context for creating
+ * translation units. It provides two options:
+ *
+ * - excludeDeclarationsFromPCH: When non-zero, allows enumeration of "local"
+ * declarations (when loading any new translation units). A "local" declaration
+ * is one that belongs in the translation unit itself and not in a precompiled 
+ * header that was used by the translation unit. If zero, all declarations
+ * will be enumerated.
+ *
+ * - displayDiagnostics: when non-zero, diagnostics will be output. If zero,
+ * diagnostics will be ignored.
+ *
+ * Here is an example:
+ *
+ *   // excludeDeclsFromPCH = 1, displayDiagnostics = 1
+ *   Idx = clang_createIndex(1, 1);
+ *
+ *   // IndexTest.pch was produced with the following command:
+ *   // "clang -x c IndexTest.h -emit-ast -o IndexTest.pch"
+ *   TU = clang_createTranslationUnit(Idx, "IndexTest.pch");
+ *
+ *   // This will load all the symbols from 'IndexTest.pch'
+ *   clang_loadTranslationUnit(TU, TranslationUnitVisitor, 0);
+ *   clang_disposeTranslationUnit(TU);
+ *
+ *   // This will load all the symbols from 'IndexTest.c', excluding symbols
+ *   // from 'IndexTest.pch'.
+ *   char *args[] = { "-Xclang", "-include-pch=IndexTest.pch", 0 };
+ *   TU = clang_createTranslationUnitFromSourceFile(Idx, "IndexTest.c", 2, args);
+ *   clang_loadTranslationUnit(TU, TranslationUnitVisitor, 0);
+ *   clang_disposeTranslationUnit(TU);
+ *
+ * This process of creating the 'pch', loading it separately, and using it (via
+ * -include-pch) allows 'excludeDeclsFromPCH' to remove redundant callbacks
+ * (which gives the indexer the same performance benefit as the compiler).
+ */
+CXIndex clang_createIndex(int excludeDeclarationsFromPCH,
+                          int displayDiagnostics);
 void clang_disposeIndex(CXIndex);
 
 const char *clang_getTranslationUnitSpelling(CXTranslationUnit CTUnit);
 
+/* 
+ * \brief Create a translation unit from an AST file (-emit-ast).
+ */
 CXTranslationUnit clang_createTranslationUnit(
   CXIndex, const char *ast_filename
 );
+/**
+ * \brief Destroy the specified CXTranslationUnit object.
+ */ 
 void clang_disposeTranslationUnit(CXTranslationUnit);
 
+/**
+ * \brief Return the CXTranslationUnit for a given source file and the provided
+ * command line arguments one would pass to the compiler.
+ *
+ * Note: The 'source_filename' argument is optional.  If the caller provides a NULL pointer,
+ *  the name of the source file is expected to reside in the specified command line arguments.
+ *
+ * Note: When encountered in 'clang_command_line_args', the following options are ignored:
+ *
+ *   '-c'
+ *   '-emit-ast'
+ *   '-fsyntax-only'
+ *   '-o <output file>'  (both '-o' and '<output file>' are ignored)
+ *
+ */
+CXTranslationUnit clang_createTranslationUnitFromSourceFile(
+  CXIndex CIdx, 
+  const char *source_filename /* specify NULL if the source file is in clang_command_line_args */,
+  int num_clang_command_line_args, 
+  const char **clang_command_line_args
+);
+
 /*
    Usage: clang_loadTranslationUnit(). Will load the toplevel declarations
    within a translation unit, issuing a 'callback' for each one.
@@ -182,9 +248,28 @@ const char *clang_getDeclSource(CXDecl);
 /*
  * CXCursor Operations.
  */
+/**
+   Usage: clang_getCursor() will translate a source/line/column position
+   into an AST cursor (to derive semantic information from the source code).
+ */
 CXCursor clang_getCursor(CXTranslationUnit, const char *source_name, 
                          unsigned line, unsigned column);
 
+/**
+   Usage: clang_getCursorWithHint() provides the same functionality as
+   clang_getCursor() except that it takes an option 'hint' argument.
+   The 'hint' is a temporary CXLookupHint object (whose lifetime is managed by 
+   the caller) that should be initialized with clang_initCXLookupHint().
+
+   FIXME: Add a better comment once getCursorWithHint() has more functionality.
+ */                         
+typedef CXCursor CXLookupHint;
+CXCursor clang_getCursorWithHint(CXTranslationUnit, const char *source_name, 
+                                 unsigned line, unsigned column, 
+                                 CXLookupHint *hint);
+
+void clang_initCXLookupHint(CXLookupHint *hint);
+
 enum CXCursorKind clang_getCursorKind(CXCursor);
 unsigned clang_isDeclaration(enum CXCursorKind);
 unsigned clang_isReference(enum CXCursorKind);

Modified: projects/clangbsd/contrib/llvm/tools/clang/include/clang/AST/ASTContext.h
==============================================================================
--- projects/clangbsd/contrib/llvm/tools/clang/include/clang/AST/ASTContext.h	Fri Oct 23 14:28:06 2009	(r198401)
+++ projects/clangbsd/contrib/llvm/tools/clang/include/clang/AST/ASTContext.h	Fri Oct 23 14:31:47 2009	(r198402)
@@ -81,12 +81,12 @@ class ASTContext {
   llvm::FoldingSet<DependentTypeOfExprType> DependentTypeOfExprTypes;
   llvm::FoldingSet<DependentDecltypeType> DependentDecltypeTypes;
   llvm::FoldingSet<TemplateTypeParmType> TemplateTypeParmTypes;
+  llvm::FoldingSet<SubstTemplateTypeParmType> SubstTemplateTypeParmTypes;
   llvm::FoldingSet<TemplateSpecializationType> TemplateSpecializationTypes;
   llvm::FoldingSet<QualifiedNameType> QualifiedNameTypes;
   llvm::FoldingSet<TypenameType> TypenameTypes;
   llvm::FoldingSet<ObjCInterfaceType> ObjCInterfaceTypes;
   llvm::FoldingSet<ObjCObjectPointerType> ObjCObjectPointerTypes;
-  llvm::FoldingSet<ObjCProtocolListType> ObjCProtocolListTypes;
   llvm::FoldingSet<ElaboratedType> ElaboratedTypes;
 
   llvm::FoldingSet<QualifiedTemplateName> QualifiedTemplateNames;
@@ -143,6 +143,12 @@ class ASTContext {
   /// \brief The type for the C sigjmp_buf type.
   TypeDecl *sigjmp_bufDecl;
 
+  /// \brief Type for the Block descriptor for Blocks CodeGen.
+  RecordDecl *BlockDescriptorType;
+
+  /// \brief Type for the Block descriptor for Blocks CodeGen.
+  RecordDecl *BlockDescriptorExtendedType;
+
   /// \brief Keeps track of all declaration attributes.
   ///
   /// Since so few decls have attrs, we keep them in a hash map instead of
@@ -390,9 +396,47 @@ public:
   /// of the specified type.
   QualType getBlockPointerType(QualType T);
 
+  /// This gets the struct used to keep track of the descriptor for pointer to
+  /// blocks.
+  QualType getBlockDescriptorType();
+
+  // Set the type for a Block descriptor type.
+  void setBlockDescriptorType(QualType T);
+  /// Get the BlockDescriptorType type, or NULL if it hasn't yet been built.
+  QualType getRawBlockdescriptorType() {
+    if (BlockDescriptorType)
+      return getTagDeclType(BlockDescriptorType);
+    return QualType();
+  }
+
+  /// This gets the struct used to keep track of the extended descriptor for
+  /// pointer to blocks.
+  QualType getBlockDescriptorExtendedType();
+
+  // Set the type for a Block descriptor extended type.
+  void setBlockDescriptorExtendedType(QualType T);
+  /// Get the BlockDescriptorExtendedType type, or NULL if it hasn't yet been
+  /// built.
+  QualType getRawBlockdescriptorExtendedType() {
+    if (BlockDescriptorExtendedType)
+      return getTagDeclType(BlockDescriptorExtendedType);
+    return QualType();
+  }
+
+  /// This gets the struct used to keep track of pointer to blocks, complete
+  /// with captured variables.
+  QualType getBlockParmType(bool BlockHasCopyDispose,
+                            llvm::SmallVector<const Expr *, 8> &BDRDs);
+
+  /// This builds the struct used for __block variables.
+  QualType BuildByRefType(const char *DeclName, QualType Ty);
+
+  /// Returns true iff we need copy/dispose helpers for the given type.
+  bool BlockRequiresCopying(QualType Ty);
+
   /// getLValueReferenceType - Return the uniqued reference to the type for an
   /// lvalue reference to the specified type.
-  QualType getLValueReferenceType(QualType T);
+  QualType getLValueReferenceType(QualType T, bool SpelledAsLValue = true);
 
   /// getRValueReferenceType - Return the uniqued reference to the type for an
   /// rvalue reference to the specified type.
@@ -431,22 +475,6 @@ public:
                                 ArrayType::ArraySizeModifier ASM,
                                 unsigned EltTypeQuals);
 
-  /// getConstantArrayWithExprType - Return a reference to the type for a
-  /// constant array of the specified element type.
-  QualType getConstantArrayWithExprType(QualType EltTy,
-                                        const llvm::APInt &ArySize,
-                                        Expr *ArySizeExpr,
-                                        ArrayType::ArraySizeModifier ASM,
-                                        unsigned EltTypeQuals,
-                                        SourceRange Brackets);
-
-  /// getConstantArrayWithoutExprType - Return a reference to the type
-  /// for a constant array of the specified element type.
-  QualType getConstantArrayWithoutExprType(QualType EltTy,
-                                           const llvm::APInt &ArySize,
-                                           ArrayType::ArraySizeModifier ASM,
-                                           unsigned EltTypeQuals);
-
   /// getVectorType - Return the unique reference to a vector type of
   /// the specified element type and size. VectorType must be a built-in type.
   QualType getVectorType(QualType VectorType, unsigned NumElts);
@@ -485,6 +513,9 @@ public:
   /// specified typename decl.
   QualType getTypedefType(TypedefDecl *Decl);
 
+  QualType getSubstTemplateTypeParmType(const TemplateTypeParmType *Replaced,
+                                        QualType Replacement);
+
   QualType getTemplateTypeParmType(unsigned Depth, unsigned Index,
                                    bool ParameterPack,
                                    IdentifierInfo *Name = 0);
@@ -515,10 +546,6 @@ public:
                                     ObjCProtocolDecl **ProtocolList = 0,
                                     unsigned NumProtocols = 0);
 
-  QualType getObjCProtocolListType(QualType T,
-                                   ObjCProtocolDecl **Protocols,
-                                   unsigned NumProtocols);
-
   /// getTypeOfType - GCC extension.
   QualType getTypeOfExprType(Expr *e);
   QualType getTypeOfType(QualType t);
@@ -815,6 +842,12 @@ public:
     return T->getCanonicalTypeInternal().getTypePtr();
   }
 
+  /// getCanonicalParamType - Return the canonical parameter type
+  /// corresponding to the specific potentially non-canonical one.
+  /// Qualifiers are stripped off, functions are turned into function
+  /// pointers, and arrays decay one level into pointers.
+  CanQualType getCanonicalParamType(QualType T);
+
   /// \brief Determine whether the given types are equivalent.
   bool hasSameType(QualType T1, QualType T2) {
     return getCanonicalType(T1) == getCanonicalType(T2);
@@ -1047,7 +1080,10 @@ public:
   /// \param T the type that will be the basis for type source info. This type
   /// should refer to how the declarator was written in source code, not to
   /// what type semantic analysis resolved the declarator to.
-  DeclaratorInfo *CreateDeclaratorInfo(QualType T);
+  ///
+  /// \param Size the size of the type info to create, or 0 if the size
+  /// should be calculated based on the type.
+  DeclaratorInfo *CreateDeclaratorInfo(QualType T, unsigned Size = 0);
 
 private:
   ASTContext(const ASTContext&); // DO NOT IMPLEMENT

Modified: projects/clangbsd/contrib/llvm/tools/clang/include/clang/AST/Attr.h
==============================================================================
--- projects/clangbsd/contrib/llvm/tools/clang/include/clang/AST/Attr.h	Fri Oct 23 14:28:06 2009	(r198401)
+++ projects/clangbsd/contrib/llvm/tools/clang/include/clang/AST/Attr.h	Fri Oct 23 14:31:47 2009	(r198402)
@@ -185,7 +185,6 @@ class AlignedAttr : public Attr {
 public:
   AlignedAttr(unsigned alignment) : Attr(Aligned), Alignment(alignment) {}
 
-  // FIXME: Should use addressable units, not bits, to match llvm
   /// getAlignment - The specified alignment in bits.
   unsigned getAlignment() const { return Alignment; }
 

Modified: projects/clangbsd/contrib/llvm/tools/clang/include/clang/AST/CXXInheritance.h
==============================================================================
--- projects/clangbsd/contrib/llvm/tools/clang/include/clang/AST/CXXInheritance.h	Fri Oct 23 14:28:06 2009	(r198401)
+++ projects/clangbsd/contrib/llvm/tools/clang/include/clang/AST/CXXInheritance.h	Fri Oct 23 14:31:47 2009	(r198402)
@@ -63,7 +63,8 @@ struct CXXBasePathElement {
 /// structure, which captures both the link from a derived class to one of its
 /// direct bases and identification describing which base class
 /// subobject is being used.
-struct CXXBasePath : public llvm::SmallVector<CXXBasePathElement, 4> {
+class CXXBasePath : public llvm::SmallVector<CXXBasePathElement, 4> {
+public:
   /// \brief The set of declarations found inside this base class
   /// subobject.
   DeclContext::lookup_result Decls;

Modified: projects/clangbsd/contrib/llvm/tools/clang/include/clang/AST/CanonicalType.h
==============================================================================
--- projects/clangbsd/contrib/llvm/tools/clang/include/clang/AST/CanonicalType.h	Fri Oct 23 14:28:06 2009	(r198401)
+++ projects/clangbsd/contrib/llvm/tools/clang/include/clang/AST/CanonicalType.h	Fri Oct 23 14:31:47 2009	(r198402)
@@ -487,30 +487,6 @@ struct CanProxyAdaptor<ConstantArrayType
 };
 
 template<>
-struct CanProxyAdaptor<ConstantArrayWithExprType>
-  : public CanProxyBase<ConstantArrayWithExprType> {
-  LLVM_CLANG_CANPROXY_TYPE_ACCESSOR(getElementType)
-  LLVM_CLANG_CANPROXY_SIMPLE_ACCESSOR(ArrayType::ArraySizeModifier,
-                                      getSizeModifier)
-  LLVM_CLANG_CANPROXY_SIMPLE_ACCESSOR(Qualifiers, getIndexTypeQualifiers)
-  LLVM_CLANG_CANPROXY_SIMPLE_ACCESSOR(const llvm::APInt &, getSize)
-  LLVM_CLANG_CANPROXY_SIMPLE_ACCESSOR(Expr *, getSizeExpr)
-  LLVM_CLANG_CANPROXY_SIMPLE_ACCESSOR(SourceRange, getBracketsRange)
-  LLVM_CLANG_CANPROXY_SIMPLE_ACCESSOR(SourceLocation, getLBracketLoc)
-  LLVM_CLANG_CANPROXY_SIMPLE_ACCESSOR(SourceLocation, getRBracketLoc)
-};
-
-template<>
-struct CanProxyAdaptor<ConstantArrayWithoutExprType>
-  : public CanProxyBase<ConstantArrayWithoutExprType> {
-  LLVM_CLANG_CANPROXY_TYPE_ACCESSOR(getElementType)
-  LLVM_CLANG_CANPROXY_SIMPLE_ACCESSOR(ArrayType::ArraySizeModifier,
-                                      getSizeModifier)
-  LLVM_CLANG_CANPROXY_SIMPLE_ACCESSOR(Qualifiers, getIndexTypeQualifiers)
-  LLVM_CLANG_CANPROXY_SIMPLE_ACCESSOR(const llvm::APInt &, getSize)
-};
-
-template<>
 struct CanProxyAdaptor<IncompleteArrayType>
   : public CanProxyBase<IncompleteArrayType> {
   LLVM_CLANG_CANPROXY_TYPE_ACCESSOR(getElementType)
@@ -684,7 +660,7 @@ CanQual<T> CanQual<T>::getFromOpaquePtr(
 
 template<typename T>
 CanQual<T> CanQual<T>::CreateUnsafe(QualType Other) {
-  assert((Other.isNull() || Other->isCanonical()) && "Type is not canonical!");
+  assert((Other.isNull() || Other.isCanonical()) && "Type is not canonical!");
   assert((Other.isNull() || isa<T>(Other.getTypePtr())) &&
          "Dynamic type does not meet the static type's requires");
   CanQual<T> Result;

Modified: projects/clangbsd/contrib/llvm/tools/clang/include/clang/AST/Decl.h
==============================================================================
--- projects/clangbsd/contrib/llvm/tools/clang/include/clang/AST/Decl.h	Fri Oct 23 14:28:06 2009	(r198401)
+++ projects/clangbsd/contrib/llvm/tools/clang/include/clang/AST/Decl.h	Fri Oct 23 14:31:47 2009	(r198402)
@@ -47,6 +47,9 @@ class DeclaratorInfo {
   friend class ASTContext;
   DeclaratorInfo(QualType ty) : Ty(ty) { }
 public:
+  /// \brief Return the type wrapped by this type source info.
+  QualType getType() const { return Ty; }
+
   /// \brief Return the TypeLoc wrapper for the type source info.
   TypeLoc getTypeLoc() const;
 };
@@ -93,28 +96,43 @@ public:
   /// name (C++ constructor, Objective-C selector, etc.).
   IdentifierInfo *getIdentifier() const { return Name.getAsIdentifierInfo(); }
 
+  /// getName - Get the name of identifier for this declaration as a StringRef.
+  /// This requires that the declaration have a name and that it be a simple
+  /// identifier.
+  llvm::StringRef getName() const {
+    assert(Name.isIdentifier() && "Name is not a simple identifier");
+    return getIdentifier() ? getIdentifier()->getName() : "";
+  }
+
   /// getNameAsCString - Get the name of identifier for this declaration as a
   /// C string (const char*).  This requires that the declaration have a name
   /// and that it be a simple identifier.
+  //
+  // FIXME: Deprecated, move clients to getName().
   const char *getNameAsCString() const {
-    assert(getIdentifier() && "Name is not a simple identifier");
-    return getIdentifier()->getName();
+    assert(Name.isIdentifier() && "Name is not a simple identifier");
+    return getIdentifier() ? getIdentifier()->getNameStart() : "";
   }
 
-  /// getDeclName - Get the actual, stored name of the declaration,
-  /// which may be a special name.
-  DeclarationName getDeclName() const { return Name; }
-
-  /// \brief Set the name of this declaration.
-  void setDeclName(DeclarationName N) { Name = N; }
-
   /// getNameAsString - Get a human-readable name for the declaration, even if
   /// it is one of the special kinds of names (C++ constructor, Objective-C
   /// selector, etc).  Creating this name requires expensive string
   /// manipulation, so it should be called only when performance doesn't matter.
   /// For simple declarations, getNameAsCString() should suffice.
+  //
+  // FIXME: This function should be renamed to indicate that it is not just an
+  // alternate form of getName(), and clients should move as appropriate.
+  //
+  // FIXME: Deprecated, move clients to getName().
   std::string getNameAsString() const { return Name.getAsString(); }
 
+  /// getDeclName - Get the actual, stored name of the declaration,
+  /// which may be a special name.
+  DeclarationName getDeclName() const { return Name; }
+
+  /// \brief Set the name of this declaration.
+  void setDeclName(DeclarationName N) { Name = N; }
+
   /// getQualifiedNameAsString - Returns human-readable qualified name for
   /// declaration, like A::B::i, for i being member of namespace A::B.
   /// If declaration is not member of context which can be named (record,
@@ -604,7 +622,8 @@ public:
   
   /// \brief For a static data member that was instantiated from a static
   /// data member of a class template, set the template specialiation kind.
-  void setTemplateSpecializationKind(TemplateSpecializationKind TSK);
+  void setTemplateSpecializationKind(TemplateSpecializationKind TSK,
+                        SourceLocation PointOfInstantiation = SourceLocation());
   
   /// isFileVarDecl - Returns true for file scoped variable declaration.
   bool isFileVarDecl() const {
@@ -1170,7 +1189,16 @@ public:
 
   /// \brief Determine what kind of template instantiation this function
   /// represents.
-  void setTemplateSpecializationKind(TemplateSpecializationKind TSK);
+  void setTemplateSpecializationKind(TemplateSpecializationKind TSK,
+                        SourceLocation PointOfInstantiation = SourceLocation());
+
+  /// \brief Retrieve the (first) point of instantiation of a function template
+  /// specialization or a member of a class template specialization.
+  ///
+  /// \returns the first point of instantiation, if this function was 
+  /// instantiated from a template; otherwie, returns an invalid source 
+  /// location.
+  SourceLocation getPointOfInstantiation() const;
 
   /// \brief Determine whether this is or was instantiated from an out-of-line 
   /// definition of a member function.

Modified: projects/clangbsd/contrib/llvm/tools/clang/include/clang/AST/DeclBase.h
==============================================================================
--- projects/clangbsd/contrib/llvm/tools/clang/include/clang/AST/DeclBase.h	Fri Oct 23 14:28:06 2009	(r198401)
+++ projects/clangbsd/contrib/llvm/tools/clang/include/clang/AST/DeclBase.h	Fri Oct 23 14:31:47 2009	(r198402)
@@ -166,6 +166,15 @@ private:
   bool Used : 1;
 
 protected:
+  /// Access - Used by C++ decls for the access specifier.
+  // NOTE: VC++ treats enums as signed, avoid using the AccessSpecifier enum
+  unsigned Access : 2;
+  friend class CXXClassMemberWrapper;
+  
+  // PCHLevel - the "level" of precompiled header/AST file from which this
+  // declaration was built.
+  unsigned PCHLevel : 2;
+  
   /// IdentifierNamespace - This specifies what IDNS_* namespace this lives in.
   unsigned IdentifierNamespace : 16;
 
@@ -177,16 +186,13 @@ private:
 #endif
 
 protected:
-  /// Access - Used by C++ decls for the access specifier.
-  // NOTE: VC++ treats enums as signed, avoid using the AccessSpecifier enum
-  unsigned Access : 2;
-  friend class CXXClassMemberWrapper;
 
   Decl(Kind DK, DeclContext *DC, SourceLocation L)
     : NextDeclInContext(0), DeclCtx(DC),
       Loc(L), DeclKind(DK), InvalidDecl(0),
       HasAttrs(false), Implicit(false), Used(false),
-      IdentifierNamespace(getIdentifierNamespaceForKind(DK)), Access(AS_none) {
+      Access(AS_none), PCHLevel(0),
+      IdentifierNamespace(getIdentifierNamespaceForKind(DK)) {
     if (Decl::CollectingStats()) addDeclKind(DK);
   }
 
@@ -274,6 +280,26 @@ public:
   bool isUsed() const { return Used; }
   void setUsed(bool U = true) { Used = U; }
 
+  /// \brief Retrieve the level of precompiled header from which this
+  /// declaration was generated.
+  ///
+  /// The PCH level of a declaration describes where the declaration originated
+  /// from. A PCH level of 0 indicates that the declaration was not from a 
+  /// precompiled header. A PCH level of 1 indicates that the declaration was
+  /// from a top-level precompiled header; 2 indicates that the declaration 
+  /// comes from a precompiled header on which the top-level precompiled header
+  /// depends, and so on. 
+  unsigned getPCHLevel() const { return PCHLevel; }
+
+  /// \brief The maximum PCH level that any declaration may have.
+  static const unsigned MaxPCHLevel = 3;
+  
+  /// \brief Set the PCH level of this declaration.
+  void setPCHLevel(unsigned Level) { 
+    assert(Level < MaxPCHLevel && "PCH level exceeds the maximum");
+    PCHLevel = Level;
+  }
+  
   unsigned getIdentifierNamespace() const {
     return IdentifierNamespace;
   }

Modified: projects/clangbsd/contrib/llvm/tools/clang/include/clang/AST/DeclObjC.h
==============================================================================
--- projects/clangbsd/contrib/llvm/tools/clang/include/clang/AST/DeclObjC.h	Fri Oct 23 14:28:06 2009	(r198401)
+++ projects/clangbsd/contrib/llvm/tools/clang/include/clang/AST/DeclObjC.h	Fri Oct 23 14:31:47 2009	(r198402)
@@ -944,16 +944,29 @@ public:
 
   ObjCCategoryDecl *getCategoryClass() const;
 
+  /// getName - Get the name of identifier for the class interface associated
+  /// with this implementation as a StringRef.
+  //
+  // FIXME: This is a bad API, we are overriding the NamedDecl::getName, to mean
+  // something different.
+  llvm::StringRef getName() const {
+    return Id ? Id->getNameStart() : "";
+  }
+
   /// getNameAsCString - Get the name of identifier for the class
   /// interface associated with this implementation as a C string
   /// (const char*).
+  //
+  // FIXME: Deprecated, move clients to getName().
   const char *getNameAsCString() const {
-    return Id ? Id->getName() : "";
+    return Id ? Id->getNameStart() : "";
   }
 
   /// @brief Get the name of the class associated with this interface.
+  //
+  // FIXME: Deprecated, move clients to getName().
   std::string getNameAsString() const {
-    return Id ? Id->getName() : "";
+    return getName();
   }
 
   static bool classof(const Decl *D) { return D->getKind() == ObjCCategoryImpl;}
@@ -995,17 +1008,30 @@ public:
     return getClassInterface()->getIdentifier();
   }
 
+  /// getName - Get the name of identifier for the class interface associated
+  /// with this implementation as a StringRef.
+  //
+  // FIXME: This is a bad API, we are overriding the NamedDecl::getName, to mean
+  // something different.
+  llvm::StringRef getName() const {
+    assert(getIdentifier() && "Name is not a simple identifier");
+    return getIdentifier()->getName();
+  }
+
   /// getNameAsCString - Get the name of identifier for the class
   /// interface associated with this implementation as a C string
   /// (const char*).
+  //
+  // FIXME: Move to StringRef API.
   const char *getNameAsCString() const {
-    assert(getIdentifier() && "Name is not a simple identifier");
-    return getIdentifier()->getName();
+    return getName().data();
   }
 
   /// @brief Get the name of the class associated with this interface.
+  //
+  // FIXME: Move to StringRef API.
   std::string getNameAsString() const {
-    return getClassInterface()->getNameAsString();
+    return getName();
   }
 
   const ObjCInterfaceDecl *getSuperClass() const { return SuperClass; }

Modified: projects/clangbsd/contrib/llvm/tools/clang/include/clang/AST/Expr.h
==============================================================================
--- projects/clangbsd/contrib/llvm/tools/clang/include/clang/AST/Expr.h	Fri Oct 23 14:28:06 2009	(r198401)
+++ projects/clangbsd/contrib/llvm/tools/clang/include/clang/AST/Expr.h	Fri Oct 23 14:31:47 2009	(r198402)
@@ -1399,7 +1399,27 @@ public:
     CK_IntegralToPointer,
     
     /// CK_PointerToIntegral - Pointer to integral
-    CK_PointerToIntegral
+    CK_PointerToIntegral,
+    
+    /// CK_ToVoid - Cast to void.
+    CK_ToVoid,
+    
+    /// CK_VectorSplat - Casting from an integer/floating type to an extended
+    /// vector type with the same element type as the src type. Splats the 
+    /// src expression into the destination expression.
+    CK_VectorSplat,
+    
+    /// CK_IntegralCast - Casting between integral types of different size.
+    CK_IntegralCast,
+
+    /// CK_IntegralToFloating - Integral to floating point.
+    CK_IntegralToFloating,
+    
+    /// CK_FloatingToIntegral - Floating point to integral.
+    CK_FloatingToIntegral,
+    
+    /// CK_FloatingCast - Casting between floating types of different size.
+    CK_FloatingCast
   };
 
 private:
@@ -1665,7 +1685,8 @@ public:
   /// predicates to categorize the respective opcodes.
   bool isMultiplicativeOp() const { return Opc >= Mul && Opc <= Rem; }
   bool isAdditiveOp() const { return Opc == Add || Opc == Sub; }
-  bool isShiftOp() const { return Opc == Shl || Opc == Shr; }
+  static bool isShiftOp(Opcode Opc) { return Opc == Shl || Opc == Shr; }
+  bool isShiftOp() const { return isShiftOp(Opc); }
   bool isBitwiseOp() const { return Opc >= And && Opc <= Or; }
 
   static bool isRelationalOp(Opcode Opc) { return Opc >= LT && Opc <= GE; }

Modified: projects/clangbsd/contrib/llvm/tools/clang/include/clang/AST/Type.h
==============================================================================
--- projects/clangbsd/contrib/llvm/tools/clang/include/clang/AST/Type.h	Fri Oct 23 14:28:06 2009	(r198401)
+++ projects/clangbsd/contrib/llvm/tools/clang/include/clang/AST/Type.h	Fri Oct 23 14:31:47 2009	(r198402)
@@ -443,6 +443,9 @@ public:
     return getTypePtr();
   }
 
+  bool isCanonical() const;
+  bool isCanonicalAsParam() const;
+
   /// isNull - Return true if this QualType doesn't point to a type yet.
   bool isNull() const {
     return Value.getPointer().isNull();
@@ -702,7 +705,9 @@ protected:
 public:
   TypeClass getTypeClass() const { return static_cast<TypeClass>(TC); }
 
-  bool isCanonical() const { return CanonicalType.getTypePtr() == this; }
+  bool isCanonicalUnqualified() const {
+    return CanonicalType.getTypePtr() == this;
+  }
 
   /// Types are partitioned into 3 broad categories (C99 6.2.5p1):
   /// object types, function types, and incomplete types.
@@ -1089,19 +1094,50 @@ public:
 class ReferenceType : public Type, public llvm::FoldingSetNode {
   QualType PointeeType;
 
+  /// True if the type was originally spelled with an lvalue sigil.
+  /// This is never true of rvalue references but can also be false
+  /// on lvalue references because of C++0x [dcl.typedef]p9,
+  /// as follows:
+  ///
+  ///   typedef int &ref;    // lvalue, spelled lvalue
+  ///   typedef int &&rvref; // rvalue
+  ///   ref &a;              // lvalue, inner ref, spelled lvalue
+  ///   ref &&a;             // lvalue, inner ref
+  ///   rvref &a;            // lvalue, inner ref, spelled lvalue
+  ///   rvref &&a;           // rvalue, inner ref
+  bool SpelledAsLValue;
+
+  /// True if the inner type is a reference type.  This only happens
+  /// in non-canonical forms.
+  bool InnerRef;
+
 protected:
-  ReferenceType(TypeClass tc, QualType Referencee, QualType CanonicalRef) :
+  ReferenceType(TypeClass tc, QualType Referencee, QualType CanonicalRef,
+                bool SpelledAsLValue) :
     Type(tc, CanonicalRef, Referencee->isDependentType()),
-    PointeeType(Referencee) {
+    PointeeType(Referencee), SpelledAsLValue(SpelledAsLValue),
+    InnerRef(Referencee->isReferenceType()) {
   }
 public:
-  QualType getPointeeType() const { return PointeeType; }
+  bool isSpelledAsLValue() const { return SpelledAsLValue; }
+
+  QualType getPointeeTypeAsWritten() const { return PointeeType; }
+  QualType getPointeeType() const {
+    // FIXME: this might strip inner qualifiers; okay?
+    const ReferenceType *T = this;
+    while (T->InnerRef)
+      T = T->PointeeType->getAs<ReferenceType>();
+    return T->PointeeType;
+  }
 
   void Profile(llvm::FoldingSetNodeID &ID) {
-    Profile(ID, getPointeeType());
+    Profile(ID, PointeeType, SpelledAsLValue);
   }
-  static void Profile(llvm::FoldingSetNodeID &ID, QualType Referencee) {
+  static void Profile(llvm::FoldingSetNodeID &ID,
+                      QualType Referencee,
+                      bool SpelledAsLValue) {
     ID.AddPointer(Referencee.getAsOpaquePtr());
+    ID.AddBoolean(SpelledAsLValue);
   }
 
   static bool classof(const Type *T) {
@@ -1114,9 +1150,10 @@ public:
 /// LValueReferenceType - C++ [dcl.ref] - Lvalue reference
 ///
 class LValueReferenceType : public ReferenceType {
-  LValueReferenceType(QualType Referencee, QualType CanonicalRef) :
-    ReferenceType(LValueReference, Referencee, CanonicalRef) {
-  }
+  LValueReferenceType(QualType Referencee, QualType CanonicalRef,
+                      bool SpelledAsLValue) :
+    ReferenceType(LValueReference, Referencee, CanonicalRef, SpelledAsLValue)
+  {}
   friend class ASTContext; // ASTContext creates these
 public:
   virtual void getAsStringInternal(std::string &InnerString,
@@ -1135,7 +1172,7 @@ public:
 ///
 class RValueReferenceType : public ReferenceType {
   RValueReferenceType(QualType Referencee, QualType CanonicalRef) :
-    ReferenceType(RValueReference, Referencee, CanonicalRef) {
+    ReferenceType(RValueReference, Referencee, CanonicalRef, false) {
   }
   friend class ASTContext; // ASTContext creates these
 public:
@@ -1239,8 +1276,6 @@ public:
 
   static bool classof(const Type *T) {
     return T->getTypeClass() == ConstantArray ||
-           T->getTypeClass() == ConstantArrayWithExpr ||
-           T->getTypeClass() == ConstantArrayWithoutExpr ||
            T->getTypeClass() == VariableArray ||
            T->getTypeClass() == IncompleteArray ||
            T->getTypeClass() == DependentSizedArray;
@@ -1285,86 +1320,11 @@ public:
     ID.AddInteger(TypeQuals);
   }
   static bool classof(const Type *T) {
-    return T->getTypeClass() == ConstantArray ||
-           T->getTypeClass() == ConstantArrayWithExpr ||
-           T->getTypeClass() == ConstantArrayWithoutExpr;
+    return T->getTypeClass() == ConstantArray;
   }
   static bool classof(const ConstantArrayType *) { return true; }
 };
 
-/// ConstantArrayWithExprType - This class represents C arrays with a
-/// constant size specified by means of an integer constant expression.
-/// For example 'int A[sizeof(int)]' has ConstantArrayWithExprType where
-/// the element type is 'int' and the size expression is 'sizeof(int)'.
-/// These types are non-canonical.
-class ConstantArrayWithExprType : public ConstantArrayType {
-  /// SizeExpr - The ICE occurring in the concrete syntax.
-  Expr *SizeExpr;
-  /// Brackets - The left and right array brackets.
-  SourceRange Brackets;
-
-  ConstantArrayWithExprType(QualType et, QualType can,
-                            const llvm::APInt &size, Expr *e,
-                            ArraySizeModifier sm, unsigned tq,
-                            SourceRange brackets)
-    : ConstantArrayType(ConstantArrayWithExpr, et, can, size, sm, tq),
-      SizeExpr(e), Brackets(brackets) {}
-  friend class ASTContext;  // ASTContext creates these.
-  virtual void Destroy(ASTContext& C);
-
-public:
-  Expr *getSizeExpr() const { return SizeExpr; }
-  SourceRange getBracketsRange() const { return Brackets; }
-  SourceLocation getLBracketLoc() const { return Brackets.getBegin(); }
-  SourceLocation getRBracketLoc() const { return Brackets.getEnd(); }
-
-  virtual void getAsStringInternal(std::string &InnerString,
-                                   const PrintingPolicy &Policy) const;
-
-  bool isSugared() const { return false; }
-  QualType desugar() const { return QualType(this, 0); }
-
-  static bool classof(const Type *T) {
-    return T->getTypeClass() == ConstantArrayWithExpr;
-  }
-  static bool classof(const ConstantArrayWithExprType *) { return true; }
-
-  void Profile(llvm::FoldingSetNodeID &ID) {
-    assert(0 && "Cannot unique ConstantArrayWithExprTypes.");
-  }
-};
-
-/// ConstantArrayWithoutExprType - This class represents C arrays with a
-/// constant size that was not specified by an integer constant expression,
-/// but inferred by static semantics.
-/// For example 'int A[] = { 0, 1, 2 }' has ConstantArrayWithoutExprType.
-/// These types are non-canonical: the corresponding canonical type,
-/// having the size specified in an APInt object, is a ConstantArrayType.
-class ConstantArrayWithoutExprType : public ConstantArrayType {
-
-  ConstantArrayWithoutExprType(QualType et, QualType can,
-                               const llvm::APInt &size,
-                               ArraySizeModifier sm, unsigned tq)
-    : ConstantArrayType(ConstantArrayWithoutExpr, et, can, size, sm, tq) {}
-  friend class ASTContext;  // ASTContext creates these.
-
-public:
-  virtual void getAsStringInternal(std::string &InnerString,
-                                   const PrintingPolicy &Policy) const;
-
-  bool isSugared() const { return false; }
-  QualType desugar() const { return QualType(this, 0); }
-
-  static bool classof(const Type *T) {
-    return T->getTypeClass() == ConstantArrayWithoutExpr;
-  }
-  static bool classof(const ConstantArrayWithoutExprType *) { return true; }
-
-  void Profile(llvm::FoldingSetNodeID &ID) {
-    assert(0 && "Cannot unique ConstantArrayWithoutExprTypes.");
-  }
-};
-
 /// IncompleteArrayType - This class represents C arrays with an unspecified
 /// size.  For example 'int A[]' has an IncompleteArrayType where the element
 /// type is 'int' and the size is unspecified.
@@ -2219,6 +2179,59 @@ public:
   static bool classof(const TemplateTypeParmType *T) { return true; }
 };
 
+/// \brief Represents the result of substituting a type for a template
+/// type parameter.
+///
+/// Within an instantiated template, all template type parameters have
+/// been replaced with these.  They are used solely to record that a
+/// type was originally written as a template type parameter;
+/// therefore they are never canonical.
+class SubstTemplateTypeParmType : public Type, public llvm::FoldingSetNode {
+  // The original type parameter.
+  const TemplateTypeParmType *Replaced;
+
+  SubstTemplateTypeParmType(const TemplateTypeParmType *Param, QualType Canon)
+    : Type(SubstTemplateTypeParm, Canon, Canon->isDependentType()),
+      Replaced(Param) { }
+
+  friend class ASTContext;
+
+public:
+  IdentifierInfo *getName() const { return Replaced->getName(); }
+
+  /// Gets the template parameter that was substituted for.
+  const TemplateTypeParmType *getReplacedParameter() const {
+    return Replaced;
+  }
+
+  /// Gets the type that was substituted for the template
+  /// parameter.
+  QualType getReplacementType() const {
+    return getCanonicalTypeInternal();
+  }
+
+  virtual void getAsStringInternal(std::string &InnerString,
+                                   const PrintingPolicy &Policy) const;
+
+  bool isSugared() const { return true; }
+  QualType desugar() const { return getReplacementType(); }
+
+  void Profile(llvm::FoldingSetNodeID &ID) {
+    Profile(ID, getReplacedParameter(), getReplacementType());
+  }
+  static void Profile(llvm::FoldingSetNodeID &ID,
+                      const TemplateTypeParmType *Replaced,
+                      QualType Replacement) {
+    ID.AddPointer(Replaced);
+    ID.AddPointer(Replacement.getAsOpaquePtr());
+  }
+
+  static bool classof(const Type *T) {
+    return T->getTypeClass() == SubstTemplateTypeParm;
+  }
+  static bool classof(const SubstTemplateTypeParmType *T) { return true; }
+};
+
 /// \brief Represents the type of a template specialization as written
 /// in the source code.
 ///
@@ -2453,9 +2466,9 @@ class ObjCInterfaceType : public Type, p
   // List is sorted on protocol name. No protocol is enterred more than once.
   llvm::SmallVector<ObjCProtocolDecl*, 4> Protocols;
 
-  ObjCInterfaceType(ObjCInterfaceDecl *D,
+  ObjCInterfaceType(QualType Canonical, ObjCInterfaceDecl *D,
                     ObjCProtocolDecl **Protos, unsigned NumP) :
-    Type(ObjCInterface, QualType(), /*Dependent=*/false),
+    Type(ObjCInterface, Canonical, /*Dependent=*/false),
     Decl(D), Protocols(Protos, Protos+NumP) { }
   friend class ASTContext;  // ASTContext creates these.
 public:
@@ -2501,8 +2514,9 @@ class ObjCObjectPointerType : public Typ
   // List is sorted on protocol name. No protocol is entered more than once.
   llvm::SmallVector<ObjCProtocolDecl*, 8> Protocols;
 
-  ObjCObjectPointerType(QualType T, ObjCProtocolDecl **Protos, unsigned NumP) :
-    Type(ObjCObjectPointer, QualType(), /*Dependent=*/false),
+  ObjCObjectPointerType(QualType Canonical, QualType T,
+                        ObjCProtocolDecl **Protos, unsigned NumP) :
+    Type(ObjCObjectPointer, Canonical, /*Dependent=*/false),
     PointeeType(T), Protocols(Protos, Protos+NumP) { }
   friend class ASTContext;  // ASTContext creates these.
 
@@ -2567,49 +2581,6 @@ public:
   static bool classof(const ObjCObjectPointerType *) { return true; }
 };
 
-/// \brief An ObjC Protocol list that qualifies a type.
-///
-/// This is used only for keeping detailed type source information, it should
-/// not participate in the semantics of the type system.
-/// The protocol list is not canonicalized.
-class ObjCProtocolListType : public Type, public llvm::FoldingSetNode {
-  QualType BaseType;
-
-  // List of protocols for this protocol conforming object type.
-  llvm::SmallVector<ObjCProtocolDecl*, 4> Protocols;
-
-  ObjCProtocolListType(QualType T, ObjCProtocolDecl **Protos, unsigned NumP) :
-    Type(ObjCProtocolList, QualType(), /*Dependent=*/false),
-    BaseType(T), Protocols(Protos, Protos+NumP) { }
-  friend class ASTContext;  // ASTContext creates these.
-
-public:
-  QualType getBaseType() const { return BaseType; }
-
-  /// \brief Provides access to the list of protocols qualifying the base type.
-  typedef llvm::SmallVector<ObjCProtocolDecl*, 4>::const_iterator qual_iterator;
-
-  qual_iterator qual_begin() const { return Protocols.begin(); }
-  qual_iterator qual_end() const   { return Protocols.end(); }
-  bool qual_empty() const { return Protocols.size() == 0; }
-
-  /// \brief Return the number of qualifying protocols.
-  unsigned getNumProtocols() const { return Protocols.size(); }
-
-  bool isSugared() const { return false; }
-  QualType desugar() const { return QualType(this, 0); }
-
-  void Profile(llvm::FoldingSetNodeID &ID);
-  static void Profile(llvm::FoldingSetNodeID &ID, QualType T,
-                      ObjCProtocolDecl **protocols, unsigned NumProtocols);
-  virtual void getAsStringInternal(std::string &InnerString,
-                                   const PrintingPolicy &Policy) const;
-  static bool classof(const Type *T) {
-    return T->getTypeClass() == ObjCProtocolList;
-  }
-  static bool classof(const ObjCProtocolListType *) { return true; }
-};
-
 /// A qualifier set is used to build a set of qualifiers.
 class QualifierCollector : public Qualifiers {
   ASTContext *Context;
@@ -2646,6 +2617,20 @@ public:
 
 // Inline function definitions.
 
+inline bool QualType::isCanonical() const {
+  const Type *T = getTypePtr();
+  if (hasQualifiers())
+    return T->isCanonicalUnqualified() && !isa<ArrayType>(T);
+  return T->isCanonicalUnqualified();
+}
+
+inline bool QualType::isCanonicalAsParam() const {
+  if (hasQualifiers()) return false;
+  const Type *T = getTypePtr();
+  return T->isCanonicalUnqualified() &&
+           !isa<FunctionType>(T) && !isa<ArrayType>(T);
+}
+
 inline void QualType::removeConst() {
   removeFastQualifiers(Qualifiers::Const);
 }

Modified: projects/clangbsd/contrib/llvm/tools/clang/include/clang/AST/TypeLoc.h
==============================================================================
--- projects/clangbsd/contrib/llvm/tools/clang/include/clang/AST/TypeLoc.h	Fri Oct 23 14:28:06 2009	(r198401)
+++ projects/clangbsd/contrib/llvm/tools/clang/include/clang/AST/TypeLoc.h	Fri Oct 23 14:31:47 2009	(r198402)
@@ -18,10 +18,15 @@
 
 namespace clang {
   class ParmVarDecl;
-  class TypeSpecLoc;
   class DeclaratorInfo;
   class UnqualTypeLoc;
 
+// Predeclare all the type nodes.
+#define ABSTRACT_TYPELOC(Class, Base)
+#define TYPELOC(Class, Base) \
+  class Class##TypeLoc;
+#include "clang/AST/TypeLocNodes.def"
+
 /// \brief Base wrapper for a particular "section" of type source info.
 ///
 /// A client should use the TypeLoc subclasses through cast/dyn_cast in order to
@@ -34,12 +39,28 @@ protected:
   void *Data;
 
 public:
+  /// The kinds of TypeLocs.  Equivalent to the Type::TypeClass enum,
+  /// except it also defines a Qualified enum that corresponds to the
+  /// QualifiedLoc class.
+  enum TypeLocClass {
+#define ABSTRACT_TYPE(Class, Base)
+#define TYPE(Class, Base) \
+    Class = Type::Class,
+#include "clang/AST/TypeNodes.def"
+    Qualified
+  };
+
   TypeLoc() : Ty(0), Data(0) { }
   TypeLoc(QualType ty, void *opaqueData)
     : Ty(ty.getAsOpaquePtr()), Data(opaqueData) { }
   TypeLoc(Type *ty, void *opaqueData)
     : Ty(ty), Data(opaqueData) { }
 
+  TypeLocClass getTypeLocClass() const {
+    if (getType().hasQualifiers()) return Qualified;
+    return (TypeLocClass) getType()->getTypeClass();
+  }
+
   bool isNull() const { return !Ty; }
   operator bool() const { return Ty; }
 
@@ -48,35 +69,45 @@ public:
 
   /// \brief Get the type for which this source info wrapper provides

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***


More information about the svn-src-projects mailing list