Commit Graph

1775 Commits

Author SHA1 Message Date
Nick Lewycky
21cc4460ef Add support for embedded metadata to LLVM. This introduces two new types of
Constant, MDString and MDNode which can only be used by globals with a name
that starts with "llvm." or as arguments to a function with the same naming
restriction.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68420 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-04 07:22:01 +00:00
Bill Wendling
dcafd04163 Make the constants fit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68258 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-01 22:44:18 +00:00
Daniel Dunbar
23e97b05da 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68252 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-01 21:53:23 +00:00
Misha Brukman
6eb28b5237 Added tests for math utility functions; fixed another test's header comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68249 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-01 21:36:40 +00:00
Misha Brukman
b0426e86af include Makefile.common before using $(BuildMode) to get its definition
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68167 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-01 00:35:00 +00:00
Misha Brukman
2e734269e3 Converted a1.ll to unittests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67652 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-24 21:36:09 +00:00
Misha Brukman
8be1ac213b Renamed unittest files to have a consistent {Tt}est suffix.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67326 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-19 19:09:48 +00:00
Daniel Dunbar
501adac7aa Minimal raw_ostream unit tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67083 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-17 16:14:59 +00:00
Nick Lewycky
a15dc035a6 Remove libtool.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65517 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-26 07:44:16 +00:00
Bill Wendling
fb3e5ca53b Fix comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64137 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-09 12:31:40 +00:00
Torok Edwin
2d0f1c57c3 APInt's countLeadingOnes() was broken for negative i128 values,
causing assertion failures in getSExtValue().
Fix it by making highWordBits actually contain what its name says,
and add some more unit-tests for APInt.
This fixes PR3419.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63107 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-27 18:06:03 +00:00
Nick Lewycky
1999ff1d81 Port this test from dejagnu to unit testing.
The way this worked before was to test APInt by running
"lli -force-interpreter=true" knowing the lli uses APInt under the hood to
store its values. Now, we test APInt directly.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62514 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-19 18:08:33 +00:00
Bill Wendling
3d9fbee0df Fix naming of file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62035 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-11 01:25:51 +00:00
Bill Wendling
f2850d9e27 Adding unittests for SmallVector. Test by Talin.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62025 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-10 12:56:31 +00:00
Bill Wendling
6b223d71e5 Some generic clean-ups. Also make the StringMapEntryInitializer specialization apply only to the tests that are actually testing it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61923 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-08 09:31:36 +00:00
Bill Wendling
38593664b0 * Don't explicitly cast "0" to "void*". This doesn't work well with specialized
StringMapEntryInitializer classes. Leave it for the compiler to figure out what
 the type is and what "0" should be transformed into.

* Un-disable the unit tests which test the StringMapEntryInitializer class.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61922 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-08 08:26:46 +00:00
Bill Wendling
1ed3663b49 80-column violation fix.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61919 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-08 07:35:39 +00:00
Misha Brukman
8bb5e99013 * Added unittests for StringMap
* Fixed but in StringMap::clear()
* Removed trailing whitespace

Original patch by Talin.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61914 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-08 04:48:20 +00:00
Misha Brukman
c870bb5c96 Minor cleanup for unittest:
* Fixed {copy,assignment} constructor test names
* s/EXPECT_EQ(true, ...)/ASSERT_TRUE(...)/

Patch by Talin.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61883 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-07 21:13:53 +00:00
Bill Wendling
4113bd1dc6 Modify the unittests Makefiles so that they don't rebuild parts of LLVM just to
run the tests. Most of this was stolen from the llvm/test Makefiles.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61648 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-04 23:12:21 +00:00
Nuno Lopes
38a2cb9379 improve test and address Misha's comments
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61609 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-03 14:55:26 +00:00
Bill Wendling
3d45f53b7a Reassign the buffer to the pointer so that we don't overwrite memory.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61596 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-02 23:13:30 +00:00
Nuno Lopes
c3651569c1 fist short at a new unit test for ImmutableSets. no bugs found, though :P
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61576 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-02 13:49:50 +00:00
Nuno Lopes
11366a03f5 make 'make clean' remove test binaries as well
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61572 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-02 12:25:22 +00:00
Misha Brukman
8fb520eb4f Original patch by Talin.
* Added the first LLVM unittest -- DenseMap.
* Updated mkpatch utility to include llvm/unittests dir
* Added top-level target "unittests" to run all unittests


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61541 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-01 02:24:48 +00:00