Dan Gohman
2637cc1a38
Make NamedMDNode not be a subclass of Value, and simplify the interface
...
for creating and populating NamedMDNodes.
llvm-svn: 109061
2010-07-21 23:38:33 +00:00
Jeffrey Yasskin
3d73d1a73c
Remove a memory leak from MetadataTest.
...
Tested: valgrind --leak-check=full unittests/VMCore/Debug/VMCoreTests
llvm-svn: 98412
2010-03-13 01:39:20 +00:00
Jeffrey Yasskin
bd8a759589
Stop leaking MDStrings.
...
llvm-svn: 97763
2010-03-04 23:24:19 +00:00
Devang Patel
e307348325
NamedMDNode is a collection MDNodes.
...
llvm-svn: 92761
2010-01-05 20:41:31 +00:00
Chris Lattner
1e6e36785e
don't unittest mdnode printing, we have disassembler tests for this.
...
llvm-svn: 92328
2009-12-31 02:12:13 +00:00
Chris Lattner
9b493028df
rename "elements" of metadata to "operands". "Elements" are
...
things that occur in types. "operands" are things that occur
in values.
llvm-svn: 92322
2009-12-31 01:22:29 +00:00
Chris Lattner
26a7ae4fba
Type.h doesn't need to #include LLVMContext.h
...
llvm-svn: 85254
2009-10-27 17:08:31 +00:00
Daniel Dunbar
8feee907e4
Update unittests for MDNode uniquing disable.
...
llvm-svn: 81142
2009-09-07 04:19:02 +00:00
Devang Patel
f7188325ef
Now Bitcode reader bug is fixed. Reapply 80839.
...
Use CallbackVH, instead of WeakVH, to hold MDNode elements.
Use FoldingSetNode to unique MDNodes in a context.
Use CallbackVH hooks to update context's MDNodeSet appropriately.
llvm-svn: 80868
2009-09-03 01:39:20 +00:00
Devang Patel
c180029be4
Revert 80839 for now. It causes test failures.
...
llvm-svn: 80841
2009-09-02 21:49:26 +00:00
Devang Patel
36309cd391
Use CallbackVH, instead of WeakVH, to hold MDNode elements.
...
Use FoldingSetNode to unique MDNodes in a context.
Use CallbackVH hooks to update context's MDNodeSet appropriately.
llvm-svn: 80839
2009-09-02 21:22:09 +00:00
Devang Patel
34455c9c65
Disable uniqueness test for now.
...
llvm-svn: 80741
2009-09-02 00:16:33 +00:00
Chris Lattner
be354a66d3
upgrade for removed functions.
...
llvm-svn: 79822
2009-08-23 04:47:35 +00:00
Owen Anderson
55f1c09e31
Push LLVMContexts through the IntegerType APIs.
...
llvm-svn: 78948
2009-08-13 21:58:54 +00:00
Owen Anderson
2358732164
Fix unit tests.
...
llvm-svn: 77734
2009-07-31 21:38:10 +00:00
Benjamin Kramer
5656e4fcd3
fix a unitialized pointer in NamedMDNode (and reenable unittest)
...
llvm-svn: 77597
2009-07-30 15:35:55 +00:00
Daniel Dunbar
54914e2b3a
Disable the NamedMDNodeTest, it is failing everywhere.
...
llvm-svn: 77569
2009-07-30 02:08:27 +00:00
Devang Patel
0924b33a1e
Add NamedMDNode test.
...
llvm-svn: 77550
2009-07-30 00:03:41 +00:00
Benjamin Kramer
28983a4cf6
fix unittest
...
llvm-svn: 77375
2009-07-28 22:03:24 +00:00
Daniel Dunbar
d43b86d4a4
Finish migrating VMCore to StringRef/Twine based APIs.
...
llvm-svn: 77051
2009-07-25 06:02:13 +00:00
Owen Anderson
edb4a70325
Revert the ConstantInt constructors back to their 2.5 forms where possible, thanks to contexts-on-types. More to come.
...
llvm-svn: 77011
2009-07-24 23:12:02 +00:00
Devang Patel
6292003492
MDString
...
- Rename member function size(). New name is length().
- Store string beginning and length. Earlier it used to store string end.
llvm-svn: 76841
2009-07-23 02:00:51 +00:00
Devang Patel
e059ba6ed2
Derive MDNode from MetadataBase instead of Constant. Emit MDNodes into METADATA_BLOCK in bitcode file.
...
llvm-svn: 76834
2009-07-23 01:07:34 +00:00
Owen Anderson
b6b2530000
Move EVER MORE stuff over to LLVMContext.
...
llvm-svn: 75703
2009-07-14 23:09:55 +00:00
Devang Patel
f04d63a398
Drop "constant" from
...
!0 = constant metadata !{...}
llvm-svn: 75057
2009-07-08 21:57:07 +00:00
Devang Patel
983c6b1b8f
Update SLotTracker to handle MDNode slots.
...
Simplify MDNode printing.
llvm-svn: 75053
2009-07-08 21:44:25 +00:00
Nick Lewycky
adbc284666
Give embedded metadata its own type instead of relying on EmptyStructTy.
...
llvm-svn: 72610
2009-05-30 05:06:04 +00:00
Nick Lewycky
b8f9b7a965
Make MDNode use CallbackVH. Also change MDNode to store Value* instead of
...
Constant* in preperation of a future change to support holding non-Constants
in an MDNode.
llvm-svn: 71407
2009-05-10 20:57:05 +00:00
Nick Lewycky
8b4db2da2b
Fix pointer casting problem.
...
llvm-svn: 68668
2009-04-09 03:10:03 +00:00
Nick Lewycky
49f891958f
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.
llvm-svn: 68420
2009-04-04 07:22:01 +00:00