<div dir="ltr"><div class="gmail_quote"><div dir="ltr">On Fri, Mar 17, 2017 at 4:57 AM Laurent Nicolas via Phabricator <<a href="mailto:reviews@reviews.llvm.org">reviews@reviews.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">lonico77 added inline comments.<br class="gmail_msg">
<br class="gmail_msg">
<br class="gmail_msg">
================<br class="gmail_msg">
Comment at: compiler-rt/trunk/lib/xray/xray_fdr_logging_impl.h:137<br class="gmail_msg">
+        Report("Failed to release buffer at %p; error=%s\n", Buffer.Buffer,<br class="gmail_msg">
+               EC.message().c_str());<br class="gmail_msg">
+      return;<br class="gmail_msg">
----------------<br class="gmail_msg">
I'm seeing the following error when building with clang 3.9.1:<br class="gmail_msg">
<br class="gmail_msg">
<br class="gmail_msg">
```<br class="gmail_msg">
In file included from /x/eng/rtpbld01/scratch/laurentn/llvm-wss/sources/llvm_import_from_git_rtp2/llvm/projects/compiler-rt/lib/xray/tests/unit/xray_fdr_log_printer_tool.cc:15:<br class="gmail_msg">
/x/eng/rtpbld01/scratch/laurentn/llvm-wss/sources/llvm_import_from_git_rtp2/llvm/projects/compiler-rt/lib/xray/tests/../xray_fdr_logging_impl.h:137:19: error: implicit instantiation of undefined template 'std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >'<br class="gmail_msg">
               EC.message().c_str());<br class="gmail_msg">
                  ^<br class="gmail_msg">
/x/eng/btools/arch/x86_64-redhat-rhel6/compilers_n_tools/pkgs/llvm-3.9.1-p1/bin/../include/c++/v1/iosfwd:193:33: note: template is declared here<br class="gmail_msg">
    class _LIBCPP_TYPE_VIS_ONLY basic_string;<br class="gmail_msg">
                                ^<br class="gmail_msg">
```<br class="gmail_msg">
<br class="gmail_msg">
And the same error shows up in 5 other locations where EC.message() is used.<br class="gmail_msg">
<br class="gmail_msg">
I was able to bypass the error by adding<br class="gmail_msg">
<br class="gmail_msg">
```<br class="gmail_msg">
 #include <mutex><br class="gmail_msg">
+#include <string><br class="gmail_msg">
 #include <system_error><br class="gmail_msg">
```<br class="gmail_msg">
in llvm/projects/compiler-rt/lib/xray/xray_buffer_queue.h<br class="gmail_msg">
<br class="gmail_msg">
but I'm not sure it's the best way to address this across platforms.<br class="gmail_msg">
<br class="gmail_msg"></blockquote><div><br></div><div>Interesting. Which standard library is this? Is this libstdc++ or libc++?</div><div><br></div><div>I suppose this is a change that's alright to make, if it fixes the error for clang-3.9.1.</div></div></div>