IRGen: Export direct metadata symbols at the address point of the metadata object.

This is more resilient, since we want to be able to add more information behind the address point of type objects. The start of the metadata object is now an internal "full metadata" symbol.

Note that we can't do this for known opaque metadata from the C++ runtime, since clang doesn't have a good way to emit offset symbol aliases, so for non-nominal metadata objects we still emit an adjustment inline. We also aren't able to generate references to aliases within the same module due to an MC bug with alias refs on i386 and armv7 (rdar://problem/22450593).

Swift SVN r31523
This commit is contained in:
Joe Groff
2015-08-27 05:18:38 +00:00
parent 1e4aa27407
commit 43d620c7e0
44 changed files with 416 additions and 208 deletions

View File

@@ -607,6 +607,11 @@ void Remangler::mangleTypeMetadata(Node *node) {
mangleChildNodes(node); // directness, type
}
void Remangler::mangleFullTypeMetadata(Node *node) {
Out << "Mf";
mangleChildNodes(node); // type
}
void Remangler::manglePartialApplyForwarder(Node *node) {
Out << "PA__T";
mangleSingleChildNode(node); // global