about summary refs log tree commit diff
path: root/src/librustc_codegen_llvm/llvm/mod.rs
AgeCommit message (Collapse)AuthorLines
2020-07-17Generating the coverage mapRich Kadel-1/+43
rustc now generates the coverage map and can support (limited) coverage report generation, at the function level. Example: $ BUILD=$HOME/rust/build/x86_64-unknown-linux-gnu $ $BUILD/stage1/bin/rustc -Zinstrument-coverage \ $HOME/rust/src/test/run-make-fulldeps/instrument-coverage/main.rs $ LLVM_PROFILE_FILE="main.profraw" ./main called $ $BUILD/llvm/bin/llvm-profdata merge -sparse main.profraw -o main.profdata $ $BUILD/llvm/bin/llvm-cov show --instr-profile=main.profdata main 1| 1|pub fn will_be_called() { 2| 1| println!("called"); 3| 1|} 4| | 5| 0|pub fn will_not_be_called() { 6| 0| println!("should not have been called"); 7| 0|} 8| | 9| 1|fn main() { 10| 1| let less = 1; 11| 1| let more = 100; 12| 1| 13| 1| if less < more { 14| 1| will_be_called(); 15| 1| } else { 16| 1| will_not_be_called(); 17| 1| } 18| 1|}
2020-03-23Rollup merge of #69940 - tmiasko:llvm-api, r=hanna-kruppeMazdak Farrokhzad-2/+2
librustc_codegen_llvm: Replace deprecated API usage
2020-03-12remove lifetimes that can be elided (clippy::needless_lifetimes)Matthias Krüger-3/+3
2020-03-11librustc_codegen_llvm: Replace deprecated API usageTomasz Miąsko-2/+2
2020-02-12Properly use the darwin archive format on Apple targetsAnthony Ramine-0/+1
See https://github.com/servo/servo/issues/25550.
2019-12-22Format the worldMark Rousskov-23/+18
2019-12-12Fix weird implicit dependency between rustllvm and rustc_codegen_llvmAaron Hill-17/+2
rustllvm relies on the `LLVMRustStringWriteImpl` symbol existing, but this symbol was previously defined in a *downstream* crate (rustc_codegen_llvm, which depends on rustc_llvm. While this somehow worked under the old 'separate bootstrap step for codegen' scheme, it meant that rustc_llvm could not actually be built by itself, since it relied linking to the downstream rustc_codegen_llvm crate. Now that librustc_codegen_llvm is just a normal crate, we actually try to build a standalone rustc_llvm when we run tests. This commit moves `LLVMRustStringWriteImpl` into rustc_llvm (technically the rustllvm directory, which has its contents built by rustc_llvm). This ensures that we can build each crate in the graph by itself, without requiring that any downstream crates be linked in as well.
2019-12-04Migrate to LLVM{Get,Set}ValueName2Josh Stone-1/+19
The deprecated `LLVM{Get,Set}ValueName` only work with NUL-terminated strings, but the `2` variants use explicit lengths, which fits better with Rust strings and slices. We now use these in new helper functions `llvm::{get,set}_value_name` that convert to/from `&[u8]`.
2019-11-13Revert "Auto merge of #65134 - ↵Robin Kruppe-1/+0
davidtwco:issue-19834-improper-ctypes-in-extern-C-fn, r=rkruppe" This reverts commit 3f0e16473de5ec010f44290a8c3ea1d90e0ad7a2, reversing changes made to 61a551b4939ec1d5596e585351038b8fbd0124ba.
2019-11-05improper_ctypes: `extern "C"` fnsDavid Wood-0/+1
2019-07-28Remove lint annotations in specific crates that are already enforced by ↵Vadim Petrochenkov-3/+0
rustbuild Remove some random unnecessary lint `allow`s
2019-02-18librustc_codegen_llvm => 2018Taiki Endo-1/+1
2018-12-25Remove licensesMark Rousskov-10/+0
2018-12-07Various minor/cosmetic improvements to codeAlexander Regueiro-1/+1
2018-11-06refactor: use shorthand fieldsteresy-1/+1
2018-08-10Introduce SmallCStr and use it where applicable.Michael Woerister-2/+3
2018-07-30rustc_codegen_llvm: use safe references for SectionIterator.Irina Popa-5/+5
2018-07-30rustc_codegen_llvm: use safe references for OperandBundleDef.Irina Popa-11/+7
2018-07-30rustc_codegen_llvm: use safe references for RustString.Irina Popa-15/+18
2018-07-30rustc_codegen_llvm: use safe references for Twine, DiagnosticInfo, SMDiagnostic.Irina Popa-1/+1
2018-07-30rustc_codegen_llvm: use safe references for MemoryBuffer and ObjectFile.Irina Popa-10/+5
2018-07-30rustc_codegen_llvm: use safe references for Value.Irina Popa-14/+14
2018-07-30rustc_codegen_llvm: remove _opaque suffix.Irina Popa-2/+2
2018-07-30rustc_codegen_llvm: remove #![allow(dead_code)] from llvm.Irina Popa-27/+0
2018-07-30rustc_codegen_llvm: use safe references for Metadata and DI*.Irina Popa-1/+0
2018-07-30rustc_codegen_llvm: use safe references for Context and Module.Irina Popa-1/+1
2018-07-30rustc_llvm: move to rustc_codegen_llvm::llvm.Irina Popa-0/+315