<div dir="ltr">Test case? (possibly even a unit test, but at least I guess this could be tested in a more traditional compiler-rt test style too/instead)<br><br><div class="gmail_quote"><div dir="ltr">On Mon, Jul 24, 2017 at 1:50 AM Dean Michael Berris via Phabricator via llvm-commits <<a href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">dberris created this revision.<br>
<br>
Currently when the XRay runtime is linked into a binary that doesn't<br>
have the instrumentation map, we print a warning unconditionally. This<br>
change attempts to make this behaviour more quiet.<br>
<br>
<br>
<a href="https://reviews.llvm.org/D35789" rel="noreferrer" target="_blank">https://reviews.llvm.org/D35789</a><br>
<br>
Files:<br>
  lib/xray/xray_init.cc<br>
<br>
<br>
Index: lib/xray/xray_init.cc<br>
===================================================================<br>
--- lib/xray/xray_init.cc<br>
+++ lib/xray/xray_init.cc<br>
@@ -48,7 +48,7 @@<br>
 // and then proceed to look for the .xray_instr_map section/segment.<br>
 void __xray_init() XRAY_NEVER_INSTRUMENT {<br>
   initializeFlags();<br>
-  if (__start_xray_instr_map == nullptr) {<br>
+  if (__start_xray_instr_map == nullptr && common_flags()->verbosity) {<br>
     Report("XRay instrumentation map missing. Not initializing XRay.\n");<br>
     return;<br>
   }<br>
<br>
<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br>
</blockquote></div></div>