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

Simplify LLVMRustModuleCost()

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