mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-02-01 12:33:13 +01:00
Fixed problem with using the variable names _arguments and _argptr in non D-style vararg functions.
Fixed problem with compiling with LLVM 2.3
This commit is contained in:
@@ -60,19 +60,17 @@ DValue* VarExp::toElem(IRState* p)
|
||||
Logger::println("VarDeclaration %s", vd->toChars());
|
||||
|
||||
// _arguments
|
||||
if (vd->ident == Id::_arguments)
|
||||
if (vd->ident == Id::_arguments && p->func()->_arguments)
|
||||
{
|
||||
Logger::println("Id::_arguments");
|
||||
LLValue* v = p->func()->_arguments;
|
||||
assert(v);
|
||||
return new DVarValue(type, vd, v, true);
|
||||
}
|
||||
// _argptr
|
||||
else if (vd->ident == Id::_argptr)
|
||||
else if (vd->ident == Id::_argptr && p->func()->_argptr)
|
||||
{
|
||||
Logger::println("Id::_argptr");
|
||||
LLValue* v = p->func()->_argptr;
|
||||
assert(v);
|
||||
return new DVarValue(type, vd, v, true);
|
||||
}
|
||||
// _dollar
|
||||
|
||||
@@ -556,7 +556,7 @@ bool DtoCanLoad(LLValue* ptr)
|
||||
{
|
||||
if (isaPointer(ptr->getType())) {
|
||||
const LLType* data = ptr->getType()->getContainedType(0);
|
||||
return data->isFirstClassType() && !data->isAggregateType();
|
||||
return data->isFirstClassType() && !(isaStruct(data) || isaArray(data));
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user