Merging in latest master

This commit is contained in:
Max Moiseev
2016-02-24 15:10:25 -08:00
parent c2c714b039
commit bb3eaaf308
78 changed files with 1048 additions and 375 deletions

View File

@@ -167,7 +167,7 @@ static bool isPromotableAllocInst(SILInstruction *I) {
// Check for array buffer allocation.
auto *AI = dyn_cast<ApplyInst>(I);
if (AI && AI->getNumArguments() == 3) {
if (auto *Callee = AI->getCalleeFunction()) {
if (auto *Callee = AI->getReferencedFunction()) {
if (Callee->getName() == "swift_bufferAllocate")
return true;
}