|
PrototypeModel thisConv = program.getCompilerSpec().getCallingConvention(CompilerSpec.CALLING_CONVENTION_thiscall); |
|
if (conv != thisConv) { |
This limits the code to just a single "this" calling convention!
Although imperfect, an alternative solution would be to use the below test both here and elsewhere in the codebase:
if (conv.getName().startsWith(CompilerSpec.CALLING_CONVENTION_thiscall)) {
Users could then add alternatives that Ghidra could work with. (Obviously those alternatives must use a name starting with the constant!)