OSDN Git Service

[MS Demangler] Support extern "C" functions.
authorZachary Turner <zturner@google.com>
Fri, 10 Aug 2018 21:09:05 +0000 (21:09 +0000)
committerZachary Turner <zturner@google.com>
Fri, 10 Aug 2018 21:09:05 +0000 (21:09 +0000)
commitcffbbb125ea004ce92e7fc265def713f3e363c79
tree3ea5baad8e13483bddeac2a5075f35f174691b0b
parent65ef1d041c5fda0cfe8654a103242485db294950
[MS Demangler] Support extern "C" functions.

There are two cases we need to support with extern "C"
functions.  The first is the case of a '9' indicating that
the function has no prototype.  This occurs when we mangle
a symbol inside of an extern "C" function, but not the
function itself.

The second case is when we have an overloaded extern "C"
functions.  In this case we emit $$J0 to indicate this.
This patch adds support for both of these cases.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@339471 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Demangle/MicrosoftDemangle.cpp
test/Demangle/ms-mangle.test