提交 7e522b2f 编写于 作者: B Björn Steinbrink

Simplify LLVMRustModuleCost()

上级 493c29d3
......@@ -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));
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册