================
@@ -63,30 +64,48 @@ class TypeInfoLValue {
 
 /// Symbolic representation of a dynamic allocation.
 class DynamicAllocLValue {
-  unsigned Index;
+  // lower NumAlignmentBits: alignment exponent
+  // remaining bits: allocation index incremented by one
+  // value of zero indicates distinct empty state
+  uintptr_t AlignAndIndex;
 
 public:
-  DynamicAllocLValue() : Index(0) {}
-  explicit DynamicAllocLValue(unsigned Index) : Index(Index + 1) {}
-  unsigned getIndex() { return Index - 1; }
+  DynamicAllocLValue() : AlignAndIndex(0) {}
+  explicit DynamicAllocLValue(unsigned Index, uint64_t Align) {
+    assert(Align > 0 && "Invalid alignment for DynamicAllocLValue 
constructor");
+    AlignAndIndex =
----------------
philnik777 wrote:

I went for using a bitfield instead and explicitly packing/unpacking in 
`getOpaqueValue()` and `getFromOpaqueValue()` instead. That seems more readable 
to me.

https://github.com/llvm/llvm-project/pull/174549
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to