Skip to content

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

clang/include/clang/AST/Mangle.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ class MangleContext {
140140
virtual void mangleCXXRTTIName(QualType T, raw_ostream &,
141141
bool NormalizeIntegers = false) = 0;
142142
virtual void mangleStringLiteral(const StringLiteral *SL, raw_ostream &) = 0;
143-
virtual void mangleMSGuidDecl(const MSGuidDecl *GD, raw_ostream &);
143+
virtual void mangleMSGuidDecl(const MSGuidDecl *GD, raw_ostream &) const;
144144

145145
void mangleGlobalBlock(const BlockDecl *BD, const NamedDecl *ID,
146146
raw_ostream &Out);
@@ -153,9 +153,9 @@ class MangleContext {
153153

154154
void mangleObjCMethodName(const ObjCMethodDecl *MD, raw_ostream &OS,
155155
bool includePrefixByte = true,
156-
bool includeCategoryNamespace = true);
156+
bool includeCategoryNamespace = true) const;
157157
void mangleObjCMethodNameAsSourceName(const ObjCMethodDecl *MD,
158-
raw_ostream &);
158+
raw_ostream &) const;
159159

160160
virtual void mangleStaticGuardVariable(const VarDecl *D, raw_ostream &) = 0;
161161

clang/lib/AST/Mangle.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,8 @@ void MangleContext::mangleName(GlobalDecl GD, raw_ostream &Out) {
240240
Out << ((DefaultPtrWidth / 8) * ArgWords);
241241
}
242242

243-
void MangleContext::mangleMSGuidDecl(const MSGuidDecl *GD, raw_ostream &Out) {
243+
void MangleContext::mangleMSGuidDecl(const MSGuidDecl *GD,
244+
raw_ostream &Out) const {
244245
// For now, follow the MSVC naming convention for GUID objects on all
245246
// targets.
246247
MSGuidDecl::Parts P = GD->getParts();
@@ -327,7 +328,7 @@ void MangleContext::mangleBlock(const DeclContext *DC, const BlockDecl *BD,
327328
void MangleContext::mangleObjCMethodName(const ObjCMethodDecl *MD,
328329
raw_ostream &OS,
329330
bool includePrefixByte,
330-
bool includeCategoryNamespace) {
331+
bool includeCategoryNamespace) const {
331332
if (getASTContext().getLangOpts().ObjCRuntime.isGNUFamily()) {
332333
// This is the mangling we've always used on the GNU runtimes, but it
333334
// has obvious collisions in the face of underscores within class
@@ -382,7 +383,7 @@ void MangleContext::mangleObjCMethodName(const ObjCMethodDecl *MD,
382383
}
383384

384385
void MangleContext::mangleObjCMethodNameAsSourceName(const ObjCMethodDecl *MD,
385-
raw_ostream &Out) {
386+
raw_ostream &Out) const {
386387
SmallString<64> Name;
387388
llvm::raw_svector_ostream OS(Name);
388389

0 commit comments

Comments
 (0)