Run semantic on Type::tvalist.

This is required to resolve the type for AAPCS/AAPCS64.
Up to now it was not necessary because only char* was used.
AAPCS/AAPCS64 use a special extern(C++) struct __va_list.
This commit is contained in:
Kai Nacke 2016-02-28 16:11:28 +00:00
parent 2dc7145e93
commit 815b13be38
4 changed files with 7 additions and 4 deletions

View file

@ -882,7 +882,7 @@ void DtoDefineFunction(FuncDeclaration *fd) {
// D varargs: prepare _argptr and _arguments
if (f->linkage == LINKd && f->varargs == 1) {
// allocate _argptr (of type core.stdc.stdarg.va_list)
LLValue *argptrmem = DtoAlloca(Type::tvalist, "_argptr_mem");
LLValue *argptrmem = DtoAlloca(Type::tvalist->semantic(fd->loc, fd->scope), "_argptr_mem");
irFunc->_argptr = argptrmem;
// initialize _argptr with a call to the va_start intrinsic