summaryrefslogtreecommitdiffstats
path: root/llvm/unittests/ADT/TripleTest.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* [ARM] Reject invalid -march valuesJohn Brawn2015-05-081-0/+31
| | | | | | | | | | | | | | | Restructure Triple::getARMCPUForArch so that invalid values will return nullptr, while retaining the behaviour that an argument specifying no particular architecture version will give a default CPU. This will be used by clang to give an error on invalid -march values. Also restructure the extraction of the architecture version from the MArch string a little to hopefully make what it's doing clearer. Differential Revision: http://reviews.llvm.org/D9599 llvm-svn: 236845
* Fix regression in parsing armv{6,7}hl- triples. These are used by SUSEIsmail Donmez2015-05-051-0/+12
| | | | | | | | and Redhat currently. Reviewed by Jonathan Roelofs. llvm-svn: 236492
* Move unit test into anonymous namespace as per convention.Douglas Katzman2015-05-011-1/+2
| | | | llvm-svn: 236332
* Exhaustively test all triples in TripleTest.Douglas Katzman2015-04-301-4/+4
| | | | | | | | | Iteration over all permutations didn't really work, due to evolution of the underlying enums. Differential Revision: http://reviews.llvm.org/D9057 llvm-svn: 236251
* New architecture name - 'sparcel' for Sparc little-endian.Douglas Katzman2015-04-291-0/+20
| | | | | | Differential Revision: http://reviews.llvm.org/D9263 llvm-svn: 236139
* Default to armv7 cpu for NaCl when march=armDerek Schuff2015-03-261-0/+4
| | | | | | | | | | | | | | Summary: When the arch is given as "arm" clang uses the default target CPU from LLVM to determine what the real arch should be (i.e. "arm" becomes "armv4t" because LLVM's getARMCPUForArch falls back to "arm7tdmi"). Default to "cortex-a8" so that we end up with "armv7" in clang. the nacl-direct.c test in clang also covers this case. Differential Revision: http://reviews.llvm.org/D8589 llvm-svn: 233321
* Add support for Nuxi CloudABI.Ed Schouten2015-03-091-0/+6
| | | | | | | | | | | | | | CloudABI is a POSIX-like runtime environment built around the concept of capability-based security. More details: https://github.com/NuxiNL/cloudlibc CloudABI uses its own ELFOSABI number. This number has been allocated by the maintainers of ELF a couple of days ago. Reviewed by: echristo llvm-svn: 231681
* The canonical CPU variant for ARM according to config.guess uses aJoerg Sonnenberger2015-01-261-0/+17
| | | | | | | | | | | | | | | | suffix it seems: # ./config.guess earmv7hfeb-unknown-netbsd7.99.4 Extend the triple parsing to support this. Avoid running the ARM parser multiple times because StringSwitch is not lazy. Reviewers: Renato Golin, Tim Northover Differential Revision: http://reviews.llvm.org/D7166 llvm-svn: 227085
* Add hsail and amdil64 to TripleMatt Arsenault2014-09-191-0/+84
| | | | llvm-svn: 218142
* Add unit test for r217454Ed Maste2014-09-151-0/+4
| | | | llvm-svn: 217786
* ADT: remove MinGW32 and Cygwin OSType enumSaleem Abdulrasool2014-08-091-1/+1
| | | | | | | | | | | Remove the MinGW32 and Cygwin types from the OSType enumeration. These values are represented via environments of Windows. It is a source of confusion and needlessly clutters the code. The cost of doing this is that we must sink the check for them into the normalization code path along with the spelling. Addresses PR20592. llvm-svn: 215303
* Move the API and implementation of clang::driver::getARMCPUForMArch() to ↵Argyrios Kyrtzidis2014-07-111-0/+12
| | | | | | | | llvm::Triple::getARMCPUForArch(). Suggested by Eric Christopher. llvm-svn: 212846
* Support: generalise object type handling for WindowsSaleem Abdulrasool2014-03-311-5/+17
| | | | | | | | | This generalises the object file type parsing to all Windows environments. This is used by cygwin as well as MSVC environments for MCJIT. This also makes the triple more similar to Chandler's suggestion of a separate field for the object file format. llvm-svn: 205219
* ARM64: remove -m32/-m64 mapping with ARM.Tim Northover2014-03-301-4/+0
| | | | | | | This is causing the ARM build-bots to fail since they only include the ARM backend and can't create an ARM64 target. llvm-svn: 205132
* Support: correct Windows normalisationSaleem Abdulrasool2014-03-301-0/+9
| | | | | | | | | | | | | If the environment is unknown and no object file is provided, then assume an "MSVC" environment, otherwise, set the environment to the object file format. In the case that we have a known environment but a non-native file format for Windows (COFF) which is used for MCJIT, then append the custom file format to the triple as an additional component. This fixes the MCJIT tests on Windows. llvm-svn: 205130
* ARM64: initial backend importTim Northover2014-03-291-1/+1
| | | | | | | | | | | | This adds a second implementation of the AArch64 architecture to LLVM, accessible in parallel via the "arm64" triple. The plan over the coming weeks & months is to merge the two into a single backend, during which time thorough code review should naturally occur. Everything will be easier with the target in-tree though, hence this commit. llvm-svn: 205090
* Canonicalise Windows target triple spellingsSaleem Abdulrasool2014-03-271-1/+33
| | | | | | | | | | | | | | | | | | | | | | | | | Construct a uniform Windows target triple nomenclature which is congruent to the Linux counterpart. The old triples are normalised to the new canonical form. This cleans up the long-standing issue of odd naming for various Windows environments. There are four different environments on Windows: MSVC: The MS ABI, MSVCRT environment as defined by Microsoft GNU: The MinGW32/MinGW32-W64 environment which uses MSVCRT and auxiliary libraries Itanium: The MSVCRT environment + libc++ built with Itanium ABI Cygnus: The Cygwin environment which uses custom libraries for everything The following spellings are now written as: i686-pc-win32 => i686-pc-windows-msvc i686-pc-mingw32 => i686-pc-windows-gnu i686-pc-cygwin => i686-pc-windows-cygnus This should be sufficiently flexible to allow us to target other windows environments in the future as necessary. llvm-svn: 204977
* Support: split object format out of environmentSaleem Abdulrasool2014-03-061-1/+19
| | | | | | | | | | | This is a preliminary setup change to support a renaming of Windows target triples. Split the object file format information out of the environment into a separate entity. Unfortunately, file format was previously treated as an environment with an unknown OS. This is most obvious in the ARM subtarget where the handling for macho on an arbitrary platform switches to AAPCS rather than APCS (as per Apple's needs). llvm-svn: 203160
* Darwin: update default iOS version to 5.0Tim Northover2013-12-101-7/+7
| | | | | | | | | | | | Defaulting to iOS 3.0 when LLVM has to guess the version is no longer a useful option and can give surprising results (like tail calls being disabled). 5.0 seems like a reasonable compromise as a platform that's still interesting to some people. rdar://problem/15567348 llvm-svn: 196912
* Added a unit test for r173983 that verifies that Target.isiOS() works correctly.Michael Gottesman2013-01-301-0/+30
| | | | | | | As a bonus I put in some extra checks to make sure that we are identifying the machine word of various Mac OS X/iOS targets appropriately. llvm-svn: 173994
* Add powerpc-ibm-aix to Triple. Patch by Kai.Duncan Sands2012-10-121-0/+12
| | | | llvm-svn: 165792
* Remove the PTX back-end and all of its artifacts (triple, etc.)Justin Holewinski2012-05-241-6/+6
| | | | | | | | This back-end was deprecated in favor of the NVPTX back-end. NV_CONTRIB llvm-svn: 157417
* Add unittests for Triple::getMacOSXVersion and Triple::getiOSVersion.Chad Rosier2012-05-091-0/+65
| | | | llvm-svn: 156507
* Add triple support for the IBM BG/P and BG/Q supercomputers.Hal Finkel2012-04-021-0/+18
| | | | llvm-svn: 153882
* Support was removed from LLVM's MIPS backend for the PSP variant of thatChandler Carruth2012-02-221-9/+0
| | | | | | | | | | | | | chip in r139383, and the PSP components of the triple are really annoying to parse. Let's leave this chapter behind. There is no reason to expect LLVM to see a PSP-related triple these days, and so no reasonable motivation to support them. It might be reasonable to prune a few of the older MIPS triple forms in general, but as those at least cause no burden on parsing (they aren't both a chip and an OS!), I'm happy to leave them in for now. llvm-svn: 151156
* Switch the llvm::Triple class to immediately parse the triple string onChandler Carruth2012-02-211-6/+1
| | | | | | | | | construction. Simplify its interface, implementation, and users accordingly as there is no longer an 'uninitialized' state to check for. Also, fixes a bug lurking in the interface as there was one method that didn't correctly check for initialization. llvm-svn: 151024
* Introduce helpers to compute the 32-bit varaints and 64-bit variants ofChandler Carruth2012-02-061-0/+62
| | | | | | | some architectures. These are useful for interacting with multiarch or bi-arch GCC (or GCC-based) toolchains. llvm-svn: 149895
* Add various coarse bit-width architecture predicates to llvm::Triple.Chandler Carruth2012-01-311-0/+57
| | | | | | | These are very useful for frontends and other utilities reasoning about or selecting between triples. llvm-svn: 149353
* Part of this test is invariant inside the inner loop - move it outsideDuncan Sands2011-02-031-14/+16
| | | | | | the loop. llvm-svn: 124784
* Remove NoVendor and NoOS, added in commit 123990, from Triple. While itDuncan Sands2011-02-021-45/+49
| | | | | | | | | may be useful to understand "none", this is not the place for it. Tweak the fix to Normalize while there: the fix added in 123990 works correctly, but I like this way better. Finally, now that Triple understands some non-trivial environment values, teach the unittests about them. llvm-svn: 124720
* Clang was not parsing target triples involving EABI and was generating wrong ↵Renato Golin2011-01-211-3/+11
| | | | | | IR (wrong PCS) and passing the wrong information down llc via the target-triple printed in IR. I've fixed this by adding the parsing of EABI into LLVM's Triple class and using it to choose the correct PCS in Clang's Tools. A Clang patch is on its way to use this infrastructure. llvm-svn: 123990
* Add better support for environment portion of triple. Original patch byDuncan Sands2010-09-161-0/+8
| | | | | | Cameron Esfahani, tweaked to use array_lengthof. llvm-svn: 114073
* Add a 'normalize' method to the Triple class, which takes a mucked upDuncan Sands2010-08-121-9/+108
| | | | | | | | | | | | | | | target triple and straightens it out. This does less than gcc's script config.sub, for example it turns i386-mingw32 into i386--mingw32 not i386-pc-mingw32, but it does a decent job of turning funky triples into something that the rest of the Triple class can understand. The plan is to use this to canonicalize triple's when they are first provided by users, and have the rest of LLVM only deal with canonical triples. Once this is done the special case workarounds in the Triple constructor can be removed, making the class more regular and easier to use. The comments and unittests for the Triple class are already adjusted in this patch appropriately for this brave new world of increased uniformity. llvm-svn: 110909
* Improve Triple to recognize the OS in i386-mingw32.Daniel Dunbar2009-08-181-0/+12
| | | | llvm-svn: 79359
* Update Triple to use StringRef/Twine based APIs.Daniel Dunbar2009-07-261-36/+36
| | | | | | - This is now shorter, simpler, safer, and more efficient, what a deal. llvm-svn: 77119
* Revert my intentional breakage.Daniel Dunbar2009-06-301-2/+0
| | | | llvm-svn: 74531
* Intentionally break a unittest to test my buildbot gtest command.Daniel Dunbar2009-06-301-0/+2
| | | | | | - Apologies in advance for the noise. llvm-svn: 74530
* Reversed order of args in EXPECT_EQ() macros to be in the correct order:Misha Brukman2009-06-091-70/+70
| | | | | | | EXPECT_EQ(expected, actual) . This will make error messages understandable as it uses terms such as "expected" and "actual" based on the order of arguments. llvm-svn: 73150
* Add llvm::Triple class for abstracting access to target triples.Daniel Dunbar2009-04-011-0/+137
- The code is silly, I'm just amusing myself. Rewrite to be efficient if you like. :) Also, if you wish to debate the proper names of the triple components I'm all ears. llvm-svn: 68252
OpenPOWER on IntegriCloud