[llvm] ADT: Add non-const overload of PackedVector::raw_bits() (PR #101742)
Nicolai Hähnle via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 2 12:44:42 PDT 2024
https://github.com/nhaehnle created https://github.com/llvm/llvm-project/pull/101742
This is convenient when operating on vectors in a bulk, bit-manipulating fashion. I plan to use this in a future change.
>From 3f9b8f8b7c8fd9ddf94484d404c0067a53b182d3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Nicolai=20H=C3=A4hnle?= <nicolai.haehnle at amd.com>
Date: Tue, 30 Jul 2024 21:59:40 +0200
Subject: [PATCH] ADT: Add non-const overload of PackedVector::raw_bits()
This is convenient when operating on vectors in a bulk, bit-manipulating
fashion. I plan to use this in a future change.
---
llvm/include/llvm/ADT/PackedVector.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/llvm/include/llvm/ADT/PackedVector.h b/llvm/include/llvm/ADT/PackedVector.h
index 4a6986669c936..b6bb6a4738067 100644
--- a/llvm/include/llvm/ADT/PackedVector.h
+++ b/llvm/include/llvm/ADT/PackedVector.h
@@ -143,6 +143,7 @@ class PackedVector : public PackedVectorBase<T, BitNum, BitVectorTy,
}
const BitVectorTy &raw_bits() const { return Bits; }
+ BitVectorTy &raw_bits() { return Bits; }
};
// Leave BitNum=0 undefined.
More information about the llvm-commits
mailing list