mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-11-26 23:21:11 +00:00
Revert "[Demangle] demangle builtin type transformations"
This reverts commit 31cc069b5f
.
This commit is contained in:
parent
31cc069b5f
commit
91a848bc89
@ -534,23 +534,6 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
class TransformedType : public Node {
|
||||
StringView Transform;
|
||||
Node *BaseType;
|
||||
public:
|
||||
TransformedType(StringView Transform_, Node *BaseType_)
|
||||
: Node(KTransformedType), Transform(Transform_), BaseType(BaseType_) {}
|
||||
|
||||
template<typename Fn> void match(Fn F) const { F(Transform, BaseType); }
|
||||
|
||||
void printLeft(OutputBuffer &OB) const override {
|
||||
OB += Transform;
|
||||
OB += '(';
|
||||
BaseType->print(OB);
|
||||
OB += ')';
|
||||
}
|
||||
};
|
||||
|
||||
struct AbiTagAttr : Node {
|
||||
Node *Base;
|
||||
std::string_view Tag;
|
||||
@ -3911,15 +3894,7 @@ Node *AbstractManglingParser<Derived, Alloc>::parseType() {
|
||||
// Typically, <builtin-type>s are not considered substitution candidates,
|
||||
// but the exception to that exception is vendor extended types (Itanium C++
|
||||
// ABI 5.9.1).
|
||||
if (consumeIf('I')) {
|
||||
Node *BaseType = parseType();
|
||||
if (BaseType == nullptr)
|
||||
return nullptr;
|
||||
if (!consumeIf('E'))
|
||||
return nullptr;
|
||||
Result = make<TransformedType>(Res, BaseType);
|
||||
} else
|
||||
Result = make<NameType>(Res);
|
||||
Result = make<NameType>(Res);
|
||||
break;
|
||||
}
|
||||
case 'D':
|
||||
|
@ -19,7 +19,6 @@ NODE(QualType)
|
||||
NODE(ConversionOperatorType)
|
||||
NODE(PostfixQualifiedType)
|
||||
NODE(ElaboratedTypeSpefType)
|
||||
NODE(TransformedType)
|
||||
NODE(NameType)
|
||||
NODE(AbiTagAttr)
|
||||
NODE(EnableIfAttr)
|
||||
|
@ -30114,9 +30114,6 @@ const char* cases[][2] =
|
||||
" std::allocator<char>>::basic_string()"},
|
||||
{"_ZN1SB8ctor_tagC2Ev", "S[abi:ctor_tag]::S()"},
|
||||
{"_ZN1SB8ctor_tagD2Ev", "S[abi:ctor_tag]::~S()"},
|
||||
|
||||
// clang builtin type transform
|
||||
{"_Z2f5IiEvu7__decayIT_E", "void f5<int>(__decay(int))"},
|
||||
};
|
||||
|
||||
const unsigned N = sizeof(cases) / sizeof(cases[0]);
|
||||
|
@ -528,23 +528,6 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
class TransformedType : public Node {
|
||||
StringView Transform;
|
||||
Node *BaseType;
|
||||
public:
|
||||
TransformedType(StringView Transform_, Node *BaseType_)
|
||||
: Node(KTransformedType), Transform(Transform_), BaseType(BaseType_) {}
|
||||
|
||||
template<typename Fn> void match(Fn F) const { F(Transform, BaseType); }
|
||||
|
||||
void printLeft(OutputBuffer &OB) const override {
|
||||
OB += Transform;
|
||||
OB += '(';
|
||||
BaseType->print(OB);
|
||||
OB += ')';
|
||||
}
|
||||
};
|
||||
|
||||
struct AbiTagAttr : Node {
|
||||
Node *Base;
|
||||
std::string_view Tag;
|
||||
@ -3906,15 +3889,7 @@ Node *AbstractManglingParser<Derived, Alloc>::parseType() {
|
||||
// Typically, <builtin-type>s are not considered substitution candidates,
|
||||
// but the exception to that exception is vendor extended types (Itanium C++
|
||||
// ABI 5.9.1).
|
||||
if (consumeIf('I')) {
|
||||
Node *BaseType = parseType();
|
||||
if (BaseType == nullptr)
|
||||
return nullptr;
|
||||
if (!consumeIf('E'))
|
||||
return nullptr;
|
||||
Result = make<TransformedType>(Res, BaseType);
|
||||
} else
|
||||
Result = make<NameType>(Res);
|
||||
Result = make<NameType>(Res);
|
||||
break;
|
||||
}
|
||||
case 'D':
|
||||
|
@ -19,7 +19,6 @@ NODE(QualType)
|
||||
NODE(ConversionOperatorType)
|
||||
NODE(PostfixQualifiedType)
|
||||
NODE(ElaboratedTypeSpefType)
|
||||
NODE(TransformedType)
|
||||
NODE(NameType)
|
||||
NODE(AbiTagAttr)
|
||||
NODE(EnableIfAttr)
|
||||
|
Loading…
Reference in New Issue
Block a user