mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 03:51:18 +00:00
Several fixes for the compiler (#2422)
* Update .gitignore for nix * Fix build failure when compiling with -Werror=maybe-uninitialized * Fix test failure formatting * Add separateDebugInfo to c3c Nix build
This commit is contained in:
6
.gitignore
vendored
6
.gitignore
vendored
@@ -80,8 +80,10 @@ TAGS
|
||||
/.cache/
|
||||
/compile_commands.json
|
||||
|
||||
# 'nix build' resulting symlink
|
||||
# Nix
|
||||
result
|
||||
/.envrc
|
||||
/.direnv/
|
||||
|
||||
# macOS
|
||||
.DS_Store
|
||||
@@ -89,4 +91,4 @@ result
|
||||
# tests
|
||||
/test/tmp/*
|
||||
/test/testrun
|
||||
/test/test_suite_runner
|
||||
/test/test_suite_runner
|
||||
|
||||
@@ -140,7 +140,6 @@ fn void unmute_output(bool has_error) @local
|
||||
usz log_size = test_context.fake_stdout.seek(0, Seek.CURSOR)!!;
|
||||
if (has_error)
|
||||
{
|
||||
io::printf("\nTesting %s ", test_context.current_test_name);
|
||||
io::printn(test_context.has_ansi_codes ? "[\e[0;31mFAIL\e[0m]" : "[FAIL]");
|
||||
}
|
||||
|
||||
|
||||
@@ -26,7 +26,10 @@ in llvmPackages.stdenv.mkDerivation (_:
|
||||
removeSuffix "\"" ( removePrefix "\"" ( elemAt ( splitString " " foundLine ) 2 ) );
|
||||
|
||||
src = ../.;
|
||||
|
||||
|
||||
# See https://github.com/symphorien/nixseparatedebuginfod for usage
|
||||
separateDebugInfo = true;
|
||||
|
||||
# Here we substitute GIT_HASH which is not set for cmake in nix builds.
|
||||
# Similar situation is with __DATE__ and __TIME__ macros, which are
|
||||
# set to "Jan 01 1980 00:00:00" by default.
|
||||
|
||||
@@ -2643,8 +2643,8 @@ static void llvm_emit_slice_values(GenContext *c, Expr *slice, BEValue *parent_r
|
||||
BEValue parent_addr_x;
|
||||
llvm_emit_expr(c, &parent_addr_x, parent_expr);
|
||||
LLVMValueRef parent_load_value = NULL;
|
||||
LLVMValueRef parent_base;
|
||||
LLVMValueRef parent_addr;
|
||||
LLVMValueRef parent_base = NULL;
|
||||
LLVMValueRef parent_addr = NULL;
|
||||
if (parent_type->type_kind == TYPE_POINTER)
|
||||
{
|
||||
llvm_value_rvalue(c, &parent_addr_x);
|
||||
|
||||
Reference in New Issue
Block a user