SuccessChanges

Summary

  1. [Darwin] Add tests for OS version checking (details)
  2. [ObjectYAML][DWARF] Support emitting the .debug_aranges section in ELFYAML. (details)
  3. [ObjectYAML][ELF] Let the endianness of DWARF sections be inferred from FileHeader. (details)
  4. [CUDA][HIP] Fix constexpr variables for C++17 (details)
  5. [gcov] Improve .gcno compatibility with gcov and use DataExtractor (details)
  6. [gcov] Delete XFAIL: host-byteorder-big-endian (details)
Commit e9f556526e57270d1f8e148e7f2be8cccf297eb2 by julian.lettner
[Darwin] Add tests for OS version checking

Extract ParseVersion helper function for testing.

Reviewed By: delcypher

Differential Revision: https://reviews.llvm.org/D80761
The file was addedcompiler-rt/lib/sanitizer_common/tests/sanitizer_mac_test.cpp
The file was modifiedcompiler-rt/lib/sanitizer_common/sanitizer_mac.cpp
The file was modifiedcompiler-rt/lib/sanitizer_common/tests/CMakeLists.txt
Commit a50f4eb2e91bc384fb8956a9637abb7e46e7ec84 by Xing
[ObjectYAML][DWARF] Support emitting the .debug_aranges section in ELFYAML.

This patch enables yaml2obj to emit the .debug_aranges section in ELFYAML.

Known issues:
- The current implementation of `debug_aranges` doesn't support emitting `segment` in the `(segment, address, length)` tuple. I will fix it in a follow-up patch.

Reviewed By: jhenderson

Differential Revision: https://reviews.llvm.org/D80972
The file was addedllvm/test/tools/yaml2obj/ELF/DWARF/debug-aranges.yaml
The file was modifiedllvm/lib/ObjectYAML/DWARFYAML.cpp
The file was modifiedllvm/lib/ObjectYAML/ELFEmitter.cpp
Commit b6020c330d3826aa542164842d6ba71fdee3650b by Xing
[ObjectYAML][ELF] Let the endianness of DWARF sections be inferred from FileHeader.

This patch helps infer the endianness of DWARF sections from `FileHeader`.

Reviewed By: jhenderson, grimar

Differential Revision: https://reviews.llvm.org/D81051
The file was modifiedllvm/test/tools/yaml2obj/ELF/DWARF/debug-aranges.yaml
The file was modifiedllvm/lib/ObjectYAML/ELFYAML.cpp
Commit 049d860707ef22978b9379fee6dce38c66a22671 by Yaxun.Liu
[CUDA][HIP] Fix constexpr variables for C++17

constexpr variables are compile time constants and implicitly const, therefore
they are safe to emit on both device and host side. Besides, in many cases
they are intended for both device and host, therefore it makes sense
to emit them on both device and host sides if necessary.

In most cases constexpr variables are used as rvalue and the variables
themselves do not need to be emitted. However if their address is taken,
then they need to be emitted.

For C++14, clang is able to handle that since clang emits them with
available_externally linkage together with the initializer.

However for C++17, the constexpr static data member of a class or template class
become inline variables implicitly. Therefore they become definitions with
linkonce_odr or weak_odr linkages. As such, they can not have available_externally
linkage.

This patch fixes that by adding implicit constant attribute to
file scope constexpr variables and constexpr static data members
in device compilation.

Differential Revision: https://reviews.llvm.org/D79237
The file was modifiedclang/lib/Sema/SemaTemplateInstantiateDecl.cpp
The file was modifiedclang/lib/Sema/SemaDecl.cpp
The file was addedclang/test/CodeGenCUDA/constexpr-variables.cu
The file was addedclang/test/SemaCUDA/constexpr-variables.cu
The file was modifiedclang/lib/Sema/SemaCUDA.cpp
The file was modifiedclang/include/clang/Sema/Sema.h
Commit 01899bb4e41178af6f4cf7b32833e661fe1e3322 by maskray
[gcov] Improve .gcno compatibility with gcov and use DataExtractor

llvm-cov.test and many Inputs/test* files contain wrong tests.
This patch rewrites a large portion of these files.
The pre-canned .gcno & .gcda are replaced by binaries produced by
clang --coverage (compatible with gcov 4.8~7)
(after some GCDAProfiling.c bugs were fixed by my previous commits).

Also make llvm-cov gcov on a little-endian host capable to parse big-endian .gcno and .gcda,
and make llvm-cov gcov on big-endian host capable to parse little-endian .gcno and .gcda
The file was removedllvm/test/tools/llvm-cov/Inputs/test_objdir.cpp.gcov
The file was removedllvm/test/tools/llvm-cov/Inputs/test_-a_-b_-c_-u.h.gcov
The file was removedllvm/test/tools/llvm-cov/Inputs/test_missing.h.gcov
The file was modifiedllvm/test/tools/llvm-cov/Inputs/test.gcda
The file was removedllvm/test/tools/llvm-cov/Inputs/test_-a_-b_-c_-u.cpp.gcov
The file was modifiedllvm/test/tools/llvm-cov/Inputs/test_preserve_paths.output
The file was removedllvm/test/tools/llvm-cov/Inputs/test_-a_-b_-u.h.gcov
The file was modifiedllvm/test/tools/llvm-cov/Inputs/test_paths.gcno
The file was modifiedllvm/test/tools/llvm-cov/Inputs/test_paths.gcda
The file was modifiedllvm/test/tools/llvm-cov/Inputs/test.h
The file was removedllvm/test/tools/llvm-cov/Inputs/test_-a.cpp.gcov
The file was removedllvm/test/tools/llvm-cov/Inputs/test_missing.output
The file was removedllvm/test/tools/llvm-cov/Inputs/test_-a_-b.cpp.gcov
The file was modifiedllvm/test/tools/llvm-cov/Inputs/test_-f.output
The file was removedllvm/test/tools/llvm-cov/Inputs/test_missing.cpp.gcov
The file was modifiedllvm/test/tools/llvm-cov/Inputs/test_no_options.cpp.gcov
The file was modifiedllvm/test/tools/llvm-cov/Inputs/test_no_gcda.cpp.gcov
The file was modifiedllvm/test/tools/llvm-cov/Inputs/test_no_options.h.gcov
The file was removedllvm/test/tools/llvm-cov/Inputs/test_long_paths.output
The file was removedllvm/test/tools/llvm-cov/Inputs/test_-a_-b_-u.cpp.gcov
The file was modifiedllvm/lib/ProfileData/GCOV.cpp
The file was removedllvm/test/tools/llvm-cov/copy_block_helper.m
The file was modifiedllvm/include/llvm/ProfileData/GCOV.h
The file was removedllvm/test/tools/llvm-cov/Inputs/test_objdir.h.gcov
The file was modifiedllvm/test/tools/llvm-cov/Inputs/test_no_options.output
The file was removedllvm/test/tools/llvm-cov/Inputs/test_long_file_names.output
The file was removedllvm/test/tools/llvm-cov/Inputs/copy_block_helper.gcno
The file was modifiedllvm/test/tools/llvm-cov/Inputs/test_no_gcda.h.gcov
The file was modifiedllvm/test/tools/llvm-cov/Inputs/test_no_gcda.output
The file was removedllvm/test/tools/llvm-cov/range_based_for.cpp
The file was modifiedllvm/test/tools/llvm-cov/llvm-cov.test
The file was modifiedllvm/test/tools/llvm-cov/Inputs/test.gcno
The file was removedllvm/test/tools/llvm-cov/Inputs/copy_block_helper.gcda
The file was removedllvm/test/tools/llvm-cov/Inputs/test_-a_-b.h.gcov
The file was modifiedllvm/test/tools/llvm-cov/Inputs/test_-b.output
The file was modifiedllvm/test/tools/llvm-cov/Inputs/test_no_output.output
The file was removedllvm/test/tools/llvm-cov/Inputs/test_-a.h.gcov
Commit c1ea672ddb919c50118f4031845af6bb9be95454 by maskray
[gcov] Delete XFAIL: host-byteorder-big-endian

Add two to function-numbering.ll and exit-block.ll
The file was modifiedllvm/test/Transforms/SampleProfile/gcc-simple.ll
The file was modifiedllvm/test/tools/llvm-profdata/gcc-gcov-sample-profile.test
The file was modifiedllvm/test/Transforms/GCOVProfiling/exit-block.ll
The file was modifiedllvm/test/tools/llvm-cov/gcov-4.7.c
The file was modifiedllvm/test/Transforms/SampleProfile/indirect-call-gcc.ll
The file was modifiedllvm/test/tools/llvm-cov/gcov-9.c
The file was modifiedllvm/test/tools/llvm-cov/gcov-8.c
The file was modifiedllvm/test/Transforms/GCOVProfiling/function-numbering.ll