diff options
Diffstat (limited to 'include/clang')
-rw-r--r-- | include/clang/AST/ASTContext.h | 15 | ||||
-rw-r--r-- | include/clang/Basic/TargetInfo.h | 6 | ||||
-rw-r--r-- | include/clang/Frontend/PCHBitCodes.h | 4 | ||||
-rw-r--r-- | include/clang/Frontend/PCHReader.h | 2 |
4 files changed, 25 insertions, 2 deletions
diff --git a/include/clang/AST/ASTContext.h b/include/clang/AST/ASTContext.h index ec17b943af..1a39889911 100644 --- a/include/clang/AST/ASTContext.h +++ b/include/clang/AST/ASTContext.h @@ -165,6 +165,8 @@ class ASTContext { QualType ObjCConstantStringType; RecordDecl *CFConstantStringTypeDecl; + RecordDecl *NSConstantStringTypeDecl; + RecordDecl *ObjCFastEnumerationStateTypeDecl; /// \brief The type for the C FILE type. @@ -689,6 +691,19 @@ public: // constant CFStrings. QualType getCFConstantStringType(); + // getNSConstantStringType - Return the C structure type used to represent + // constant NSStrings. + QualType getNSConstantStringType(); + /// Get the structure type used to representation NSStrings, or NULL + /// if it hasn't yet been built. + QualType getRawNSConstantStringType() { + if (NSConstantStringTypeDecl) + return getTagDeclType(NSConstantStringTypeDecl); + return QualType(); + } + void setNSConstantStringType(QualType T); + + /// Get the structure type used to representation CFStrings, or NULL /// if it hasn't yet been built. QualType getRawCFConstantStringType() { diff --git a/include/clang/Basic/TargetInfo.h b/include/clang/Basic/TargetInfo.h index 81c780c9be..455b745270 100644 --- a/include/clang/Basic/TargetInfo.h +++ b/include/clang/Basic/TargetInfo.h @@ -339,6 +339,12 @@ public: return "__DATA,__cfstring"; } + /// getNSStringSection - Return the section to use for NSString + /// literals, or 0 if no special section is used. + virtual const char *getNSStringSection() const { + return "__OBJC,__cstring_object,regular,no_dead_strip"; + } + /// isValidSectionSpecifier - This is an optional hook that targets can /// implement to perform semantic checking on attribute((section("foo"))) /// specifiers. In this case, "foo" is passed in to be checked. If the diff --git a/include/clang/Frontend/PCHBitCodes.h b/include/clang/Frontend/PCHBitCodes.h index f975c497be..457e63332f 100644 --- a/include/clang/Frontend/PCHBitCodes.h +++ b/include/clang/Frontend/PCHBitCodes.h @@ -453,7 +453,9 @@ namespace clang { /// \brief Block extedned descriptor type for Blocks CodeGen SPECIAL_TYPE_BLOCK_EXTENDED_DESCRIPTOR = 13, /// \brief Objective-C "SEL" redefinition type - SPECIAL_TYPE_OBJC_SEL_REDEFINITION = 14 + SPECIAL_TYPE_OBJC_SEL_REDEFINITION = 14, + /// \brief NSConstantString type + SPECIAL_TYPE_NS_CONSTANT_STRING = 15 }; /// \brief Record codes for each kind of declaration. diff --git a/include/clang/Frontend/PCHReader.h b/include/clang/Frontend/PCHReader.h index e324228e92..c2352301ca 100644 --- a/include/clang/Frontend/PCHReader.h +++ b/include/clang/Frontend/PCHReader.h @@ -436,7 +436,7 @@ private: std::deque<PendingIdentifierInfo> PendingIdentifierInfos; /// \brief FIXME: document! - llvm::SmallVector<uint64_t, 4> SpecialTypes; + llvm::SmallVector<uint64_t, 16> SpecialTypes; /// \brief Contains declarations and definitions that will be /// "interesting" to the ASTConsumer, when we get that AST consumer. |