Removes the serde dependency in rustc_codegen_llvm
This commit is contained in:
parent
23d01cd241
commit
fe075ad212
5 changed files with 7 additions and 30 deletions
|
|
@ -1572,16 +1572,8 @@ extern "C" uint64_t LLVMRustModuleCost(LLVMModuleRef M) {
|
|||
return std::distance(std::begin(f), std::end(f));
|
||||
}
|
||||
|
||||
extern "C" void LLVMRustModuleInstructionStats(LLVMModuleRef M,
|
||||
RustStringRef Str) {
|
||||
auto OS = RawRustStringOstream(Str);
|
||||
auto JOS = llvm::json::OStream(OS);
|
||||
auto Module = unwrap(M);
|
||||
|
||||
JOS.object([&] {
|
||||
JOS.attribute("module", Module->getName());
|
||||
JOS.attribute("total", Module->getInstructionCount());
|
||||
});
|
||||
extern "C" uint64_t LLVMRustModuleInstructionStats(LLVMModuleRef M) {
|
||||
return unwrap(M)->getInstructionCount();
|
||||
}
|
||||
|
||||
// Transfers ownership of DiagnosticHandler unique_ptr to the caller.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue