Commit Graph

2872 Commits

Author SHA1 Message Date
Dan Gohman a6d0afcb74 Fix a bunch of namespace pollution.
llvm-svn: 78363
2009-08-07 01:32:21 +00:00
Daniel Dunbar 84f399103b Don't search the entire type table just to delete a type by name.
- This also fixes the ENABLE_EXPENSIVE_CHECKS failure on vmcore.ml.

llvm-svn: 78287
2009-08-06 06:04:35 +00:00
Owen Anderson 03cb69fbd1 Privatize the StructType table, which unfortunately involves routing contexts through a number of APIs.
llvm-svn: 78258
2009-08-05 23:16:16 +00:00
Owen Anderson 4b5c761af2 Privatize the FunctionType table.
llvm-svn: 78221
2009-08-05 18:13:27 +00:00
Chris Lattner 0aff0b2b58 common globals may also not be marked constant.
llvm-svn: 78169
2009-08-05 05:41:44 +00:00
Chris Lattner d055488c72 Clarify common linkage and the requirements on it. Enforce
them in the verifier.

llvm-svn: 78160
2009-08-05 05:21:07 +00:00
Owen Anderson e565995c65 Privatize the PointerType factory.
llvm-svn: 78130
2009-08-05 00:15:12 +00:00
Owen Anderson d918649d5f Privatize the VectorType uniquing.
llvm-svn: 78125
2009-08-04 23:47:44 +00:00
Owen Anderson 542cffc3eb Begin the process of privatizing the type uniquing tables. No API changes yet, but there will be in the near future.
llvm-svn: 78122
2009-08-04 23:33:01 +00:00
Chris Lattner 694285ca6d revert r78048, it isn't worth using assertingvh here.
llvm-svn: 78119
2009-08-04 23:07:12 +00:00
Benjamin Kramer 83c917a627 Update CMakeLists.
llvm-svn: 78118
2009-08-04 23:02:53 +00:00
Owen Anderson 9b67698574 It helps if I remember to actually add the file...
llvm-svn: 78116
2009-08-04 22:55:26 +00:00
Owen Anderson afd0c4cd56 Factor some of the constants+context related code out into a separate header, to make LLVMContextImpl.h
not hideous.  Also, fix some MSVC compile errors.

llvm-svn: 78115
2009-08-04 22:41:48 +00:00
Owen Anderson 1584a29536 Privatize the last bit of Constant-creation state.
llvm-svn: 78097
2009-08-04 20:25:11 +00:00
Chris Lattner 59c08e76ca switch ValueMap to using AssertingVH. This is an old patch I had laying
around in a tree I forgot about.

llvm-svn: 78048
2009-08-04 04:31:02 +00:00
Devang Patel d7fd6aba7c Keep track of metadata used by other metadata.
llvm-svn: 78012
2009-08-03 22:51:10 +00:00
Dan Gohman f011f5a8a2 Add a new Constant::getIntegerValue helper function, and convert a
few places in InstCombine to use it, to fix problems handling pointer
types. This fixes the recent llvm-gcc bootstrap error.

llvm-svn: 78005
2009-08-03 22:07:33 +00:00
Devang Patel 79238d7e6b Add NamedMDNode destructor.
llvm-svn: 77959
2009-08-03 06:19:01 +00:00
Edward O'Callaghan 4bf58b8add One two many newlines at end of file LLVMContextImpl.cpp
llvm-svn: 77911
2009-08-02 20:06:26 +00:00
Edward O'Callaghan 2dd529c9ef Fix no newline at end of LLVMContextImpl.cpp
llvm-svn: 77907
2009-08-02 19:38:12 +00:00
Owen Anderson c8c302644c Privatize all but one of the remaining constant tables.
llvm-svn: 77748
2009-07-31 22:45:43 +00:00
Owen Anderson 0087fe6e5c Move the metadata constructors back to 2.5 syntax.
llvm-svn: 77733
2009-07-31 21:35:40 +00:00
Owen Anderson 5a1acd9912 Move a few more APIs back to 2.5 forms. The only remaining ones left to change back are
metadata related, which I'm waiting on to avoid conflicting with Devang.

llvm-svn: 77721
2009-07-31 20:28:14 +00:00
Dan Gohman b53e26c7eb Fix printing of Alloca instructions with null operands.
llvm-svn: 77697
2009-07-31 18:23:24 +00:00
Owen Anderson 23a204d91b Move getTrue() and getFalse() to 2.5-like APIs.
llvm-svn: 77685
2009-07-31 17:39:07 +00:00
Devang Patel 98250795e8 Add getOrInsertNamedMetadata().
llvm-svn: 77646
2009-07-30 23:59:04 +00:00
Owen Anderson b292b8ce70 Move more code back to 2.5 APIs.
llvm-svn: 77635
2009-07-30 23:03:37 +00:00
Devang Patel 3f4ab29f45 Do not use getNamedValue() to lookup NamedMDNode. NamedMDNode is not a GlobalValue.
Thanks Benjamin Kramer!

llvm-svn: 77619
2009-07-30 18:46:29 +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
Nate Begeman 50b69eaa36 Typo
llvm-svn: 77568
2009-07-30 02:00:06 +00:00
Devang Patel 847fcacd48 Check null NameMDNode elements.
llvm-svn: 77559
2009-07-30 01:02:04 +00:00
Devang Patel b4a4e774db print single NamedMDNode.
llvm-svn: 77549
2009-07-30 00:02:57 +00:00
Owen Anderson 4056ca9568 Move types back to the 2.5 API.
llvm-svn: 77516
2009-07-29 22:17:13 +00:00
Devang Patel 23e68308b5 Print named metadata.
llvm-svn: 77513
2009-07-29 22:04:47 +00:00
Devang Patel 4a942d0863 There is no need to keep name ref in NamedMDNode.
llvm-svn: 77511
2009-07-29 21:58:56 +00:00
Owen Anderson 487375e9a2 Move ConstantExpr to 2.5 API.
llvm-svn: 77494
2009-07-29 18:55:55 +00:00
Devang Patel 18dfdc99af Keep track of named mdnodes in a Module using an ilist.
llvm-svn: 77476
2009-07-29 17:16:17 +00:00
Bob Wilson 5be9ee399f Fix an assumption that there is a single return value when verifying
overloaded types for intrinsic parameters.

llvm-svn: 77466
2009-07-29 16:25:56 +00:00
Devang Patel 05a26fb6dd Add NamedMDNode.
llvm-svn: 77409
2009-07-29 00:33:07 +00:00
Devang Patel f869caa03f Remove unused method.
llvm-svn: 77378
2009-07-28 22:04:55 +00:00
Devang Patel a4f43fb5dd Rename MDNode.h header. It defines MDnode and other metadata classes.
New name is Metadata.h.

llvm-svn: 77370
2009-07-28 21:49:47 +00:00
Owen Anderson 4aa3295a65 Return ConstantVector to 2.5 API.
llvm-svn: 77366
2009-07-28 21:19:26 +00:00
Owen Anderson c2c7932c64 Change ConstantArray to 2.5 API.
llvm-svn: 77347
2009-07-28 18:32:17 +00:00
Owen Anderson 45308b578b Move ConstantStruct back to 2.5 API.
llvm-svn: 77266
2009-07-27 22:29:26 +00:00
Dan Gohman 75b7f678a3 Add a comment about the "getelementptr null" trick.
llvm-svn: 77262
2009-07-27 21:59:50 +00:00
Dan Gohman 1639c3905e Add a new keyword 'inbounds' for use with getelementptr. See the
LangRef.html changes for details.

llvm-svn: 77259
2009-07-27 21:53:46 +00:00
Daniel Dunbar ae15479eb3 Unbreak build.
llvm-svn: 77256
2009-07-27 21:47:07 +00:00
Owen Anderson 69c464dec4 Move ConstantFP construction back to the 2.5-ish API.
llvm-svn: 77247
2009-07-27 20:59:43 +00:00
Devang Patel 072833539b Initialize mdnNext.
llvm-svn: 77229
2009-07-27 18:42:56 +00:00
Dan Gohman 9c7f808201 Change the assembly syntax for nsw, nuw, and exact, putting them
after their associated opcodes rather than before. This makes them
a little easier to read.

llvm-svn: 77194
2009-07-27 16:11:46 +00:00