aboutsummaryrefslogtreecommitdiff
path: root/src/zig_llvm.cpp
diff options
context:
space:
mode:
authorantlilja <liljaanton2001@gmail.com>2024-03-03 02:28:24 +0100
committerantlilja <liljaanton2001@gmail.com>2024-03-03 02:28:24 +0100
commit282b398f6da967f413e223b452457d37e93a70b3 (patch)
treea5dd0ad9598ae01ff5e2256267c54121199073c6 /src/zig_llvm.cpp
parentd345068ec2cf7275c931c4d79d46384c38132ffc (diff)
downloadzig-282b398f6da967f413e223b452457d37e93a70b3.tar.gz
zig-282b398f6da967f413e223b452457d37e93a70b3.zip
Add comment explaining LLVM bug and linking tracking issue
Diffstat (limited to 'src/zig_llvm.cpp')
-rw-r--r--src/zig_llvm.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/zig_llvm.cpp b/src/zig_llvm.cpp
index 92364cc143..ae1f02422b 100644
--- a/src/zig_llvm.cpp
+++ b/src/zig_llvm.cpp
@@ -384,6 +384,11 @@ struct ZigDiagnosticHandler : public DiagnosticHandler {
bool BrokenDebugInfo;
ZigDiagnosticHandler() : BrokenDebugInfo(false) {}
bool handleDiagnostics(const DiagnosticInfo &DI) override {
+ // This dyn_cast should be casting to DiagnosticInfoIgnoringInvalidDebugMetadata
+ // but DiagnosticInfoIgnoringInvalidDebugMetadata is treated as DiagnosticInfoDebugMetadataVersion
+ // because of a bug in LLVM (see https://github.com/ziglang/zig/issues/19161).
+ // After this is fixed add an additional check for DiagnosticInfoIgnoringInvalidDebugMetadata
+ // but don't remove the current one as both indicate that debug info is broken.
if (auto *Remark = dyn_cast<DiagnosticInfoDebugMetadataVersion>(&DI)) {
BrokenDebugInfo = true;
}