Merge branch 'master' into merge-2.067

This commit is contained in:
Kai Nacke 2015-05-23 23:53:36 +02:00
commit ccd8dd06c5
3 changed files with 5 additions and 4 deletions

View file

@ -13,6 +13,7 @@
#include "gen/llvmhelpers.h" #include "gen/llvmhelpers.h"
#include "gen/logger.h" #include "gen/logger.h"
#include "gen/tollvm.h" #include "gen/tollvm.h"
#include "gen/optimizer.h"
#include "ir/irtypeaggr.h" #include "ir/irtypeaggr.h"
#include "llvm/ADT/SmallString.h" #include "llvm/ADT/SmallString.h"
#include "llvm/Support/FileSystem.h" #include "llvm/Support/FileSystem.h"
@ -42,7 +43,7 @@ Module *ldc::DIBuilder::getDefinedModule(Dsymbol *s)
// array operations as well // array operations as well
else if (FuncDeclaration* fd = s->isFuncDeclaration()) else if (FuncDeclaration* fd = s->isFuncDeclaration())
{ {
if (fd->isArrayOp && !isDruntimeArrayOp(fd)) if (fd->isArrayOp && (willInline() || !isDruntimeArrayOp(fd)))
return IR->dmodule; return IR->dmodule;
} }
// otherwise use the symbol's module // otherwise use the symbol's module

View file

@ -731,7 +731,7 @@ static llvm::GlobalValue::LinkageTypes lowerFuncLinkage(FuncDeclaration* fdecl)
// Generated array op functions behave like templates in that they might be // Generated array op functions behave like templates in that they might be
// emitted into many different modules. // emitted into many different modules.
if (fdecl->isArrayOp && !isDruntimeArrayOp(fdecl)) if (fdecl->isArrayOp && (willInline() || !isDruntimeArrayOp(fdecl)))
return templateLinkage; return templateLinkage;
// A body-less declaration always needs to be marked as external in LLVM // A body-less declaration always needs to be marked as external in LLVM
@ -780,7 +780,7 @@ void DtoDefineFunction(FuncDeclaration* fd)
} }
// Skip array ops implemented in druntime // Skip array ops implemented in druntime
if (fd->isArrayOp && isDruntimeArrayOp(fd)) if (fd->isArrayOp && !willInline() && isDruntimeArrayOp(fd))
{ {
IF_LOG Logger::println("No code generation for array op %s implemented in druntime", fd->toChars()); IF_LOG Logger::println("No code generation for array op %s implemented in druntime", fd->toChars());
fd->ir.setDefined(); fd->ir.setDefined();

@ -1 +1 @@
Subproject commit 4beed802a64b59bed4cc3aa446aae7ab38db92b8 Subproject commit 8b60ac81835e092ed715369938d351dcff13a5e8