[compiler-rt] a7cf694 - tsan_shadow_test: add const qualifier

Thurston Dang via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 11 11:37:31 PST 2023


Author: Thurston Dang
Date: 2023-01-11T19:35:13Z
New Revision: a7cf694c4950b7ce5309c3c4d613f40966c8f7ae

URL: https://github.com/llvm/llvm-project/commit/a7cf694c4950b7ce5309c3c4d613f40966c8f7ae
DIFF: https://github.com/llvm/llvm-project/commit/a7cf694c4950b7ce5309c3c4d613f40966c8f7ae.diff

LOG: tsan_shadow_test: add const qualifier

Fix build error in https://lab.llvm.org/buildbot/#/builders/57/builds/23839/steps/7/logs/stdio
that I had introduced in https://reviews.llvm.org/D141445

Differential Revision: https://reviews.llvm.org/D141534

Added: 
    

Modified: 
    compiler-rt/lib/tsan/tests/unit/tsan_shadow_test.cpp

Removed: 
    


################################################################################
diff  --git a/compiler-rt/lib/tsan/tests/unit/tsan_shadow_test.cpp b/compiler-rt/lib/tsan/tests/unit/tsan_shadow_test.cpp
index 78398acc253a..0cc6c7db776d 100644
--- a/compiler-rt/lib/tsan/tests/unit/tsan_shadow_test.cpp
+++ b/compiler-rt/lib/tsan/tests/unit/tsan_shadow_test.cpp
@@ -132,8 +132,8 @@ bool broken(uptr what, typename Has<Mapping::kBroken>::Result = false) {
 }
 
 static int CompareRegion(const void *region_a, const void *region_b) {
-  uptr start_a = ((struct Region *)region_a)->start;
-  uptr start_b = ((struct Region *)region_b)->start;
+  uptr start_a = ((const struct Region *)region_a)->start;
+  uptr start_b = ((const struct Region *)region_b)->start;
 
   if (start_a < start_b) {
     return -1;


        


More information about the llvm-commits mailing list