hanchenye-llvm-project/clang/test/Modules/Inputs
Duncan P. N. Exon Smith 03df14c6dd Modules: Do not serialize #pragma pack state
The modules side of r299226, which serializes #pragma pack state,
doesn't work well.

The main purpose was to make -include and -include-pch match semantics
(the PCH side).  We also started serializing #pragma pack in PCMs, in
the hopes of making modules and non-modules builds more consistent.  But
consider:

    $ cat a.h
    $ cat b.h
    #pragma pack(push, 2)
    $ cat module.modulemap
    module M {
        module a { header "a.h" }
        module b { header "b.h" }
    }
    $ cat t.cpp
    #include "a.h"
    #pragma pack(show)

As of r299226, the #pragma pack(show) gives "2", even though we've only
included "a.h".

- With -fmodules-local-submodule-visibility, this is clearly wrong.  We
  should get the default state (8 on x86_64).

- Without -fmodules-local-submodule-visibility, this kind of matches how
  other things work (as if include-the-whole-module), but it's still
  really terrible, and it doesn't actually make modules and non-modules
  builds more consistent.

This commit disables the serialization for modules, essentially a
partial revert of r299226.

Going forward:

 1. Having this #pragma pack stuff escape is terrible design (or, more
    often, a horrible bug).  We should prioritize adding warnings (maybe
    -Werror by default?).

 2. If we eventually reintroduce this for modules, it should only apply
    to -fmodules-local-submodule-visibility, and it should be tracked on
    a per-submodule basis.

llvm-svn: 300380
2017-04-15 00:07:57 +00:00
..
AddRemovePrivate.framework
AlsoDependsOnModule.framework/Headers
AutolinkTBD.framework Fix auto-link for text-based dynamic library SDKs. 2015-11-13 19:08:07 +00:00
CmdLine.framework/Headers
Conflicts
DependsOnModule.framework
FooFramework.framework [Modules] Fix misleading warning about missing textual header in umbrella header 2017-01-12 19:15:33 +00:00
GNUAsm/NeedsGNUInlineAsm.framework [Modules] Add 'gnuinlineasm' to the 'requires-declaration' feature-list. 2016-08-30 21:25:42 +00:00
HasSubModules.framework
Main.framework [Modules] Find PrivateHeaders when looking into subframeworks 2017-03-21 16:43:51 +00:00
Modified
Module.framework
ModuleDiags
ModuleMapLocations
MutuallyRecursive1.framework/Headers
MutuallyRecursive2.framework/Headers
NameInDir.framework
NameInDir2.framework
NameInDirInferred.framework/Headers
NoUmbrella.framework
NotAModule.framework/Headers
PR20399
PR20786
PR21547 [modules] Add a regression test for PR21547. 2016-03-30 20:10:07 +00:00
PR21687
PR24954 [modules] Fix adding a templated friend functions to a namespace from another module. 2016-03-16 11:17:04 +00:00
PR25501 PR25501: Delay loading visible updates for a declaration until after we've 2016-04-08 20:53:26 +00:00
PR26014 Canonicalize UnaryTransformType types when they don't have a known underlying type. 2016-03-30 22:18:29 +00:00
PR26179 [modules] Prefer more complete array types. 2016-02-28 19:08:24 +00:00
PR27041 [modules] Write out identifiers if the ID is local, too. 2016-03-30 20:16:03 +00:00
PR27186 [modules] Add forgotten test case to r265597. 2016-04-06 20:58:12 +00:00
PR27401 Reland r267691 fixing PR27535. 2016-04-28 14:13:28 +00:00
PR27513 PR27513: When determining which declaration to put into an exported lookup 2016-04-26 23:40:43 +00:00
PR27699 Add regression test for PR27699. 2016-07-22 20:49:31 +00:00
PR27739 [modules] Ask the canonical decl whether the constructor was defaulted. 2016-05-24 12:10:36 +00:00
PR27754 PR27754: CXXRecordDecl::data() needs to perform an update even if it's called 2016-05-17 22:44:15 +00:00
PR27890 [modules] Allow emission of update records for predefined __va_list_tag. 2016-06-20 15:10:40 +00:00
PR28332 [modules] Teach the ASTWriter to ignore mutations coming from the ASTReader. 2016-07-22 21:08:24 +00:00
PR28438 PR28438: Update the information on an identifier with local definitions before 2016-08-18 01:16:55 +00:00
PR28752 Reinstate r284008 reverted in r284081, with two fixes: 2016-10-14 21:41:24 +00:00
PR28794 PR28794: Don't try to instantiate function templates which are not visible. 2016-08-18 22:01:25 +00:00
PR28812 [modules] PR28812: Modules can return duplicate field decls. 2016-10-26 10:24:29 +00:00
PR31469 PR31469: Don't add friend template class decls to redecl chain in dependent contexts. 2017-01-12 09:16:26 +00:00
StdDef
System/usr/include Treat module headers wrapped by our builtin headers as implicitly being textual 2016-10-26 01:08:55 +00:00
UseAfterFree Modules: set SystemHeader to true if we are building a system module. 2016-05-17 02:15:12 +00:00
anon-namespace
anon-redecl [modules] Additional tests. 2017-01-26 23:07:59 +00:00
attr-unavailable
auto-import-unavailable [modules] PR20507: Avoid silent textual inclusion. 2015-08-17 16:39:30 +00:00
available-is-better [modules] PR20507: Avoid silent textual inclusion. 2015-08-17 16:39:30 +00:00
codegen Modular Codegen: Include testing for inline asm as well as some commentary on the implementaiton choice. 2017-04-12 21:14:04 +00:00
codegen-flags Modular Codegen: Separate flags for function and debug info support 2017-04-12 20:58:33 +00:00
codegen-nodep Modular Codegen: Support homing debug info for types in modular objects 2017-04-11 21:13:37 +00:00
codegen-opt Initialize builtins during modular codegen 2017-02-08 20:51:11 +00:00
crash-recovery [ModuleMap][CrashReproducer] Collect headers from inner frameworks 2016-05-13 22:21:51 +00:00
cxx-dtor
cxx-lookup
cxx17 Take into account C++17's noexcept function types during merging -- it should 2017-03-08 23:00:26 +00:00
declare-use [modules] PR20507: Avoid silent textual inclusion. 2015-08-17 16:39:30 +00:00
deferred-lookup
elsewhere
empty
exclude-header
explicit-build [modules] Flatten -fmodule-name= and -fmodule-implementation-of= into a single 2016-02-19 22:25:36 +00:00
explicit-build-overlap [modules] Tests for r245390. 2015-08-18 23:42:50 +00:00
explicit-build-prefer-self
filename
getSourceDescriptor-crash Adding a test for a compiler crash that was fixed in r248069. 2016-05-03 00:29:56 +00:00
gnumode-non-benign [modules] Add missing test from r297030. 2017-03-06 17:47:57 +00:00
header-in-multiple-maps
hidden-names [modules] Additional tests. 2017-01-26 23:07:59 +00:00
implicit-built-Werror-using-W Serialization: Simulate -Werror settings in implicit modules 2017-04-12 03:58:58 +00:00
implicit-private-with-different-name/A.framework [modules] Handle modules with nonstandard names in module.private.modulemaps 2016-12-21 00:24:39 +00:00
import-textual [Modules] Support #import when entering files with modules 2017-01-11 02:14:51 +00:00
include-relative
include_next
inferred-attr
initializer_list
internal-constants [modules] Rationalize the behavior of Decl::declarationReplaces, and in 2015-11-03 03:13:11 +00:00
invalid-module-id [PCH] Fix a regression when PCH is used with -fmodules 2017-02-07 21:54:57 +00:00
invalidate-identifiers
libc-libcxx [Modules] Support #import when entering files with modules 2017-01-11 02:14:51 +00:00
libstdcxx-ambiguous-internal [modules] Generalize the workaround for multiple ambiguous definitions of 2015-11-04 19:26:32 +00:00
lookup-assert Modules: for ObjectiveC try to keep the definition invariant. 2016-09-09 23:48:27 +00:00
macro-ambiguity
macro-hiding
macro-masking
macro-reexport [modules] PR20507: Avoid silent textual inclusion. 2015-08-17 16:39:30 +00:00
macro-undef-through-pch
malformed
merge-anon-in-template
merge-class-definition-visibility
merge-decl-context [modules] Mark deleted functions as implicitly inline to allow merging 2016-10-31 23:07:15 +00:00
merge-decl-order
merge-dependent-friends
merge-fn-prototype-tags [modules] Apply ODR merging for function scoped tags only in C++ mode. 2016-09-08 20:34:41 +00:00
merge-friends
merge-function-defs [modules] Additional tests. 2017-01-26 23:07:59 +00:00
merge-implicit-special-members
merge-name-for-linkage Add files forgotten in r293219. 2017-01-26 23:06:10 +00:00
merge-nested-templates
merge-target-features
merge-template-friend
merge-template-members
merge-template-pattern-visibility Revert "Reinstate r281429, reverted in r281452, with a fix for its mishandling of" 2016-10-17 13:00:44 +00:00
merge-template-specializations [modules] Be sure to emit local specializations of imported templates, even if 2016-10-06 20:30:51 +00:00
merge-typedefs
merge-using-decls [Test] NFC: Fixed typo in comments 2017-03-01 17:55:03 +00:00
merge-var-template-def [modules] Do not report missing definitions of demoted constexpr variable templates. 2016-10-19 11:19:30 +00:00
merge-vtable-codegen
misplaced [Modules] More descriptive diagnostics for misplaced import directive 2015-09-19 05:32:57 +00:00
modular_maps
module-impl-with-link Module: Do not add any link flags when an implementation TU of a module imports 2017-01-11 18:47:38 +00:00
module-map-path-hash Avoid failure to canonicalize '..'. 2015-07-30 00:26:34 +00:00
modules-with-same-name
multiple-include
no-implicit-builds
no-linkage [modules] Fix some more cases where we used to reject a conflict between two 2015-11-17 03:02:41 +00:00
normal-module-map
objc-category Modules: for ObjectiveC try to keep the definition invariant. 2016-09-09 23:48:27 +00:00
objc-category-2 Modules: for ObjectiveC try to keep the definition invariant. 2016-09-09 23:48:27 +00:00
objc-category-3 Modules: for ObjectiveC try to keep the definition invariant. 2016-09-09 23:48:27 +00:00
objc-hidden Module: for ObjectiveC, be consistent when checking hidden decls. 2016-10-11 21:18:20 +00:00
objc-initializer Module: emit initializers in submodules when importing the parent module. 2016-10-14 18:55:44 +00:00
odr
oldname
outofdate-rebuild Canonicalize the path provided by -fmodules-cache-path. 2017-03-14 23:07:49 +00:00
overloadable-attrs Represent pass_object_size attrs in ExtParameterInfo 2017-02-24 02:49:47 +00:00
pch-with-module-name PCH: fix a regression that reports a module is defined in both pch and pcm. 2017-01-09 19:20:18 +00:00
pr19692
prebuilt-module Module: add -fprebuilt-module-path to support loading prebuilt modules. 2016-08-18 17:42:15 +00:00
preprocess
private
private0
private1
private2
private3 Allow use of private headers in different sub-modules. 2015-11-05 15:24:47 +00:00
redecl-found-building-chains
redecl-templates
redecls
require-modular-includes
self-import-header
separate_map_tree
static_assert Fix interaction between serialization and c++1z feature. 2016-09-13 01:20:40 +00:00
stress1 Add file missed from r244409. 2015-08-09 01:50:14 +00:00
string_names
subdir
submodule-visibility
submodules
submodules-merge-defs Allow non-defining declarations of class template partial specializations to 2015-12-11 22:39:52 +00:00
suggest-include [modules] When diagnosing a missing module import, suggest adding a #include if 2016-04-27 21:57:05 +00:00
system-out-of-date Avoid these headers looking like the same file on a content-addressed file system. 2017-03-20 20:14:03 +00:00
template-default-args Add new test file missing from r247486. 2015-09-11 22:54:01 +00:00
template-specialization-visibility
thread-safety [modules] Fix thread safety analysis to cope with merging of FieldDecls across modules. 2015-08-12 02:17:52 +00:00
undefined-type-fixit
unnecessary-module-map-parsing
unused-global-init [modules] Don't emit initializers for VarDecls within a module eagerly whenever 2016-07-20 19:10:16 +00:00
update-after-load
update-exception-spec
using-decl-redecl [modules] Don't diagnose a conflict between two using-declarations that name equivalent internal linkage entities. 2016-01-12 20:34:32 +00:00
va_list [modules] Fix merging of __va_list_tag's implicit special member functions. 2015-10-13 00:23:25 +00:00
warning-mismatch Reapply "Modules: Cache PCMs in memory and avoid a use-after-free" 2017-03-20 17:58:26 +00:00
wildcard-submodule-exports
working-dir-test/Test.framework [modules] Fix issue where building a module from a relative path when -working-directory option is set, results in error. 2015-07-31 00:58:32 +00:00
DebugCXX.h Module debug info: Fix a bug in handling record decls without fields. 2016-08-17 18:27:24 +00:00
DebugNestedA.h Module debug info: Don't assert when encountering an incomplete definition 2016-08-22 22:23:58 +00:00
DebugNestedB.h Module debug info: Don't assert when encountering an incomplete definition 2016-08-22 22:23:58 +00:00
DebugObjC.h Module Debugging: Emit the canonical debug info for Objective-C classes 2016-04-20 23:59:32 +00:00
DebugSubmoduleA.h Module debugging: Support submodules in the PCM/PCH debug info. 2015-09-20 16:51:35 +00:00
DebugSubmoduleB.h Module debugging: Support submodules in the PCM/PCH debug info. 2015-09-20 16:51:35 +00:00
DiagOutOfDate.h Modules: add command line option fmodules-disable-diagnostic-validation 2016-07-26 17:12:17 +00:00
ExtensionTestA.h Introduce module file extensions to piggy-back data onto module files. 2015-11-03 18:33:07 +00:00
ImportNameInDir.h
MacroFabs1.h PCH + module: make sure we write out macros associated with builtin identifiers. 2016-05-31 18:19:32 +00:00
MethodPoolA.h
MethodPoolASub.h
MethodPoolASub2.h
MethodPoolB.h
MethodPoolBSub.h
MethodPoolBSub2.h
MethodPoolCombined1.h Method Pool in modules: we make sure that if a module contains an entry for 2016-04-29 19:04:05 +00:00
MethodPoolCombined2.h Method Pool in modules: we make sure that if a module contains an entry for 2016-04-29 19:04:05 +00:00
MethodPoolString1.h Method Pool in modules: we make sure that if a module contains an entry for 2016-04-29 19:04:05 +00:00
MethodPoolString2.h Method Pool in modules: we make sure that if a module contains an entry for 2016-04-29 19:04:05 +00:00
autolink-sub.h
autolink-sub2.h
autolink-sub3.h
autolink-sub3.pch
autolink.h
builtin.h Fix predefine for __NSConstantString struct type 2016-02-04 00:55:24 +00:00
builtin_sub.h Fix missing builtin identifier infos with PCH+modules 2015-10-28 22:25:37 +00:00
c-header-bad.h
c-header.h
category_bottom.h
category_left.h
category_left_sub.h
category_other.h
category_right.h Don't synthesize an ImportDecl for a module named in -fmodule-implementation-of 2016-02-05 01:10:05 +00:00
category_right_sub.h [ObjC][Modules] Don't perform property lookup in hidden class extensions 2017-02-22 23:18:49 +00:00
category_top.h
config.h
crash.h
cxx-decls-imported.h Fix off-by-one error in worst-case number of offsets needed for an AST record. 2016-04-14 18:32:54 +00:00
cxx-decls-merged.h
cxx-decls-premerged.h
cxx-decls-unimported.h
cxx-header.h [modules] Use the "redundant #include" diagnostic rather than the "module 2016-12-06 00:12:39 +00:00
cxx-inline-namespace-b.h
cxx-inline-namespace.h
cxx-irgen-left.h
cxx-irgen-right.h
cxx-irgen-top.h
cxx-linkage-cache.h
cxx-many-overloads.h
cxx-templates-a.h
cxx-templates-b-impl.h
cxx-templates-b.h
cxx-templates-c.h
cxx-templates-common.h [modules] Enforce the rules that an explicit or partial specialization must be 2016-05-05 00:56:12 +00:00
cxx-templates-d.h
cxx-templates-textual.h
cxx-templates-unimported.h [modules] Enforce the rules that an explicit or partial specialization must be 2016-05-05 00:56:12 +00:00
decl.h
decl2.h
def-include.h
def.h
dependency-gen-base.modulemap
dependency-gen-base2.modulemap
dependency-gen-included.h
dependency-gen-included2.h
dependency-gen.h
diag_pragma.h Remove and replace DiagStatePoint tracking and lookup data structure. 2017-01-26 01:01:01 +00:00
diagnostics-aux-2.modulemap
diagnostics-aux.modulemap
diamond.h
diamond_bottom.h
diamond_left.h
diamond_right.h
diamond_top.h
dummy.h [modules] Make sure we always include the contents of private headers when 2016-01-08 22:36:45 +00:00
elaborated-type-structs.h Reapply "[Modules] Fix regression when an elaborated-type-specifier mentions a hidden tag" 2015-12-11 22:05:13 +00:00
empty.h
ignored_macros.h
import-decl.h
incomplete_mod.h
incomplete_mod_missing.h
irgen.h
linkage-merge-bar.h
linkage-merge-foo.h
linkage-merge-sub.h
load_failure.h
lookup_left.h
lookup_left.hpp
lookup_right.h
lookup_right.hpp
macros-indirect.h
macros.h
macros_bottom.h
macros_left.h
macros_other.h
macros_right.h
macros_right_undef.h
macros_top.h
macros_top_b.h
macros_top_c.h
modular_maps-moduleb-cwd.map
module.map Modules: Do not serialize #pragma pack state 2017-04-15 00:07:57 +00:00
module_private_left.h
module_private_right.h
namespaces-left.h
namespaces-right.h
namespaces-top.h
non-module.h [modules] Don't diagnose non-modular includes from modular files that are 2016-03-14 17:52:37 +00:00
objc-method-redecl.h ObjectiveC: fix a seg fault when deserialing redeclaration of ObjCMethodDecl. 2016-10-03 21:26:46 +00:00
pch-import-module-out-of-date.pch Modules: add command line option fmodules-disable-diagnostic-validation 2016-07-26 17:12:17 +00:00
pch-import-module-with-macro.pch PCH + module: make sure we write out macros associated with builtin identifiers. 2016-05-31 18:19:32 +00:00
pch-used.h
point.h
pragma_pack_set.h [Modules][PCH] Serialize #pragma pack 2017-03-31 15:36:21 +00:00
preprocess-prefix.h
recursive1.h
recursive2.h
recursive_visibility_a1_inner.h
recursive_visibility_a2_more_inner.h
recursive_visibility_b.h
recursive_visibility_c.h
redecl-add-after-load-decls.h
redecl-add-after-load-top.h
redecl-add-after-load.h
redecl-merge-bottom-prefix.h
redecl-merge-bottom.h
redecl-merge-left-left.h
redecl-merge-left.h
redecl-merge-right.h
redecl-merge-top-explicit.h
redecl-merge-top.h
redecl_namespaces_left.h
redecl_namespaces_right.h
redeclarations_left.h
redeclarations_right.h
relative-dep-gen-1.h
relative-dep-gen-2.h
relative-dep-gen-cwd.modulemap
relative-dep-gen.modulemap
templates-left.h [modules] Fix assert if multiple update records provide a definition for a 2016-10-26 02:31:56 +00:00
templates-right.h [modules] Fix assert if multiple update records provide a definition for a 2016-10-26 02:31:56 +00:00
templates-top.h [modules] Fix assert if multiple update records provide a definition for a 2016-10-26 02:31:56 +00:00
typedef-tag-hidden.h [modules] Allow "redefinition" of typedef of anon tag from unimported submodule 2015-11-14 03:26:14 +00:00
typedef-tag.h [modules] Allow "redefinition" of typedef of anon tag from unimported submodule 2015-11-14 03:26:14 +00:00
typo.h Fix CodeCompletion & TypoCorrection when combining a PCH with Modules 2016-05-04 00:53:13 +00:00
use-builtin.h Fix missing builtin identifier infos with PCH+modules 2015-10-28 22:25:37 +00:00
using-decl-a.h [modules] Make sure we make hidden UsingShadowDecls visible to redeclaration 2015-09-15 18:51:56 +00:00
using-decl-b.h [modules] Make sure we make hidden UsingShadowDecls visible to redeclaration 2015-09-15 18:51:56 +00:00
warn-unused-local-typedef.h
warning.h
weird_objc.h