mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-02-16 20:03:14 +01:00
Fixed segfault when using va_arg.
Fixed segfault when accessing function symbols from inline asm.
This commit is contained in:
@@ -254,10 +254,12 @@ DValue* VarExp::toElem(IRState* p)
|
||||
else if (FuncDeclaration* fdecl = var->isFuncDeclaration())
|
||||
{
|
||||
Logger::println("FuncDeclaration");
|
||||
if (fdecl->llvmInternal != LLVMva_arg) {// && fdecl->llvmValue == 0)
|
||||
LLValue* func = 0;
|
||||
if (fdecl->llvmInternal != LLVMva_arg) {
|
||||
DtoForceDeclareDsymbol(fdecl);
|
||||
func = fdecl->ir.irFunc->func;
|
||||
}
|
||||
return new DFuncValue(fdecl, fdecl->ir.irFunc->func);
|
||||
return new DFuncValue(fdecl, func);
|
||||
}
|
||||
else if (SymbolDeclaration* sdecl = var->isSymbolDeclaration())
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user