diff options
| author | bors <bors@rust-lang.org> | 2018-12-03 02:27:15 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2018-12-03 02:27:15 +0000 |
| commit | a563ceb3b9471acbb827e27686c5cacadc49a032 (patch) | |
| tree | 18d02d7af14c9910eb9cf1fc1c10eafdcef51333 /src/rustllvm/RustWrapper.cpp | |
| parent | b817d0b65156ab2b7c903ecce7ad16033961344e (diff) | |
| parent | 850d2f1af0224cf1d442a66c33470791a2597888 (diff) | |
| download | rust-a563ceb3b9471acbb827e27686c5cacadc49a032.tar.gz rust-a563ceb3b9471acbb827e27686c5cacadc49a032.zip | |
Auto merge of #56358 - nikic:mergefunc-aliases, r=rkruppe
Enable -mergefunc-use-aliases If the Rust LLVM fork is used, enable the -mergefunc-use-aliases flag, which will create aliases for merged functions, rather than inserting a call from one to the other. A number of codegen tests needed to be adjusted, because functions that previously fell below the thunk limit are now being merged. Merging is prevented in various ways now. I expect that this is going to break something, somewhere, because it isn't able to deal with aliases properly, but we won't find out until we try :) This fixes #52651. r? @rkruppe
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
| -rw-r--r-- | src/rustllvm/RustWrapper.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/rustllvm/RustWrapper.cpp b/src/rustllvm/RustWrapper.cpp index b6e07942f86..6dcd32fe4d7 100644 --- a/src/rustllvm/RustWrapper.cpp +++ b/src/rustllvm/RustWrapper.cpp @@ -533,6 +533,14 @@ extern "C" uint32_t LLVMRustVersionMinor() { return LLVM_VERSION_MINOR; } extern "C" uint32_t LLVMRustVersionMajor() { return LLVM_VERSION_MAJOR; } +extern "C" bool LLVMRustIsRustLLVM() { +#ifdef LLVM_RUSTLLVM + return 1; +#else + return 0; +#endif +} + extern "C" void LLVMRustAddModuleFlag(LLVMModuleRef M, const char *Name, uint32_t Value) { unwrap(M)->addModuleFlag(Module::Warning, Name, Value); |
