demangler: add an API function to get the target of a thunk symbol.

rdar://problem/30820093
This commit is contained in:
Erik Eckstein
2017-03-02 17:21:45 -08:00
parent d237167550
commit a41312288d
4 changed files with 54 additions and 15 deletions

View File

@@ -289,6 +289,13 @@ public:
/// or ObjC-as-swift thunks.
bool isThunkSymbol(llvm::StringRef MangledName);
/// Returns the mangled name of the target of a thunk.
///
/// \returns Returns the remaining name after removing the thunk mangling
/// characters from \p MangledName. If \p MangledName is not a thunk symbol,
/// an empty string is returned.
std::string getThunkTarget(llvm::StringRef MangledName);
/// Returns true if the \p mangledName refers to a function which conforms to
/// the Swift calling convention.
///