10
10
//
11
11
// ===----------------------------------------------------------------------===//
12
12
13
+ #include " MissingFeatures.h"
14
+
13
15
#include " clang/CIR/Dialect/IR/CIRTypes.h"
14
16
#include " clang/CIR/Dialect/IR/CIRAttrs.h"
15
17
#include " clang/CIR/Dialect/IR/CIRDialect.h"
32
34
#include " llvm/Support/ErrorHandling.h"
33
35
#include < optional>
34
36
37
+ using cir::MissingFeatures;
38
+
35
39
// ===----------------------------------------------------------------------===//
36
40
// CIR Custom Parser/Printer Signatures
37
41
// ===----------------------------------------------------------------------===//
@@ -408,20 +412,23 @@ llvm::TypeSize
408
412
DataMemberType::getTypeSizeInBits (const ::mlir::DataLayout &dataLayout,
409
413
::mlir::DataLayoutEntryListRef params) const {
410
414
// FIXME: consider size differences under different ABIs
415
+ assert (!MissingFeatures::cxxABI ());
411
416
return llvm::TypeSize::getFixed (64 );
412
417
}
413
418
414
419
uint64_t
415
420
DataMemberType::getABIAlignment (const ::mlir::DataLayout &dataLayout,
416
421
::mlir::DataLayoutEntryListRef params) const {
417
422
// FIXME: consider alignment differences under different ABIs
423
+ assert (!MissingFeatures::cxxABI ());
418
424
return 8 ;
419
425
}
420
426
421
427
uint64_t DataMemberType::getPreferredAlignment (
422
428
const ::mlir::DataLayout &dataLayout,
423
429
::mlir::DataLayoutEntryListRef params) const {
424
430
// FIXME: consider alignment differences under different ABIs
431
+ assert (!MissingFeatures::cxxABI ());
425
432
return 8 ;
426
433
}
427
434
@@ -443,20 +450,20 @@ ArrayType::getPreferredAlignment(const ::mlir::DataLayout &dataLayout,
443
450
return dataLayout.getTypePreferredAlignment (getEltType ());
444
451
}
445
452
446
- llvm::TypeSize cir::VectorType::getTypeSizeInBits (
453
+ llvm::TypeSize mlir:: cir::VectorType::getTypeSizeInBits (
447
454
const ::mlir::DataLayout &dataLayout,
448
455
::mlir::DataLayoutEntryListRef params) const {
449
456
return llvm::TypeSize::getFixed (getSize () *
450
457
dataLayout.getTypeSizeInBits (getEltType ()));
451
458
}
452
459
453
- uint64_t
454
- cir::VectorType::getABIAlignment ( const ::mlir::DataLayout &dataLayout,
455
- ::mlir::DataLayoutEntryListRef params) const {
460
+ uint64_t mlir::cir::VectorType::getABIAlignment (
461
+ const ::mlir::DataLayout &dataLayout,
462
+ ::mlir::DataLayoutEntryListRef params) const {
456
463
return getSize () * dataLayout.getTypeABIAlignment (getEltType ());
457
464
}
458
465
459
- uint64_t cir::VectorType::getPreferredAlignment (
466
+ uint64_t mlir:: cir::VectorType::getPreferredAlignment (
460
467
const ::mlir::DataLayout &dataLayout,
461
468
::mlir::DataLayoutEntryListRef params) const {
462
469
return getSize () * dataLayout.getTypePreferredAlignment (getEltType ());
0 commit comments