Commit Graph

4 Commits

Author SHA1 Message Date
Slava Pestov
e123815e85 IRGen: Use the correct triple when checking for YAML legacy type info
IGM.Triple is irgen.getEffectiveClangTriple(), which says "thumbv7"
in place of "armv7" for 32-bit iOS ARM targets.

Instead, lets use IGM.Context.LangOpts.Target, which is what we use
to find swiftmodule files.
2019-02-15 21:10:27 -05:00
Michael Gottesman
0af0d5fddc [ownership] Replace ValueOwnershipKind::Trivial with ValueOwnershipKind::Any.
In a previous commit, I banned in the verifier any SILValue from producing
ValueOwnershipKind::Any in preparation for this.

This change arises out of discussions in between John, Andy, and I around
ValueOwnershipKind::Trivial. The specific realization was that this ownership
kind was an unnecessary conflation of the a type system idea (triviality) with
an ownership idea (@any, an ownership kind that is compatible with any other
ownership kind at value merge points and can only create). This caused the
ownership model to have to contort to handle the non-payloaded or trivial cases
of non-trivial enums. This is unnecessary if we just eliminate the any case and
in the verifier separately verify that trivial => @any (notice that we do not
verify that @any => trivial).

NOTE: This is technically an NFC intended change since I am just replacing
Trivial with Any. That is why if you look at the tests you will see that I
actually did not need to update anything except removing some @trivial ownership
since @any ownership is represented without writing @any in the parsed sil.

rdar://46294760
2018-12-04 23:01:43 -08:00
Michael Gottesman
60252dcd6a Fix the build by ensuring that the test only runs if LLVM can compile ARM. 2018-10-31 19:32:21 -07:00
John McCall
cf511445e2 Basic support for Builtin.IntegerLiteral. 2018-10-31 18:42:34 -04:00