This replaces the '[volatile]' flag. Now, class_method and
super_method are only used for vtable dispatch.
The witness_method instruction is still overloaded for use
with both ObjC protocol requirements and Swift protocol
requirements; the next step is to make it only mean the
latter, also using objc_method for ObjC protocol calls.
The specific exposed problem had to do with my using the same emission routine
for both lvalues using delegating init self (where we want formal accesses) and
for routines that wanted normal access to self. By splitting them the issue is
resolved.
As a benefit, I added a small peephole that I needed to add for my own purposes
(i.e. to maintain invariants), but that also incidentally improve codegen in
other places!
rdar://31521023
While updating DI for ownership, I noticed that we were closing a borrow scope too early in the DI version of this test file. While trying to find why I missed it earlier, I noticed that (AFAICT) we don't have a specific SILGen test for this behavior.
This commit adds the missing test with the ownership verifier disabled. I am
going to fix it in a subsequent commit.
rdar://31521023