Add support for various C++14 demanglings.
Mostly this includes <auto> and <decltype-auto> return values.
Additionally, this fixes a fairly obscure back-referencing bug
that was encountered in one of the C++14 tests, which is that
if you have something like Foo<&bar, &bar> then the `bar`
forms a backreference.
llvm-svn: 340896
diff --git a/llvm/lib/Demangle/MicrosoftDemangleNodes.h b/llvm/lib/Demangle/MicrosoftDemangleNodes.h
index 1797403..93845b5 100644
--- a/llvm/lib/Demangle/MicrosoftDemangleNodes.h
+++ b/llvm/lib/Demangle/MicrosoftDemangleNodes.h
@@ -148,7 +148,10 @@
enum class ReferenceKind : uint8_t { None, LValueRef, RValueRef };
-enum OutputFlags { OF_Default = 0, OF_NoCallingConvention = 1 };
+enum OutputFlags {
+ OF_Default = 0,
+ OF_NoCallingConvention = 1,
+};
// Types
enum class PrimitiveKind {
@@ -392,8 +395,8 @@
explicit FunctionSignatureNode(NodeKind K) : TypeNode(K) {}
FunctionSignatureNode() : TypeNode(NodeKind::FunctionSignature) {}
- virtual void outputPre(OutputStream &OS, OutputFlags Flags) const;
- virtual void outputPost(OutputStream &OS, OutputFlags Flags) const;
+ void outputPre(OutputStream &OS, OutputFlags Flags) const override;
+ void outputPost(OutputStream &OS, OutputFlags Flags) const override;
// Valid if this FunctionTypeNode is the Pointee of a PointerType or
// MemberPointerType.
@@ -566,13 +569,13 @@
void output(OutputStream &OS, OutputFlags Flags) const override {}
};
-struct CustomNode : public Node {
- CustomNode() : Node(NodeKind::Custom) {}
+struct CustomTypeNode : public TypeNode {
+ CustomTypeNode() : TypeNode(NodeKind::Custom) {}
- void output(OutputStream &OS, OutputFlags Flags) const override;
+ void outputPre(OutputStream &OS, OutputFlags Flags) const override;
+ void outputPost(OutputStream &OS, OutputFlags Flags) const override;
- // The string to print.
- StringView Name;
+ IdentifierNode *Identifier;
};
struct NodeArrayNode : public Node {