Skip to content
Snippets Groups Projects
  • Reid Kleckner's avatar
    b92c95be
    [MS] Fix 'this' type when calling virtual methods with inalloca · b92c95be
    Reid Kleckner authored
    If the virtual method comes from a secondary vtable, then the type of
    the 'this' parameter should be i8*, and not a pointer to the complete
    class. In the MS ABI, the 'this' parameter on entry points to the vptr
    containing the virtual method that was called, so we use i8* instead of
    the normal type. We had a mismatch where the CGFunctionInfo of the call
    didn't match the CGFunctionInfo of the declaration, and this resulted in
    some assertions, but now both sides agree the type of 'this' is i8*.
    
    Fixes one issue raised in PR30293
    
    git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@280815 91177308-0d34-0410-b5e6-96231b3b80d8
    b92c95be
    History
    [MS] Fix 'this' type when calling virtual methods with inalloca
    Reid Kleckner authored
    If the virtual method comes from a secondary vtable, then the type of
    the 'this' parameter should be i8*, and not a pointer to the complete
    class. In the MS ABI, the 'this' parameter on entry points to the vptr
    containing the virtual method that was called, so we use i8* instead of
    the normal type. We had a mismatch where the CGFunctionInfo of the call
    didn't match the CGFunctionInfo of the declaration, and this resulted in
    some assertions, but now both sides agree the type of 'this' is i8*.
    
    Fixes one issue raised in PR30293
    
    git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@280815 91177308-0d34-0410-b5e6-96231b3b80d8
Code owners
Assign users and groups as approvers for specific file changes. Learn more.