[clang] [CIR] Add vptr type and generate vptr field when needed (PR #151377)
Henrich Lauko via cfe-commits
cfe-commits at lists.llvm.org
Fri Aug 1 04:41:27 PDT 2025
================
@@ -697,6 +697,24 @@ BoolType::getABIAlignment(const ::mlir::DataLayout &dataLayout,
return 1;
}
+//===----------------------------------------------------------------------===//
+// VPtrType Definitions
+//===----------------------------------------------------------------------===//
+
+llvm::TypeSize
+VPtrType::getTypeSizeInBits(const ::mlir::DataLayout &dataLayout,
+ ::mlir::DataLayoutEntryListRef params) const {
+ // FIXME: consider size differences under different ABIs
+ return llvm::TypeSize::getFixed(64);
+}
+
+uint64_t
+VPtrType::getABIAlignment(const ::mlir::DataLayout &dataLayout,
+ ::mlir::DataLayoutEntryListRef params) const {
+ // FIXME: consider alignment differences under different ABIs
+ return 8;
+}
----------------
xlauko wrote:
any reason these are `::mlir` not just `mlir`?
https://github.com/llvm/llvm-project/pull/151377
More information about the cfe-commits
mailing list