Lines Matching refs:Triple
18 Triple T; in TEST()
20 T = Triple(""); in TEST()
26 T = Triple("-"); in TEST()
32 T = Triple("--"); in TEST()
38 T = Triple("---"); in TEST()
44 T = Triple("----"); in TEST()
50 T = Triple("a"); in TEST()
56 T = Triple("a-b"); in TEST()
62 T = Triple("a-b-c"); in TEST()
68 T = Triple("a-b-c-d"); in TEST()
76 Triple T; in TEST()
78 T = Triple("i386-apple-darwin"); in TEST()
79 EXPECT_EQ(Triple::x86, T.getArch()); in TEST()
80 EXPECT_EQ(Triple::Apple, T.getVendor()); in TEST()
81 EXPECT_EQ(Triple::Darwin, T.getOS()); in TEST()
82 EXPECT_EQ(Triple::UnknownEnvironment, T.getEnvironment()); in TEST()
84 T = Triple("x86_64-pc-linux-gnu"); in TEST()
85 EXPECT_EQ(Triple::x86_64, T.getArch()); in TEST()
86 EXPECT_EQ(Triple::PC, T.getVendor()); in TEST()
87 EXPECT_EQ(Triple::Linux, T.getOS()); in TEST()
88 EXPECT_EQ(Triple::GNU, T.getEnvironment()); in TEST()
90 T = Triple("powerpc-bgp-linux"); in TEST()
91 EXPECT_EQ(Triple::ppc, T.getArch()); in TEST()
92 EXPECT_EQ(Triple::BGP, T.getVendor()); in TEST()
93 EXPECT_EQ(Triple::Linux, T.getOS()); in TEST()
94 EXPECT_EQ(Triple::UnknownEnvironment, T.getEnvironment()); in TEST()
96 T = Triple("powerpc-bgp-cnk"); in TEST()
97 EXPECT_EQ(Triple::ppc, T.getArch()); in TEST()
98 EXPECT_EQ(Triple::BGP, T.getVendor()); in TEST()
99 EXPECT_EQ(Triple::CNK, T.getOS()); in TEST()
100 EXPECT_EQ(Triple::UnknownEnvironment, T.getEnvironment()); in TEST()
102 T = Triple("powerpc64-bgq-linux"); in TEST()
103 EXPECT_EQ(Triple::ppc64, T.getArch()); in TEST()
104 EXPECT_EQ(Triple::BGQ, T.getVendor()); in TEST()
105 EXPECT_EQ(Triple::Linux, T.getOS()); in TEST()
106 EXPECT_EQ(Triple::UnknownEnvironment, T.getEnvironment()); in TEST()
108 T = Triple("powerpc-ibm-aix"); in TEST()
109 EXPECT_EQ(Triple::ppc, T.getArch()); in TEST()
110 EXPECT_EQ(Triple::IBM, T.getVendor()); in TEST()
111 EXPECT_EQ(Triple::AIX, T.getOS()); in TEST()
112 EXPECT_EQ(Triple::UnknownEnvironment, T.getEnvironment()); in TEST()
114 T = Triple("powerpc64-ibm-aix"); in TEST()
115 EXPECT_EQ(Triple::ppc64, T.getArch()); in TEST()
116 EXPECT_EQ(Triple::IBM, T.getVendor()); in TEST()
117 EXPECT_EQ(Triple::AIX, T.getOS()); in TEST()
118 EXPECT_EQ(Triple::UnknownEnvironment, T.getEnvironment()); in TEST()
120 T = Triple("powerpc-dunno-notsure"); in TEST()
121 EXPECT_EQ(Triple::ppc, T.getArch()); in TEST()
122 EXPECT_EQ(Triple::UnknownVendor, T.getVendor()); in TEST()
123 EXPECT_EQ(Triple::UnknownOS, T.getOS()); in TEST()
124 EXPECT_EQ(Triple::UnknownEnvironment, T.getEnvironment()); in TEST()
126 T = Triple("arm-none-none-eabi"); in TEST()
127 EXPECT_EQ(Triple::arm, T.getArch()); in TEST()
128 EXPECT_EQ(Triple::UnknownVendor, T.getVendor()); in TEST()
129 EXPECT_EQ(Triple::UnknownOS, T.getOS()); in TEST()
130 EXPECT_EQ(Triple::EABI, T.getEnvironment()); in TEST()
132 T = Triple("amdil-unknown-unknown"); in TEST()
133 EXPECT_EQ(Triple::amdil, T.getArch()); in TEST()
134 EXPECT_EQ(Triple::UnknownVendor, T.getVendor()); in TEST()
135 EXPECT_EQ(Triple::UnknownOS, T.getOS()); in TEST()
137 T = Triple("amdil64-unknown-unknown"); in TEST()
138 EXPECT_EQ(Triple::amdil64, T.getArch()); in TEST()
139 EXPECT_EQ(Triple::UnknownVendor, T.getVendor()); in TEST()
140 EXPECT_EQ(Triple::UnknownOS, T.getOS()); in TEST()
142 T = Triple("hsail-unknown-unknown"); in TEST()
143 EXPECT_EQ(Triple::hsail, T.getArch()); in TEST()
144 EXPECT_EQ(Triple::UnknownVendor, T.getVendor()); in TEST()
145 EXPECT_EQ(Triple::UnknownOS, T.getOS()); in TEST()
147 T = Triple("hsail64-unknown-unknown"); in TEST()
148 EXPECT_EQ(Triple::hsail64, T.getArch()); in TEST()
149 EXPECT_EQ(Triple::UnknownVendor, T.getVendor()); in TEST()
150 EXPECT_EQ(Triple::UnknownOS, T.getOS()); in TEST()
152 T = Triple("spir-unknown-unknown"); in TEST()
153 EXPECT_EQ(Triple::spir, T.getArch()); in TEST()
154 EXPECT_EQ(Triple::UnknownVendor, T.getVendor()); in TEST()
155 EXPECT_EQ(Triple::UnknownOS, T.getOS()); in TEST()
157 T = Triple("spir64-unknown-unknown"); in TEST()
158 EXPECT_EQ(Triple::spir64, T.getArch()); in TEST()
159 EXPECT_EQ(Triple::UnknownVendor, T.getVendor()); in TEST()
160 EXPECT_EQ(Triple::UnknownOS, T.getOS()); in TEST()
162 T = Triple("x86_64-unknown-cloudabi"); in TEST()
163 EXPECT_EQ(Triple::x86_64, T.getArch()); in TEST()
164 EXPECT_EQ(Triple::UnknownVendor, T.getVendor()); in TEST()
165 EXPECT_EQ(Triple::CloudABI, T.getOS()); in TEST()
166 EXPECT_EQ(Triple::UnknownEnvironment, T.getEnvironment()); in TEST()
168 T = Triple("huh"); in TEST()
169 EXPECT_EQ(Triple::UnknownArch, T.getArch()); in TEST()
184 EXPECT_EQ("", Triple::normalize("")); in TEST()
185 EXPECT_EQ("-", Triple::normalize("-")); in TEST()
186 EXPECT_EQ("--", Triple::normalize("--")); in TEST()
187 EXPECT_EQ("---", Triple::normalize("---")); in TEST()
188 EXPECT_EQ("----", Triple::normalize("----")); in TEST()
190 EXPECT_EQ("a", Triple::normalize("a")); in TEST()
191 EXPECT_EQ("a-b", Triple::normalize("a-b")); in TEST()
192 EXPECT_EQ("a-b-c", Triple::normalize("a-b-c")); in TEST()
193 EXPECT_EQ("a-b-c-d", Triple::normalize("a-b-c-d")); in TEST()
195 EXPECT_EQ("i386-b-c", Triple::normalize("i386-b-c")); in TEST()
196 EXPECT_EQ("i386-a-c", Triple::normalize("a-i386-c")); in TEST()
197 EXPECT_EQ("i386-a-b", Triple::normalize("a-b-i386")); in TEST()
198 EXPECT_EQ("i386-a-b-c", Triple::normalize("a-b-c-i386")); in TEST()
200 EXPECT_EQ("a-pc-c", Triple::normalize("a-pc-c")); in TEST()
201 EXPECT_EQ("-pc-b-c", Triple::normalize("pc-b-c")); in TEST()
202 EXPECT_EQ("a-pc-b", Triple::normalize("a-b-pc")); in TEST()
203 EXPECT_EQ("a-pc-b-c", Triple::normalize("a-b-c-pc")); in TEST()
205 EXPECT_EQ("a-b-linux", Triple::normalize("a-b-linux")); in TEST()
206 EXPECT_EQ("--linux-b-c", Triple::normalize("linux-b-c")); in TEST()
207 EXPECT_EQ("a--linux-c", Triple::normalize("a-linux-c")); in TEST()
209 EXPECT_EQ("i386-pc-a", Triple::normalize("a-pc-i386")); in TEST()
210 EXPECT_EQ("i386-pc-", Triple::normalize("-pc-i386")); in TEST()
211 EXPECT_EQ("-pc-linux-c", Triple::normalize("linux-pc-c")); in TEST()
212 EXPECT_EQ("-pc-linux", Triple::normalize("linux-pc-")); in TEST()
214 EXPECT_EQ("i386", Triple::normalize("i386")); in TEST()
215 EXPECT_EQ("-pc", Triple::normalize("pc")); in TEST()
216 EXPECT_EQ("--linux", Triple::normalize("linux")); in TEST()
218 EXPECT_EQ("x86_64--linux-gnu", Triple::normalize("x86_64-gnu-linux")); in TEST()
223 for (int Arch = 1+Triple::UnknownArch; Arch <= Triple::amdil; ++Arch) { in TEST()
224 C[0] = Triple::getArchTypeName(Triple::ArchType(Arch)); in TEST()
225 for (int Vendor = 1+Triple::UnknownVendor; Vendor <= Triple::PC; in TEST()
227 C[1] = Triple::getVendorTypeName(Triple::VendorType(Vendor)); in TEST()
228 for (int OS = 1+Triple::UnknownOS; OS <= Triple::Minix; ++OS) { in TEST()
229 if (OS == Triple::Win32) in TEST()
232 C[2] = Triple::getOSTypeName(Triple::OSType(OS)); in TEST()
235 EXPECT_EQ(E, Triple::normalize(Join(C[0], C[1], C[2]))); in TEST()
237 EXPECT_EQ(E, Triple::normalize(Join(C[0], C[2], C[1]))); in TEST()
238 EXPECT_EQ(E, Triple::normalize(Join(C[1], C[2], C[0]))); in TEST()
239 EXPECT_EQ(E, Triple::normalize(Join(C[1], C[0], C[2]))); in TEST()
240 EXPECT_EQ(E, Triple::normalize(Join(C[2], C[0], C[1]))); in TEST()
241 EXPECT_EQ(E, Triple::normalize(Join(C[2], C[1], C[0]))); in TEST()
243 for (int Env = 1 + Triple::UnknownEnvironment; Env <= Triple::Android; in TEST()
245 C[3] = Triple::getEnvironmentTypeName(Triple::EnvironmentType(Env)); in TEST()
248 EXPECT_EQ(F, Triple::normalize(Join(C[0], C[1], C[2], C[3]))); in TEST()
250 EXPECT_EQ(F, Triple::normalize(Join(C[0], C[1], C[3], C[2]))); in TEST()
251 EXPECT_EQ(F, Triple::normalize(Join(C[0], C[2], C[3], C[1]))); in TEST()
252 EXPECT_EQ(F, Triple::normalize(Join(C[0], C[2], C[1], C[3]))); in TEST()
253 EXPECT_EQ(F, Triple::normalize(Join(C[0], C[3], C[1], C[2]))); in TEST()
254 EXPECT_EQ(F, Triple::normalize(Join(C[0], C[3], C[2], C[1]))); in TEST()
255 EXPECT_EQ(F, Triple::normalize(Join(C[1], C[2], C[3], C[0]))); in TEST()
256 EXPECT_EQ(F, Triple::normalize(Join(C[1], C[2], C[0], C[3]))); in TEST()
257 EXPECT_EQ(F, Triple::normalize(Join(C[1], C[3], C[0], C[2]))); in TEST()
258 EXPECT_EQ(F, Triple::normalize(Join(C[1], C[3], C[2], C[0]))); in TEST()
259 EXPECT_EQ(F, Triple::normalize(Join(C[1], C[0], C[2], C[3]))); in TEST()
260 EXPECT_EQ(F, Triple::normalize(Join(C[1], C[0], C[3], C[2]))); in TEST()
261 EXPECT_EQ(F, Triple::normalize(Join(C[2], C[3], C[0], C[1]))); in TEST()
262 EXPECT_EQ(F, Triple::normalize(Join(C[2], C[3], C[1], C[0]))); in TEST()
263 EXPECT_EQ(F, Triple::normalize(Join(C[2], C[0], C[1], C[3]))); in TEST()
264 EXPECT_EQ(F, Triple::normalize(Join(C[2], C[0], C[3], C[1]))); in TEST()
265 EXPECT_EQ(F, Triple::normalize(Join(C[2], C[1], C[3], C[0]))); in TEST()
266 EXPECT_EQ(F, Triple::normalize(Join(C[2], C[1], C[0], C[3]))); in TEST()
267 EXPECT_EQ(F, Triple::normalize(Join(C[3], C[0], C[1], C[2]))); in TEST()
268 EXPECT_EQ(F, Triple::normalize(Join(C[3], C[0], C[2], C[1]))); in TEST()
269 EXPECT_EQ(F, Triple::normalize(Join(C[3], C[1], C[2], C[0]))); in TEST()
270 EXPECT_EQ(F, Triple::normalize(Join(C[3], C[1], C[0], C[2]))); in TEST()
271 EXPECT_EQ(F, Triple::normalize(Join(C[3], C[2], C[0], C[1]))); in TEST()
272 EXPECT_EQ(F, Triple::normalize(Join(C[3], C[2], C[1], C[0]))); in TEST()
280 EXPECT_EQ("i386--windows-gnu", Triple::normalize("i386-mingw32")); // i386-pc-mingw32 in TEST()
281 EXPECT_EQ("x86_64--linux-gnu", Triple::normalize("x86_64-linux-gnu")); // x86_64-pc-linux-gnu in TEST()
282 EXPECT_EQ("i486--linux-gnu", Triple::normalize("i486-linux-gnu")); // i486-pc-linux-gnu in TEST()
283 EXPECT_EQ("i386-redhat-linux", Triple::normalize("i386-redhat-linux")); // i386-redhat-linux-gnu in TEST()
284 EXPECT_EQ("i686--linux", Triple::normalize("i686-linux")); // i686-pc-linux-gnu in TEST()
285 EXPECT_EQ("arm-none--eabi", Triple::normalize("arm-none-eabi")); // arm-none-eabi in TEST()
289 Triple T; in TEST()
290 EXPECT_EQ(Triple::UnknownArch, T.getArch()); in TEST()
291 EXPECT_EQ(Triple::UnknownVendor, T.getVendor()); in TEST()
292 EXPECT_EQ(Triple::UnknownOS, T.getOS()); in TEST()
293 EXPECT_EQ(Triple::UnknownEnvironment, T.getEnvironment()); in TEST()
296 EXPECT_EQ(Triple::x86, T.getArch()); in TEST()
300 EXPECT_EQ(Triple::x86, T.getArch()); in TEST()
301 EXPECT_EQ(Triple::PC, T.getVendor()); in TEST()
305 EXPECT_EQ(Triple::x86, T.getArch()); in TEST()
306 EXPECT_EQ(Triple::PC, T.getVendor()); in TEST()
307 EXPECT_EQ(Triple::Linux, T.getOS()); in TEST()
311 EXPECT_EQ(Triple::x86, T.getArch()); in TEST()
312 EXPECT_EQ(Triple::PC, T.getVendor()); in TEST()
313 EXPECT_EQ(Triple::Linux, T.getOS()); in TEST()
317 EXPECT_EQ(Triple::x86, T.getArch()); in TEST()
318 EXPECT_EQ(Triple::PC, T.getVendor()); in TEST()
319 EXPECT_EQ(Triple::FreeBSD, T.getOS()); in TEST()
323 EXPECT_EQ(Triple::x86, T.getArch()); in TEST()
324 EXPECT_EQ(Triple::PC, T.getVendor()); in TEST()
325 EXPECT_EQ(Triple::Darwin, T.getOS()); in TEST()
331 Triple T; in TEST()
336 T.setArch(Triple::arm); in TEST()
341 T.setArch(Triple::hexagon); in TEST()
346 T.setArch(Triple::mips); in TEST()
351 T.setArch(Triple::mips64); in TEST()
356 T.setArch(Triple::msp430); in TEST()
361 T.setArch(Triple::ppc); in TEST()
366 T.setArch(Triple::ppc64); in TEST()
371 T.setArch(Triple::x86); in TEST()
376 T.setArch(Triple::x86_64); in TEST()
381 T.setArch(Triple::amdil); in TEST()
386 T.setArch(Triple::amdil64); in TEST()
391 T.setArch(Triple::hsail); in TEST()
396 T.setArch(Triple::hsail64); in TEST()
401 T.setArch(Triple::spir); in TEST()
406 T.setArch(Triple::spir64); in TEST()
413 Triple T; in TEST()
414 EXPECT_EQ(Triple::UnknownArch, T.get32BitArchVariant().getArch()); in TEST()
415 EXPECT_EQ(Triple::UnknownArch, T.get64BitArchVariant().getArch()); in TEST()
417 T.setArch(Triple::UnknownArch); in TEST()
418 EXPECT_EQ(Triple::UnknownArch, T.get32BitArchVariant().getArch()); in TEST()
419 EXPECT_EQ(Triple::UnknownArch, T.get64BitArchVariant().getArch()); in TEST()
421 T.setArch(Triple::mips); in TEST()
422 EXPECT_EQ(Triple::mips, T.get32BitArchVariant().getArch()); in TEST()
423 EXPECT_EQ(Triple::mips64, T.get64BitArchVariant().getArch()); in TEST()
425 T.setArch(Triple::mipsel); in TEST()
426 EXPECT_EQ(Triple::mipsel, T.get32BitArchVariant().getArch()); in TEST()
427 EXPECT_EQ(Triple::mips64el, T.get64BitArchVariant().getArch()); in TEST()
429 T.setArch(Triple::ppc); in TEST()
430 EXPECT_EQ(Triple::ppc, T.get32BitArchVariant().getArch()); in TEST()
431 EXPECT_EQ(Triple::ppc64, T.get64BitArchVariant().getArch()); in TEST()
433 T.setArch(Triple::nvptx); in TEST()
434 EXPECT_EQ(Triple::nvptx, T.get32BitArchVariant().getArch()); in TEST()
435 EXPECT_EQ(Triple::nvptx64, T.get64BitArchVariant().getArch()); in TEST()
437 T.setArch(Triple::sparc); in TEST()
438 EXPECT_EQ(Triple::sparc, T.get32BitArchVariant().getArch()); in TEST()
439 EXPECT_EQ(Triple::sparcv9, T.get64BitArchVariant().getArch()); in TEST()
441 T.setArch(Triple::x86); in TEST()
442 EXPECT_EQ(Triple::x86, T.get32BitArchVariant().getArch()); in TEST()
443 EXPECT_EQ(Triple::x86_64, T.get64BitArchVariant().getArch()); in TEST()
445 T.setArch(Triple::mips64); in TEST()
446 EXPECT_EQ(Triple::mips, T.get32BitArchVariant().getArch()); in TEST()
447 EXPECT_EQ(Triple::mips64, T.get64BitArchVariant().getArch()); in TEST()
449 T.setArch(Triple::mips64el); in TEST()
450 EXPECT_EQ(Triple::mipsel, T.get32BitArchVariant().getArch()); in TEST()
451 EXPECT_EQ(Triple::mips64el, T.get64BitArchVariant().getArch()); in TEST()
453 T.setArch(Triple::ppc64); in TEST()
454 EXPECT_EQ(Triple::ppc, T.get32BitArchVariant().getArch()); in TEST()
455 EXPECT_EQ(Triple::ppc64, T.get64BitArchVariant().getArch()); in TEST()
457 T.setArch(Triple::nvptx64); in TEST()
458 EXPECT_EQ(Triple::nvptx, T.get32BitArchVariant().getArch()); in TEST()
459 EXPECT_EQ(Triple::nvptx64, T.get64BitArchVariant().getArch()); in TEST()
461 T.setArch(Triple::sparcv9); in TEST()
462 EXPECT_EQ(Triple::sparc, T.get32BitArchVariant().getArch()); in TEST()
463 EXPECT_EQ(Triple::sparcv9, T.get64BitArchVariant().getArch()); in TEST()
465 T.setArch(Triple::x86_64); in TEST()
466 EXPECT_EQ(Triple::x86, T.get32BitArchVariant().getArch()); in TEST()
467 EXPECT_EQ(Triple::x86_64, T.get64BitArchVariant().getArch()); in TEST()
469 T.setArch(Triple::amdil); in TEST()
470 EXPECT_EQ(Triple::amdil, T.get32BitArchVariant().getArch()); in TEST()
471 EXPECT_EQ(Triple::amdil64, T.get64BitArchVariant().getArch()); in TEST()
473 T.setArch(Triple::amdil64); in TEST()
474 EXPECT_EQ(Triple::amdil, T.get32BitArchVariant().getArch()); in TEST()
475 EXPECT_EQ(Triple::amdil64, T.get64BitArchVariant().getArch()); in TEST()
477 T.setArch(Triple::hsail); in TEST()
478 EXPECT_EQ(Triple::hsail, T.get32BitArchVariant().getArch()); in TEST()
479 EXPECT_EQ(Triple::hsail64, T.get64BitArchVariant().getArch()); in TEST()
481 T.setArch(Triple::hsail64); in TEST()
482 EXPECT_EQ(Triple::hsail, T.get32BitArchVariant().getArch()); in TEST()
483 EXPECT_EQ(Triple::hsail64, T.get64BitArchVariant().getArch()); in TEST()
485 T.setArch(Triple::spir); in TEST()
486 EXPECT_EQ(Triple::spir, T.get32BitArchVariant().getArch()); in TEST()
487 EXPECT_EQ(Triple::spir64, T.get64BitArchVariant().getArch()); in TEST()
489 T.setArch(Triple::spir64); in TEST()
490 EXPECT_EQ(Triple::spir, T.get32BitArchVariant().getArch()); in TEST()
491 EXPECT_EQ(Triple::spir64, T.get64BitArchVariant().getArch()); in TEST()
495 Triple T; in TEST()
498 T = Triple("i386-apple-darwin9"); in TEST()
513 T = Triple("x86_64-apple-darwin9"); in TEST()
528 T = Triple("x86_64-apple-macosx"); in TEST()
543 T = Triple("x86_64-apple-macosx10.7"); in TEST()
558 T = Triple("armv7-apple-ios"); in TEST()
573 T = Triple("armv7-apple-ios7.0"); in TEST()
590 EXPECT_EQ(Triple::ELF, Triple("i686-unknown-linux-gnu").getObjectFormat()); in TEST()
591 EXPECT_EQ(Triple::ELF, Triple("i686-unknown-freebsd").getObjectFormat()); in TEST()
592 EXPECT_EQ(Triple::ELF, Triple("i686-unknown-netbsd").getObjectFormat()); in TEST()
593 EXPECT_EQ(Triple::ELF, Triple("i686--win32-elf").getObjectFormat()); in TEST()
594 EXPECT_EQ(Triple::ELF, Triple("i686---elf").getObjectFormat()); in TEST()
596 EXPECT_EQ(Triple::MachO, Triple("i686-apple-macosx").getObjectFormat()); in TEST()
597 EXPECT_EQ(Triple::MachO, Triple("i686-apple-ios").getObjectFormat()); in TEST()
598 EXPECT_EQ(Triple::MachO, Triple("i686---macho").getObjectFormat()); in TEST()
600 EXPECT_EQ(Triple::COFF, Triple("i686--win32").getObjectFormat()); in TEST()
602 EXPECT_EQ(Triple::ELF, Triple("i686-pc-windows-msvc-elf").getObjectFormat()); in TEST()
603 EXPECT_EQ(Triple::ELF, Triple("i686-pc-cygwin-elf").getObjectFormat()); in TEST()
605 Triple MSVCNormalized(Triple::normalize("i686-pc-windows-msvc-elf")); in TEST()
606 EXPECT_EQ(Triple::ELF, MSVCNormalized.getObjectFormat()); in TEST()
608 Triple GNUWindowsNormalized(Triple::normalize("i686-pc-windows-gnu-elf")); in TEST()
609 EXPECT_EQ(Triple::ELF, GNUWindowsNormalized.getObjectFormat()); in TEST()
611 Triple CygnusNormalised(Triple::normalize("i686-pc-windows-cygnus-elf")); in TEST()
612 EXPECT_EQ(Triple::ELF, CygnusNormalised.getObjectFormat()); in TEST()
614 Triple CygwinNormalized(Triple::normalize("i686-pc-cygwin-elf")); in TEST()
615 EXPECT_EQ(Triple::ELF, CygwinNormalized.getObjectFormat()); in TEST()
617 Triple T = Triple(""); in TEST()
618 T.setObjectFormat(Triple::ELF); in TEST()
619 EXPECT_EQ(Triple::ELF, T.getObjectFormat()); in TEST()
623 EXPECT_EQ("i686-pc-windows-msvc", Triple::normalize("i686-pc-win32")); in TEST()
624 EXPECT_EQ("i686--windows-msvc", Triple::normalize("i686-win32")); in TEST()
625 EXPECT_EQ("i686-pc-windows-gnu", Triple::normalize("i686-pc-mingw32")); in TEST()
626 EXPECT_EQ("i686--windows-gnu", Triple::normalize("i686-mingw32")); in TEST()
627 EXPECT_EQ("i686-pc-windows-gnu", Triple::normalize("i686-pc-mingw32-w64")); in TEST()
628 EXPECT_EQ("i686--windows-gnu", Triple::normalize("i686-mingw32-w64")); in TEST()
629 EXPECT_EQ("i686-pc-windows-cygnus", Triple::normalize("i686-pc-cygwin")); in TEST()
630 EXPECT_EQ("i686--windows-cygnus", Triple::normalize("i686-cygwin")); in TEST()
632 EXPECT_EQ("x86_64-pc-windows-msvc", Triple::normalize("x86_64-pc-win32")); in TEST()
633 EXPECT_EQ("x86_64--windows-msvc", Triple::normalize("x86_64-win32")); in TEST()
634 EXPECT_EQ("x86_64-pc-windows-gnu", Triple::normalize("x86_64-pc-mingw32")); in TEST()
635 EXPECT_EQ("x86_64--windows-gnu", Triple::normalize("x86_64-mingw32")); in TEST()
636 EXPECT_EQ("x86_64-pc-windows-gnu", Triple::normalize("x86_64-pc-mingw32-w64")); in TEST()
637 EXPECT_EQ("x86_64--windows-gnu", Triple::normalize("x86_64-mingw32-w64")); in TEST()
639 EXPECT_EQ("i686-pc-windows-elf", Triple::normalize("i686-pc-win32-elf")); in TEST()
640 EXPECT_EQ("i686--windows-elf", Triple::normalize("i686-win32-elf")); in TEST()
641 EXPECT_EQ("i686-pc-windows-macho", Triple::normalize("i686-pc-win32-macho")); in TEST()
642 EXPECT_EQ("i686--windows-macho", Triple::normalize("i686-win32-macho")); in TEST()
644 EXPECT_EQ("x86_64-pc-windows-elf", Triple::normalize("x86_64-pc-win32-elf")); in TEST()
645 EXPECT_EQ("x86_64--windows-elf", Triple::normalize("x86_64-win32-elf")); in TEST()
646 EXPECT_EQ("x86_64-pc-windows-macho", Triple::normalize("x86_64-pc-win32-macho")); in TEST()
647 EXPECT_EQ("x86_64--windows-macho", Triple::normalize("x86_64-win32-macho")); in TEST()
650 Triple::normalize("i686-pc-windows-cygnus")); in TEST()
651 EXPECT_EQ("i686-pc-windows-gnu", Triple::normalize("i686-pc-windows-gnu")); in TEST()
652 EXPECT_EQ("i686-pc-windows-itanium", Triple::normalize("i686-pc-windows-itanium")); in TEST()
653 EXPECT_EQ("i686-pc-windows-msvc", Triple::normalize("i686-pc-windows-msvc")); in TEST()
655 EXPECT_EQ("i686-pc-windows-elf", Triple::normalize("i686-pc-windows-elf-elf")); in TEST()
660 llvm::Triple Triple("armv6-unknown-freebsd"); in TEST() local
661 EXPECT_STREQ("arm1176jzf-s", Triple.getARMCPUForArch()); in TEST()
664 llvm::Triple Triple("armv7s-apple-ios7"); in TEST() local
665 EXPECT_STREQ("swift", Triple.getARMCPUForArch()); in TEST()
668 llvm::Triple Triple("armv7-apple-ios7"); in TEST() local
669 EXPECT_STREQ("cortex-a8", Triple.getARMCPUForArch()); in TEST()
670 EXPECT_STREQ("swift", Triple.getARMCPUForArch("armv7s")); in TEST()
673 llvm::Triple Triple("arm--nacl"); in TEST() local
674 EXPECT_STREQ("cortex-a8", Triple.getARMCPUForArch("arm")); in TEST()
680 EXPECT_EQ("armv6--netbsd-eabi", Triple::normalize("armv6-netbsd-eabi")); in TEST()
681 EXPECT_EQ("armv7--netbsd-eabi", Triple::normalize("armv7-netbsd-eabi")); in TEST()
682 EXPECT_EQ("armv6eb--netbsd-eabi", Triple::normalize("armv6eb-netbsd-eabi")); in TEST()
683 EXPECT_EQ("armv7eb--netbsd-eabi", Triple::normalize("armv7eb-netbsd-eabi")); in TEST()
684 EXPECT_EQ("armv6--netbsd-eabihf", Triple::normalize("armv6-netbsd-eabihf")); in TEST()
685 EXPECT_EQ("armv7--netbsd-eabihf", Triple::normalize("armv7-netbsd-eabihf")); in TEST()
686 EXPECT_EQ("armv6eb--netbsd-eabihf", Triple::normalize("armv6eb-netbsd-eabihf")); in TEST()
687 EXPECT_EQ("armv7eb--netbsd-eabihf", Triple::normalize("armv7eb-netbsd-eabihf")); in TEST()
689 Triple T; in TEST()
690 T = Triple("armv6--netbsd-eabi"); in TEST()
691 EXPECT_EQ(Triple::arm, T.getArch()); in TEST()
692 T = Triple("armv6eb--netbsd-eabi"); in TEST()
693 EXPECT_EQ(Triple::armeb, T.getArch()); in TEST()