Backed out changeset 5253bfbb3890

This commit is contained in:
Kelly Wilson
2011-04-20 00:28:23 -06:00
parent b26b0f4196
commit 7c81278b9c
15 changed files with 250 additions and 221 deletions

View File

@@ -7,7 +7,6 @@
#include "gen/tollvm.h"
#include "gen/functions.h"
#include "llvm/Analysis/ValueTracking.h"
#include "llvm/Support/CommandLine.h"
namespace cl = llvm::cl;
@@ -438,7 +437,7 @@ static void DtoCreateNestedContextType(FuncDeclaration* fd) {
assert(vd->ir.irLocal->value);
LLValue* value = vd->ir.irLocal->value;
const LLType* type = value->getType();
if (llvm::isa<llvm::AllocaInst>(llvm::GetUnderlyingObject(value)))
if (llvm::isa<llvm::AllocaInst>(value->getUnderlyingObject()))
// This will be copied to the nesting frame.
type = type->getContainedType(0);
types.push_back(type);
@@ -632,7 +631,7 @@ void DtoCreateNestedContext(FuncDeclaration* fd) {
Logger::println("nested param: %s", vd->toChars());
LOG_SCOPE
LLValue* value = vd->ir.irLocal->value;
if (llvm::isa<llvm::AllocaInst>(llvm::GetUnderlyingObject(value))) {
if (llvm::isa<llvm::AllocaInst>(value->getUnderlyingObject())) {
Logger::println("Copying to nested frame");
// The parameter value is an alloca'd stack slot.
// Copy to the nesting frame and leave the alloca for