mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-31 12:41:49 +01:00
c++filt: support COFF import thunks
The synthetic thunk for the import is prefixed with __imp_. Attempt to undecorate the names when they begin with the __imp_ prefix. llvm-svn: 298550
This commit is contained in:
parent
7e0f29b6ef
commit
6af02742d8
5
test/tools/llvm-cxxfilt/coff-import.test
Normal file
5
test/tools/llvm-cxxfilt/coff-import.test
Normal file
@ -0,0 +1,5 @@
|
||||
RUN: llvm-cxxfilt -_ ___imp__ZSt6futureIvE | FileCheck %s
|
||||
RUN: llvm-cxxfilt __imp__ZSt6futureIvE | FileCheck %s
|
||||
|
||||
CHECK: import thunk for std::future<void>
|
||||
|
@ -68,6 +68,12 @@ static void demangle(llvm::raw_ostream &OS, const std::string &Mangled) {
|
||||
(DecoratedLength >= 4 && strncmp(Decorated, "___Z", 4) == 0)))
|
||||
Undecorated = itaniumDemangle(Decorated, nullptr, nullptr, &Status);
|
||||
|
||||
if (!Undecorated &&
|
||||
(DecoratedLength > 6 && strncmp(Decorated, "__imp_", 6) == 0)) {
|
||||
OS << "import thunk for ";
|
||||
Undecorated = itaniumDemangle(Decorated + 6, nullptr, nullptr, &Status);
|
||||
}
|
||||
|
||||
OS << (Undecorated ? Undecorated : Mangled) << '\n';
|
||||
|
||||
free(Undecorated);
|
||||
|
Loading…
x
Reference in New Issue
Block a user