mirror of
https://github.com/ziglang/zig.git
synced 2026-02-12 20:37:54 +00:00
LLVM: Fail to emit if LLVM encounters broken debug info
This commit is contained in:
parent
e2345f006f
commit
d345068ec2
@ -1245,9 +1245,11 @@ pub const Object = struct {
|
||||
);
|
||||
defer bitcode_memory_buffer.dispose();
|
||||
|
||||
context.enableBrokenDebugInfoCheck();
|
||||
|
||||
var module: *llvm.Module = undefined;
|
||||
if (context.parseBitcodeInContext2(bitcode_memory_buffer, &module).toBool()) {
|
||||
std.debug.print("Failed to parse bitcode\n", .{});
|
||||
if (context.parseBitcodeInContext2(bitcode_memory_buffer, &module).toBool() or context.getBrokenDebugInfo()) {
|
||||
log.err("Failed to parse bitcode", .{});
|
||||
return error.FailedToEmit;
|
||||
}
|
||||
break :emit .{ context, module };
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user