Skip to content

Commit

Permalink
Simplify LLVMRustModuleCost()
Browse files Browse the repository at this point in the history
  • Loading branch information
dotdash committed Jan 4, 2018
1 parent 493c29d commit 7e522b2
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions src/rustllvm/RustWrapper.cpp
Expand Up @@ -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));
}

0 comments on commit 7e522b2

Please sign in to comment.