aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAiden Grossman <aidengrossman@google.com>2024-07-05 10:56:33 -0700
committerGitHub <noreply@github.com>2024-07-05 10:56:33 -0700
commit44248d2d248be43c3e55d1ab6808342f63e0c70c (patch)
treecc8b27e203e0960b869972c463a14cf1dc9c0ecf
parent3bfc5167d9e49b9a53e364e8d8853fce543cca0f (diff)
downloadllvm-44248d2d248be43c3e55d1ab6808342f63e0c70c.zip
llvm-44248d2d248be43c3e55d1ab6808342f63e0c70c.tar.gz
llvm-44248d2d248be43c3e55d1ab6808342f63e0c70c.tar.bz2
[PGO][compiler-rt] Add a test to ensure include files do not diverge (#97775)
Memprof has two include files that are duplicated between LLVM and compiler-rt. They need to stay in sync to ensure correct functionality, but the comments can be somewhat easy to miss, which causes fixups like 839ed1ba553346b0c225e9b839cf3cb716dc7412 to be needed. This patch adds a test to ensure that the files are the same between LLVM and compiler-rt to catch this ideally before commit, but if not, soon afterwards. There is additionally `InstrProfData.inc` for some PGO variants that is added to the same test here as well.
-rw-r--r--compiler-rt/test/profile/check-same-common-code.test7
1 files changed, 7 insertions, 0 deletions
diff --git a/compiler-rt/test/profile/check-same-common-code.test b/compiler-rt/test/profile/check-same-common-code.test
new file mode 100644
index 0000000..81b9836
--- /dev/null
+++ b/compiler-rt/test/profile/check-same-common-code.test
@@ -0,0 +1,7 @@
+;
+; NOTE: if this test fails, please make sure the files are identical
+; copies of each other.
+;
+; RUN: diff %crt_src/include/profile/MIBEntryDef.inc %llvm_src/include/llvm/ProfileData/MIBEntryDef.inc
+; RUN: diff %crt_src/include/profile/MemProfData.inc %llvm_src/include/llvm/ProfileData/MemProfData.inc
+; RUN: diff %crt_src/include/profile/InstrProfData.inc %llvm_src/include/llvm/ProfileData/InstrProfData.inc