Fixes bug handling chained && ||. Work towards more macro functionality. Correctly emit stdcall. Corrected character parsing in escaped string entries.

This commit is contained in:
Christoffer Lerno
2020-06-11 15:45:58 +02:00
parent f96ab76195
commit 50c36789bf
23 changed files with 517 additions and 206 deletions

View File

@@ -211,8 +211,7 @@ void gencontext_emit_function_decl(GenContext *context, Decl *decl)
}
gencontext_add_attribute(context, function, nounwind_attribute, -1);
// TODO only for windows.
if (decl->func.attr_stdcall)
if (decl->func.attr_stdcall && (build_target.os == OS_TYPE_WIN32))
{
LLVMSetFunctionCallConv(function, LLVMX86StdcallCallConv);
LLVMSetDLLStorageClass(function, LLVMDLLImportStorageClass);