forked from OSchip/llvm-project
Extended moduleImport test to test a module with more than one path component. This required a change to the includes test, because of the change to the headers.
llvm-svn: 194504
This commit is contained in:
parent
bed1be926d
commit
13e1cd3a37
|
@ -1 +1,2 @@
|
|||
#include "Level2B.h"
|
||||
#define MACRO_1B 1
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
#define MACRO_2B 1
|
|
@ -1,3 +1,4 @@
|
|||
Level1A.h
|
||||
Level1B.h
|
||||
Level2A.h
|
||||
Level2B.h
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
// module.map
|
||||
// Generated by: modularize -module-map-path=module.map ModularizeList.txt
|
||||
|
||||
module Level1A {
|
||||
header "Level1A.h"
|
||||
|
@ -8,6 +7,10 @@ module Level1A {
|
|||
module Level1B {
|
||||
header "Level1B.h"
|
||||
export *
|
||||
module Level2B {
|
||||
header "Level2B.h"
|
||||
export *
|
||||
}
|
||||
}
|
||||
module Level2A {
|
||||
header "Level2A.h"
|
||||
|
|
|
@ -107,6 +107,28 @@
|
|||
// CHECK-NEXT: Reason: EnterFile
|
||||
// CHECK-NEXT: FileType: C_User
|
||||
// CHECK-NEXT: PrevFID: (invalid)
|
||||
// CHECK-NEXT: - Callback: InclusionDirective
|
||||
// CHECK-NEXT: IncludeTok: include
|
||||
// CHECK-NEXT: FileName: "Level2B.h"
|
||||
// CHECK-NEXT: IsAngled: false
|
||||
// CHECK-NEXT: FilenameRange: "Level2B.h"
|
||||
// CHECK-NEXT: File: "{{.*}}{{[/\\]}}Inputs/Level2B.h"
|
||||
// CHECK-NEXT: SearchPath: "{{.*}}{{[/\\]}}Inputs"
|
||||
// CHECK-NEXT: RelativePath: "Level2B.h"
|
||||
// CHECK-NEXT: Imported: (null)
|
||||
// CHECK-NEXT: - Callback: FileChanged
|
||||
// CHECK-NEXT: Loc: "{{.*}}{{[/\\]}}Inputs/Level2B.h:1:1"
|
||||
// CHECK-NEXT: Reason: EnterFile
|
||||
// CHECK-NEXT: FileType: C_User
|
||||
// CHECK-NEXT: PrevFID: (invalid)
|
||||
// CHECK-NEXT: - Callback: MacroDefined
|
||||
// CHECK-NEXT: MacroNameTok: MACRO_2B
|
||||
// CHECK-NEXT: MacroDirective: MD_Define
|
||||
// CHECK-NEXT: - Callback: FileChanged
|
||||
// CHECK-NEXT: Loc: "{{.*}}{{[/\\]}}Inputs/Level1B.h:2:1"
|
||||
// CHECK-NEXT: Reason: ExitFile
|
||||
// CHECK-NEXT: FileType: C_User
|
||||
// CHECK-NEXT: PrevFID: "{{.*}}{{[/\\]}}Inputs/Level2B.h"
|
||||
// CHECK-NEXT: - Callback: MacroDefined
|
||||
// CHECK-NEXT: MacroNameTok: MACRO_1B
|
||||
// CHECK-NEXT: MacroDirective: MD_Define
|
||||
|
|
|
@ -1,11 +1,16 @@
|
|||
// RUN: pp-trace -ignore FileChanged,MacroDefined %s -x objective-c++ -undef -target x86_64 -std=c++11 -fmodules -fcxx-modules -fmodules-cache-path=%t -I%S -I%S/Input | FileCheck --strict-whitespace %s
|
||||
|
||||
@import Level1A;
|
||||
@import Level1B.Level2B;
|
||||
|
||||
// CHECK: ---
|
||||
// CHECK-NEXT: - Callback: moduleImport
|
||||
// CHECK-NEXT: ImportLoc: "{{.*}}{{[/\\]}}pp-trace-modules.cpp:3:2"
|
||||
// CHECK-NEXT: Path: [{Name: Level1A, Loc: "{{.*}}{{[/\\]}}pp-trace-modules.cpp:3:9"}]
|
||||
// CHECK-NEXT: Imported: Level1A
|
||||
// CHECK-NEXT: - Callback: moduleImport
|
||||
// CHECK-NEXT: ImportLoc: "{{.*}}{{[/\\]}}pp-trace-modules.cpp:4:2"
|
||||
// CHECK-NEXT: Path: [{Name: Level1B, Loc: "{{.*}}{{[/\\]}}pp-trace-modules.cpp:4:9"}, {Name: Level2B, Loc: "{{.*}}{{[/\\]}}pp-trace-modules.cpp:4:17"}]
|
||||
// CHECK-NEXT: Imported: Level2B
|
||||
// CHECK-NEXT: - Callback: EndOfMainFile
|
||||
// CHECK-NEXT: ...
|
||||
|
|
Loading…
Reference in New Issue