File tree Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -38,3 +38,12 @@ std::optional<std::string> SwiftMangler::mangleType(const swift::ModuleType& typ
3838 }
3939 return key;
4040}
41+
42+ #define TYPE (TYPE_ID, PARENT_TYPE )
43+ #define BUILTIN_TYPE (TYPE_ID, PARENT_TYPE ) \
44+ std::optional<std::string> SwiftMangler::mangleType (const swift::TYPE_ID##Type& type) { \
45+ llvm::SmallString<32 > buffer; \
46+ type.getTypeName (buffer); \
47+ return buffer.str ().str (); \
48+ }
49+ #include < swift/AST/TypeNodes.def>
Original file line number Diff line number Diff line change @@ -15,6 +15,11 @@ class SwiftMangler {
1515
1616 std::optional<std::string> mangleType (const swift::ModuleType& type);
1717
18+ #define TYPE (TYPE_ID, PARENT_TYPE )
19+ #define BUILTIN_TYPE (TYPE_ID, PARENT_TYPE ) \
20+ std::optional<std::string> mangleType (const swift::TYPE_ID##Type& type);
21+ #include < swift/AST/TypeNodes.def>
22+
1823 private:
1924 swift::Mangle::ASTMangler mangler;
2025};
You can’t perform that action at this time.
0 commit comments