[compiler-rt] [compiler-rt][XRay] Make `xray_interface.h` C compliant (PR #140068)
Jan André Reuter via llvm-commits
llvm-commits at lists.llvm.org
Mon May 26 03:01:52 PDT 2025
================
@@ -1,21 +1,21 @@
// Check that we can patch and un-patch on demand, and that logging gets invoked
// appropriately.
//
-// RUN: %clangxx_xray -fxray-instrument -std=c++11 %s -o %t
+// RUN: %clang_xray -fxray-instrument -std=c23 %s -o %t
----------------
Thyre wrote:
> Hmm, I think it's better to ensure that `xray_interface.h` only use the common subset of C and C++...
Isn't this what we're checking now with the one adapted test?
Since we're including the header in one C test, we'll see when `xray_interface.h` uses C / C++ only features, due to at least one test failing.
We can ensure this further by adding additional tests for all files using `xray_interface.h`. Tests using `xray_log_interface.h` may fail on `extern "C" {` (which we may want to adapt as well), tests using `xray_records.h` will certainly not work with C.
https://github.com/llvm/llvm-project/pull/140068
More information about the llvm-commits
mailing list