Skip to content

Commit

Permalink
Merge fix: Adapt to changed mangleToBuffer() signature
Browse files Browse the repository at this point in the history
  • Loading branch information
kinke committed Nov 6, 2023
1 parent d6d7918 commit d435c8a
Show file tree
Hide file tree
Showing 9 changed files with 16 additions and 16 deletions.
4 changes: 2 additions & 2 deletions gen/asm-x86.h
Original file line number Diff line number Diff line change
Expand Up @@ -2375,7 +2375,7 @@ struct AsmProcessor {
insnTemplate << "_";
}
OutBuffer buf;
mangleToBuffer(vd, &buf);
mangleToBuffer(vd, buf);
insnTemplate << buf.peekChars();
getIrGlobal(vd, true)->nakedUse = true;
break;
Expand Down Expand Up @@ -3047,7 +3047,7 @@ struct AsmProcessor {
insnTemplate << "_";
}
OutBuffer buf;
mangleToBuffer(decl, &buf);
mangleToBuffer(decl, buf);
insnTemplate << buf.peekChars();
// addOperand2("${", ":c}", Arg_Pointer, e,
// asmcode);
Expand Down
2 changes: 1 addition & 1 deletion gen/dibuilder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1281,7 +1281,7 @@ void DIBuilder::EmitGlobalVariable(llvm::GlobalVariable *llVar,
}

OutBuffer mangleBuf;
mangleToBuffer(vd, &mangleBuf);
mangleToBuffer(vd, mangleBuf);

auto DIVar = DBuilder.createGlobalVariableExpression(
scope, // context
Expand Down
8 changes: 4 additions & 4 deletions gen/mangling.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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?

Expand All @@ -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)) {
Expand Down Expand Up @@ -176,15 +176,15 @@ 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);
}

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);
}
Expand Down
2 changes: 1 addition & 1 deletion gen/moduleinfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
4 changes: 2 additions & 2 deletions gen/modules.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down Expand Up @@ -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) {
Expand Down
4 changes: 2 additions & 2 deletions gen/rttibuilder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand All @@ -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.");
Expand Down
2 changes: 1 addition & 1 deletion gen/typinf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
4 changes: 2 additions & 2 deletions ir/irclass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down
2 changes: 1 addition & 1 deletion ir/irstruct.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down

0 comments on commit d435c8a

Please sign in to comment.