Commit Graph

54046 Commits

Author SHA1 Message Date
Anders Carlsson 33c1b6528f Remove the last remnants of the Obj-C EH stack code.
llvm-svn: 64205
2009-02-10 06:07:49 +00:00
Devang Patel 9b6c1d6313 Validate file id.
llvm-svn: 64204
2009-02-10 06:04:08 +00:00
Anders Carlsson 33747b6c41 Start removing the old Obj-C EH stack now that the cleanup stack is used instead.
llvm-svn: 64203
2009-02-10 05:52:02 +00:00
Ted Kremenek a84522088f Fix a crash in GRSimpleVals::EvalCast due not handling transparent unions.
llvm-svn: 64200
2009-02-10 05:42:58 +00:00
Sanjiv Gupta c3f7b82628 Function temporaries can not overlap with retval or args.See the comment in source code to know the reason. Anything having .auto. in its name is local to a function in nature irrespective of the linkage specified. print static local variables in module level IDATA section.
llvm-svn: 64199
2009-02-10 04:20:26 +00:00
Sanjiv Gupta e99ad00fd2 Function parameters for PIC16 are like local variables. So use the keyword ".auto." to mangle their names. The working of PIC16AsmPrinter relies on that keyword currently.
llvm-svn: 64198
2009-02-10 04:17:25 +00:00
Daniel Dunbar 0007961241 Support va_arg on _Complex.
gcc compat test suite results (Darwin x86-32 & -64):
--
# of expected passes		1110
# of unexpected failures	74
# of unresolved testcases	168
# of unsupported tests		2

llvm-svn: 64197
2009-02-10 03:03:30 +00:00
Argyrios Kyrtzidis 2ca8d5dfdf Bring in 'CHAR_BIT' for GCC 4.3.
llvm-svn: 64196
2009-02-10 02:14:34 +00:00
Daniel Dunbar 2daa142765 Enable parameter passing test for x86_64.
llvm-svn: 64195
2009-02-10 01:53:22 +00:00
Daniel Dunbar 9bfb4de38b ABI: Correctly handle load/store of values which have a different LLVM
memory representation (e.g., bool).
 - This upgrades (downgrades) MultiSource/Applications/ClamAV/clamscan
   to a miscompile and fixes
   SingleSource/UnitTests/2003-05-31-CastToBool.

llvm-svn: 64194
2009-02-10 01:51:39 +00:00
Ted Kremenek 351f78822b Rearrange code. No functionality change.
llvm-svn: 64193
2009-02-10 01:14:45 +00:00
Ted Kremenek 5b229bcea8 Fix potential padding error in PTH file and add stub code for emitting an on-disk chained hash table.
llvm-svn: 64192
2009-02-10 01:06:17 +00:00
Daniel Dunbar 1d425460d5 Add util Emit{LoadOf,StoreTo}Scalar methods to encapsulate conversion
from LLVM memory type to/from LLVM temporary type.
 - No intended functionality change.

llvm-svn: 64191
2009-02-10 00:57:50 +00:00
Ted Kremenek a446e95891 Update checker build.
llvm-svn: 64190
2009-02-10 00:53:39 +00:00
Douglas Gregor 97f34576d4 Teach the type-id/expression disambiguator about different
disambiguation contexts, so that we properly parse template arguments
such as

  A<int()>

as type-ids rather than as expressions. Since this can be confusing
(especially when the template parameter is a non-type template
parameter), we try to give a friendly error message.

Almost, eliminate a redundant error message (that should have been a
note) and add some ultra-basic checks for non-type template
arguments.

llvm-svn: 64189
2009-02-10 00:53:15 +00:00
Douglas Gregor 85e0f66250 Check template template arguments against their corresponding template
template parameters.

llvm-svn: 64188
2009-02-10 00:24:35 +00:00
Daniel Dunbar d5f1f55e28 Make sure to initialize local variables, even if they were ignored by
ABI.

llvm-svn: 64187
2009-02-10 00:06:49 +00:00
Evan Cheng e5ade4a9a1 Implement FpSET_ST1_*.
llvm-svn: 64186
2009-02-09 23:32:07 +00:00
Douglas Gregor d32e028f79 Rudimentary checking of template arguments against their corresponding
template parameters when performing semantic analysis of a template-id
naming a class template specialization.

llvm-svn: 64185
2009-02-09 23:23:08 +00:00
Evan Cheng 3af42a8a14 If the target cannot issue a copy for the given source and dest registers, abort instead of silently continue.
llvm-svn: 64184
2009-02-09 22:47:36 +00:00
Dale Johannesen cd19967754 Fix PR 3471, and some cleanups.
llvm-svn: 64177
2009-02-09 22:14:15 +00:00
Anders Carlsson ac0d7bd709 id<Foo> is a POD type.
llvm-svn: 64175
2009-02-09 21:53:01 +00:00
Anders Carlsson d19fd0dd57 Move previously unsupported VLA test to vla.c
llvm-svn: 64173
2009-02-09 21:48:07 +00:00
Daniel Dunbar 8a1ca06456 ccc: -dM wasn't being passed to Darwin/CC1 correctly.
llvm-svn: 64169
2009-02-09 21:22:38 +00:00
Daniel Dunbar 7aa851246e Update test case; VLA's are now supported.
llvm-svn: 64168
2009-02-09 21:19:23 +00:00
Douglas Gregor 0db4ccd7fb Implement Sebastian's idea for simplifying our handling of the greater-than operator/delimiter. Also, clean up after ourselves following a failed parse of a template-argument-list
llvm-svn: 64166
2009-02-09 21:04:56 +00:00
Evan Cheng fe174df170 Simplify code.
llvm-svn: 64164
2009-02-09 21:01:06 +00:00
Evan Cheng 020588cee3 Make sure constant subscript is truncated to ptr size if it may not fit.
llvm-svn: 64163
2009-02-09 20:54:38 +00:00
Ted Kremenek d7b4f40b18 CallExpr now uses ASTContext's allocate to allocate/delete its array of subexpressions.
llvm-svn: 64162
2009-02-09 20:51:47 +00:00
Anders Carlsson 15949b3a32 Use the new cleanup infrastructure for VLAs. The next iteration of patches will remove the old Obj-C EH cleanup code.
llvm-svn: 64161
2009-02-09 20:41:50 +00:00
Anders Carlsson bfee7e921b Use the new cleanup infrastructure for @try/@finally
llvm-svn: 64160
2009-02-09 20:38:58 +00:00
Anders Carlsson 1ac6282c5b Replace a bunch of EmitBranch calls with EmitBranchThroughCleanup. No functionality change (yet).
llvm-svn: 64159
2009-02-09 20:31:03 +00:00
Gabor Greif 5b9974a81f incorporate review feedback
llvm-svn: 64158
2009-02-09 20:27:45 +00:00
Anders Carlsson ff0bb6ce62 Save and restore the DidCallStackSave variable
llvm-svn: 64157
2009-02-09 20:23:40 +00:00
Anders Carlsson f4478e94b8 Add DidCallStackSave variable to CodeGenFunction.
llvm-svn: 64156
2009-02-09 20:20:56 +00:00
Douglas Gregor aef040a28e When handling "the rest" of a designated array subobject, maybe sure
to tell it that it wasn't (directly) designated. This way, we unwind
back to the explicit initializer list properly rather than getting
stuck in the wrong subobject. Fixes llvm.org/PR3519

llvm-svn: 64155
2009-02-09 19:45:19 +00:00
Douglas Gregor 67b556a0da Eliminate TemplateArg so that we only have a single kind of
representation for template arguments. Also simplifies the interface
for ActOnClassTemplateSpecialization and eliminates some annoying
allocations of TemplateArgs.

My attempt at smart pointers for template arguments lists is
relatively lame. We can improve it once we're sure that we have the
right representation for template arguments.

llvm-svn: 64154
2009-02-09 19:34:22 +00:00
Douglas Gregor 8bf4205c70 Start processing template-ids as types when the template-name refers
to a class template. For example, the template-id 'vector<int>' now
has a nice, sugary type in the type system. What we can do now:

  - Parse template-ids like 'vector<int>' (where 'vector' names a
    class template) and form proper types for them in the type system.
  - Parse icky template-ids like 'A<5>' and 'A<(5 > 0)>' properly,
    using (sadly) a bool in the parser to tell it whether '>' should
    be treated as an operator or not.

This is a baby-step, with major problems and limitations:
  - There are currently two ways that we handle template arguments
  (whether they are types or expressions). These will be merged, and,
  most likely, TemplateArg will disappear.
  - We don't have any notion of the declaration of class template
  specializations or of template instantiations, so all template-ids
  are fancy names for 'int' :)

llvm-svn: 64153
2009-02-09 18:46:07 +00:00
Sebastian Redl 1df2bbe7f9 Update new expression to make use of Declarator::getSourceRange().
References are not objects; implement this in Type::isObjectType().

llvm-svn: 64152
2009-02-09 18:24:27 +00:00
Sebastian Redl f6591ca6d9 Implement Declarator::getSourceRange().
llvm-svn: 64151
2009-02-09 18:23:29 +00:00
Dan Gohman a950e99dee Use doxygen comment syntax.
llvm-svn: 64150
2009-02-09 18:12:09 +00:00
Ted Kremenek 0203db73ee Fix PR 2514: Do not flag dead initializations for variables initialized to a constant global variable.
llvm-svn: 64149
2009-02-09 18:01:00 +00:00
Dan Gohman 9280a685db Use slightly more correct grammar in error messages.
llvm-svn: 64148
2009-02-09 17:41:21 +00:00
Mikhail Glushenkov 8ebeee37dc 80-column violations.
llvm-svn: 64147
2009-02-09 17:11:05 +00:00
Ted Kremenek e2559b22d0 Deallocate the StringLiteral itself in StringLiteral::Destroy() and deallocate the string data before running StringLiteral's destructor.
llvm-svn: 64146
2009-02-09 17:10:09 +00:00
Ted Kremenek 5b0d90fa79 Allocate the subexpression array for OberloadExpr from ASTContext's allocator.
llvm-svn: 64145
2009-02-09 17:08:14 +00:00
Ted Kremenek 42bdbef222 Refine PostStmtCustom to reference a tagged data pair with the tag to indicate the checker.
llvm-svn: 64144
2009-02-09 16:59:59 +00:00
Ted Kremenek a4bebd0c69 Added a new ProgramPoint 'PostStmtCustom' to enable checker-specific ProgramPoints.
llvm-svn: 64143
2009-02-09 16:52:31 +00:00
Gabor Greif cab008f51f make sure that BranchInst::getSuccessor() does not assert in cast<>
even if the underlying operand is NULL. This may happen in debugging context
within opt with partial loop unrolling (see test/Transforms/LoopUnroll/partial.ll).
After this fix I can resubmit the (backed out) r63459:
* lib/VMCore/AsmWriter.cpp: use precise accessors.

llvm-svn: 64142
2009-02-09 15:45:06 +00:00
Douglas Gregor 9817f4a717 Make Sema::getTypeName return the opaque pointer of a QualType rather
than a Decl, which gives us some more flexibility to express the
results with the type system. There are no clients using this
flexibility yet, but it's meant to be able to describe qualified names
as written in the source (e.g., "foo::type") or template-ids that name
a class template specialization (e.g., "std::vector<INT>").

DeclSpec's TST_typedef has become TST_typename, to reflect its use to
describe types found by name (that may or may not be typedefs). The
type representation of a DeclSpec with TST_typename is an opaque
QualType pointer. All users of TST_typedef, both direct and indirect,
have been updated for these changes.

llvm-svn: 64141
2009-02-09 15:09:02 +00:00