Skip to content

Commit dcd0ee0

Browse files
authored
[NFC][LowerTypeTests] Make buildBitSet is now a static function (#157375)
1 parent 2b3d3fc commit dcd0ee0

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

llvm/lib/Transforms/IPO/LowerTypeTests.cpp

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -504,10 +504,7 @@ class LowerTypeTestsModule {
504504
void importTypeTest(CallInst *CI);
505505
void importFunction(Function *F, bool isJumpTableCanonical);
506506

507-
BitSetInfo
508-
buildBitSet(Metadata *TypeId,
509-
const DenseMap<GlobalTypeMember *, uint64_t> &GlobalLayout);
510-
ByteArrayInfo *createByteArray(BitSetInfo &BSI);
507+
ByteArrayInfo *createByteArray(const BitSetInfo &BSI);
511508
void allocateByteArrays();
512509
Value *createBitSetTest(IRBuilder<> &B, const TypeIdLowering &TIL,
513510
Value *BitOffset);
@@ -578,9 +575,9 @@ class LowerTypeTestsModule {
578575

579576
/// Build a bit set for TypeId using the object layouts in
580577
/// GlobalLayout.
581-
BitSetInfo LowerTypeTestsModule::buildBitSet(
582-
Metadata *TypeId,
583-
const DenseMap<GlobalTypeMember *, uint64_t> &GlobalLayout) {
578+
static BitSetInfo
579+
buildBitSet(Metadata *TypeId,
580+
const DenseMap<GlobalTypeMember *, uint64_t> &GlobalLayout) {
584581
BitSetBuilder BSB;
585582

586583
// Compute the byte offset of each address associated with this type
@@ -615,7 +612,7 @@ static Value *createMaskedBitTest(IRBuilder<> &B, Value *Bits,
615612
return B.CreateICmpNE(MaskedBits, ConstantInt::get(BitsType, 0));
616613
}
617614

618-
ByteArrayInfo *LowerTypeTestsModule::createByteArray(BitSetInfo &BSI) {
615+
ByteArrayInfo *LowerTypeTestsModule::createByteArray(const BitSetInfo &BSI) {
619616
// Create globals to stand in for byte arrays and masks. These never actually
620617
// get initialized, we RAUW and erase them later in allocateByteArrays() once
621618
// we know the offset and mask to use.

0 commit comments

Comments
 (0)