[llvm] [llvm][DebugInfo] Emit 0/1 for constant boolean values (PR #151225)
Laxman Sole via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 9 10:45:59 PDT 2025
================
@@ -820,6 +833,22 @@ void DwarfCompileUnit::applyConcreteDbgVariableAttributes(
}
if (!DVal->isVariadic()) {
const DbgValueLocEntry *Entry = DVal->getLocEntries().begin();
+
+ // Helper function to handle boolean constant values with type safety
+ auto addConstantValueWithBooleanNormalization =
----------------
laxmansole wrote:
> It also feels a bit strange to do the normalization in one place, but not other places where we may emit constants.
@Michael137 Adding normalization to `addConstantValue` will ensure we don't miss anything. We'll also have to change a few call sites that use `addConstantValue` without `DIType`. Shall I make this change?
https://github.com/llvm/llvm-project/pull/151225
More information about the llvm-commits
mailing list