From d435c8a451f41b39c57acdddb80edf4a6a88cd25 Mon Sep 17 00:00:00 2001 From: Martin Kinkelin Date: Sun, 5 Nov 2023 15:26:45 +0100 Subject: [PATCH] Merge fix: Adapt to changed mangleToBuffer() signature --- gen/asm-x86.h | 4 ++-- gen/dibuilder.cpp | 2 +- gen/mangling.cpp | 8 ++++---- gen/moduleinfo.cpp | 2 +- gen/modules.cpp | 4 ++-- gen/rttibuilder.cpp | 4 ++-- gen/typinf.cpp | 2 +- ir/irclass.cpp | 4 ++-- ir/irstruct.cpp | 2 +- 9 files changed, 16 insertions(+), 16 deletions(-) diff --git a/gen/asm-x86.h b/gen/asm-x86.h index c6e9488be9c..16d9e790db1 100644 --- a/gen/asm-x86.h +++ b/gen/asm-x86.h @@ -2375,7 +2375,7 @@ struct AsmProcessor { insnTemplate << "_"; } OutBuffer buf; - mangleToBuffer(vd, &buf); + mangleToBuffer(vd, buf); insnTemplate << buf.peekChars(); getIrGlobal(vd, true)->nakedUse = true; break; @@ -3047,7 +3047,7 @@ struct AsmProcessor { insnTemplate << "_"; } OutBuffer buf; - mangleToBuffer(decl, &buf); + mangleToBuffer(decl, buf); insnTemplate << buf.peekChars(); // addOperand2("${", ":c}", Arg_Pointer, e, // asmcode); diff --git a/gen/dibuilder.cpp b/gen/dibuilder.cpp index 63f1bf82784..9836983c6cb 100644 --- a/gen/dibuilder.cpp +++ b/gen/dibuilder.cpp @@ -1281,7 +1281,7 @@ void DIBuilder::EmitGlobalVariable(llvm::GlobalVariable *llVar, } OutBuffer mangleBuf; - mangleToBuffer(vd, &mangleBuf); + mangleToBuffer(vd, mangleBuf); auto DIVar = DBuilder.createGlobalVariableExpression( scope, // context diff --git a/gen/mangling.cpp b/gen/mangling.cpp index c72e511cc9e..52e5bc7473d 100644 --- a/gen/mangling.cpp +++ b/gen/mangling.cpp @@ -118,7 +118,7 @@ std::string getIRMangledName(FuncDeclaration *fdecl, LINK link) { std::string getIRMangledName(VarDeclaration *vd) { OutBuffer mangleBuf; - mangleToBuffer(vd, &mangleBuf); + mangleToBuffer(vd, mangleBuf); // TODO: is hashing of variable names necessary? @@ -144,7 +144,7 @@ std::string getIRMangledAggregateName(AggregateDeclaration *ad, std::string ret = "_D"; OutBuffer mangleBuf; - mangleToBuffer(ad, &mangleBuf); + mangleToBuffer(ad, mangleBuf); llvm::StringRef mangledAggrName = mangleBuf.peekChars(); if (shouldHashAggrName(mangledAggrName)) { @@ -176,7 +176,7 @@ std::string getIRMangledClassInfoSymbolName(AggregateDeclaration *aggrdecl) { std::string getIRMangledInterfaceInfosSymbolName(ClassDeclaration *cd) { OutBuffer mangledName; mangledName.writestring("_D"); - mangleToBuffer(cd, &mangledName); + mangleToBuffer(cd, mangledName); mangledName.writestring("16__interfaceInfosZ"); return getIRMangledVarName(mangledName.peekChars(), LINK::d); } @@ -184,7 +184,7 @@ std::string getIRMangledInterfaceInfosSymbolName(ClassDeclaration *cd) { std::string getIRMangledModuleInfoSymbolName(Module *module) { OutBuffer mangledName; mangledName.writestring("_D"); - mangleToBuffer(module, &mangledName); + mangleToBuffer(module, mangledName); mangledName.writestring("12__ModuleInfoZ"); return getIRMangledVarName(mangledName.peekChars(), LINK::d); } diff --git a/gen/moduleinfo.cpp b/gen/moduleinfo.cpp index 1cc8513aed7..65e673aae14 100644 --- a/gen/moduleinfo.cpp +++ b/gen/moduleinfo.cpp @@ -101,7 +101,7 @@ namespace { std::string getMangledName(Module *m, const char *suffix) { OutBuffer buf; buf.writestring("_D"); - mangleToBuffer(m, &buf); + mangleToBuffer(m, buf); if (suffix) buf.writestring(suffix); return buf.peekChars(); diff --git a/gen/modules.cpp b/gen/modules.cpp index 928b875c65a..03481045637 100644 --- a/gen/modules.cpp +++ b/gen/modules.cpp @@ -279,7 +279,7 @@ void addCoverageAnalysis(Module *m) { OutBuffer mangleBuf; mangleBuf.writestring("_D"); - mangleToBuffer(m, &mangleBuf); + mangleToBuffer(m, mangleBuf); mangleBuf.writestring("12_coverageanalysisCtor1FZv"); const char *ctorname = mangleBuf.peekChars(); @@ -382,7 +382,7 @@ void registerModuleInfo(Module *m) { const auto style = getModuleRegistryStyle(); OutBuffer mangleBuf; - mangleToBuffer(m, &mangleBuf); + mangleToBuffer(m, mangleBuf); const char *mangle = mangleBuf.peekChars(); if (style == RegistryStyle::legacyLinkedList) { diff --git a/gen/rttibuilder.cpp b/gen/rttibuilder.cpp index b8ba7006943..6c249325d1c 100644 --- a/gen/rttibuilder.cpp +++ b/gen/rttibuilder.cpp @@ -78,7 +78,7 @@ void RTTIBuilder::push_void_array(uint64_t dim, llvm::Constant *ptr) { void RTTIBuilder::push_void_array(llvm::Constant *CI, Type *valtype, Dsymbol *mangle_sym) { OutBuffer initname; - mangleToBuffer(mangle_sym, &initname); + mangleToBuffer(mangle_sym, initname); initname.writestring(".rtti.voidarr.data"); const LinkageWithCOMDAT lwc(TYPEINFO_LINKAGE_TYPE, needsCOMDAT()); @@ -100,7 +100,7 @@ void RTTIBuilder::push_array(llvm::Constant *CI, uint64_t dim, Type *valtype, OutBuffer initname; if (mangle_sym) - mangleToBuffer(mangle_sym, &initname); + mangleToBuffer(mangle_sym, initname); else initname.writestring(".ldc"); initname.writestring(".rtti."); diff --git a/gen/typinf.cpp b/gen/typinf.cpp index 996a29b212b..e38c01136a5 100644 --- a/gen/typinf.cpp +++ b/gen/typinf.cpp @@ -421,7 +421,7 @@ void buildTypeInfo(TypeInfoDeclaration *decl) { Type *forType = decl->tinfo; OutBuffer mangleBuf; - mangleToBuffer(decl, &mangleBuf); + mangleToBuffer(decl, mangleBuf); const char *mangled = mangleBuf.peekChars(); IF_LOG { diff --git a/ir/irclass.cpp b/ir/irclass.cpp index 009dabccd99..a036a99e5e9 100644 --- a/ir/irclass.cpp +++ b/ir/irclass.cpp @@ -457,9 +457,9 @@ llvm::GlobalVariable *IrClass::getInterfaceVtblSymbol(BaseClass *b, OutBuffer mangledName; mangledName.writestring("_D"); - mangleToBuffer(aggrdecl, &mangledName); + mangleToBuffer(aggrdecl, mangledName); mangledName.writestring("11__interface"); - mangleToBuffer(b->sym, &mangledName); + mangleToBuffer(b->sym, mangledName); mangledName.writestring(thunkPrefixLen); mangledName.writestring(thunkPrefix); mangledName.writestring("6__vtblZ"); diff --git a/ir/irstruct.cpp b/ir/irstruct.cpp index 7f0c7121312..1b9870e0815 100644 --- a/ir/irstruct.cpp +++ b/ir/irstruct.cpp @@ -40,7 +40,7 @@ LLGlobalVariable* IrStruct::getTypeInfoSymbol(bool define) { if (!typeInfo) { OutBuffer mangledName; mangledName.writestring("TypeInfo_S"); - mangleToBuffer(aggrdecl, &mangledName); + mangleToBuffer(aggrdecl, mangledName); const auto length = mangledName.length(); mangledName.prependstring(("_D" + std::to_string(length)).c_str()); mangledName.writestring("6__initZ");