Use log to print out a verbose message.
authorRui Ueyama <ruiu@google.com>
Fri, 9 Feb 2018 00:15:12 +0000 (00:15 +0000)
committerRui Ueyama <ruiu@google.com>
Fri, 9 Feb 2018 00:15:12 +0000 (00:15 +0000)
llvm-svn: 324688

lld/ELF/AArch64ErrataFix.cpp
lld/test/ELF/aarch64-cortex-a53-843419-address.s
lld/test/ELF/aarch64-cortex-a53-843419-recognize.s
lld/test/ELF/aarch64-cortex-a53-843419-thunk.s

index b8fc643..d16873e 100644 (file)
@@ -555,10 +555,8 @@ static void implementPatch(uint64_t AdrpAddr, uint64_t PatcheeOffset,
   if (RelIt != IS->Relocations.end() && RelIt->Type == R_AARCH64_JUMP26)
     return;
 
-
-  if (errorHandler().Verbose)
-    message("detected cortex-a53-843419 erratum sequence starting at " +
-            utohexstr(AdrpAddr) + " in unpatched output.");
+  log("detected cortex-a53-843419 erratum sequence starting at " +
+      utohexstr(AdrpAddr) + " in unpatched output.");
 
   auto *PS = make<Patch843419Section>(IS, PatcheeOffset);
   Patches.push_back(PS);
index e9f6ff4..6c1f04d 100644 (file)
@@ -4,7 +4,8 @@
 // RUN:          .text : { *(.text) *(.text.*) *(.newisd) } \
 // RUN:          .text2 : { *.(newos) } \
 // RUN:          .data : { *(.data) } }" > %t.script
-// RUN: ld.lld --script %t.script -fix-cortex-a53-843419 -verbose %t.o -o %t2 | FileCheck -check-prefix=CHECK-PRINT %s
+// RUN: ld.lld --script %t.script -fix-cortex-a53-843419 -verbose %t.o -o %t2 2>&1 \
+// RUN:   | FileCheck -check-prefix=CHECK-PRINT %s
 // RUN: llvm-objdump -triple=aarch64-linux-gnu -d %t2 | FileCheck %s
 
 // Test cases for Cortex-A53 Erratum 843419 that involve interactions
index 3674dd2..be71c29 100644 (file)
@@ -1,8 +1,8 @@
 // REQUIRES: aarch64
 // RUN: llvm-mc -filetype=obj -triple=aarch64-none-linux %s -o %t.o
-// RUN: ld.lld -fix-cortex-a53-843419 -verbose %t.o -o %t2 | FileCheck -check-prefix CHECK-PRINT %s
+// RUN: ld.lld -fix-cortex-a53-843419 -verbose %t.o -o %t2 2>&1 | FileCheck -check-prefix CHECK-PRINT %s
 // RUN: llvm-objdump -triple=aarch64-linux-gnu -d %t2 | FileCheck %s -check-prefixes=CHECK,CHECK-FIX
-// RUN: ld.lld -verbose %t.o -o %t3
+// RUN: ld.lld %t.o -o %t3
 // RUN: llvm-objdump -triple=aarch64-linux-gnu -d %t3 | FileCheck %s -check-prefixes=CHECK,CHECK-NOFIX
 // Test cases for Cortex-A53 Erratum 843419
 // See ARM-EPM-048406 Cortex_A53_MPCore_Software_Developers_Errata_Notice.pdf
index 4568095..c802f3f 100644 (file)
@@ -3,7 +3,8 @@
 // RUN: echo "SECTIONS { \
 // RUN:          .text1 0x10000 : { *(.text.01) *(.text.02) *(.text.03) } \
 // RUN:          .text2 0x8010000 : { *(.text.04) } } " > %t.script
-// RUN: ld.lld --script %t.script -fix-cortex-a53-843419 -verbose %t.o -o %t2 | FileCheck -check-prefix=CHECK-PRINT %s
+// RUN: ld.lld --script %t.script -fix-cortex-a53-843419 -verbose %t.o -o %t2 2>&1 \
+// RUN:   | FileCheck -check-prefix=CHECK-PRINT %s
 // RUN: llvm-objdump -triple=aarch64-linux-gnu -d %t2 | FileCheck %s
 
 // %t2 is 128 Megabytes, so delete it early.