[llvm-bugs] [Bug 32313] New: lib/xray/tests/unit/xray_fdr_log_printer_tool.cc should include <functional>

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Mar 16 08:48:48 PDT 2017


https://bugs.llvm.org/show_bug.cgi?id=32313

            Bug ID: 32313
           Summary: lib/xray/tests/unit/xray_fdr_log_printer_tool.cc
                    should include <functional>
           Product: XRay
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Compiler instrumentation
          Assignee: dberris at google.com
          Reporter: octoploid at yandex.com
                CC: llvm-bugs at lists.llvm.org

building with gcc trunk shows:

/home/markus/llvm/projects/compiler-rt/lib/xray/tests/unit/xray_fdr_log_printer_tool.cc:
In function ‘int main(int, char**)’:
/home/markus/llvm/projects/compiler-rt/lib/xray/tests/unit/xray_fdr_log_printer_tool.cc:284:30:
error: ‘function’ is not a member of ‘std’
   std::map<std::string, std::function<void(std::istream &)>>
TopLevelRecordMap;
                              ^~~~~~~~
/home/markus/llvm/projects/compiler-rt/lib/xray/tests/unit/xray_fdr_log_printer_tool.cc:284:30:
note: suggested alternative: ‘is_function’
   std::map<std::string, std::function<void(std::istream &)>>
TopLevelRecordMap;
                              ^~~~~~~~
                              is_function
/home/markus/llvm/projects/compiler-rt/lib/xray/tests/unit/xray_fdr_log_printer_tool.cc:284:30:
error: ‘function’ is not a member of ‘std’
/home/markus/llvm/projects/compiler-rt/lib/xray/tests/unit/xray_fdr_log_printer_tool.cc:284:30:
note: suggested alternative: ‘is_function’
   std::map<std::string, std::function<void(std::istream &)>>
TopLevelRecordMap;
                              ^~~~~~~~
                              is_function
/home/markus/llvm/projects/compiler-rt/lib/xray/tests/unit/xray_fdr_log_printer_tool.cc:284:59:
error: template argument 2 is invalid
   std::map<std::string, std::function<void(std::istream &)>>
TopLevelRecordMap;
                                                           ^~
/home/markus/llvm/projects/compiler-rt/lib/xray/tests/unit/xray_fdr_log_printer_tool.cc:284:59:
error: template argument 4 is invalid
...

diff --git a/lib/xray/tests/unit/xray_fdr_log_printer_tool.cc
b/lib/xray/tests/unit/xray_fdr_log_printer_tool.cc
index a4d05f200de5..6e209809e346 100644
--- a/lib/xray/tests/unit/xray_fdr_log_printer_tool.cc
+++ b/lib/xray/tests/unit/xray_fdr_log_printer_tool.cc
@@ -17,6 +17,7 @@
 #include <algorithm>
 #include <array>
 #include <cstdlib>
+#include <functional>
 #include <iostream>
 #include <map>
 #include <sstream>

fixes the issue.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20170316/13c090a7/attachment.html>


More information about the llvm-bugs mailing list