Commit Graph

75159 Commits

Author SHA1 Message Date
Anders Carlsson a4bbe58c3b Add more vtable tests.
llvm-svn: 92285
2009-12-30 01:25:42 +00:00
Anders Carlsson ac2f681777 More RTTI cleanup, test that RTTI classes have the correct vtables.
llvm-svn: 92284
2009-12-30 01:00:12 +00:00
John McCall 91f1a02648 Typedefs can be redeclared. That seems like something we should record in
the AST lest we run into some crazy canonicalization bug like PR5874.

llvm-svn: 92283
2009-12-30 00:31:22 +00:00
Eli Friedman be55976627 Test for PR5908.
llvm-svn: 92282
2009-12-30 00:20:14 +00:00
Eli Friedman 84341cd668 Make sure to explicitly pass type/value dependence to Expr constructor. This
caught several cases where we were not doing the right thing. I'm
not completely sure all cases are being handled correctly, but this should
be an improvement.

llvm-svn: 92281
2009-12-30 00:13:48 +00:00
Chris Lattner 278bc953bc factor code even more.
llvm-svn: 92280
2009-12-29 22:40:21 +00:00
Chris Lattner f2fe7fffab simplify some code and unbreak the build by not consuming an
extra token.

llvm-svn: 92279
2009-12-29 22:35:39 +00:00
Anders Carlsson 79c184e975 Match gcc and treat vector types as fundamental types.
llvm-svn: 92278
2009-12-29 22:30:11 +00:00
Benjamin Kramer 84dd9a3d28 remove a really wrong parenthesis.
llvm-svn: 92277
2009-12-29 22:17:06 +00:00
Anders Carlsson ef88695860 Handle enum types as well.
llvm-svn: 92276
2009-12-29 22:13:01 +00:00
Chris Lattner 1c6b864abe clean up some really strange code.
llvm-svn: 92275
2009-12-29 22:01:50 +00:00
Anders Carlsson 0e4151c685 Test linkage of RTTI descriptors of array types.
llvm-svn: 92274
2009-12-29 21:58:32 +00:00
Chris Lattner 1797fc7009 change ParseMDString and ParseMDNode to take arguments of the right type.
This exposed a raft of other problems, which I'll deal with in subsequent
patches.

llvm-svn: 92273
2009-12-29 21:53:55 +00:00
Chris Lattner 218b22f33b switch to TrackingVH instead of WeakVH, since these can never
be RAUW'd and go to null.  This also gets us some sorely lacking
type safety.

llvm-svn: 92272
2009-12-29 21:43:58 +00:00
Chris Lattner 596760d9bb Each instruction is allowed to have *multiple* different
metadata objects on them.  Though the entire compiler supports this,
the asmparser didn't.

llvm-svn: 92270
2009-12-29 21:25:40 +00:00
Chris Lattner 93163c401e Do not crash when .ll printing metadata that smells like debug info, but isn't.
llvm-svn: 92268
2009-12-29 21:17:33 +00:00
Chris Lattner 0709a2790a fix indentation, fit in 80 cols.
llvm-svn: 92267
2009-12-29 21:09:57 +00:00
Anders Carlsson 26cf4ab8e2 Fix function type RTTI linkage and add tests.
llvm-svn: 92266
2009-12-29 20:20:19 +00:00
Benjamin Kramer 6b37c9e6fc Replace a few more SmallVectors with arrays.
llvm-svn: 92265
2009-12-29 16:57:26 +00:00
Benjamin Kramer 756d7086c1 Use an array instead of a SmallVector.
llvm-svn: 92264
2009-12-29 11:04:52 +00:00
Chris Lattner 8e805be369 remove a bunch of unneeded functions.
llvm-svn: 92263
2009-12-29 09:32:19 +00:00
Chris Lattner 047fd2fd97 major cleanups, much of this file was incorrectly indented.
llvm-svn: 92262
2009-12-29 09:22:47 +00:00
Chris Lattner 573f294c00 one pass of cleanup over DebugInfo.h. Much more is still needed.
llvm-svn: 92261
2009-12-29 09:15:46 +00:00
Chris Lattner 22e13ba4e5 prune #includes.
llvm-svn: 92260
2009-12-29 09:12:29 +00:00
Chris Lattner a0566979b7 Final step in the metadata API restructuring: move the
getMDKindID/getMDKindNames methods to LLVMContext (and add
convenience methods to Module), eliminating MetadataContext.
Move the state that it maintains out to LLVMContext.

llvm-svn: 92259
2009-12-29 09:01:33 +00:00
Chris Lattner 9330b2f7ec just cleanup.
llvm-svn: 92258
2009-12-29 08:06:56 +00:00
Chandler Carruth 585fb1e97e Fix support for const_cast<>s of array types which actual change the
CV-qualifiers. Remove an error expectation from the 'good' set of const-cast
test cases. With this patch, the final non-template test case from PR5542
passes. (It's the same as the one already in const-cast.cpp.)

llvm-svn: 92257
2009-12-29 08:05:19 +00:00
Chris Lattner 6311212bf9 remove useless argument.
llvm-svn: 92256
2009-12-29 08:03:58 +00:00
Chris Lattner 5508da383a privatize another interface.
llvm-svn: 92255
2009-12-29 07:56:15 +00:00
Chris Lattner c88199e999 the only call to this function (from clang) has been removed, zap it.
llvm-svn: 92254
2009-12-29 07:50:09 +00:00
Chris Lattner 3f8e5dd898 strength reduce this call away.
llvm-svn: 92253
2009-12-29 07:49:13 +00:00
Chris Lattner 68017800cd remove some unneeded Metadata interfaces.
llvm-svn: 92252
2009-12-29 07:44:16 +00:00
Chris Lattner 426b709a81 fix whitespace in test to match llvm asmprinter change.
llvm-svn: 92251
2009-12-29 07:42:23 +00:00
Chris Lattner 3b32672733 fix .cpp file to not wrap the entire file in namespace blocks.
llvm-svn: 92250
2009-12-29 07:28:33 +00:00
Chris Lattner 031560c2c7 tidy up debug info comments, use ->isVoidTy() where reasonable.
llvm-svn: 92249
2009-12-29 07:25:48 +00:00
Chandler Carruth 607f38e05f Correctly refer to element CVR qualifications when determining if a type is
more or less cv-qualified than another during implicit conversion and overload
resolution ([basic.type.qualifier] p5). Factors the logic out of template
deduction and into the ASTContext so it can be shared.

This fixes several aspects of PR5542, but not all of them.

llvm-svn: 92248
2009-12-29 07:16:59 +00:00
Chris Lattner 5d3b077111 sink twine.h down out of Value.h. It is annoying that you need
to #include Twine.h just to give a twine a default value.

llvm-svn: 92247
2009-12-29 07:12:03 +00:00
Anders Carlsson 88ea2455f8 Get rid of FixedWidthIntType, as suggested by Chris and Eli.
llvm-svn: 92246
2009-12-29 07:07:36 +00:00
Chandler Carruth c25c6ee3db Handle using declarations in overloaded and template functions during ADL and
address resolution. This fixes PR5751.

Also, while we're here, remove logic from ADL which mistakenly included the
definition namespaces of overloaded and/or templated functions whose name or
address is used as an argument.

llvm-svn: 92245
2009-12-29 06:17:27 +00:00
Sanjiv Gupta 015215ca86 Extern declaration for unordered.f32 libcall was not being emitted. Fixed that.
llvm-svn: 92242
2009-12-29 03:24:34 +00:00
Chris Lattner 241264ee32 When doing v1->RAUW(v2), don't do anything to metadata. We don't know
why one was replaced with the other.  Even in the specific case of 
debug information, it doesn't make sense to transfer the location over,
this will just result in jumbled loc info.

llvm-svn: 92241
2009-12-29 02:53:52 +00:00
Chris Lattner d8eb2cf571 sink the Instruction::HasMetadata bit into SubclassData.
llvm-svn: 92240
2009-12-29 02:46:09 +00:00
Chris Lattner b9c8651b8c add a layer of accessors around the Value::SubClassData member, and use
a convention (shadowing the setter with private forwarding function) to
prevent subclasses from accidentally using it.

This exposed some bogosity in ConstantExprs, which was propaging the
opcode of the constant expr into the NUW/NSW/Exact field in the
getWithOperands/getWithOperandReplaced methods.

llvm-svn: 92239
2009-12-29 02:14:09 +00:00
Chris Lattner 9f021fd05d adjust for llvm api changes.
llvm-svn: 92236
2009-12-28 23:41:39 +00:00
Chris Lattner 2f2aa2b067 This is a major cleanup of the instruction metadata interfaces that
I asked Devang to do back on Sep 27.  Instead of going through the
MetadataContext class with methods like getMD() and getMDs(), just
ask the instruction directly for its metadata with getMetadata()
and getAllMetadata().

This includes a variety of other fixes and improvements: previously
all Value*'s were bloated because the HasMetadata bit was thrown into
value, adding a 9th bit to a byte.  Now this is properly sunk down to
the Instruction class (the only place where it makes sense) and it
will be folded away somewhere soon.

This also fixes some confusion in getMDs and its clients about 
whether the returned list is indexed by the MDID or densely packed.
This is now returned sorted and densely packed and the comments make
this clear.

This introduces a number of fixme's which I'll follow up on.

llvm-svn: 92235
2009-12-28 23:41:32 +00:00
Chris Lattner 06ea5ffcff rearrange some code.
llvm-svn: 92234
2009-12-28 21:56:07 +00:00
Chris Lattner a16bdb9f96 add IRBuilder.cpp to cmake
llvm-svn: 92233
2009-12-28 21:52:41 +00:00
Chris Lattner a7057044c9 remove #include that comes in from ConstantFolder.h
llvm-svn: 92232
2009-12-28 21:52:06 +00:00
Chris Lattner 49f9f76030 remove #include of Function.h from IRBuilder
llvm-svn: 92231
2009-12-28 21:50:56 +00:00
Chris Lattner 7ef1cac576 move debug info stuff out of line, allowing two #includes
to go away from IRBuilder.h

llvm-svn: 92230
2009-12-28 21:45:40 +00:00