• Home
  • Raw
  • Download

Lines Matching +full:windows +full:- +full:gnu +full:- +full:test

1 //===----------- Triple.cpp - Triple unit tests ---------------------------===//
8 //===----------------------------------------------------------------------===//
17 TEST(TripleTest, BasicParsing) { in TEST() function
26 T = Triple("-"); in TEST()
32 T = Triple("--"); in TEST()
38 T = Triple("---"); in TEST()
44 T = Triple("----"); in TEST()
48 EXPECT_EQ("-", T.getEnvironmentName().str()); 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()
75 TEST(TripleTest, ParsedIDs) { in TEST() function
78 T = Triple("i386-apple-darwin"); in TEST()
84 T = Triple("i386-pc-elfiamcu"); in TEST()
90 T = Triple("x86_64-pc-linux-gnu"); in TEST()
94 EXPECT_EQ(Triple::GNU, T.getEnvironment()); in TEST()
96 T = Triple("x86_64-pc-linux-musl"); in TEST()
102 T = Triple("powerpc-bgp-linux"); in TEST()
108 T = Triple("powerpc-bgp-cnk"); in TEST()
114 T = Triple("powerpc64-bgq-linux"); in TEST()
120 T = Triple("powerpc-ibm-aix"); in TEST()
126 T = Triple("powerpc64-ibm-aix"); in TEST()
132 T = Triple("powerpc-dunno-notsure"); in TEST()
138 T = Triple("arm-none-none-eabi"); in TEST()
144 T = Triple("arm-none-linux-musleabi"); in TEST()
150 T = Triple("armv6hl-none-linux-gnueabi"); in TEST()
156 T = Triple("armv7hl-none-linux-gnueabi"); in TEST()
162 T = Triple("amdil-unknown-unknown"); in TEST()
167 T = Triple("amdil64-unknown-unknown"); in TEST()
172 T = Triple("hsail-unknown-unknown"); in TEST()
177 T = Triple("hsail64-unknown-unknown"); in TEST()
182 T = Triple("sparcel-unknown-unknown"); in TEST()
187 T = Triple("spir-unknown-unknown"); in TEST()
192 T = Triple("spir64-unknown-unknown"); in TEST()
197 T = Triple("x86_64-unknown-cloudabi"); in TEST()
203 T = Triple("wasm32-unknown-unknown"); in TEST()
209 T = Triple("wasm64-unknown-unknown"); in TEST()
215 T = Triple("avr-unknown-unknown"); in TEST()
227 T = Triple("lanai-unknown-unknown"); in TEST()
239 T = Triple("amdgcn-mesa-mesa3d"); in TEST()
245 T = Triple("amdgcn-amd-amdhsa"); in TEST()
256 std::string Str = A; Str += '-'; Str += B; Str += '-'; Str += C; in Join()
261 std::string Str = A; Str += '-'; Str += B; Str += '-'; Str += C; Str += '-'; in Join()
265 TEST(TripleTest, Normalization) { in TEST() function
268 EXPECT_EQ("-", Triple::normalize("-")); in TEST()
269 EXPECT_EQ("--", Triple::normalize("--")); in TEST()
270 EXPECT_EQ("---", Triple::normalize("---")); in TEST()
271 EXPECT_EQ("----", Triple::normalize("----")); in TEST()
274 EXPECT_EQ("a-b", Triple::normalize("a-b")); in TEST()
275 EXPECT_EQ("a-b-c", Triple::normalize("a-b-c")); in TEST()
276 EXPECT_EQ("a-b-c-d", Triple::normalize("a-b-c-d")); in TEST()
278 EXPECT_EQ("i386-b-c", Triple::normalize("i386-b-c")); in TEST()
279 EXPECT_EQ("i386-a-c", Triple::normalize("a-i386-c")); in TEST()
280 EXPECT_EQ("i386-a-b", Triple::normalize("a-b-i386")); in TEST()
281 EXPECT_EQ("i386-a-b-c", Triple::normalize("a-b-c-i386")); in TEST()
283 EXPECT_EQ("a-pc-c", Triple::normalize("a-pc-c")); in TEST()
284 EXPECT_EQ("-pc-b-c", Triple::normalize("pc-b-c")); in TEST()
285 EXPECT_EQ("a-pc-b", Triple::normalize("a-b-pc")); in TEST()
286 EXPECT_EQ("a-pc-b-c", Triple::normalize("a-b-c-pc")); in TEST()
288 EXPECT_EQ("a-b-linux", Triple::normalize("a-b-linux")); in TEST()
289 EXPECT_EQ("--linux-b-c", Triple::normalize("linux-b-c")); in TEST()
290 EXPECT_EQ("a--linux-c", Triple::normalize("a-linux-c")); in TEST()
292 EXPECT_EQ("i386-pc-a", Triple::normalize("a-pc-i386")); in TEST()
293 EXPECT_EQ("i386-pc-", Triple::normalize("-pc-i386")); in TEST()
294 EXPECT_EQ("-pc-linux-c", Triple::normalize("linux-pc-c")); in TEST()
295 EXPECT_EQ("-pc-linux", Triple::normalize("linux-pc-")); in TEST()
298 EXPECT_EQ("-pc", Triple::normalize("pc")); in TEST()
299 EXPECT_EQ("--linux", Triple::normalize("linux")); in TEST()
301 EXPECT_EQ("x86_64--linux-gnu", Triple::normalize("x86_64-gnu-linux")); in TEST()
361 // Various real-world funky triples. The value returned by GCC's config.sub in TEST()
363 EXPECT_EQ("i386--windows-gnu", Triple::normalize("i386-mingw32")); // i386-pc-mingw32 in TEST()
364 EXPECT_EQ("x86_64--linux-gnu", Triple::normalize("x86_64-linux-gnu")); // x86_64-pc-linux-gnu in TEST()
365 EXPECT_EQ("i486--linux-gnu", Triple::normalize("i486-linux-gnu")); // i486-pc-linux-gnu in TEST()
366 EXPECT_EQ("i386-redhat-linux", Triple::normalize("i386-redhat-linux")); // i386-redhat-linux-gnu in TEST()
367 EXPECT_EQ("i686--linux", Triple::normalize("i686-linux")); // i686-pc-linux-gnu in TEST()
368 EXPECT_EQ("arm-none--eabi", Triple::normalize("arm-none-eabi")); // arm-none-eabi in TEST()
371 TEST(TripleTest, MutateName) { in TEST() function
380 EXPECT_EQ("i386--", T.getTriple()); in TEST()
385 EXPECT_EQ("i386-pc-", T.getTriple()); in TEST()
391 EXPECT_EQ("i386-pc-linux", T.getTriple()); in TEST()
393 T.setEnvironmentName("gnu"); in TEST()
397 EXPECT_EQ("i386-pc-linux-gnu", T.getTriple()); in TEST()
403 EXPECT_EQ("i386-pc-freebsd-gnu", T.getTriple()); in TEST()
409 EXPECT_EQ("i386-pc-darwin", T.getTriple()); in TEST()
415 TEST(TripleTest, BitWidthPredicates) { in TEST() function
532 TEST(TripleTest, BitWidthArchVariants) { in TEST() function
622 TEST(TripleTest, EndianArchVariants) { in TEST() function
712 TEST(TripleTest, getOSVersion) { in TEST() function
716 T = Triple("i386-apple-darwin9"); in TEST()
731 T = Triple("x86_64-apple-darwin9"); in TEST()
746 T = Triple("x86_64-apple-macosx"); in TEST()
761 T = Triple("x86_64-apple-macosx10.7"); in TEST()
776 T = Triple("armv7-apple-ios"); in TEST()
791 T = Triple("armv7-apple-ios7.0"); in TEST()
807 TEST(TripleTest, FileFormat) { in TEST() function
808 EXPECT_EQ(Triple::ELF, Triple("i686-unknown-linux-gnu").getObjectFormat()); in TEST()
809 EXPECT_EQ(Triple::ELF, Triple("i686-unknown-freebsd").getObjectFormat()); in TEST()
810 EXPECT_EQ(Triple::ELF, Triple("i686-unknown-netbsd").getObjectFormat()); in TEST()
811 EXPECT_EQ(Triple::ELF, Triple("i686--win32-elf").getObjectFormat()); in TEST()
812 EXPECT_EQ(Triple::ELF, Triple("i686---elf").getObjectFormat()); in TEST()
814 EXPECT_EQ(Triple::MachO, Triple("i686-apple-macosx").getObjectFormat()); in TEST()
815 EXPECT_EQ(Triple::MachO, Triple("i686-apple-ios").getObjectFormat()); in TEST()
816 EXPECT_EQ(Triple::MachO, Triple("i686---macho").getObjectFormat()); in TEST()
818 EXPECT_EQ(Triple::COFF, Triple("i686--win32").getObjectFormat()); in TEST()
820 EXPECT_EQ(Triple::ELF, Triple("i686-pc-windows-msvc-elf").getObjectFormat()); in TEST()
821 EXPECT_EQ(Triple::ELF, Triple("i686-pc-cygwin-elf").getObjectFormat()); in TEST()
823 Triple MSVCNormalized(Triple::normalize("i686-pc-windows-msvc-elf")); in TEST()
826 Triple GNUWindowsNormalized(Triple::normalize("i686-pc-windows-gnu-elf")); in TEST()
829 Triple CygnusNormalised(Triple::normalize("i686-pc-windows-cygnus-elf")); in TEST()
832 Triple CygwinNormalized(Triple::normalize("i686-pc-cygwin-elf")); in TEST()
840 TEST(TripleTest, NormalizeWindows) { in TEST() function
841 EXPECT_EQ("i686-pc-windows-msvc", Triple::normalize("i686-pc-win32")); in TEST()
842 EXPECT_EQ("i686--windows-msvc", Triple::normalize("i686-win32")); in TEST()
843 EXPECT_EQ("i686-pc-windows-gnu", Triple::normalize("i686-pc-mingw32")); in TEST()
844 EXPECT_EQ("i686--windows-gnu", Triple::normalize("i686-mingw32")); in TEST()
845 EXPECT_EQ("i686-pc-windows-gnu", Triple::normalize("i686-pc-mingw32-w64")); in TEST()
846 EXPECT_EQ("i686--windows-gnu", Triple::normalize("i686-mingw32-w64")); in TEST()
847 EXPECT_EQ("i686-pc-windows-cygnus", Triple::normalize("i686-pc-cygwin")); in TEST()
848 EXPECT_EQ("i686--windows-cygnus", Triple::normalize("i686-cygwin")); in TEST()
850 EXPECT_EQ("x86_64-pc-windows-msvc", Triple::normalize("x86_64-pc-win32")); in TEST()
851 EXPECT_EQ("x86_64--windows-msvc", Triple::normalize("x86_64-win32")); in TEST()
852 EXPECT_EQ("x86_64-pc-windows-gnu", Triple::normalize("x86_64-pc-mingw32")); in TEST()
853 EXPECT_EQ("x86_64--windows-gnu", Triple::normalize("x86_64-mingw32")); in TEST()
854 EXPECT_EQ("x86_64-pc-windows-gnu", Triple::normalize("x86_64-pc-mingw32-w64")); in TEST()
855 EXPECT_EQ("x86_64--windows-gnu", Triple::normalize("x86_64-mingw32-w64")); in TEST()
857 EXPECT_EQ("i686-pc-windows-elf", Triple::normalize("i686-pc-win32-elf")); in TEST()
858 EXPECT_EQ("i686--windows-elf", Triple::normalize("i686-win32-elf")); in TEST()
859 EXPECT_EQ("i686-pc-windows-macho", Triple::normalize("i686-pc-win32-macho")); in TEST()
860 EXPECT_EQ("i686--windows-macho", Triple::normalize("i686-win32-macho")); in TEST()
862 EXPECT_EQ("x86_64-pc-windows-elf", Triple::normalize("x86_64-pc-win32-elf")); in TEST()
863 EXPECT_EQ("x86_64--windows-elf", Triple::normalize("x86_64-win32-elf")); in TEST()
864 EXPECT_EQ("x86_64-pc-windows-macho", Triple::normalize("x86_64-pc-win32-macho")); in TEST()
865 EXPECT_EQ("x86_64--windows-macho", Triple::normalize("x86_64-win32-macho")); in TEST()
867 EXPECT_EQ("i686-pc-windows-cygnus", in TEST()
868 Triple::normalize("i686-pc-windows-cygnus")); in TEST()
869 EXPECT_EQ("i686-pc-windows-gnu", Triple::normalize("i686-pc-windows-gnu")); in TEST()
870 EXPECT_EQ("i686-pc-windows-itanium", Triple::normalize("i686-pc-windows-itanium")); in TEST()
871 EXPECT_EQ("i686-pc-windows-msvc", Triple::normalize("i686-pc-windows-msvc")); in TEST()
873 EXPECT_EQ("i686-pc-windows-elf", Triple::normalize("i686-pc-windows-elf-elf")); in TEST()
876 TEST(TripleTest, getARMCPUForArch) { in TEST() function
879 llvm::Triple Triple("armv4-unknown-eabi"); in TEST()
883 llvm::Triple Triple("armv4t-unknown-eabi"); in TEST()
887 llvm::Triple Triple("armv5-unknown-eabi"); in TEST()
891 llvm::Triple Triple("armv5t-unknown-eabi"); in TEST()
895 llvm::Triple Triple("armv5e-unknown-eabi"); in TEST()
899 llvm::Triple Triple("armv5tej-unknown-eabi"); in TEST()
900 EXPECT_EQ("arm926ej-s", Triple.getARMCPUForArch()); in TEST()
903 llvm::Triple Triple("armv6-unknown-eabi"); in TEST()
904 EXPECT_EQ("arm1136jf-s", Triple.getARMCPUForArch()); in TEST()
907 llvm::Triple Triple("armv6j-unknown-eabi"); in TEST()
908 EXPECT_EQ("arm1136jf-s", Triple.getARMCPUForArch()); in TEST()
911 llvm::Triple Triple("armv6k-unknown-eabi"); in TEST()
912 EXPECT_EQ("arm1176j-s", Triple.getARMCPUForArch()); in TEST()
915 llvm::Triple Triple("armv6kz-unknown-eabi"); in TEST()
916 EXPECT_EQ("arm1176jzf-s", Triple.getARMCPUForArch()); in TEST()
919 llvm::Triple Triple("armv6zk-unknown-eabi"); in TEST()
920 EXPECT_EQ("arm1176jzf-s", Triple.getARMCPUForArch()); in TEST()
923 llvm::Triple Triple("armv6t2-unknown-eabi"); in TEST()
924 EXPECT_EQ("arm1156t2-s", Triple.getARMCPUForArch()); in TEST()
927 llvm::Triple Triple("armv6m-unknown-eabi"); in TEST()
928 EXPECT_EQ("cortex-m0", Triple.getARMCPUForArch()); in TEST()
931 llvm::Triple Triple("armv7-unknown-eabi"); in TEST()
932 EXPECT_EQ("cortex-a8", Triple.getARMCPUForArch()); in TEST()
935 llvm::Triple Triple("armv7a-unknown-eabi"); in TEST()
936 EXPECT_EQ("cortex-a8", Triple.getARMCPUForArch()); in TEST()
939 llvm::Triple Triple("armv7m-unknown-eabi"); in TEST()
940 EXPECT_EQ("cortex-m3", Triple.getARMCPUForArch()); in TEST()
943 llvm::Triple Triple("armv7r-unknown-eabi"); in TEST()
944 EXPECT_EQ("cortex-r4", Triple.getARMCPUForArch()); in TEST()
947 llvm::Triple Triple("armv7r-unknown-eabi"); in TEST()
948 EXPECT_EQ("cortex-r4", Triple.getARMCPUForArch()); in TEST()
951 llvm::Triple Triple("armv7r-unknown-eabi"); in TEST()
952 EXPECT_EQ("cortex-r4", Triple.getARMCPUForArch()); in TEST()
955 llvm::Triple Triple("armv7r-unknown-eabi"); in TEST()
956 EXPECT_EQ("cortex-r4", Triple.getARMCPUForArch()); in TEST()
959 llvm::Triple Triple("armv8a-unknown-eabi"); in TEST()
960 EXPECT_EQ("cortex-a53", Triple.getARMCPUForArch()); in TEST()
963 llvm::Triple Triple("armv8.1a-unknown-eabi"); in TEST()
966 // Non-synonym names, using -march style, not default arch. in TEST()
969 EXPECT_EQ("cortex-a8", Triple.getARMCPUForArch("armv7-a")); in TEST()
973 EXPECT_EQ("cortex-m3", Triple.getARMCPUForArch("armv7-m")); in TEST()
977 EXPECT_EQ("cortex-a53", Triple.getARMCPUForArch("armv8")); in TEST()
981 EXPECT_EQ("cortex-a53", Triple.getARMCPUForArch("armv8-a")); in TEST()
985 llvm::Triple Triple("arm--nacl"); in TEST()
986 EXPECT_EQ("cortex-a8", Triple.getARMCPUForArch()); in TEST()
989 llvm::Triple Triple("armv6-unknown-freebsd"); in TEST()
990 EXPECT_EQ("arm1176jzf-s", Triple.getARMCPUForArch()); in TEST()
993 llvm::Triple Triple("thumbv6-unknown-freebsd"); in TEST()
994 EXPECT_EQ("arm1176jzf-s", Triple.getARMCPUForArch()); in TEST()
997 llvm::Triple Triple("armebv6-unknown-freebsd"); in TEST()
998 EXPECT_EQ("arm1176jzf-s", Triple.getARMCPUForArch()); in TEST()
1001 llvm::Triple Triple("arm--win32"); in TEST()
1002 EXPECT_EQ("cortex-a9", Triple.getARMCPUForArch()); in TEST()
1006 llvm::Triple Triple("xscale-unknown-eabi"); in TEST()
1010 llvm::Triple Triple("iwmmxt-unknown-eabi"); in TEST()
1014 llvm::Triple Triple("armv7s-apple-ios7"); in TEST()
1018 llvm::Triple Triple("armv7k-apple-ios9"); in TEST()
1019 EXPECT_EQ("cortex-a7", Triple.getARMCPUForArch()); in TEST()
1022 llvm::Triple Triple("armv7k-apple-watchos3"); in TEST()
1023 EXPECT_EQ("cortex-a7", Triple.getARMCPUForArch()); in TEST()
1026 llvm::Triple Triple("armv7k-apple-tvos9"); in TEST()
1027 EXPECT_EQ("cortex-a7", Triple.getARMCPUForArch()); in TEST()
1030 llvm::Triple Triple("armv7em-apple-ios7"); in TEST()
1031 EXPECT_EQ("cortex-m4", Triple.getARMCPUForArch()); in TEST()
1034 llvm::Triple Triple("armv7l-linux-gnueabihf"); in TEST()
1035 EXPECT_EQ("cortex-a8", Triple.getARMCPUForArch()); in TEST()
1038 llvm::Triple Triple("armv6sm-apple-ios7"); in TEST()
1039 EXPECT_EQ("cortex-m0", Triple.getARMCPUForArch()); in TEST()
1043 llvm::Triple Triple("armeb-none-eabi"); in TEST()
1047 llvm::Triple Triple("armebeb-none-eabi"); in TEST()
1051 llvm::Triple Triple("armebv6eb-none-eabi"); in TEST()
1056 llvm::Triple Triple("armebv6-non-eabi"); in TEST()
1057 EXPECT_EQ("arm1136jf-s", Triple.getARMCPUForArch()); in TEST()
1060 llvm::Triple Triple("armv6eb-none-eabi"); in TEST()
1061 EXPECT_EQ("arm1136jf-s", Triple.getARMCPUForArch()); in TEST()
1065 llvm::Triple Triple("xscaleeb-none-eabi"); in TEST()
1069 llvm::Triple Triple("armebxscale-none-eabi"); in TEST()
1074 TEST(TripleTest, NormalizeARM) { in TEST() function
1075 EXPECT_EQ("armv6--netbsd-eabi", Triple::normalize("armv6-netbsd-eabi")); in TEST()
1076 EXPECT_EQ("armv7--netbsd-eabi", Triple::normalize("armv7-netbsd-eabi")); in TEST()
1077 EXPECT_EQ("armv6eb--netbsd-eabi", Triple::normalize("armv6eb-netbsd-eabi")); in TEST()
1078 EXPECT_EQ("armv7eb--netbsd-eabi", Triple::normalize("armv7eb-netbsd-eabi")); in TEST()
1079 EXPECT_EQ("armv6--netbsd-eabihf", Triple::normalize("armv6-netbsd-eabihf")); in TEST()
1080 EXPECT_EQ("armv7--netbsd-eabihf", Triple::normalize("armv7-netbsd-eabihf")); in TEST()
1081 EXPECT_EQ("armv6eb--netbsd-eabihf", Triple::normalize("armv6eb-netbsd-eabihf")); in TEST()
1082 EXPECT_EQ("armv7eb--netbsd-eabihf", Triple::normalize("armv7eb-netbsd-eabihf")); in TEST()
1085 T = Triple("armv6--netbsd-eabi"); in TEST()
1087 T = Triple("armv6eb--netbsd-eabi"); in TEST()
1091 TEST(TripleTest, ParseARMArch) { in TEST() function