summaryrefslogtreecommitdiff
path: root/lib/Sema
diff options
context:
space:
mode:
authorSaleem Abdulrasool <compnerd@compnerd.org>2017-10-17 17:39:32 +0000
committerSaleem Abdulrasool <compnerd@compnerd.org>2017-10-17 17:39:32 +0000
commit4dd964422c23862fe4e27175da64da407fc40911 (patch)
tree9462a2eab66ba1176fd34e3e79fe4733aa85144b /lib/Sema
parent1b641bcb61ddab51b491e8875e3994604ac1ae17 (diff)
downloadclang-4dd964422c23862fe4e27175da64da407fc40911.tar.gz
Sema: use new `getNS{,U}IntegerType` for NS{,U}Integer
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
Diffstat (limited to 'lib/Sema')
-rw-r--r--lib/Sema/SemaChecking.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Sema/SemaChecking.cpp b/lib/Sema/SemaChecking.cpp
index a440606813..79263f1e3a 100644
--- a/lib/Sema/SemaChecking.cpp
+++ b/lib/Sema/SemaChecking.cpp
@@ -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());