diff options
| author | Dan Gohman <dev@sunfishcode.online> | 2021-07-17 12:33:31 -0700 |
|---|---|---|
| committer | Dan Gohman <dev@sunfishcode.online> | 2021-07-17 13:35:38 -0700 |
| commit | 9bb11ba51135b0398b5a8b9feca24149d96fa5e8 (patch) | |
| tree | 06c9d5764401c31d6aab9d83736e54987dee7dab /compiler/rustc_mir/src/transform/coverage/debug.rs | |
| parent | 46010c4618d4602cd6999c613fce7081fad438c2 (diff) | |
| download | rust-9bb11ba51135b0398b5a8b9feca24149d96fa5e8.tar.gz rust-9bb11ba51135b0398b5a8b9feca24149d96fa5e8.zip | |
Remove an unnecessary `Mutex` around argument initialization.
In the command-line argument initialization code, remove the Mutex around the `ARGV` and `ARGC` variables, and simply check whether ARGV is non-null before dereferencing it. This way, if either of ARGV or ARGC is not initialized, we'll get an empty argument list. This allows simple cdylibs to avoid having `pthread_mutex_lock`/`pthread_mutex_unlock` appear in their symbol tables if they don't otherwise use threads.
Diffstat (limited to 'compiler/rustc_mir/src/transform/coverage/debug.rs')
0 files changed, 0 insertions, 0 deletions
