[llvm] r359007 - llvm-undname: Support demangling the spaceship operator
Nico Weber via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 23 09:20:27 PDT 2019
Author: nico
Date: Tue Apr 23 09:20:27 2019
New Revision: 359007
URL: http://llvm.org/viewvc/llvm-project?rev=359007&view=rev
Log:
llvm-undname: Support demangling the spaceship operator
Also add a test for demanling the co_await operator.
Added:
llvm/trunk/test/Demangle/ms-cxx20.test
Modified:
llvm/trunk/include/llvm/Demangle/MicrosoftDemangleNodes.h
llvm/trunk/lib/Demangle/MicrosoftDemangle.cpp
llvm/trunk/lib/Demangle/MicrosoftDemangleNodes.cpp
Modified: llvm/trunk/include/llvm/Demangle/MicrosoftDemangleNodes.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Demangle/MicrosoftDemangleNodes.h?rev=359007&r1=359006&r2=359007&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Demangle/MicrosoftDemangleNodes.h (original)
+++ llvm/trunk/include/llvm/Demangle/MicrosoftDemangleNodes.h Tue Apr 23 09:20:27 2019
@@ -170,8 +170,8 @@ enum class IntrinsicFunctionKind : uint8
VectorCopyCtorIter, // ?__G vector copy constructor iterator
VectorVbaseCopyCtorIter, // ?__H vector vbase copy constructor iterator
ManVectorVbaseCopyCtorIter, // ?__I managed vector vbase copy constructor
- CoAwait, // ?__L co_await
- Spaceship, // operator<=>
+ CoAwait, // ?__L operator co_await
+ Spaceship, // ?__M operator<=>
MaxIntrinsic
};
Modified: llvm/trunk/lib/Demangle/MicrosoftDemangle.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Demangle/MicrosoftDemangle.cpp?rev=359007&r1=359006&r2=359007&view=diff
==============================================================================
--- llvm/trunk/lib/Demangle/MicrosoftDemangle.cpp (original)
+++ llvm/trunk/lib/Demangle/MicrosoftDemangle.cpp Tue Apr 23 09:20:27 2019
@@ -626,8 +626,8 @@ Demangler::translateIntrinsicFunctionCod
// iter
IFK::None, // ?__J local static thread guard
IFK::None, // ?__K operator ""_name
- IFK::CoAwait, // ?__L co_await
- IFK::None, // ?__M <unused>
+ IFK::CoAwait, // ?__L operator co_await
+ IFK::Spaceship, // ?__M operator<=>
IFK::None, // ?__N <unused>
IFK::None, // ?__O <unused>
IFK::None, // ?__P <unused>
@@ -687,7 +687,6 @@ Demangler::demangleFunctionIdentifierCod
translateIntrinsicFunctionCode(CH, Group));
}
}
- // No Mangling Yet: Spaceship, // operator<=>
DEMANGLE_UNREACHABLE;
}
Modified: llvm/trunk/lib/Demangle/MicrosoftDemangleNodes.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Demangle/MicrosoftDemangleNodes.cpp?rev=359007&r1=359006&r2=359007&view=diff
==============================================================================
--- llvm/trunk/lib/Demangle/MicrosoftDemangleNodes.cpp (original)
+++ llvm/trunk/lib/Demangle/MicrosoftDemangleNodes.cpp Tue Apr 23 09:20:27 2019
@@ -337,8 +337,9 @@ void IntrinsicFunctionIdentifierNode::ou
"`vector vbase copy constructor iterator'");
OUTPUT_ENUM_CLASS_VALUE(IntrinsicFunctionKind, ManVectorVbaseCopyCtorIter,
"`managed vector vbase copy constructor iterator'");
- OUTPUT_ENUM_CLASS_VALUE(IntrinsicFunctionKind, CoAwait, "co_await");
- OUTPUT_ENUM_CLASS_VALUE(IntrinsicFunctionKind, Spaceship, "operator <=>");
+ OUTPUT_ENUM_CLASS_VALUE(IntrinsicFunctionKind, CoAwait,
+ "operator co_await");
+ OUTPUT_ENUM_CLASS_VALUE(IntrinsicFunctionKind, Spaceship, "operator<=>");
case IntrinsicFunctionKind::MaxIntrinsic:
case IntrinsicFunctionKind::None:
break;
Added: llvm/trunk/test/Demangle/ms-cxx20.test
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Demangle/ms-cxx20.test?rev=359007&view=auto
==============================================================================
--- llvm/trunk/test/Demangle/ms-cxx20.test (added)
+++ llvm/trunk/test/Demangle/ms-cxx20.test Tue Apr 23 09:20:27 2019
@@ -0,0 +1,9 @@
+; RUN: llvm-undname < %s | FileCheck %s
+
+; CHECK-NOT: Invalid mangled name
+
+??__LA@@QEAA?AUno_suspend@@XZ
+; CHECK: struct no_suspend __cdecl A::operator co_await(void)
+
+??__MS@@QEAA?AVstrong_ordering at std@@AEBU0@@Z'
+; CHECK: class std::strong_ordering __cdecl S::operator<=>(struct S const &)
More information about the llvm-commits
mailing list