Skip to content

Commit 4727327

Browse files
committed
IRGen: Remove unused function isStandardLibrary().
1 parent 8d5c27e commit 4727327

File tree

1 file changed

+0
-22
lines changed

1 file changed

+0
-22
lines changed

lib/IRGen/IRGenModule.cpp

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1035,28 +1035,6 @@ static llvm::MemoryEffects mergeMemoryEffects(ArrayRef<llvm::MemoryEffects> effe
10351035
return mergedEffects;
10361036
}
10371037

1038-
1039-
namespace {
1040-
bool isStandardLibrary(const llvm::Module &M) {
1041-
if (auto *Flags = M.getNamedMetadata("swift.module.flags")) {
1042-
for (const auto *F : Flags->operands()) {
1043-
const auto *Key = dyn_cast_or_null<llvm::MDString>(F->getOperand(0));
1044-
if (!Key)
1045-
continue;
1046-
1047-
const auto *Value =
1048-
dyn_cast_or_null<llvm::ConstantAsMetadata>(F->getOperand(1));
1049-
if (!Value)
1050-
continue;
1051-
1052-
if (Key->getString() == "standard-library")
1053-
return cast<llvm::ConstantInt>(Value->getValue())->isOne();
1054-
}
1055-
}
1056-
return false;
1057-
}
1058-
}
1059-
10601038
llvm::FunctionType *swift::getRuntimeFnType(llvm::Module &Module,
10611039
llvm::ArrayRef<llvm::Type*> retTypes,
10621040
llvm::ArrayRef<llvm::Type*> argTypes) {

0 commit comments

Comments
 (0)