aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Analysis/ModuleSummaryAnalysis.cpp
diff options
context:
space:
mode:
authorGuillaume Chatelet <gchatelet@google.com>2021-04-21 13:25:24 +0000
committerGuillaume Chatelet <gchatelet@google.com>2021-04-21 13:25:24 +0000
commitfa404ae43a6f7ed256a47257aeccc760d16dc0c9 (patch)
tree8cfbac4186fdb8aecbf87ba068b373a9c9b6f330 /llvm/lib/Analysis/ModuleSummaryAnalysis.cpp
parentca9b7e2e2f0897dade16d785dafadbf75deaf405 (diff)
downloadllvm-fa404ae43a6f7ed256a47257aeccc760d16dc0c9.zip
llvm-fa404ae43a6f7ed256a47257aeccc760d16dc0c9.tar.gz
llvm-fa404ae43a6f7ed256a47257aeccc760d16dc0c9.tar.bz2
[libc] Enhance ArrayRef + unittests
This patch mostly adds unittests for `ArrayRef` and `MutableArrayRef`, additionnaly: - We mimic the behavior of `std::vector` and disallow CV qualified type (`ArrayRef<const X>` is not allowed). This is to make sure that the type traits are always valid (e.g. `value_type`, `pointer`, ...). - In the previous implementation `ArrayRef` would define `value_type` as `const T` but this is not correct, it should be `T` for both `MutableArrayRef` and `ArrayRef`. - We add the `equals` method to ease testing, - We define the constructor taking an `Array` outside of the base implementation to ensure we match `const Array<T>&` and not `Array<const T>&` in the case of `ArrayRef`. Differential Revision: https://reviews.llvm.org/D100732
Diffstat (limited to 'llvm/lib/Analysis/ModuleSummaryAnalysis.cpp')
0 files changed, 0 insertions, 0 deletions