[Sanitizer][Darwin] Fix log-path_test.cpp
authorJulian Lettner <julian.lettner@apple.com>
Tue, 5 Jul 2022 23:27:11 +0000 (16:27 -0700)
committerJulian Lettner <julian.lettner@apple.com>
Tue, 5 Jul 2022 23:34:55 +0000 (16:34 -0700)
In my previous change [1], I added log output that made a test that
expected "no output" fail.  The easiest solution is to only print the
new hint/warning when we at least ask for `verbosity=1`.

[1] https://reviews.llvm.org/D128936

Radar-Id: rdar://96437354

compiler-rt/lib/sanitizer_common/sanitizer_procmaps_mac.cpp

index 66f4935..4b0e678 100644 (file)
@@ -223,10 +223,10 @@ const mach_header *get_dyld_hdr() {
     if (GetMacosAlignedVersion() >= MacosVersion(13, 0)) {
       dyld_hdr = GetDyldImageHeaderViaSharedCache();
       if (!dyld_hdr) {
-        Printf(
-            "Failed to lookup the dyld image header in the shared cache on "
-            "macOS 13+ (or no shared cache in use).  Falling back to lookup via"
-            "vm_region_recurse_64().\n");
+        VReport(1,
+                "Failed to lookup the dyld image header in the shared cache on "
+                "macOS 13+ (or no shared cache in use).  Falling back to "
+                "lookup via vm_region_recurse_64().\n");
         dyld_hdr = GetDyldImageHeaderViaVMRegion();
       }
     } else {