[Demangle] Add back isSwiftSymbol() entry point for null-terminated strings.

This particular API can be safely used with a null-terminated string,
and is used by some clients (e.g., LLDB), so add back a "const char *"
variant that safely accesses a null-terminated string.
This commit is contained in:
Doug Gregor
2018-01-10 14:27:37 -08:00
parent 6d1e668c86
commit 82140ca811
2 changed files with 10 additions and 0 deletions

View File

@@ -235,6 +235,11 @@ inline bool isMangledName(llvm::StringRef mangledName) {
/// This includes the old (<= swift 3.x) mangling prefix "_T".
bool isSwiftSymbol(llvm::StringRef mangledName);
/// Returns true if the mangledName starts with the swift mangling prefix.
///
/// This includes the old (<= swift 3.x) mangling prefix "_T".
bool isSwiftSymbol(const char *mangledName);
/// Drops the Swift mangling prefix from the given mangled name, if there is
/// one.
///