SIL: Make RefElement take VarDecl instead of index

This is inconsistent with ElementAddr and Extract, but allows all the hairy logic of accessing class fields in IRGen to stand without a bunch of pointless refactoring.

Swift SVN r3778
This commit is contained in:
Joe Groff
2013-01-16 22:12:17 +00:00
parent 197b9e90e9
commit 521b9376eb
7 changed files with 70 additions and 45 deletions

View File

@@ -315,8 +315,8 @@ public:
<< EI->getFieldNo();
}
void visitRefElementAddrInst(RefElementAddrInst *EI) {
OS << "ref_element_addr " << getID(EI->getOperand()) << ", "
<< EI->getFieldNo();
OS << "ref_element_addr " << getID(EI->getOperand()) << ", @"
<< EI->getField()->getName().get();
}
void visitArchetypeMethodInst(ArchetypeMethodInst *AMI) {
OS << "archetype_method " << getID(AMI->getOperand()) << ", @";