Skip to content

Commit 1b135ac

Browse files
committed
Fix demangler for internal core type changes
1 parent e649639 commit 1b135ac

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

demangler/msvc/demangle_msvc.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1616,7 +1616,12 @@ TypeBuilder Demangle::DemangleFunction(BNNameType classFunctionType, bool pointe
16161616
params.pop_back();
16171617

16181618
// TODO: fix calling convention
1619-
TypeBuilder newType = TypeBuilder::FunctionType(shouldHaveReturnType ? returnType.Finalize() : Type::VoidType(), nullptr, params);
1619+
Ref<Type> returnTypeObj;
1620+
if (shouldHaveReturnType)
1621+
returnTypeObj = returnType.Finalize();
1622+
else
1623+
returnTypeObj = Type::VoidType();
1624+
TypeBuilder newType = TypeBuilder::FunctionType(returnTypeObj, nullptr, params);
16201625
newType.SetConst(_const);
16211626
newType.SetVolatile(_volatile);
16221627
newType.SetPointerSuffix(suffix);

0 commit comments

Comments
 (0)