[Mlir-commits] [llvm] [mlir] [DebugInfo] Add symbolic branches to DIExpression (PR #210850)
Aman LaChapelle
llvmlistbot at llvm.org
Mon Jul 20 22:03:13 PDT 2026
================
@@ -37,6 +37,27 @@ using namespace llvm;
#define DEBUG_TYPE "dwarfdebug"
+static dwarf::Form getDataForm(unsigned Size) {
+ switch (Size) {
+ case 1:
+ return dwarf::DW_FORM_data1;
+ case 2:
+ return dwarf::DW_FORM_data2;
+ case 4:
+ return dwarf::DW_FORM_data4;
+ case 8:
+ return dwarf::DW_FORM_data8;
+ default:
+ llvm_unreachable("fixed-width data size must be 1, 2, 4, or 8 bytes");
+ }
+}
+
+static uint64_t getDataValue(uint64_t Value, unsigned Size) {
+ if (Size == sizeof(Value))
+ return Value;
+ return Value & ((uint64_t(1) << (Size * 8)) - 1);
----------------
bzcheeseman wrote:
why are you setting the high bit here? Non-obvious to me, anyway
https://github.com/llvm/llvm-project/pull/210850
More information about the Mlir-commits
mailing list