swift
323e2b16 - [cxx-interop] Fix linker errors when using std-vector.

Commit
3 years ago
[cxx-interop] Fix linker errors when using std-vector. Adds tests for using std-vector and some other interesting types. This patch fixes four mis conceptions that the compiler was previously making: 1. Implicit destructors have no side effects. (Yes, this means we were not cleaning up some objects.) 2. Implicit destructors have bodies. (Technically they do, but the body doesn't include CallExprs that they make when lowered to IR.) 3. Functions other than methods can be uninstantiated templates. 4. Uninstantiated templates may have executable code. (I.e., we can never take the fast path.) And makes sure that we visit the destructor of any VarDecl (including parameters).
Author
Committer
Parents
Loading