[llvm] [Offload] Allow specifying debug level with `all` debug type (PR #178213)
Hansang Bae via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 27 06:36:29 PST 2026
https://github.com/hansangbae created https://github.com/llvm/llvm-project/pull/178213
This change allows users to specify debug level with `all` debug type. The effect of `all:<num>` is equivalent to `<num>`.
>From 9e5b79172d58e2b94b98632c50f2891263bad6f6 Mon Sep 17 00:00:00 2001
From: Hansang Bae <hansang.bae at intel.com>
Date: Tue, 27 Jan 2026 08:13:04 -0600
Subject: [PATCH] [Offload] Allow specifying debug level with `all` debug type
This change allows users to specify debug level with `all` debug type.
The effect of `all:<num>` is equivalent to `<num>`.
---
offload/include/Shared/Debug.h | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/offload/include/Shared/Debug.h b/offload/include/Shared/Debug.h
index 245bcc164da6f..0f98a445c73ea 100644
--- a/offload/include/Shared/Debug.h
+++ b/offload/include/Shared/Debug.h
@@ -308,8 +308,14 @@ struct DebugSettings {
return;
Settings.Enabled = true;
- if (EnvRef.equals_insensitive("all"))
- return;
+
+ if (EnvRef.starts_with_insensitive("all")) {
+ auto Spec = parseDebugFilter(EnvRef);
+ if (Spec.Type.equals_insensitive("all")) {
+ Settings.DefaultLevel = Spec.Level;
+ return;
+ }
+ }
if (!EnvRef.getAsInteger(10, Settings.DefaultLevel))
return;
More information about the llvm-commits
mailing list