aboutsummaryrefslogtreecommitdiff
path: root/tools/build/feature/test-cxx.cpp
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2016-10-07 00:36:49 +0200
committerIngo Molnar <mingo@kernel.org>2016-10-07 00:36:49 +0200
commitc68306ce20ad03ce655a367fc33ad06e12bb87a6 (patch)
tree73eb2890678d20f32da70d5f373612e03bd6e509 /tools/build/feature/test-cxx.cpp
parent8657355f5b5f657407efc12a2223e8a3a6d658de (diff)
parent87095f7ddeff3038a0cf8e6574922f9c11688619 (diff)
Merge tag 'perf-core-for-mingo-20161005' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent
Pull perf/core improvements and fixes from Arnaldo Carvalho de Melo: - Intel PT timestamp fixes (Adrian Hunter) - Fix Intel JSON fixed counter conversions (Andi Kleen) - Sync memcpy, cpufeatures and bpf headers with the kernel (Arnaldo Carvalho de Melo) - Add some more tool tips (Donghyun Kim, Kim SeonYoung, Nambong Ha) - Fix libtraceevent's kbuffer_read_at_offset() handling of offsets before or equal the first event (Namhyung Kim) - Fix uretprobe probe placement on ppc64le (Ravi Bangoria) - Support building C++ source files and add feature detection for g++, prep work for supporting a builtin clang/llvm, to remove the need for having that toolchain installed to automagically build BPF scriptlets that then gets uploaded to the kernel via sys_bpf() (Wang Nan) Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'tools/build/feature/test-cxx.cpp')
-rw-r--r--tools/build/feature/test-cxx.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/tools/build/feature/test-cxx.cpp b/tools/build/feature/test-cxx.cpp
new file mode 100644
index 000000000000..b1dee9a31d6c
--- /dev/null
+++ b/tools/build/feature/test-cxx.cpp
@@ -0,0 +1,15 @@
+#include <iostream>
+#include <memory>
+
+static void print_str(std::string s)
+{
+ std::cout << s << std::endl;
+}
+
+int main()
+{
+ std::string s("Hello World!");
+ print_str(std::move(s));
+ std::cout << "|" << s << "|" << std::endl;
+ return 0;
+}