Skip to content

Commit f218573

Browse files
[llvm][CAS] Remove unused functions (#168856)
Building with GCC I got: ``` <...>/OnDiskGraphDB.cpp:624:18: warning: ‘static {anonymous}::DataRecordHandle {anonymous}::DataRecordHandle::construct(char*, const {anonymous}::DataRecordHandle::Input&)’ defined but not used [-Wunused-function] 624 | DataRecordHandle DataRecordHandle::construct(char *Mem, const Input &I) { | ^~~~~~~~~~~~~~~~ <...>/OnDiskGraphDB.cpp:456:1: warning: ‘static {anonymous}::DataRecordHandle {anonymous}::DataRecordHandle::create(llvm::function_ref<char*(long unsigned int)>, const {anonymous}::DataRecordHandle::Input&)’ defined but not used [-Wunused-function] 456 | DataRecordHandle::create(function_ref<char *(size_t Size)> Alloc, | ^~~~~~~~~~~~~~~~ ``` These implement parts of a class that is defined in an anonymous namespace. All llvm tests passed with them removed.
1 parent ce70d4b commit f218573

File tree

1 file changed

+0
-11
lines changed

1 file changed

+0
-11
lines changed

llvm/lib/CAS/OnDiskGraphDB.cpp

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -452,13 +452,6 @@ Expected<DataRecordHandle> DataRecordHandle::createWithError(
452452
return Mem.takeError();
453453
}
454454

455-
DataRecordHandle
456-
DataRecordHandle::create(function_ref<char *(size_t Size)> Alloc,
457-
const Input &I) {
458-
Layout L(I);
459-
return constructImpl(Alloc(L.getTotalSize()), I, L);
460-
}
461-
462455
ObjectHandle ObjectHandle::fromFileOffset(FileOffset Offset) {
463456
// Store the file offset as it is.
464457
assert(!(Offset.get() & 0x1));
@@ -621,10 +614,6 @@ bool TrieRecord::compare_exchange_strong(Data &Existing, Data New) {
621614
return false;
622615
}
623616

624-
DataRecordHandle DataRecordHandle::construct(char *Mem, const Input &I) {
625-
return constructImpl(Mem, I, Layout(I));
626-
}
627-
628617
Expected<DataRecordHandle>
629618
DataRecordHandle::getFromDataPool(const OnDiskDataAllocator &Pool,
630619
FileOffset Offset) {

0 commit comments

Comments
 (0)