[clang] Implement `ByteAddressBuffer` Load/Store methods (PR #176058)

Kaitlin Peng via cfe-commits cfe-commits at lists.llvm.org
Tue Jan 20 12:47:39 PST 2026


================
@@ -1145,6 +1178,92 @@ BuiltinTypeDeclBuilder &BuiltinTypeDeclBuilder::addLoadMethods() {
   return *this;
 }
 
+BuiltinTypeDeclBuilder &
+BuiltinTypeDeclBuilder::addByteAddressBufferLoadMethods() {
+  assert(!Record->isCompleteDefinition() && "record is already complete");
+
+  using PH = BuiltinTypeMethodBuilder::PlaceHolder;
+  ASTContext &AST = SemaRef.getASTContext();
+
+  auto addLoadMethod = [&](StringRef MethodName, QualType ReturnType) {
----------------
kmpeng wrote:

Ah yeah, I didn't want to name it that because there's already a `BuiltinTypeDeclBuilder::addLoadMethods()` and I thought it would be confusing. I probably need to find a better name or see if I can modify + use the existing one...

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


More information about the cfe-commits mailing list