[llvm] [DWARF] Emit 0/1 for constant boolean values (PR #151225)

David Blaikie via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 6 11:10:22 PDT 2025


================
@@ -194,6 +194,15 @@ void DwarfExpression::addStackValue() {
     emitOp(dwarf::DW_OP_stack_value);
 }
 
+void DwarfExpression::addBooleanConstant(int64_t Value) {
+  assert(isImplicitLocation() || isUnknownLocation());
+  LocationKind = Implicit;
----------------
dwblaikie wrote:

Yep, sounds right to me. What is it you're considering follows from that? (that we don't need an `addBooleanConstant` because it should fall out of adding a normal integer constant, we'd still get a value 0 or 1? maybe encoded with slightly different/more verbose ops?)

https://github.com/llvm/llvm-project/pull/151225


More information about the llvm-commits mailing list