[compiler-rt] 8598bcb - [compiler-rt][test]Use c-style headers in instrprof-vtable-value-prof.cpp (#97245)
via llvm-commits
llvm-commits at lists.llvm.org
Sun Jun 30 19:20:13 PDT 2024
Author: Mingming Liu
Date: 2024-06-30T19:20:10-07:00
New Revision: 8598bcb9934dca16ea16d87304e00defc85d986c
URL: https://github.com/llvm/llvm-project/commit/8598bcb9934dca16ea16d87304e00defc85d986c
DIFF: https://github.com/llvm/llvm-project/commit/8598bcb9934dca16ea16d87304e00defc85d986c.diff
LOG: [compiler-rt][test]Use c-style headers in instrprof-vtable-value-prof.cpp (#97245)
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
Added:
Modified:
compiler-rt/test/profile/Linux/instrprof-vtable-value-prof.cpp
Removed:
################################################################################
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++) {
More information about the llvm-commits
mailing list