diff --git a/builtins/util.m4 b/builtins/util.m4 index a97336a7..dbe073fb 100644 --- a/builtins/util.m4 +++ b/builtins/util.m4 @@ -2499,14 +2499,14 @@ define void @__memset64(i8 * %dst, i8 %val, i64 %len) alwaysinline { ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; assert -declare i32 @printf(i8*, ...) +declare i32 @puts(i8*) declare void @abort() noreturn define void @__do_assert_uniform(i8 *%str, i1 %test, %mask) { br i1 %test, label %ok, label %fail fail: - %call = call i32 (i8*, ...)* @printf(i8* %str) + %call = call i32 @puts(i8* %str) call void @abort() noreturn unreachable @@ -2525,7 +2525,7 @@ define void @__do_assert_varying(i8 *%str, %test, br i1 %all_ok, label %ok, label %fail fail: - %call = call i32 (i8*, ...)* @printf(i8* %str) + %call = call i32 @puts(i8* %str) call void @abort() noreturn unreachable diff --git a/stmt.cpp b/stmt.cpp index 94a6b857..b663c661 100644 --- a/stmt.cpp +++ b/stmt.cpp @@ -3142,14 +3142,14 @@ AssertStmt::EmitCode(FunctionEmitContext *ctx) const { bool isUniform = type->IsUniformType(); // The actual functionality to do the check and then handle falure is - // done via a builtin written in bitcode in builtins.m4. + // done via a builtin written in bitcode in builtins/util.m4. llvm::Function *assertFunc = isUniform ? m->module->getFunction("__do_assert_uniform") : m->module->getFunction("__do_assert_varying"); AssertPos(pos, assertFunc != NULL); char *errorString; - if (asprintf(&errorString, "%s:%d:%d: Assertion failed: %s\n", + if (asprintf(&errorString, "%s:%d:%d: Assertion failed: %s", pos.name, pos.first_line, pos.first_column, message.c_str()) == -1) { Error(pos, "Fatal error when generating assert string: asprintf() "