From e7bcad327814a78ecb8d5f5545d2e3df84c67a5c Mon Sep 17 00:00:00 2001 From: dim Date: Sun, 5 Jul 2015 14:23:59 +0000 Subject: Vendor import of clang trunk r241361: https://llvm.org/svn/llvm-project/cfe/trunk@241361 --- lib/Basic/IdentifierTable.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'lib/Basic/IdentifierTable.cpp') diff --git a/lib/Basic/IdentifierTable.cpp b/lib/Basic/IdentifierTable.cpp index b295008..36fba99 100644 --- a/lib/Basic/IdentifierTable.cpp +++ b/lib/Basic/IdentifierTable.cpp @@ -71,8 +71,6 @@ IdentifierIterator *IdentifierInfoLookup::getIdentifiers() { return new EmptyLookupIterator(); } -ExternalIdentifierLookup::~ExternalIdentifierLookup() {} - IdentifierTable::IdentifierTable(const LangOptions &LangOpts, IdentifierInfoLookup* externalLookup) : HashTable(8192), // Start with space for 8K identifiers. @@ -647,16 +645,17 @@ const char *clang::getOperatorSpelling(OverloadedOperatorKind Operator) { llvm_unreachable("Invalid OverloadedOperatorKind!"); } -StringRef clang::getNullabilitySpelling(NullabilityKind kind) { +StringRef clang::getNullabilitySpelling(NullabilityKind kind, + bool isContextSensitive) { switch (kind) { case NullabilityKind::NonNull: - return "__nonnull"; + return isContextSensitive ? "nonnull" : "_Nonnull"; case NullabilityKind::Nullable: - return "__nullable"; + return isContextSensitive ? "nullable" : "_Nullable"; case NullabilityKind::Unspecified: - return "__null_unspecified"; + return isContextSensitive ? "null_unspecified" : "_Null_unspecified"; } llvm_unreachable("Unknown nullability kind."); } -- cgit v1.1