Although I don't plan to bring over new assertions wholesale
into the current qualification branch, it's entirely possible
that various minor changes in main will use the new assertions;
having this basic support in the release branch will simplify that.
(This is why I'm adding the includes as a separate pass from
rewriting the individual assertions)
LLVM deprecated, renamed, and removed a bunch of APIs. This patch
contains a lot of the changes needed to deal with that.
The SetVector type changed the template parameters.
APInt updated multiple names, countPopulation became popcount,
getAllOnesValue became getAllOnes, getNullValue became getZero, etc...
Clang type nullability check stopped taking a clang AST context.
The LLVM IRGen Function type stopped exposing basic block list directly,
but gained enough API surface that the translation isn't too bad.
(GenControl.cpp, LLVMMergeFunctions.cpp)
llvm::Optional had a transform function. That was being used in a couple
of places, so I've added a new implementation under STLExtras that
transforms valid optionals, otherwise it returns nullopt.
dead methods, and moving emitInvoke to CallInvocation.
An interesting semantic change of this is that we're now calling getResultType
on the function type every time IGF is constructed, which exposed some latent
bugs. Specifically two places in GenObjC are trying to extra curry level two
from function types like "SomeObject -> (value : SomeObject) -> ()" which
doesn't make sense. I switched them to get curry level 1, but this definitely
needs some close review.
Swift SVN r4852
for Swift's IRGen (or CFGGen) to get a constant folded condition when
emitting a branch: this is because all constants are obfuscated behind
function calls. This is verified to never trigger on the testsuite.
Swift SVN r2940
With that in place, fix ~Scope so that it uses the same code for
popping as Scope::pop() does, i.e. the code that modifies InnermostScope
before popping out.
This properly fixes the issue Doug patched over in r1387.
Swift SVN r1393
to look at the first element of an empty stack. The use-after-free
triggers occasionally for me during normal testing (about 1 failure
per 5 trials), but triggers on IRgen/func.swift regularly when using
guardmalloc.
John, please take a look; this feels more like treating a symptom than
addressing the cause.
Swift SVN r1389