]> granicus.if.org Git - clang/commitdiff
Sema: use new `getNS{,U}IntegerType` for NS{,U}Integer
authorSaleem Abdulrasool <compnerd@compnerd.org>
Tue, 17 Oct 2017 17:39:32 +0000 (17:39 +0000)
committerSaleem Abdulrasool <compnerd@compnerd.org>
Tue, 17 Oct 2017 17:39:32 +0000 (17:39 +0000)
Use the new helper methods to get the underlying type for NSUInteger,
NSInteger types.  This avoids spreading the knowledge of the underlying
types in various sites.  For non-LLP64 targets, this has no change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@316013 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Sema/SemaChecking.cpp

index a440606813a7f451e7482207f123a64a7f9ab9db..79263f1e3ac1b2dc47467e74e26801366218e6e2 100644 (file)
@@ -6168,9 +6168,9 @@ shouldNotPrintDirectly(const ASTContext &Context,
   while (const TypedefType *UserTy = TyTy->getAs<TypedefType>()) {
     StringRef Name = UserTy->getDecl()->getName();
     QualType CastTy = llvm::StringSwitch<QualType>(Name)
-      .Case("CFIndex", Context.LongTy)
-      .Case("NSInteger", Context.LongTy)
-      .Case("NSUInteger", Context.UnsignedLongTy)
+      .Case("CFIndex", Context.getNSIntegerType())
+      .Case("NSInteger", Context.getNSIntegerType())
+      .Case("NSUInteger", Context.getNSUIntegerType())
       .Case("SInt32", Context.IntTy)
       .Case("UInt32", Context.UnsignedIntTy)
       .Default(QualType());