diff options
| author | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2018-01-06 02:13:34 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-01-06 02:13:34 +0100 |
| commit | 21b9822390323420ae3a2998f1c376606325a883 (patch) | |
| tree | 28a4c00ad2a4224f44579de33c07574eee92e32b /src/rustllvm/RustWrapper.cpp | |
| parent | 5624ac7c47f508c9975c4bea321d9af6a4bf2ad2 (diff) | |
| parent | 7e522b2f0ebddd60fb3df467cb755c2de0f37f4d (diff) | |
| download | rust-21b9822390323420ae3a2998f1c376606325a883.tar.gz rust-21b9822390323420ae3a2998f1c376606325a883.zip | |
Rollup merge of #47173 - dotdash:cleanup, r=michaelwoerister
Remove some outdated LLVM-related code Ticks two boxes on #46437
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
| -rw-r--r-- | src/rustllvm/RustWrapper.cpp | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/src/rustllvm/RustWrapper.cpp b/src/rustllvm/RustWrapper.cpp index 6f51ea67cb1..96fb05ee06e 100644 --- a/src/rustllvm/RustWrapper.cpp +++ b/src/rustllvm/RustWrapper.cpp @@ -1144,13 +1144,6 @@ extern "C" void LLVMRustWriteSMDiagnosticToString(LLVMSMDiagnosticRef D, unwrap(D)->print("", OS); } -extern "C" LLVMValueRef -LLVMRustBuildLandingPad(LLVMBuilderRef B, LLVMTypeRef Ty, - LLVMValueRef PersFn, unsigned NumClauses, - const char *Name, LLVMValueRef F) { - return LLVMBuildLandingPad(B, Ty, PersFn, NumClauses, Name); -} - extern "C" LLVMValueRef LLVMRustBuildCleanupPad(LLVMBuilderRef B, LLVMValueRef ParentPad, unsigned ArgCount, @@ -1355,10 +1348,6 @@ extern "C" bool LLVMRustConstInt128Get(LLVMValueRef CV, bool sext, uint64_t *hig return true; } -extern "C" LLVMContextRef LLVMRustGetValueContext(LLVMValueRef V) { - return wrap(&unwrap(V)->getContext()); -} - enum class LLVMRustVisibility { Default = 0, Hidden = 1, @@ -1439,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)); } |
