summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2011-08-09 16:24:26 +0000
committerDouglas Gregor <dgregor@apple.com>2011-08-09 16:24:26 +0000
commit7874310ba116a6d100316afa5093a2698aca7de5 (patch)
tree511b6974a54b1df9388e490a461d807a01ce754a
parentabf4e0dfcdd8447bc377a93eea61dd3142f10516 (diff)
downloadbcm5719-llvm-7874310ba116a6d100316afa5093a2698aca7de5.tar.gz
bcm5719-llvm-7874310ba116a6d100316afa5093a2698aca7de5.zip
Don't serialize the block descriptor or block extended descriptor
types to AST files; they're only used by debug info generation anyway, and shouldn't ever exist in the AST anyway. llvm-svn: 137122
-rw-r--r--clang/include/clang/AST/ASTContext.h25
-rw-r--r--clang/include/clang/Serialization/ASTBitCodes.h8
-rw-r--r--clang/lib/AST/ASTContext.cpp12
-rw-r--r--clang/lib/Serialization/ASTReader.cpp5
-rw-r--r--clang/lib/Serialization/ASTWriter.cpp2
5 files changed, 8 insertions, 44 deletions
diff --git a/clang/include/clang/AST/ASTContext.h b/clang/include/clang/AST/ASTContext.h
index 025bb41242b..882e0a6aa82 100644
--- a/clang/include/clang/AST/ASTContext.h
+++ b/clang/include/clang/AST/ASTContext.h
@@ -210,9 +210,15 @@ class ASTContext : public llvm::RefCountedBase<ASTContext> {
TypeDecl *sigjmp_bufDecl;
/// \brief Type for the Block descriptor for Blocks CodeGen.
+ ///
+ /// Since this is only used for generation of debug info, it is not
+ /// serialized.
mutable RecordDecl *BlockDescriptorType;
/// \brief Type for the Block descriptor for Blocks CodeGen.
+ ///
+ /// Since this is only used for generation of debug info, it is not
+ /// serialized.
mutable RecordDecl *BlockDescriptorExtendedType;
/// \brief Declaration for the CUDA cudaConfigureCall function.
@@ -565,29 +571,10 @@ public:
/// blocks.
QualType getBlockDescriptorType() const;
- // 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() const;
- // 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() const {
- if (BlockDescriptorExtendedType)
- return getTagDeclType(BlockDescriptorExtendedType);
- return QualType();
- }
-
void setcudaConfigureCallDecl(FunctionDecl *FD) {
cudaConfigureCallDecl = FD;
}
diff --git a/clang/include/clang/Serialization/ASTBitCodes.h b/clang/include/clang/Serialization/ASTBitCodes.h
index aa1d9b99bfd..b6c5a24254d 100644
--- a/clang/include/clang/Serialization/ASTBitCodes.h
+++ b/clang/include/clang/Serialization/ASTBitCodes.h
@@ -662,14 +662,10 @@ namespace clang {
SPECIAL_TYPE_OBJC_ID_REDEFINITION = 10,
/// \brief Objective-C "Class" redefinition type
SPECIAL_TYPE_OBJC_CLASS_REDEFINITION = 11,
- /// \brief Block descriptor type for Blocks CodeGen
- SPECIAL_TYPE_BLOCK_DESCRIPTOR = 12,
- /// \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 = 12,
/// \brief Whether __[u]int128_t identifier is installed.
- SPECIAL_TYPE_INT128_INSTALLED = 15
+ SPECIAL_TYPE_INT128_INSTALLED = 13
};
/// \brief Predefined declaration IDs.
diff --git a/clang/lib/AST/ASTContext.cpp b/clang/lib/AST/ASTContext.cpp
index 3f8cf37a68e..b3fab6f0e3b 100644
--- a/clang/lib/AST/ASTContext.cpp
+++ b/clang/lib/AST/ASTContext.cpp
@@ -3712,12 +3712,6 @@ QualType ASTContext::getBlockDescriptorType() const {
return getTagDeclType(BlockDescriptorType);
}
-void ASTContext::setBlockDescriptorType(QualType T) {
- const RecordType *Rec = T->getAs<RecordType>();
- assert(Rec && "Invalid BlockDescriptorType");
- BlockDescriptorType = Rec->getDecl();
-}
-
QualType ASTContext::getBlockDescriptorExtendedType() const {
if (BlockDescriptorExtendedType)
return getTagDeclType(BlockDescriptorExtendedType);
@@ -3761,12 +3755,6 @@ QualType ASTContext::getBlockDescriptorExtendedType() const {
return getTagDeclType(BlockDescriptorExtendedType);
}
-void ASTContext::setBlockDescriptorExtendedType(QualType T) {
- const RecordType *Rec = T->getAs<RecordType>();
- assert(Rec && "Invalid BlockDescriptorType");
- BlockDescriptorExtendedType = Rec->getDecl();
-}
-
bool ASTContext::BlockRequiresCopying(QualType Ty) const {
if (Ty->isObjCRetainableType())
return true;
diff --git a/clang/lib/Serialization/ASTReader.cpp b/clang/lib/Serialization/ASTReader.cpp
index d5cb6a6cedf..9ca5211d9f8 100644
--- a/clang/lib/Serialization/ASTReader.cpp
+++ b/clang/lib/Serialization/ASTReader.cpp
@@ -3033,11 +3033,6 @@ void ASTReader::InitializeContext(ASTContext &Ctx) {
if (unsigned ObjCClassRedef
= SpecialTypes[SPECIAL_TYPE_OBJC_CLASS_REDEFINITION])
Context->ObjCClassRedefinitionType = GetType(ObjCClassRedef);
- if (unsigned String = SpecialTypes[SPECIAL_TYPE_BLOCK_DESCRIPTOR])
- Context->setBlockDescriptorType(GetType(String));
- if (unsigned String
- = SpecialTypes[SPECIAL_TYPE_BLOCK_EXTENDED_DESCRIPTOR])
- Context->setBlockDescriptorExtendedType(GetType(String));
if (unsigned ObjCSelRedef
= SpecialTypes[SPECIAL_TYPE_OBJC_SEL_REDEFINITION])
Context->ObjCSelRedefinitionType = GetType(ObjCSelRedef);
diff --git a/clang/lib/Serialization/ASTWriter.cpp b/clang/lib/Serialization/ASTWriter.cpp
index 6cdd6cad607..1c4a5f63e7b 100644
--- a/clang/lib/Serialization/ASTWriter.cpp
+++ b/clang/lib/Serialization/ASTWriter.cpp
@@ -2940,8 +2940,6 @@ void ASTWriter::WriteASTCore(Sema &SemaRef, MemorizeStatCalls *StatCalls,
AddTypeRef(Context.getsigjmp_bufType(), SpecialTypes);
AddTypeRef(Context.ObjCIdRedefinitionType, SpecialTypes);
AddTypeRef(Context.ObjCClassRedefinitionType, SpecialTypes);
- AddTypeRef(Context.getRawBlockdescriptorType(), SpecialTypes);
- AddTypeRef(Context.getRawBlockdescriptorExtendedType(), SpecialTypes);
AddTypeRef(Context.ObjCSelRedefinitionType, SpecialTypes);
SpecialTypes.push_back(Context.isInt128Installed());
OpenPOWER on IntegriCloud