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
|
extern "C" uint64_t
|
||||||
LLVMRustModuleCost(LLVMModuleRef M) {
|
LLVMRustModuleCost(LLVMModuleRef M) {
|
||||||
Module &Mod = *unwrap(M);
|
auto f = unwrap(M)->functions();
|
||||||
uint64_t cost = 0;
|
return std::distance(std::begin(f), std::end(f));
|
||||||
for (auto &F : Mod.functions()) {
|
|
||||||
(void)F;
|
|
||||||
cost += 1;
|
|
||||||
}
|
|
||||||
return cost;
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user