If a header file belonging to a certain module is not found on the filesystem, that header gets marked as unavailable. Now, the layering warning (-fmodules-decluse) should still warn about headers of this module being wrongfully included. Currently, headers belonging to those modules are just treated as not belonging to modules at all which means they can be included freely from everywhere. To implement this (somewhat) cleanly, I have moved most of the layering checks into the ModuleMap. This will also help with showing FixIts later. llvm-svn: 197805
48 lines
563 B
Plaintext
48 lines
563 B
Plaintext
module XA {
|
|
header "a.h"
|
|
}
|
|
|
|
module XB {
|
|
header "b.h"
|
|
}
|
|
|
|
module XC {
|
|
header "c.h"
|
|
use XA
|
|
// Intentionally doesn't use XB to show that -fdecl-use isn't transitive.
|
|
}
|
|
|
|
module XD {
|
|
header "d.h"
|
|
use XA
|
|
// Intentionally doesn't use XB to show that -fdecl-use isn't transitive.
|
|
}
|
|
|
|
module XE {
|
|
header "e.h"
|
|
header "unavailable.h"
|
|
use XA
|
|
use XB
|
|
}
|
|
|
|
module XF {
|
|
header "f.h"
|
|
header "unavailable.h"
|
|
use XA
|
|
use XB
|
|
}
|
|
|
|
module XG {
|
|
header "g.h"
|
|
header "g1.h"
|
|
use XC
|
|
use XE
|
|
}
|
|
|
|
module XH {
|
|
header "h.h"
|
|
header "h1.h"
|
|
use XC
|
|
use XE
|
|
}
|