[clang] 8d9a3a6 - [clang][test] Make headers unique to avoid linking issues

Ben Langmuir via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 6 10:09:53 PDT 2022


Author: Ben Langmuir
Date: 2022-10-06T10:09:22-07:00
New Revision: 8d9a3a6b9bd10f294d0e5adb0972a1ed8845e4aa

URL: https://github.com/llvm/llvm-project/commit/8d9a3a6b9bd10f294d0e5adb0972a1ed8845e4aa
DIFF: https://github.com/llvm/llvm-project/commit/8d9a3a6b9bd10f294d0e5adb0972a1ed8845e4aa.diff

LOG: [clang][test] Make headers unique to avoid linking issues

Make the empty headers used by cl-pch-showincludes.cpp unique so that
filesystems that link these files together by contents will not see
different behaviour in this test, which is not testing linked files
specifically.

This was uncovered by 5ea78c4113f8 which made us stop mutating the name
of the presumed loc for the file in ContentCache, but that just surfaced
an underlying issue that the filename of multiple includes of linked
files are not separately tracked.

Differential Revision: https://reviews.llvm.org/D135373

Added: 
    

Modified: 
    clang/test/Driver/Inputs/header0.h
    clang/test/Driver/Inputs/header1.h
    clang/test/Driver/Inputs/header2.h
    clang/test/Driver/Inputs/header3.h
    clang/test/Driver/Inputs/header4.h

Removed: 
    


################################################################################
diff  --git a/clang/test/Driver/Inputs/header0.h b/clang/test/Driver/Inputs/header0.h
index e69de29bb2d1d..8de9e9058b96d 100644
--- a/clang/test/Driver/Inputs/header0.h
+++ b/clang/test/Driver/Inputs/header0.h
@@ -0,0 +1 @@
+// header0.h

diff  --git a/clang/test/Driver/Inputs/header1.h b/clang/test/Driver/Inputs/header1.h
index e69de29bb2d1d..586f24a26b2e3 100644
--- a/clang/test/Driver/Inputs/header1.h
+++ b/clang/test/Driver/Inputs/header1.h
@@ -0,0 +1 @@
+// header1.h

diff  --git a/clang/test/Driver/Inputs/header2.h b/clang/test/Driver/Inputs/header2.h
index 243468d879c7d..e1c05acfa651d 100644
--- a/clang/test/Driver/Inputs/header2.h
+++ b/clang/test/Driver/Inputs/header2.h
@@ -1 +1,2 @@
+// header2.h
 #include "header1.h"

diff  --git a/clang/test/Driver/Inputs/header3.h b/clang/test/Driver/Inputs/header3.h
index e69de29bb2d1d..c71a93945aa00 100644
--- a/clang/test/Driver/Inputs/header3.h
+++ b/clang/test/Driver/Inputs/header3.h
@@ -0,0 +1 @@
+// header3.h

diff  --git a/clang/test/Driver/Inputs/header4.h b/clang/test/Driver/Inputs/header4.h
index e69de29bb2d1d..236f5267cfa88 100644
--- a/clang/test/Driver/Inputs/header4.h
+++ b/clang/test/Driver/Inputs/header4.h
@@ -0,0 +1 @@
+// header4.h


        


More information about the cfe-commits mailing list