-
Notifications
You must be signed in to change notification settings - Fork 15.6k
[compiler-rt][test]Use c-style headers in instrprof-vtable-value-prof.cpp #97245
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
@llvm/pr-subscribers-pgo Author: Mingming Liu (minglotus-6) ChangesUse c-style headers just like other compiler-rt/profile tests do [1], to fix [1] llvm-project/compiler-rt/test/profile/instrprof-value-prof.c Lines 27 to 30 in 9b94056
llvm-project/compiler-rt/test/tsan/printf-1.c Lines 6 to 16 in 9b94056
Full diff: https://github.com/llvm/llvm-project/pull/97245.diff 1 Files Affected:
diff --git a/compiler-rt/test/profile/Linux/instrprof-vtable-value-prof.cpp b/compiler-rt/test/profile/Linux/instrprof-vtable-value-prof.cpp
index efb24751da5ff..24a96a227393a 100644
--- a/compiler-rt/test/profile/Linux/instrprof-vtable-value-prof.cpp
+++ b/compiler-rt/test/profile/Linux/instrprof-vtable-value-prof.cpp
@@ -165,8 +165,9 @@
//
// IR: [[MERGE0]]:
// IR: [[RES2:%.*]] = phi i32 [ [[RES1]], %[[MERGE1]] ], [ [[RESBB1]], %[[BB1]] ]
-#include <cstdio>
-#include <cstdlib>
+
+#include <stdio.h>
+#include <stdlib.h>
class Base {
public:
virtual int func(int a, int b) = 0;
@@ -195,6 +196,7 @@ __attribute__((noinline)) Base *createType(int a) {
base = new Derived2();
return base;
}
+
int main(int argc, char **argv) {
int sum = 0;
for (int i = 0; i < 1000; i++) {
|
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/123/builds/938 Here is the relevant piece of the build log for the reference: |
|
Those other tests are C sources though, this one is a C++. There are other tests in compiler-rt that use the C++ headers, for example https://github.com/llvm/llvm-project/blob/9b9405621bcc55b74d2177c960c21f62cc95e6fd/compiler-rt/test/tsan/custom_mutex4.cpp. It looks that builder doesn't run any of those other tests, but if it did, those would likely fail as well for the same reason. Those headers should be provided by the C++ standard library; it looks like the C++ standard library on that builder is eithre missing or misconfigured. I don't think it's reasonable to avoid C++ headers in compiler-rt tests just because a single builder is broken, we instead should reach out to the maintainer of that builder and ask them to fix their C++ standard library. |
It makes sense to me to keep the maintainer informed. Thank you Petr! According to the 3rd tab of buildbot failure, linaro-toolchain@lists.linaro.org is the contact. I sent an email to them just now. |
Use c-style headers just like other compiler-rt/profile tests do [1], to fix
'cstdio' file not foundin https://lab.llvm.org/buildbot/#/builders/122/builds/150[1]
llvm-project/compiler-rt/test/profile/instrprof-value-prof.c
Lines 27 to 30 in 9b94056
llvm-project/compiler-rt/test/tsan/printf-1.c
Lines 6 to 16 in 9b94056