summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2018-04-17 11:08:05 +0000
committerChandler Carruth <chandlerc@gmail.com>2018-04-17 11:08:05 +0000
commit6a4a524146226e98be04697d57a574f743052323 (patch)
tree87420f2ccd460ab11ca152da10c0bfa06a36be01
parente256ab847b7621f67e3d24a62e72d493ab7b6d32 (diff)
downloadbcm5719-llvm-6a4a524146226e98be04697d57a574f743052323.tar.gz
bcm5719-llvm-6a4a524146226e98be04697d57a574f743052323.zip
Add some infuriatingly necessary comments to this test case.
Without these comments, by "luck" the contents of SomeKit's SKWidget.h are precisely the same as SomeKitCore's SomeKitCore.h. This can create havoc if anything canonicalizes on the inode and your filesystem assigns a common inode to files with identical file content. Alternatively, if your build system uses symlinks into a content-addressed-storage (as Google's does), you end up with these files being symlinks to the same file. The end result is that Clang deduplicates them internally, and then believes that the SomeKit framework includes the SomeKitCore.h header, and does not include the SKWidget.h in SomeKit. This in turn results in warnings in this test and eventually errors as Clang becomes confused because the umbrella header for SomeKitCore has already been included into another framework's module (SomeKit). Yay. If anyone has a better idea about how to avoid this, I'm all ears. Nothing other than causing the file content to change worked for me. llvm-svn: 330184
-rw-r--r--clang/test/Modules/Inputs/exportas-link/OtherKit.framework/Headers/OtherKit.h1
-rw-r--r--clang/test/Modules/Inputs/exportas-link/SomeKit.framework/Headers/SKWidget.h1
-rw-r--r--clang/test/Modules/Inputs/exportas-link/SomeKit.framework/Headers/SomeKit.h5
-rw-r--r--clang/test/Modules/Inputs/exportas-link/SomeKitCore.framework/Headers/SomeKitCore.h5
4 files changed, 12 insertions, 0 deletions
diff --git a/clang/test/Modules/Inputs/exportas-link/OtherKit.framework/Headers/OtherKit.h b/clang/test/Modules/Inputs/exportas-link/OtherKit.framework/Headers/OtherKit.h
index 18f0bd555d6..f62c082d64d 100644
--- a/clang/test/Modules/Inputs/exportas-link/OtherKit.framework/Headers/OtherKit.h
+++ b/clang/test/Modules/Inputs/exportas-link/OtherKit.framework/Headers/OtherKit.h
@@ -1,3 +1,4 @@
+// Umbrella header for OtherKit.
#import <SomeKitCore/SomeKitCore.h>
#ifdef F
diff --git a/clang/test/Modules/Inputs/exportas-link/SomeKit.framework/Headers/SKWidget.h b/clang/test/Modules/Inputs/exportas-link/SomeKit.framework/Headers/SKWidget.h
index dd99ff7ed2f..60473720f91 100644
--- a/clang/test/Modules/Inputs/exportas-link/SomeKit.framework/Headers/SKWidget.h
+++ b/clang/test/Modules/Inputs/exportas-link/SomeKit.framework/Headers/SKWidget.h
@@ -1 +1,2 @@
+// Delegate to SomeKitCore.
#import <SomeKitCore/SKWidget.h>
diff --git a/clang/test/Modules/Inputs/exportas-link/SomeKit.framework/Headers/SomeKit.h b/clang/test/Modules/Inputs/exportas-link/SomeKit.framework/Headers/SomeKit.h
index 17a4cc83fdf..15e96a7554c 100644
--- a/clang/test/Modules/Inputs/exportas-link/SomeKit.framework/Headers/SomeKit.h
+++ b/clang/test/Modules/Inputs/exportas-link/SomeKit.framework/Headers/SomeKit.h
@@ -1 +1,6 @@
+// Umbrella header for SomeKit.
+//
+// Note that this file's content must not end up to coincidentally be identical
+// to any other file in the test which can easily happen given the reduced
+// test.
#import <SomeKit/SKWidget.h>
diff --git a/clang/test/Modules/Inputs/exportas-link/SomeKitCore.framework/Headers/SomeKitCore.h b/clang/test/Modules/Inputs/exportas-link/SomeKitCore.framework/Headers/SomeKitCore.h
index dd99ff7ed2f..f18aa97d421 100644
--- a/clang/test/Modules/Inputs/exportas-link/SomeKitCore.framework/Headers/SomeKitCore.h
+++ b/clang/test/Modules/Inputs/exportas-link/SomeKitCore.framework/Headers/SomeKitCore.h
@@ -1 +1,6 @@
+// Umbrella header for SomeKitCore.
+//
+// Note that this file's content must not end up to coincidentally be identical
+// to any other file in the test which can easily happen given the reduced
+// test.
#import <SomeKitCore/SKWidget.h>
OpenPOWER on IntegriCloud