[cfe-commits] r41894 - in /cfe/trunk: clang.xcodeproj/project.pbxproj include/clang/AST/ASTContext.h

Steve Naroff snaroff at apple.com
Wed Sep 12 16:08:23 PDT 2007


Author: snaroff
Date: Wed Sep 12 18:08:22 2007
New Revision: 41894

URL: http://llvm.org/viewvc/llvm-project?rev=41894&view=rev
Log:

Add ASTContext::StringMap<char> to unique selector names.


Modified:
    cfe/trunk/clang.xcodeproj/project.pbxproj
    cfe/trunk/include/clang/AST/ASTContext.h

Modified: cfe/trunk/clang.xcodeproj/project.pbxproj
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/clang.xcodeproj/project.pbxproj?rev=41894&r1=41893&r2=41894&view=diff

==============================================================================
--- cfe/trunk/clang.xcodeproj/project.pbxproj (original)
+++ cfe/trunk/clang.xcodeproj/project.pbxproj Wed Sep 12 18:08:22 2007
@@ -675,7 +675,6 @@
 		08FB7793FE84155DC02AAC07 /* Project object */ = {
 			isa = PBXProject;
 			buildConfigurationList = 1DEB923508733DC60010E9CD /* Build configuration list for PBXProject "clang" */;
-			compatibilityVersion = "Xcode 2.4";
 			hasScannedForEncodings = 1;
 			mainGroup = 08FB7794FE84155DC02AAC07 /* clang */;
 			projectDirPath = "";

Modified: cfe/trunk/include/clang/AST/ASTContext.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/ASTContext.h?rev=41894&r1=41893&r2=41894&view=diff

==============================================================================
--- cfe/trunk/include/clang/AST/ASTContext.h (original)
+++ cfe/trunk/include/clang/AST/ASTContext.h Wed Sep 12 18:08:22 2007
@@ -19,6 +19,7 @@
 #include "clang/AST/RecordLayout.h"
 #include "clang/AST/Type.h"
 #include "llvm/ADT/DenseMap.h"
+#include "llvm/ADT/StringMap.h"
 #include <vector>
 
 namespace clang {
@@ -37,6 +38,7 @@
   llvm::FoldingSet<FunctionTypeProto> FunctionTypeProtos;
   llvm::DenseMap<const RecordDecl*, const RecordLayout*> RecordLayoutInfo;
   RecordDecl *CFConstantStringTypeDecl;
+  llvm::StringMap<char> SelectorNames;
 public:
   TargetInfo &Target;
   IdentifierTable &Idents;
@@ -174,6 +176,16 @@
   /// 'typeSize' is a real floating point or complex type.
   QualType getFloatingTypeOfSizeWithinDomain(QualType typeSize, 
                                              QualType typeDomain) const;
+
+  //===--------------------------------------------------------------------===//
+  //                            Objective-C
+  //===--------------------------------------------------------------------===//
+  
+  /// getSelectorName - Return a uniqued character string for the selector.
+  char &getSelectorName(const char *NameStart, const char *NameEnd) {
+    return SelectorNames.GetOrCreateValue(NameStart, NameEnd).getValue();
+  }
+
 private:
   ASTContext(const ASTContext&); // DO NOT IMPLEMENT
   void operator=(const ASTContext&); // DO NOT IMPLEMENT





More information about the cfe-commits mailing list