mirror of
https://github.com/ziglang/zig.git
synced 2025-12-22 22:23:10 +00:00
llvm: avoid debug info for naked function arguments
This is not supported by llvm.
This commit is contained in:
parent
6220c754cf
commit
d208e59496
@ -1732,6 +1732,7 @@ pub const Object = struct {
|
|||||||
.liveness = liveness,
|
.liveness = liveness,
|
||||||
.dg = &dg,
|
.dg = &dg,
|
||||||
.wip = wip,
|
.wip = wip,
|
||||||
|
.is_naked = fn_info.cc == .Naked,
|
||||||
.ret_ptr = ret_ptr,
|
.ret_ptr = ret_ptr,
|
||||||
.args = args.items,
|
.args = args.items,
|
||||||
.arg_index = 0,
|
.arg_index = 0,
|
||||||
@ -4801,6 +4802,7 @@ pub const FuncGen = struct {
|
|||||||
air: Air,
|
air: Air,
|
||||||
liveness: Liveness,
|
liveness: Liveness,
|
||||||
wip: Builder.WipFunction,
|
wip: Builder.WipFunction,
|
||||||
|
is_naked: bool,
|
||||||
|
|
||||||
file: Builder.Metadata,
|
file: Builder.Metadata,
|
||||||
scope: Builder.Metadata,
|
scope: Builder.Metadata,
|
||||||
@ -8846,7 +8848,8 @@ pub const FuncGen = struct {
|
|||||||
const arg_val = self.args[self.arg_index];
|
const arg_val = self.args[self.arg_index];
|
||||||
self.arg_index += 1;
|
self.arg_index += 1;
|
||||||
|
|
||||||
if (self.wip.strip) return arg_val;
|
// llvm does not support debug info for naked function arguments
|
||||||
|
if (self.wip.strip or self.is_naked) return arg_val;
|
||||||
|
|
||||||
const inst_ty = self.typeOfIndex(inst);
|
const inst_ty = self.typeOfIndex(inst);
|
||||||
if (needDbgVarWorkaround(o)) return arg_val;
|
if (needDbgVarWorkaround(o)) return arg_val;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user