File tree Expand file tree Collapse file tree 2 files changed +18
-10
lines changed Expand file tree Collapse file tree 2 files changed +18
-10
lines changed Original file line number Diff line number Diff line change 14
14
#define __SWIFT_AST_MANGLE_H__
15
15
16
16
#include " llvm/ADT/DenseMap.h"
17
+ #include " swift/ABI/Compression.h"
17
18
#include " swift/AST/Types.h"
18
19
#include " swift/AST/Decl.h"
19
20
#include " swift/AST/GenericSignature.h"
@@ -89,19 +90,11 @@ class Mangler {
89
90
};
90
91
91
92
// / Finish the mangling of the symbol and return the mangled name.
92
- std::string finalize () {
93
- assert (Storage.size () && " Mangling an empty name" );
94
- std::string result = std::string (Storage.data (), Storage.size ());
95
- Storage.clear ();
96
- return result;
97
- }
93
+ std::string finalize ();
98
94
99
95
// / Finish the mangling of the symbol and write the mangled name into
100
96
// / \p stream.
101
- void finalize (llvm::raw_ostream &stream) {
102
- std::string result = finalize ();
103
- stream.write (result.data (), result.size ());
104
- }
97
+ void finalize (llvm::raw_ostream &stream);
105
98
106
99
void setModuleContext (ModuleDecl *M) { Mod = M; }
107
100
Original file line number Diff line number Diff line change @@ -70,6 +70,21 @@ static Demangle::OperatorKind TranslateOperator(OperatorFixity fixity) {
70
70
llvm_unreachable (" invalid operator fixity" );
71
71
}
72
72
73
+ // / Finish the mangling of the symbol and return the mangled name.
74
+ std::string Mangler::finalize () {
75
+ assert (Storage.size () && " Mangling an empty name" );
76
+ std::string result = std::string (Storage.data (), Storage.size ());
77
+ Storage.clear ();
78
+ return result;
79
+ }
80
+
81
+ // / Finish the mangling of the symbol and write the mangled name into
82
+ // / \p stream.
83
+ void Mangler::finalize (llvm::raw_ostream &stream) {
84
+ std::string result = finalize ();
85
+ stream.write (result.data (), result.size ());
86
+ }
87
+
73
88
// / Mangle a StringRef as an identifier into a buffer.
74
89
void Mangler::mangleIdentifier (StringRef str, OperatorFixity fixity,
75
90
bool isOperator) {
You can’t perform that action at this time.
0 commit comments