[compiler-rt] [compiler-rt][test]Use c-style headers in instrprof-vtable-value-prof.cpp (PR #97245)

via llvm-commits llvm-commits at lists.llvm.org
Sun Jun 30 18:15:04 PDT 2024


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-pgo

Author: Mingming Liu (minglotus-6)

<details>
<summary>Changes</summary>

Use c-style headers just like other compiler-rt/profile tests do [1], to fix ` 'cstdio' file not found` in https://lab.llvm.org/buildbot/#/builders/122/builds/150

[1] https://github.com/llvm/llvm-project/blob/9b9405621bcc55b74d2177c960c21f62cc95e6fd/compiler-rt/test/profile/instrprof-value-prof.c#L27-L30 and https://github.com/llvm/llvm-project/blob/9b9405621bcc55b74d2177c960c21f62cc95e6fd/compiler-rt/test/tsan/printf-1.c#L6-L16

---
Full diff: https://github.com/llvm/llvm-project/pull/97245.diff


1 Files Affected:

- (modified) compiler-rt/test/profile/Linux/instrprof-vtable-value-prof.cpp (+4-2) 


``````````diff
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++) {

``````````

</details>


https://github.com/llvm/llvm-project/pull/97245


More information about the llvm-commits mailing list