Skip to content

Commit daa7523

Browse files
committed
Use hasNilCheck to be more clear
1 parent 1b42f2b commit daa7523

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

clang/include/clang/AST/Mangle.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ class MangleContext {
161161
void mangleObjCMethodName(const ObjCMethodDecl *MD, raw_ostream &OS,
162162
bool includePrefixByte = true,
163163
bool includeCategoryNamespace = true,
164-
bool isThunk = true) const;
164+
bool hasNilCheck = true) const;
165165
void mangleObjCMethodNameAsSourceName(const ObjCMethodDecl *MD,
166166
raw_ostream &) const;
167167

clang/lib/AST/Mangle.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ using namespace clang;
3232
void clang::mangleObjCMethodName(raw_ostream &OS, bool includePrefixByte,
3333
bool isInstanceMethod, StringRef ClassName,
3434
std::optional<StringRef> CategoryName,
35-
StringRef MethodName, bool isNilCheckThunk) {
35+
StringRef MethodName, bool hasNilCheck) {
3636
// \01+[ContainerName(CategoryName) SelectorName]
3737
if (includePrefixByte)
3838
OS << "\01";
@@ -44,7 +44,7 @@ void clang::mangleObjCMethodName(raw_ostream &OS, bool includePrefixByte,
4444
OS << " ";
4545
OS << MethodName;
4646
OS << ']';
47-
if (!isNilCheckThunk)
47+
if (!hasNilCheck)
4848
OS << "_nonnull";
4949
}
5050
// FIXME: For blocks we currently mimic GCC's mangling scheme, which leaves
@@ -347,7 +347,7 @@ void MangleContext::mangleObjCMethodName(const ObjCMethodDecl *MD,
347347
raw_ostream &OS,
348348
bool includePrefixByte,
349349
bool includeCategoryNamespace,
350-
bool isThunk) const {
350+
bool hasNilCheck) const {
351351
if (getASTContext().getLangOpts().ObjCRuntime.isGNUFamily()) {
352352
// This is the mangling we've always used on the GNU runtimes, but it
353353
// has obvious collisions in the face of underscores within class
@@ -398,7 +398,7 @@ void MangleContext::mangleObjCMethodName(const ObjCMethodDecl *MD,
398398
llvm::raw_string_ostream MethodNameOS(MethodName);
399399
MD->getSelector().print(MethodNameOS);
400400
clang::mangleObjCMethodName(OS, includePrefixByte, MD->isInstanceMethod(),
401-
ClassName, CategoryName, MethodName, isThunk);
401+
ClassName, CategoryName, MethodName, hasNilCheck);
402402
}
403403

404404
void MangleContext::mangleObjCMethodNameAsSourceName(const ObjCMethodDecl *MD,

0 commit comments

Comments
 (0)