diff options
| author | bors <bors@rust-lang.org> | 2018-07-31 13:32:32 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2018-07-31 13:32:32 +0000 |
| commit | f89817997ac0aa100bf91997194ad85a7e59f743 (patch) | |
| tree | 53fdd03057783bec2884b091f5d02bce10313894 /src/rustllvm/PassWrapper.cpp | |
| parent | ed8d14db99fc79909274454c02073bc5bd0c0df2 (diff) | |
| parent | baff67d51f691734ecee0faa83acee91ec16cc5d (diff) | |
| download | rust-f89817997ac0aa100bf91997194ad85a7e59f743.tar.gz rust-f89817997ac0aa100bf91997194ad85a7e59f743.zip | |
Auto merge of #52461 - irinagpopa:safe-llvm, r=nikomatsakis
rustc_codegen_llvm: use safe references for LLVM FFI types. Part of #45274.
Diffstat (limited to 'src/rustllvm/PassWrapper.cpp')
| -rw-r--r-- | src/rustllvm/PassWrapper.cpp | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/src/rustllvm/PassWrapper.cpp b/src/rustllvm/PassWrapper.cpp index 85fbc4bf378..3f5550bf95f 100644 --- a/src/rustllvm/PassWrapper.cpp +++ b/src/rustllvm/PassWrapper.cpp @@ -828,23 +828,6 @@ LLVMRustPGOAvailable() { // and various online resources about ThinLTO to make heads or tails of all // this. -extern "C" bool -LLVMRustWriteThinBitcodeToFile(LLVMPassManagerRef PMR, - LLVMModuleRef M, - const char *BcFile) { - llvm::legacy::PassManager *PM = unwrap<llvm::legacy::PassManager>(PMR); - std::error_code EC; - llvm::raw_fd_ostream bc(BcFile, EC, llvm::sys::fs::F_None); - if (EC) { - LLVMRustSetLastError(EC.message().c_str()); - return false; - } - PM->add(createWriteThinLTOBitcodePass(bc)); - PM->run(*unwrap(M)); - delete PM; - return true; -} - // This is a shared data structure which *must* be threadsafe to share // read-only amongst threads. This also corresponds basically to the arguments // of the `ProcessThinLTOModule` function in the LLVM source. @@ -1259,13 +1242,6 @@ LLVMRustThinLTOPatchDICompileUnit(LLVMModuleRef Mod, DICompileUnit *Unit) { #else -extern "C" bool -LLVMRustWriteThinBitcodeToFile(LLVMPassManagerRef PMR, - LLVMModuleRef M, - const char *BcFile) { - report_fatal_error("ThinLTO not available"); -} - struct LLVMRustThinLTOData { }; |
