[compiler-rt] r266291 - asan: fix build
Dmitry Vyukov via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 14 05:36:28 PDT 2016
On Thu, Apr 14, 2016 at 1:48 PM, Benjamin Kramer <benny.kra at gmail.com> wrote:
> Can we just use static_assert instead? The typedef hack is really ugly
> and unnecessary, we switched to C++11 years ago. static_assert also
> doesn't trigger that warning.
I agree that static_assert looks like a better solution.
But I've grepped for "static_assert" in sanitizers before doing this
change, and found only few uses in tests. So I decided to do a safer
change (in the end, the original commit also worked on my machine).
> On Thu, Apr 14, 2016 at 1:40 PM, Dmitry Vyukov via llvm-commits
> <llvm-commits at lists.llvm.org> wrote:
>> Author: dvyukov
>> Date: Thu Apr 14 06:40:08 2016
>> New Revision: 266291
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=266291&view=rev
>> Log:
>> asan: fix build
>>
>> Some bots failed with:
>>
>> sanitizer_quarantine.h:104:7: error: unused typedef 'assertion_failed__104' [-Werror,-Wunused-local-typedef]
>> COMPILER_CHECK(kPrefetch <= ARRAY_SIZE(b->batch));
>>
>> Replace COMPILER_CHECK with CHECK.
>>
>>
>> Modified:
>> compiler-rt/trunk/lib/sanitizer_common/sanitizer_quarantine.h
>>
>> Modified: compiler-rt/trunk/lib/sanitizer_common/sanitizer_quarantine.h
>> URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_quarantine.h?rev=266291&r1=266290&r2=266291&view=diff
>> ==============================================================================
>> --- compiler-rt/trunk/lib/sanitizer_common/sanitizer_quarantine.h (original)
>> +++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_quarantine.h Thu Apr 14 06:40:08 2016
>> @@ -101,7 +101,7 @@ class Quarantine {
>> void NOINLINE DoRecycle(Cache *c, Callback cb) {
>> while (QuarantineBatch *b = c->DequeueBatch()) {
>> const uptr kPrefetch = 16;
>> - COMPILER_CHECK(kPrefetch <= ARRAY_SIZE(b->batch));
>> + CHECK(kPrefetch <= ARRAY_SIZE(b->batch));
>> for (uptr i = 0; i < kPrefetch; i++)
>> PREFETCH(b->batch[i]);
>> for (uptr i = 0, count = b->count; i < count; i++) {
>>
>>
>> _______________________________________________
>> llvm-commits mailing list
>> llvm-commits at lists.llvm.org
>> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
More information about the llvm-commits
mailing list