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

Ben Langmuir via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 6 09:18:26 PDT 2022


benlangmuir created this revision.
benlangmuir added reviewers: goncharov, dexonsmith.
Herald added a project: All.
benlangmuir requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.

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 <https://reviews.llvm.org/rG5ea78c4113f8d2c8be24152f2dd0cadaea352c9d> 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.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D135373

Files:
  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


Index: clang/test/Driver/Inputs/header4.h
===================================================================
--- clang/test/Driver/Inputs/header4.h
+++ clang/test/Driver/Inputs/header4.h
@@ -0,0 +1 @@
+// header4.h
Index: clang/test/Driver/Inputs/header3.h
===================================================================
--- clang/test/Driver/Inputs/header3.h
+++ clang/test/Driver/Inputs/header3.h
@@ -0,0 +1 @@
+// header3.h
Index: clang/test/Driver/Inputs/header2.h
===================================================================
--- clang/test/Driver/Inputs/header2.h
+++ clang/test/Driver/Inputs/header2.h
@@ -1 +1,2 @@
+// header2.h
 #include "header1.h"
Index: clang/test/Driver/Inputs/header1.h
===================================================================
--- clang/test/Driver/Inputs/header1.h
+++ clang/test/Driver/Inputs/header1.h
@@ -0,0 +1 @@
+// header1.h
Index: clang/test/Driver/Inputs/header0.h
===================================================================
--- clang/test/Driver/Inputs/header0.h
+++ clang/test/Driver/Inputs/header0.h
@@ -0,0 +1 @@
+// header0.h


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D135373.465767.patch
Type: text/x-patch
Size: 1102 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20221006/930432b5/attachment.bin>


More information about the cfe-commits mailing list