File tree Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -235,6 +235,11 @@ inline bool isMangledName(llvm::StringRef mangledName) {
235
235
// / This includes the old (<= swift 3.x) mangling prefix "_T".
236
236
bool isSwiftSymbol (llvm::StringRef mangledName);
237
237
238
+ // / Returns true if the mangledName starts with the swift mangling prefix.
239
+ // /
240
+ // / This includes the old (<= swift 3.x) mangling prefix "_T".
241
+ bool isSwiftSymbol (const char *mangledName);
242
+
238
243
// / Drops the Swift mangling prefix from the given mangled name, if there is
239
244
// / one.
240
245
// /
Original file line number Diff line number Diff line change @@ -139,6 +139,11 @@ bool swift::Demangle::isSwiftSymbol(llvm::StringRef mangledName) {
139
139
return getManglingPrefixLength (mangledName) != 0 ;
140
140
}
141
141
142
+ bool swift::Demangle::isSwiftSymbol (const char *mangledName) {
143
+ StringRef mangledNameRef (mangledName, 4 );
144
+ return isSwiftSymbol (mangledNameRef);
145
+ }
146
+
142
147
bool swift::Demangle::isOldFunctionTypeMangling (llvm::StringRef mangledName) {
143
148
return mangledName.size () >= 2 && mangledName[0 ] == ' _' &&
144
149
mangledName[1 ] == ' T' ;
You can’t perform that action at this time.
0 commit comments