Commit Graph

53204 Commits

Author SHA1 Message Date
Mikhail Glushenkov 57cf3964f3 Clarify comment.
llvm-svn: 63171
2009-01-28 03:46:22 +00:00
Dan Gohman b3bbde3e62 Use ValueType::bitsLT to simplify some code.
llvm-svn: 63170
2009-01-28 03:10:52 +00:00
Dan Gohman 172ad92b29 Use ZERO_EXTEND instead of ANY_EXTEND when promoting
shift amounts, to avoid implicitly assuming that
target architectures will ignore the high bits.

llvm-svn: 63169
2009-01-28 02:58:31 +00:00
Mike Stump 5d1ebe90b3 Add a preliminary version number.
llvm-svn: 63168
2009-01-28 02:43:35 +00:00
Daniel Dunbar 6ec8a4d9e3 ABITest: Support --test-layout option for generating
size/alignment/offsetof based tests of types instead of calling
convention tests.

llvm-svn: 63167
2009-01-28 02:01:23 +00:00
Fariborz Jahanian 3d3426f321 Set visibility of ivar offset symbols according to
accessibility of the ivar (related to objc2's
non-fragile abi).

llvm-svn: 63166
2009-01-28 01:36:42 +00:00
Bill Wendling 3cf43ca571 Comment fixes.
llvm-svn: 63164
2009-01-28 01:19:52 +00:00
Fariborz Jahanian 40a4bcd49b Generation of ivar-offset symbols in objc2's non-fragile abi.
Changed section names for meta-data (to match current gcc).

llvm-svn: 63163
2009-01-28 01:05:23 +00:00
Ted Kremenek 1502b7e288 On Windows use a BumpPtrAllocator for the UniqueFileContainer's StringMap.
llvm-svn: 63162
2009-01-28 01:01:07 +00:00
Evan Cheng e4510972a6 Suppress a compile time warning.
llvm-svn: 63161
2009-01-28 00:53:34 +00:00
Nuno Lopes b81d94ff58 add test for PR2502, which was already fixed some time ago
llvm-svn: 63160
2009-01-28 00:44:33 +00:00
Ted Kremenek bb2f25b40f FileManager: Use a BumpPtrAllocator for the StringMaps DirEntries and FileEntries.
Performance impact (clang -fsyntax-only INPUTS/Cocoa_h.m):
  non-PTH: 0.4% improvement
  PTH: 0.8% improvement

llvm-svn: 63159
2009-01-28 00:44:12 +00:00
Nuno Lopes bb537dc189 fix PR3427: fix debuginfo for incomplete array types
llvm-svn: 63158
2009-01-28 00:35:17 +00:00
Ted Kremenek 5c04bd81ed Add a some comments to designate Windows-specific/Unix-specific code. No functionality change.
llvm-svn: 63157
2009-01-28 00:27:31 +00:00
Dale Johannesen b3e0931401 Embalm my ideas of how things should work. Not that
anyone will pay attention.

llvm-svn: 63155
2009-01-27 23:32:10 +00:00
Devang Patel 5adc3dbc96 Add type DIE into appropriate context DIE.
llvm-svn: 63154
2009-01-27 23:22:55 +00:00
Steve Naroff 99c0cdf899 Finish making AST BumpPtrAllocation runtime configurable (based on -disable-free).
snaroff% time ../../Release-Asserts/bin/clang INPUTS/Cocoa_h.m
0.179u 0.051s 0:00.23 95.6%	0+0k 0+0io 0pf+0w
snaroff% time ../../Release-Asserts/bin/clang INPUTS/Cocoa_h.m -disable-free
0.169u 0.052s 0:00.22 95.4%	0+0k 0+0io 0pf+0w

llvm-svn: 63153
2009-01-27 23:20:32 +00:00
Dale Johannesen 4e04ef3c55 Add a DebugLoc field and some simple accessors.
llvm-svn: 63152
2009-01-27 23:20:29 +00:00
Dale Johannesen 675869aef0 Reorder args, constify.
llvm-svn: 63151
2009-01-27 23:19:41 +00:00
Sebastian Redl a5a77a6dc6 Add handling of member pointers to reinterpret_cast.
llvm-svn: 63150
2009-01-27 23:18:31 +00:00
Bill Wendling fd03bdd00c Add testcase for r63142.
llvm-svn: 63149
2009-01-27 23:00:53 +00:00
Anton Korobeynikov 70d4c08cfe Treat [1 x i8] zeroinitializer as a C string, placing such stuff into
mergeable string section. I don't see any bad impact of such decision
(rather then placing it into mergeable const section, as it was before),
but at least Darwin linker won't complain anymore.

The problem in LLVM is that we don't have special type for string constants
(like gcc does). Even more, we have two separate types: ConstatArray for non-null
strings and ConstantAggregateZero for null stuff.... It's a bit weird :)

llvm-svn: 63142
2009-01-27 22:29:24 +00:00
Fariborz Jahanian e19a1f15ae After talking to our runtime guru, I added a comment.
llvm-svn: 63141
2009-01-27 22:27:56 +00:00
Ted Kremenek 3efd355b9d Updated checker build.
llvm-svn: 63140
2009-01-27 22:24:33 +00:00
Dan Gohman b841dc2957 Use .empty() instead of comparing .size() with 0.
llvm-svn: 63139
2009-01-27 22:12:23 +00:00
Dale Johannesen aa064e6cd6 Update to latest spelling.
llvm-svn: 63138
2009-01-27 22:09:11 +00:00
Steve Naroff 096bab711e Convert types over to placement new() that takes an ASTContext.
Also changed FunctionTypeProto to be allocated with 8-byte alignment (noticed by Doug). I couldn't think of any reason to allocate on 16-byte boundaries. If anyone remembers why we were doing this, let me know!

llvm-svn: 63137
2009-01-27 22:08:43 +00:00
Dale Johannesen f041127bda Add DebugLoc field and simple accessors.
llvm-svn: 63136
2009-01-27 21:41:04 +00:00
Steve Naroff 13ae6f47cd Remove many references to ASTContext::getAllocator(), replacing them with calls to the recently added placement new (which uses ASTContext's allocator for memory). Also added ASTContext::Deallocate().
This will simplify runtime replacement of ASTContext's allocator. Keeping the allocator private (and removing getAllocator() entirely) is also goodness.

llvm-svn: 63135
2009-01-27 21:25:57 +00:00
Evan Cheng 573e529127 Refine DebugLoc per review comments.
llvm-svn: 63132
2009-01-27 21:15:07 +00:00
Daniel Dunbar f4a0cba545 ccc/Darwin/clang: Fix a mistranslation for the llvm-backend; llvm-gcc
doesn't set the relocation model when -mdynamic-no-pic is present.

llvm-svn: 63129
2009-01-27 20:42:58 +00:00
Dan Gohman fb58faf29e Add an assertion to the form of SelectionDAG::getConstant that takes
a uint64_t to verify that the value is in range for the given type,
to help catch accidental overflow. Fix a few places that relied on
getConstant implicitly truncating the value.

llvm-svn: 63128
2009-01-27 20:39:34 +00:00
Anders Carlsson 570c357ded If an input constraint refers to an output constraint, it should have the same constraint info as the output constraint. Fixes PR3417
llvm-svn: 63127
2009-01-27 20:38:24 +00:00
Fariborz Jahanian 7415caa3d4 ivar meta-data generation for nonfragile-abi.
Still more work to do in this area.

llvm-svn: 63126
2009-01-27 19:38:51 +00:00
Daniel Dunbar 2ad3ff0bd6 ccc: Normalize machine name to i386 for platforms which report the
machine as x86_64.

llvm-svn: 63122
2009-01-27 19:29:51 +00:00
Dan Gohman 0ca1e7c6b6 Reformat the allocation-order arrays to a more conventional style.
llvm-svn: 63121
2009-01-27 19:25:38 +00:00
Dan Gohman 0bd9546039 Delete redundant return statements.
llvm-svn: 63120
2009-01-27 19:23:22 +00:00
Dan Gohman 13f18e853f Respect the DisableRedZone flag on PowerPC.
llvm-svn: 63119
2009-01-27 19:19:28 +00:00
Dan Gohman f77f0ce21a Simplify findNonImmUse; return the result using the return value
instead of via a by-reference argument. No functionality change.

llvm-svn: 63118
2009-01-27 19:04:30 +00:00
Chris Lattner 75441a3870 eliminate some random .ll file outputs
llvm-svn: 63117
2009-01-27 18:56:08 +00:00
Fariborz Jahanian 7ec8851c89 Fixed a typo in getPreferredTypeAlign method.
llvm-svn: 63116
2009-01-27 18:55:00 +00:00
Chris Lattner 7687a998a4 add new headers
llvm-svn: 63113
2009-01-27 18:34:53 +00:00
Chris Lattner 660419289a Add the new .def files
llvm-svn: 63112
2009-01-27 18:34:32 +00:00
Chris Lattner 7368d581c1 Split the single monolithic DiagnosticKinds.def file into one
.def file for each library.  This means that adding a diagnostic
to sema doesn't require all the other libraries to be rebuilt.

Patch by Anders Johnsen!

llvm-svn: 63111
2009-01-27 18:30:58 +00:00
Ted Kremenek 422d81dcd4 Fix bug in BasicStore::getLValueElement where if the base of an array subscript expression was an ElementRegion we stacked another ElementRegion on top of that.
This fixes PR 3422.

llvm-svn: 63110
2009-01-27 18:29:03 +00:00
Chris Lattner a3402cd524 add a new "getPreferredTypeAlign" method to return the preferred alignment
of a type.  The implementation is currently something of a hack, but is 
sufficient for now and allows clients to be built on it.

llvm-svn: 63108
2009-01-27 18:08:34 +00:00
Torok Edwin ec39eb8519 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.

llvm-svn: 63107
2009-01-27 18:06:03 +00:00
Dan Gohman ed2ba0fb01 Make some comments doxygen-friendly.
llvm-svn: 63104
2009-01-27 17:28:23 +00:00
Eli Friedman 3f66b84c86 Support CodeGen for __extension__ operator on aggregates.
llvm-svn: 63101
2009-01-27 09:03:41 +00:00
Eli Friedman eb3a9b03ab Fix for PR3418: make sure to handle the RHS of expressions starting with
__extension__.  This sort of construct shows up in the gcc source code.

llvm-svn: 63100
2009-01-27 08:43:38 +00:00