diff options
author | John McCall <rjmccall@apple.com> | 2009-12-07 02:54:59 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2009-12-07 02:54:59 +0000 |
commit | a93c934af4fbf97cbe8e649d82e68ccacfe57c95 (patch) | |
tree | be955fa39337ec24a6853245d8114ef49ce93d70 /lib/AST/ASTContext.cpp | |
parent | c08582ba5eef9383702fd3e434de1a6f2f470e3c (diff) |
DeclaratorInfo -> TypeSourceInfo. Makes an effort to rename associated variables,
but the results are imperfect.
For posterity, I did:
cat <<EOF > $cmdfile
s/DeclaratorInfo/TypeSourceInfo/g
s/DInfo/TInfo/g
s/TypeTypeSourceInfo/TypeSourceInfo/g
s/SourceTypeSourceInfo/TypeSourceInfo/g
EOF
find lib -name '*.cpp' -not -path 'lib/Parse/*' -exec sed -i '' -f $cmdfile '{}' \;
find lib -name '*.h' -exec sed -i '' -f $cmdfile '{}' \;
find include -name '*.h' -not -path 'include/clang/Parse/*' -not -path 'include/clang/Basic/*' -exec sed -i '' -f $cmdfile '{}' \;
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90743 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/ASTContext.cpp')
-rw-r--r-- | lib/AST/ASTContext.cpp | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/lib/AST/ASTContext.cpp b/lib/AST/ASTContext.cpp index bce7d67edf..cc96a5dc0e 100644 --- a/lib/AST/ASTContext.cpp +++ b/lib/AST/ASTContext.cpp @@ -1009,31 +1009,31 @@ void ASTContext::setObjCImplementation(ObjCCategoryDecl *CatD, ObjCImpls[CatD] = ImplD; } -/// \brief Allocate an uninitialized DeclaratorInfo. +/// \brief Allocate an uninitialized TypeSourceInfo. /// -/// The caller should initialize the memory held by DeclaratorInfo using +/// The caller should initialize the memory held by TypeSourceInfo using /// the TypeLoc wrappers. /// /// \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 *ASTContext::CreateDeclaratorInfo(QualType T, +TypeSourceInfo *ASTContext::CreateTypeSourceInfo(QualType T, unsigned DataSize) { if (!DataSize) DataSize = TypeLoc::getFullDataSizeForType(T); else assert(DataSize == TypeLoc::getFullDataSizeForType(T) && - "incorrect data size provided to CreateDeclaratorInfo!"); + "incorrect data size provided to CreateTypeSourceInfo!"); - DeclaratorInfo *DInfo = - (DeclaratorInfo*)BumpAlloc.Allocate(sizeof(DeclaratorInfo) + DataSize, 8); - new (DInfo) DeclaratorInfo(T); - return DInfo; + TypeSourceInfo *TInfo = + (TypeSourceInfo*)BumpAlloc.Allocate(sizeof(TypeSourceInfo) + DataSize, 8); + new (TInfo) TypeSourceInfo(T); + return TInfo; } -DeclaratorInfo *ASTContext::getTrivialDeclaratorInfo(QualType T, +TypeSourceInfo *ASTContext::getTrivialTypeSourceInfo(QualType T, SourceLocation L) { - DeclaratorInfo *DI = CreateDeclaratorInfo(T); + TypeSourceInfo *DI = CreateTypeSourceInfo(T); DI->getTypeLoc().initialize(L); return DI; } @@ -2808,7 +2808,7 @@ QualType ASTContext::getCFConstantStringType() { for (unsigned i = 0; i < 4; ++i) { FieldDecl *Field = FieldDecl::Create(*this, CFConstantStringTypeDecl, SourceLocation(), 0, - FieldTypes[i], /*DInfo=*/0, + FieldTypes[i], /*TInfo=*/0, /*BitWidth=*/0, /*Mutable=*/false); CFConstantStringTypeDecl->addDecl(Field); @@ -2844,7 +2844,7 @@ QualType ASTContext::getObjCFastEnumerationStateType() { FieldDecl *Field = FieldDecl::Create(*this, ObjCFastEnumerationStateTypeDecl, SourceLocation(), 0, - FieldTypes[i], /*DInfo=*/0, + FieldTypes[i], /*TInfo=*/0, /*BitWidth=*/0, /*Mutable=*/false); ObjCFastEnumerationStateTypeDecl->addDecl(Field); @@ -2880,7 +2880,7 @@ QualType ASTContext::getBlockDescriptorType() { T, SourceLocation(), &Idents.get(FieldNames[i]), - FieldTypes[i], /*DInfo=*/0, + FieldTypes[i], /*TInfo=*/0, /*BitWidth=*/0, /*Mutable=*/false); T->addDecl(Field); @@ -2927,7 +2927,7 @@ QualType ASTContext::getBlockDescriptorExtendedType() { T, SourceLocation(), &Idents.get(FieldNames[i]), - FieldTypes[i], /*DInfo=*/0, + FieldTypes[i], /*TInfo=*/0, /*BitWidth=*/0, /*Mutable=*/false); T->addDecl(Field); @@ -3005,7 +3005,7 @@ QualType ASTContext::BuildByRefType(const char *DeclName, QualType Ty) { continue; FieldDecl *Field = FieldDecl::Create(*this, T, SourceLocation(), &Idents.get(FieldNames[i]), - FieldTypes[i], /*DInfo=*/0, + FieldTypes[i], /*TInfo=*/0, /*BitWidth=*/0, /*Mutable=*/false); T->addDecl(Field); } @@ -3048,7 +3048,7 @@ QualType ASTContext::getBlockParmType( for (size_t i = 0; i < 5; ++i) { FieldDecl *Field = FieldDecl::Create(*this, T, SourceLocation(), &Idents.get(FieldNames[i]), - FieldTypes[i], /*DInfo=*/0, + FieldTypes[i], /*TInfo=*/0, /*BitWidth=*/0, /*Mutable=*/false); T->addDecl(Field); } @@ -3068,7 +3068,7 @@ QualType ASTContext::getBlockParmType( FieldType); FieldDecl *Field = FieldDecl::Create(*this, T, SourceLocation(), - Name, FieldType, /*DInfo=*/0, + Name, FieldType, /*TInfo=*/0, /*BitWidth=*/0, /*Mutable=*/false); T->addDecl(Field); } |