summaryrefslogtreecommitdiffstats
path: root/lib/Basic/IdentifierTable.cpp
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2015-07-05 14:23:59 +0000
committerdim <dim@FreeBSD.org>2015-07-05 14:23:59 +0000
commite7bcad327814a78ecb8d5f5545d2e3df84c67a5c (patch)
treeac719b5984165053bf83d71142e4d96b609b9784 /lib/Basic/IdentifierTable.cpp
parent9dd834653b811ad20382e98a87dff824980c9916 (diff)
downloadFreeBSD-src-e7bcad327814a78ecb8d5f5545d2e3df84c67a5c.zip
FreeBSD-src-e7bcad327814a78ecb8d5f5545d2e3df84c67a5c.tar.gz
Vendor import of clang trunk r241361:
https://llvm.org/svn/llvm-project/cfe/trunk@241361
Diffstat (limited to 'lib/Basic/IdentifierTable.cpp')
-rw-r--r--lib/Basic/IdentifierTable.cpp11
1 files changed, 5 insertions, 6 deletions
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.");
}
OpenPOWER on IntegriCloud