1 // RUN: pp-trace %s -- -undef -target x86_64 -std=c++11 | FileCheck --strict-whitespace %s 2 3 #include "Inputs/Level1A.h" 4 #include "Inputs/Level1B.h" 5 6 // CHECK: --- 7 // CHECK-NEXT: - Callback: FileChanged 8 // CHECK-NEXT: Loc: "{{.*}}{{[/\\]}}pp-trace-include.cpp:1:1" 9 // CHECK-NEXT: Reason: EnterFile 10 // CHECK-NEXT: FileType: C_User 11 // CHECK-NEXT: PrevFID: (invalid) 12 // CHECK-NEXT: - Callback: FileChanged 13 // CHECK-NEXT: Loc: "<built-in>:1:1" 14 // CHECK-NEXT: Reason: EnterFile 15 // CHECK-NEXT: FileType: C_User 16 // CHECK-NEXT: PrevFID: (invalid) 17 // CHECK-NEXT: - Callback: FileChanged 18 // CHECK-NEXT: Loc: "<built-in>:1:1" 19 // CHECK-NEXT: Reason: RenameFile 20 // CHECK-NEXT: FileType: C_System 21 // CHECK-NEXT: PrevFID: (invalid) 22 // CHECK-NEXT: - Callback: MacroDefined 23 // CHECK: MacroNameTok: __STDC__ 24 // CHECK-NEXT: MacroDirective: MD_Define 25 // CHECK-NEXT: - Callback: MacroDefined 26 // CHECK: MacroNameTok: __STDC_HOSTED__ 27 // CHECK-NEXT: MacroDirective: MD_Define 28 // CHECK-NEXT: - Callback: MacroDefined 29 // CHECK: MacroNameTok: __cplusplus 30 // CHECK-NEXT: MacroDirective: MD_Define 31 // CHECK-NEXT: - Callback: MacroDefined 32 // CHECK: MacroNameTok: __STDC_UTF_16__ 33 // CHECK-NEXT: MacroDirective: MD_Define 34 // CHECK-NEXT: - Callback: MacroDefined 35 // CHECK: MacroNameTok: __STDC_UTF_32__ 36 // CHECK-NEXT: MacroDirective: MD_Define 37 // CHECK: - Callback: FileChanged 38 // CHECK-NEXT: Loc: "<command line>:1:1" 39 // CHECK-NEXT: Reason: EnterFile 40 // CHECK-NEXT: FileType: C_User 41 // CHECK-NEXT: PrevFID: (invalid) 42 // CHECK-NEXT: - Callback: FileChanged 43 // CHECK-NEXT: Loc: "<built-in>:1:1" 44 // CHECK-NEXT: Reason: ExitFile 45 // CHECK-NEXT: FileType: C_User 46 // CHECK-NEXT: PrevFID: (invalid) 47 // CHECK-NEXT: - Callback: FileChanged 48 // CHECK-NEXT: Loc: "{{.*}}{{[/\\]}}pp-trace-include.cpp:1:1" 49 // CHECK-NEXT: Reason: ExitFile 50 // CHECK-NEXT: FileType: C_User 51 // CHECK-NEXT: PrevFID: (getFileEntryForID failed) 52 // CHECK-NEXT: - Callback: InclusionDirective 53 // CHECK-NEXT: IncludeTok: include 54 // CHECK-NEXT: FileName: "Inputs/Level1A.h" 55 // CHECK-NEXT: IsAngled: false 56 // CHECK-NEXT: FilenameRange: "Inputs/Level1A.h" 57 // CHECK-NEXT: File: "{{.*}}{{[/\\]}}Inputs/Level1A.h" 58 // CHECK-NEXT: SearchPath: "{{.*}}{{[/\\]}}pp-trace" 59 // CHECK-NEXT: RelativePath: "Inputs/Level1A.h" 60 // CHECK-NEXT: Imported: (null) 61 // CHECK-NEXT: - Callback: FileChanged 62 // CHECK-NEXT: Loc: "{{.*}}{{[/\\]}}Inputs/Level1A.h:1:1" 63 // CHECK-NEXT: Reason: EnterFile 64 // CHECK-NEXT: FileType: C_User 65 // CHECK-NEXT: PrevFID: (invalid) 66 // CHECK-NEXT: - Callback: InclusionDirective 67 // CHECK-NEXT: IncludeTok: include 68 // CHECK-NEXT: FileName: "Level2A.h" 69 // CHECK-NEXT: IsAngled: false 70 // CHECK-NEXT: FilenameRange: "Level2A.h" 71 // CHECK-NEXT: File: "{{.*}}{{[/\\]}}Inputs/Level2A.h" 72 // CHECK-NEXT: SearchPath: "{{.*}}{{[/\\]}}Inputs" 73 // CHECK-NEXT: RelativePath: "Level2A.h" 74 // CHECK-NEXT: Imported: (null) 75 // CHECK-NEXT: - Callback: FileChanged 76 // CHECK-NEXT: Loc: "{{.*}}{{[/\\]}}Inputs/Level2A.h:1:1" 77 // CHECK-NEXT: Reason: EnterFile 78 // CHECK-NEXT: FileType: C_User 79 // CHECK-NEXT: PrevFID: (invalid) 80 // CHECK-NEXT: - Callback: MacroDefined 81 // CHECK-NEXT: MacroNameTok: MACRO_2A 82 // CHECK-NEXT: MacroDirective: MD_Define 83 // CHECK-NEXT: - Callback: FileChanged 84 // CHECK-NEXT: Loc: "{{.*}}{{[/\\]}}Inputs/Level1A.h:2:1" 85 // CHECK-NEXT: Reason: ExitFile 86 // CHECK-NEXT: FileType: C_User 87 // CHECK-NEXT: PrevFID: "{{.*}}{{[/\\]}}Inputs/Level2A.h" 88 // CHECK-NEXT: - Callback: MacroDefined 89 // CHECK-NEXT: MacroNameTok: MACRO_1A 90 // CHECK-NEXT: MacroDirective: MD_Define 91 // CHECK-NEXT: - Callback: FileChanged 92 // CHECK-NEXT: Loc: "{{.*}}{{[/\\]}}pp-trace-include.cpp:4:1" 93 // CHECK-NEXT: Reason: ExitFile 94 // CHECK-NEXT: FileType: C_User 95 // CHECK-NEXT: PrevFID: "{{.*}}{{[/\\]}}Inputs/Level1A.h" 96 // CHECK-NEXT: - Callback: InclusionDirective 97 // CHECK-NEXT: IncludeTok: include 98 // CHECK-NEXT: FileName: "Inputs/Level1B.h" 99 // CHECK-NEXT: IsAngled: false 100 // CHECK-NEXT: FilenameRange: "Inputs/Level1B.h" 101 // CHECK-NEXT: File: "{{.*}}{{[/\\]}}Inputs/Level1B.h" 102 // CHECK-NEXT: SearchPath: "{{.*}}{{[/\\]}}pp-trace" 103 // CHECK-NEXT: RelativePath: "Inputs/Level1B.h" 104 // CHECK-NEXT: Imported: (null) 105 // CHECK-NEXT: - Callback: FileChanged 106 // CHECK-NEXT: Loc: "{{.*}}{{[/\\]}}Inputs/Level1B.h:1:1" 107 // CHECK-NEXT: Reason: EnterFile 108 // CHECK-NEXT: FileType: C_User 109 // CHECK-NEXT: PrevFID: (invalid) 110 // CHECK-NEXT: - Callback: InclusionDirective 111 // CHECK-NEXT: IncludeTok: include 112 // CHECK-NEXT: FileName: "Level2B.h" 113 // CHECK-NEXT: IsAngled: false 114 // CHECK-NEXT: FilenameRange: "Level2B.h" 115 // CHECK-NEXT: File: "{{.*}}{{[/\\]}}Inputs/Level2B.h" 116 // CHECK-NEXT: SearchPath: "{{.*}}{{[/\\]}}Inputs" 117 // CHECK-NEXT: RelativePath: "Level2B.h" 118 // CHECK-NEXT: Imported: (null) 119 // CHECK-NEXT: - Callback: FileChanged 120 // CHECK-NEXT: Loc: "{{.*}}{{[/\\]}}Inputs/Level2B.h:1:1" 121 // CHECK-NEXT: Reason: EnterFile 122 // CHECK-NEXT: FileType: C_User 123 // CHECK-NEXT: PrevFID: (invalid) 124 // CHECK-NEXT: - Callback: MacroDefined 125 // CHECK-NEXT: MacroNameTok: MACRO_2B 126 // CHECK-NEXT: MacroDirective: MD_Define 127 // CHECK-NEXT: - Callback: FileChanged 128 // CHECK-NEXT: Loc: "{{.*}}{{[/\\]}}Inputs/Level1B.h:2:1" 129 // CHECK-NEXT: Reason: ExitFile 130 // CHECK-NEXT: FileType: C_User 131 // CHECK-NEXT: PrevFID: "{{.*}}{{[/\\]}}Inputs/Level2B.h" 132 // CHECK-NEXT: - Callback: MacroDefined 133 // CHECK-NEXT: MacroNameTok: MACRO_1B 134 // CHECK-NEXT: MacroDirective: MD_Define 135 // CHECK-NEXT: - Callback: FileChanged 136 // CHECK-NEXT: Loc: "{{.*}}{{[/\\]}}pp-trace-include.cpp:5:1" 137 // CHECK-NEXT: Reason: ExitFile 138 // CHECK-NEXT: FileType: C_User 139 // CHECK-NEXT: PrevFID: "{{.*}}{{[/\\]}}Inputs/Level1B.h" 140 // CHECK-NEXT: - Callback: EndOfMainFile 141 // CHECK-NEXT: ... 142