Open
Description
Compiling the following sample for Windows x86 with -O3 shows that static_func
will have fastcc
applied to it:
static __declspec(noinline) int static_func(int arg1){
return arg1 * 2;
}
int main(int argc, char* argv[]) {
return static_func(argc);
}
https://godbolt.org/z/Pcroj66c4
The PDB however shows NearC
, so cdecl, instead of FastCall
.
The reason this happens is because GlobalOpt updates the CC, but not the debug info:
I feel like the DISubroutineType
should be updated to DW_CC_BORLAND_msfastcall
for Windows x86. So that the PDB depicts the correct CC.