Vyacheslav Zakharin | 6c99d2b | 2018-11-27 18:57:43 +0000 | [diff] [blame] | 1 | // RUN: llvm-tblgen -I %p %s 2>&1 | FileCheck %s --implicit-check-not warning: |
| 2 | |
| 3 | class C; |
| 4 | |
| 5 | // TableGen prints records in alpabetical order. |
| 6 | // CHECK-NOT: def ifdef_disabled1 |
| 7 | // CHECK-NOT: def ifdef_disabled2 |
| 8 | // CHECK: def ifdef_disabled3 |
| 9 | // CHECK-NOT: def ifdef_disabled4 |
| 10 | // CHECK-NOT: def ifdef_disabled5 |
| 11 | // CHECK: def ifdef_disabled4_else |
| 12 | // CHECK-NOT: def ifdef_disabled5_else |
| 13 | // CHECK: def ifdef_enabled1 |
| 14 | // CHECK-NOT: def ifdef_enabled2 |
| 15 | // CHECK: def ifdef_enabled3 |
| 16 | // CHECK: def ifdef_enabled4 |
| 17 | // CHECK-NOT: def ifdef_enabled4_else |
| 18 | // CHECK: def ifdef_enabled5 |
| 19 | // CHECK: def ifdef_enabled6 |
| 20 | // CHECK-NOT: def ifdef_enabled6_else |
| 21 | // CHECK-NOT: def ifdef_disabled6 |
| 22 | // CHECK-NOT: def ifdef_disabled6_else |
| 23 | |
| 24 | #define ENABLED1 |
| 25 | #define ENABLED2 |
| 26 | |
| 27 | #ifdef DISABLED1 |
| 28 | // |
| 29 | def ifdef_disabled1 : C; |
| 30 | |
| 31 | #define DISABLED2/*This one is disabled, |
| 32 | because DISABLED1 is. |
| 33 | */ |
| 34 | #endif |
| 35 | |
| 36 | #ifdef ENABLED1 |
| 37 | def ifdef_enabled1 : C; |
| 38 | #endif |
| 39 | |
| 40 | #ifdef DISABLED2/* |
| 41 | */ |
| 42 | def ifdef_disabled2 : C; |
| 43 | #endif |
| 44 | |
| 45 | /* |
| 46 | #ifdef ENABLED2 |
| 47 | def ifdef_enabled2 : C; |
| 48 | #endif |
| 49 | */ |
| 50 | |
| 51 | //#ifdef DISABLED3 |
| 52 | def ifdef_disabled3 : C; |
| 53 | |
| 54 | //#endif |
| 55 | |
| 56 | /* _DISABLED4 */ /* padding */ #ifdef _DISABLED4 |
| 57 | def ifdef_disabled4 : C; |
| 58 | #else// /*!_DISABLED4 |
| 59 | def ifdef_disabled4_else : C; |
| 60 | |
| 61 | #define ENABLED3 |
| 62 | #endif |
| 63 | |
| 64 | #ifdef __DISABLED5 |
| 65 | def ifdef_disabled5 : C; |
| 66 | /* |
| 67 | |
| 68 | */#else |
| 69 | #ifdef ENABLED3 |
| 70 | def ifdef_enabled3 : C; |
| 71 | #else /* //!ENABLED3 |
| 72 | */ |
| 73 | def ifdef_disabled5_else : C; |
| 74 | #endif |
| 75 | #endif |
| 76 | |
| 77 | #define ENABLED4 |
| 78 | include "prep-region-include.inc"//ENABLED5 is defined inside |
| 79 | |
| 80 | #ifdef ENABLED5 |
| 81 | def ifdef_enabled5 : C; |
| 82 | #endif // ENABLED5 |
| 83 | |
| 84 | #ifdef DISABLED6__ |
| 85 | // Double inclusion is an error. |
| 86 | include "prep-region-include.inc" |
| 87 | #else |
| 88 | #endif |
| 89 | |
| 90 | #ifdef DIS |
| 91 | #ifdef DIS |
| 92 | #ifdef DIS |
| 93 | #ifdef DIS |
| 94 | #ifdef DIS |
| 95 | #ifdef DIS |
| 96 | #ifdef DIS |
| 97 | #ifdef DIS |
| 98 | #ifdef DIS |
| 99 | #ifdef DIS |
| 100 | #ifdef DIS |
| 101 | def ifdef_disabled6 : C; |
| 102 | #endif |
| 103 | #endif |
| 104 | #endif |
| 105 | #endif |
| 106 | #else |
| 107 | def ifdef_disabled6_else : C; |
| 108 | #endif |
| 109 | #endif |
| 110 | #endif |
| 111 | #endif |
| 112 | #endif |
| 113 | #endif |
| 114 | #else |
| 115 | #define ENAB//ENAB |
| 116 | #endif |
| 117 | |
| 118 | #ifdef ENAB |
| 119 | #ifdef ENAB |
| 120 | #ifdef ENAB |
| 121 | #ifdef ENAB |
| 122 | #ifdef ENAB |
| 123 | #ifdef ENAB |
| 124 | #ifdef ENAB |
| 125 | #ifdef ENAB |
| 126 | #ifdef ENAB |
| 127 | #ifdef ENAB |
| 128 | #ifdef ENAB |
| 129 | def ifdef_enabled6 : C; |
| 130 | #endif |
| 131 | #endif |
| 132 | #endif |
| 133 | #endif |
| 134 | #else |
| 135 | def ifdef_enabled6_else : C; |
| 136 | #endif |
| 137 | #endif |
| 138 | #endif |
| 139 | #endif |
| 140 | #endif |
| 141 | #endif |
| 142 | #endif |
| 143 | |
| 144 | #ifdef DISABLED_7 |
| 145 | include "non-existent-file.inc" |
| 146 | #endif |
| 147 | |
| 148 | #ifdef DISABLED_8 |
| 149 | \\\\\ invalid TD text ///// |
| 150 | #endif // DISABLED_8 |