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
// ===----------------------------------------------------------------------===//
@@ -407,20 +411,23 @@ llvm::TypeSize
407
411
DataMemberType::getTypeSizeInBits (const ::mlir::DataLayout &dataLayout,
408
412
::mlir::DataLayoutEntryListRef params) const {
409
413
// FIXME: consider size differences under different ABIs
414
+ assert (!MissingFeatures::cxxABI ());
410
415
return llvm::TypeSize::getFixed (64 );
411
416
}
412
417
413
418
uint64_t
414
419
DataMemberType::getABIAlignment (const ::mlir::DataLayout &dataLayout,
415
420
::mlir::DataLayoutEntryListRef params) const {
416
421
// FIXME: consider alignment differences under different ABIs
422
+ assert (!MissingFeatures::cxxABI ());
417
423
return 8 ;
418
424
}
419
425
420
426
uint64_t DataMemberType::getPreferredAlignment (
421
427
const ::mlir::DataLayout &dataLayout,
422
428
::mlir::DataLayoutEntryListRef params) const {
423
429
// FIXME: consider alignment differences under different ABIs
430
+ assert (!MissingFeatures::cxxABI ());
424
431
return 8 ;
425
432
}
426
433
@@ -442,20 +449,20 @@ ArrayType::getPreferredAlignment(const ::mlir::DataLayout &dataLayout,
442
449
return dataLayout.getTypePreferredAlignment (getEltType ());
443
450
}
444
451
445
- llvm::TypeSize cir::VectorType::getTypeSizeInBits (
452
+ llvm::TypeSize mlir:: cir::VectorType::getTypeSizeInBits (
446
453
const ::mlir::DataLayout &dataLayout,
447
454
::mlir::DataLayoutEntryListRef params) const {
448
455
return llvm::TypeSize::getFixed (getSize () *
449
456
dataLayout.getTypeSizeInBits (getEltType ()));
450
457
}
451
458
452
- uint64_t
453
- cir::VectorType::getABIAlignment ( const ::mlir::DataLayout &dataLayout,
454
- ::mlir::DataLayoutEntryListRef params) const {
459
+ uint64_t mlir::cir::VectorType::getABIAlignment (
460
+ const ::mlir::DataLayout &dataLayout,
461
+ ::mlir::DataLayoutEntryListRef params) const {
455
462
return getSize () * dataLayout.getTypeABIAlignment (getEltType ());
456
463
}
457
464
458
- uint64_t cir::VectorType::getPreferredAlignment (
465
+ uint64_t mlir:: cir::VectorType::getPreferredAlignment (
459
466
const ::mlir::DataLayout &dataLayout,
460
467
::mlir::DataLayoutEntryListRef params) const {
461
468
return getSize () * dataLayout.getTypePreferredAlignment (getEltType ());
0 commit comments