Change QualType::getTypePtr() to return a const pointer, then change a

thousand other things which were (generally inadvertantly) relying on that.

llvm-svn: 123814
This commit is contained in:
John McCall
2011-01-19 06:33:43 +00:00
parent 0c49533039
commit 424cec97bd
53 changed files with 243 additions and 236 deletions

View File

@@ -118,7 +118,7 @@ cocoa::NamingConvention cocoa::deriveNamingConvention(Selector S,
bool cocoa::isRefType(QualType RetTy, llvm::StringRef Prefix,
llvm::StringRef Name) {
// Recursively walk the typedef stack, allowing typedefs of reference types.
while (TypedefType* TD = dyn_cast<TypedefType>(RetTy.getTypePtr())) {
while (const TypedefType *TD = dyn_cast<TypedefType>(RetTy.getTypePtr())) {
llvm::StringRef TDName = TD->getDecl()->getIdentifier()->getName();
if (TDName.startswith(Prefix) && TDName.endswith("Ref"))
return true;