mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-30 02:33:55 +00:00
Simplify LLVMRustModuleCost()
This commit is contained in:
parent
493c29d35a
commit
7e522b2f0e
@ -1428,11 +1428,6 @@ LLVMRustModuleBufferLen(const LLVMRustModuleBuffer *Buffer) {
|
||||
|
||||
extern "C" uint64_t
|
||||
LLVMRustModuleCost(LLVMModuleRef M) {
|
||||
Module &Mod = *unwrap(M);
|
||||
uint64_t cost = 0;
|
||||
for (auto &F : Mod.functions()) {
|
||||
(void)F;
|
||||
cost += 1;
|
||||
}
|
||||
return cost;
|
||||
auto f = unwrap(M)->functions();
|
||||
return std::distance(std::begin(f), std::end(f));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user