Commit Graph

8 Commits

Author SHA1 Message Date
Duncan Sands 84a3bddfc3 Add better support for environment portion of triple. Original patch by
Cameron Esfahani, tweaked to use array_lengthof.

llvm-svn: 114073
2010-09-16 08:25:48 +00:00
Duncan Sands 501dff76ce Add a 'normalize' method to the Triple class, which takes a mucked up
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
2010-08-12 11:31:39 +00:00
Daniel Dunbar 959323a260 Improve Triple to recognize the OS in i386-mingw32.
llvm-svn: 79359
2009-08-18 19:26:55 +00:00
Daniel Dunbar 19e7076ddd Update Triple to use StringRef/Twine based APIs.
- This is now shorter, simpler, safer, and more efficient, what a deal.

llvm-svn: 77119
2009-07-26 03:31:47 +00:00
Daniel Dunbar ec6fdb6750 Revert my intentional breakage.
llvm-svn: 74531
2009-06-30 16:26:57 +00:00
Daniel Dunbar c9de159696 Intentionally break a unittest to test my buildbot gtest command.
- Apologies in advance for the noise.

llvm-svn: 74530
2009-06-30 16:11:58 +00:00
Misha Brukman 67a1ffa59c Reversed order of args in EXPECT_EQ() macros to be in the correct order:
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
2009-06-09 21:48:57 +00:00
Daniel Dunbar 4abd56677d Add llvm::Triple class for abstracting access to target triples.
- 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
2009-04-01 21:53:23 +00:00