Mercurial > projects > ldc
diff gen/tollvm.cpp @ 1353:45aca7e7cc88
Remove struct padding when passing or returning in registers on x86-64 (extern(D) only)
author | Frits van Bommel <fvbommel wxs.nl> |
---|---|
date | Thu, 14 May 2009 20:36:55 +0200 |
parents | 3647bef175d7 |
children | 46f6365a50d7 |
line wrap: on
line diff
--- a/gen/tollvm.cpp Thu May 14 17:23:55 2009 +0200 +++ b/gen/tollvm.cpp Thu May 14 20:36:55 2009 +0200 @@ -630,6 +630,18 @@ ////////////////////////////////////////////////////////////////////////////////////////// +LLValue* DtoInsertValue(LLValue* aggr, LLValue* v, unsigned idx) +{ + return gIR->ir->CreateInsertValue(aggr, v, idx); +} + +LLValue* DtoExtractValue(LLValue* aggr, unsigned idx) +{ + return gIR->ir->CreateExtractValue(aggr, idx); +} + +////////////////////////////////////////////////////////////////////////////////////////// + const LLPointerType* isaPointer(LLValue* v) { return llvm::dyn_cast<LLPointerType>(v->getType());