diff options
| author | William Sengir <william@sengir.com> | 2022-03-13 00:28:34 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2022-03-15 00:38:20 -0400 |
| commit | c757f197903940115c1d42883240ec1fe7ef660c (patch) | |
| tree | 31915696778776c3a906df85cbf08e428f052b90 /src/Module.zig | |
| parent | f36bf8506c9c1fa48dadd699b3122acd15890cf6 (diff) | |
| download | zig-c757f197903940115c1d42883240ec1fe7ef660c.tar.gz zig-c757f197903940115c1d42883240ec1fe7ef660c.zip | |
stage2: add debug info for globals in the LLVM backend
LLVM backend: generate DIGlobalVariable's for non-function globals and
rename linkage names when exporting functions and globals.
zig_llvm.cpp: add some wrappers to convert a handful of DI classes
into DINode's since DIGlobalVariable is not a DIScope like the others.
zig_llvm.cpp: add some wrappers to allow replacing the LinkageName of
DISubprogram and DIGlobalVariable.
zig_llvm.cpp: fix DI class mixup causing nonsense reinterpret_cast.
The end result is that GDB is now usable since you now no longer need
to manually cast every global nor fully qualify every export.
Diffstat (limited to 'src/Module.zig')
| -rw-r--r-- | src/Module.zig | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Module.zig b/src/Module.zig index d490568604..b6104df232 100644 --- a/src/Module.zig +++ b/src/Module.zig @@ -663,7 +663,7 @@ pub const Decl = struct { return (try decl.typedValue()).val; } - pub fn isFunction(decl: *Decl) !bool { + pub fn isFunction(decl: Decl) !bool { const tv = try decl.typedValue(); return tv.ty.zigTypeTag() == .Fn; } |
