From 260faae6ecd55d544e08040cd538ee3559fb4ce0 Mon Sep 17 00:00:00 2001 From: David Nadlinger Date: Wed, 6 Jun 2012 15:44:54 +0200 Subject: [PATCH] Remove inreg attribute from static arrays when enregistering them. --- gen/abi.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/gen/abi.cpp b/gen/abi.cpp index 21cad4f6..a43d8012 100644 --- a/gen/abi.cpp +++ b/gen/abi.cpp @@ -177,6 +177,12 @@ struct X86TargetABI : TargetABI // erase previous attributes last->attrs = 0; } + else if (lastTy->ty == Tsarray) + { + last->ltype = DtoType(last->type); + last->byref = false; + last->attrs &= ~llvm::Attribute::ByVal; + } last->attrs |= llvm::Attribute::InReg; } }