[PATCH] [ms-cxxabi] Get closer to emitting the correct set of destructors in each TU (PR12784).

Timur Iskhodzhanov timurrrr at google.com
Mon May 6 06:12:14 PDT 2013


  From the earlier non-phabricator review:

    Compiled with Clang:
    ------------------------------------------------------------------------
    struct S {
        virtual ~S();
    };

    void f(S *s);

    int main(void) {
        S *s = new S[2];
          f(s);
    }
    ------------------------------------------------------------------------

    Compiled with cl.exe:
    ------------------------------------------------------------------------
    struct S {
        virtual ~S();
    };

    void f(S *s) {
        delete[] s;
    }
    ------------------------------------------------------------------------

  Yeah, this does look like we need to generate the vector deleting dtor in this case.
  Sorry for not being attentive enough.

  Am I right that you plan to fix this case in the forthcoming patches?
  Is is possible to split this patch into "fix the base vs complete dtor logic in MS ABI" (should be simple enough)
  and then have a separate "handle array delete in MS ABI, with tests" patches?

http://llvm-reviews.chandlerc.com/D746



More information about the cfe-commits mailing list