@@ -36,38 +36,26 @@ namespace {
36
36
37
37
// / A TypeInfo implementation for Builtin.IntegerLiteral.
38
38
class IntegerLiteralTypeInfo :
39
- public ScalarPairTypeInfo <IntegerLiteralTypeInfo, LoadableTypeInfo> {
39
+ public TrivialScalarPairTypeInfo <IntegerLiteralTypeInfo, LoadableTypeInfo> {
40
40
41
41
public:
42
42
IntegerLiteralTypeInfo (llvm::StructType *storageType,
43
43
Size size, Alignment align, SpareBitVector &&spareBits)
44
- : ScalarPairTypeInfo (storageType, size, std::move(spareBits), align,
45
- IsPOD, IsFixedSize) {}
44
+ : TrivialScalarPairTypeInfo (storageType, size, std::move(spareBits), align,
45
+ IsPOD, IsFixedSize) {}
46
46
47
47
static Size getFirstElementSize (IRGenModule &IGM) {
48
48
return IGM.getPointerSize ();
49
49
}
50
50
static StringRef getFirstElementLabel () {
51
51
return " .data" ;
52
52
}
53
- static bool isFirstElementTrivial () {
54
- return true ;
55
- }
56
53
57
54
TypeLayoutEntry *buildTypeLayoutEntry (IRGenModule &IGM,
58
55
SILType T) const override {
59
56
return IGM.typeLayoutCache .getOrCreateScalarEntry (*this , T);
60
57
}
61
58
62
- void emitRetainFirstElement (IRGenFunction &IGF, llvm::Value *fn,
63
- Optional<Atomicity> atomicity = None) const {}
64
- void emitReleaseFirstElement (IRGenFunction &IGF, llvm::Value *fn,
65
- Optional<Atomicity> atomicity = None) const {}
66
- void emitAssignFirstElement (IRGenFunction &IGF, llvm::Value *fn,
67
- Address fnAddr) const {
68
- IGF.Builder .CreateStore (fn, fnAddr);
69
- }
70
-
71
59
static Size getSecondElementOffset (IRGenModule &IGM) {
72
60
return IGM.getPointerSize ();
73
61
}
@@ -77,17 +65,6 @@ class IntegerLiteralTypeInfo :
77
65
static StringRef getSecondElementLabel () {
78
66
return " .flags" ;
79
67
}
80
- bool isSecondElementTrivial () const {
81
- return true ;
82
- }
83
- void emitRetainSecondElement (IRGenFunction &IGF, llvm::Value *data,
84
- Optional<Atomicity> atomicity = None) const {}
85
- void emitReleaseSecondElement (IRGenFunction &IGF, llvm::Value *data,
86
- Optional<Atomicity> atomicity = None) const {}
87
- void emitAssignSecondElement (IRGenFunction &IGF, llvm::Value *context,
88
- Address dataAddr) const {
89
- IGF.Builder .CreateStore (context, dataAddr);
90
- }
91
68
92
69
// The data pointer isn't a heap object, but it is an aligned pointer.
93
70
bool mayHaveExtraInhabitants (IRGenModule &IGM) const override {
0 commit comments