Commit Graph

53287 Commits

Author SHA1 Message Date
Chris Lattner 0f65a585ba Fix a wart that existed from before we had EXTWARN.
llvm-svn: 63272
2009-01-29 05:23:19 +00:00
Chris Lattner 60f36223a9 move library-specific diagnostic headers into library private dirs. Reduce
redundant #includes.  Patch by Anders Johnsen!

llvm-svn: 63271
2009-01-29 05:15:15 +00:00
Chris Lattner d9ae05ba50 fix an absolutely inscrutible gcc 4.0 error:
llvm[0]: Compiling SemaInit.cpp for Debug build 
SemaInit.cpp:171: error: ‘InitListChecker’ has not been declared
SemaInit.cpp:171: error: ISO C++ forbids declaration of ‘InitListChecker’ with no type
SemaInit.cpp: In function ‘int InitListChecker(clang::Sema*, clang::InitListExpr*, clang::QualType&)’:
SemaInit.cpp:172: error: ‘hadError’ was not declared in this scope
SemaInit.cpp:173: error: ‘SemaRef’ was not declared in this scope
SemaInit.cpp:177: error: ‘FullyStructuredList’ was not declared in this scope

llvm-svn: 63270
2009-01-29 05:10:57 +00:00
Chris Lattner c0474013cb Fix PR3424, a static constructor ordering issue. Patch by Robert Schuster!
llvm-svn: 63269
2009-01-29 04:43:42 +00:00
Evan Cheng 76a2736c74 Exit with nice warnings when register allocator run out of registers.
llvm-svn: 63267
2009-01-29 02:20:59 +00:00
Dan Gohman e58ab79f33 Make x86's BT instruction matching more thorough, and add some
dagcombines that help it match in several more cases. Add
several more cases to test/CodeGen/X86/bt.ll. This doesn't
yet include matching for BT with an immediate operand, it
just covers more register+register cases.

llvm-svn: 63266
2009-01-29 01:59:02 +00:00
Dan Gohman 84f0165273 Move the code that starts printing the Select_* functions
after the code that sorts the patterns. This doesn't
affect the output, but it makes the code a little easier
to follow.

llvm-svn: 63265
2009-01-29 01:37:18 +00:00
Daniel Dunbar 0aa2606190 Add folding for complex mul and fix some major bugs in complex float
evaluation (alternate part of real/imag init was being set to 3 not 0
because the wrong APFloat constructor was being called).
 - Test cases coming once some more support is in.

llvm-svn: 63264
2009-01-29 01:32:56 +00:00
Evan Cheng 89ba594975 A slight compile time optimization. If the caller knows there isn't a free register getReg() should not call getFreeReg().
llvm-svn: 63263
2009-01-29 01:13:00 +00:00
Douglas Gregor 35a52fabf4 Add another devilish testcase for designated initializers
llvm-svn: 63262
2009-01-29 01:10:11 +00:00
Douglas Gregor cde232f7f0 Better documentation for our initialization checker
llvm-svn: 63261
2009-01-29 01:05:33 +00:00
Dale Johannesen 839acbb089 Add DebugLoc-sensitive versions of many node creation
functions.  Currently omitted:  memcpy, memmove, memset.

llvm-svn: 63259
2009-01-29 00:47:48 +00:00
Douglas Gregor 85df8d82c7 Move InitListChecker out of Sema.h
llvm-svn: 63258
2009-01-29 00:45:39 +00:00
Douglas Gregor f6d2752f12 Eliminate infinite looping in a wacky case with designated initializers. Simplifies (somewhat) the actually checking of the initializer expression following the designators
llvm-svn: 63257
2009-01-29 00:39:20 +00:00
Steve Naroff dcfe56d489 Refactor Sema::LookupDecl() into 2 functions: LookupDeclInScope() and LookupDeclInContext().
The previous interface was very confusing. This is much more explicit, which will be easier to understand/optimize/convert.

The plan is to eventually deprecate both of these functions. For now, I'm focused on performance.

llvm-svn: 63256
2009-01-29 00:07:50 +00:00
Evan Cheng 55ca1d38ea Fix comment about removeRange.
llvm-svn: 63255
2009-01-29 00:06:09 +00:00
Douglas Gregor e6af7a028c Remove Expr::hasSideEffects. It doesn't work anyway
llvm-svn: 63254
2009-01-28 23:43:32 +00:00
Douglas Gregor 17bd094a6b Improvements to code-generation and semantic analysis of designated
initializers.

  - We now initialize unions properly when a member other than the
    first is named by a designated initializer.
  - We now provide proper semantic analysis and code generation for
    GNU array-range designators *except* that side effects will occur
    more than once. We warn about this.

llvm-svn: 63253
2009-01-28 23:36:17 +00:00
Mon P Wang 9150f735fa Fixed lowering of v816 shuffles.
llvm-svn: 63252
2009-01-28 23:11:14 +00:00
Fariborz Jahanian d27a820ae2 Add setter/getter methods to the list of methods
of class's meta-data (related to objc2 nonfragile abi).

llvm-svn: 63251
2009-01-28 22:46:49 +00:00
Ted Kremenek b4dd3f8685 Remove '#if 0' code.
llvm-svn: 63250
2009-01-28 22:35:55 +00:00
Ted Kremenek 2e561dd491 Remove method 'AddNE' from the public interface of ConstraintManager.
llvm-svn: 63249
2009-01-28 22:27:59 +00:00
Daniel Dunbar f50e60b23a Implement basic _Complex integer constant folding.
- Merged into single ComplexEvaluator, these share too much logic to
   be worth splitting for float/int (IMHO). Will split on request.

llvm-svn: 63248
2009-01-28 22:24:07 +00:00
Bill Wendling 42b63bc175 Make test platform agnostic.
llvm-svn: 63247
2009-01-28 22:20:56 +00:00
Fariborz Jahanian 066347ec7b property metadata for objc2's nonfragile abi
llvm-svn: 63246
2009-01-28 22:18:42 +00:00
Bill Wendling 1b6a3bce82 Add DebugLoc to the getNode() methods.
llvm-svn: 63245
2009-01-28 22:17:52 +00:00
Dan Gohman d21775ae0e Give this test an explicit target, to make it host-independent.
llvm-svn: 63244
2009-01-28 22:14:58 +00:00
Ted Kremenek 5997644550 Add some comments to GRStateManager. No functionality change.
llvm-svn: 63243
2009-01-28 22:11:38 +00:00
Douglas Gregor 347f7eabb9 Code generation support for C99 designated initializers.
The approach I've taken in this patch is relatively straightforward,
although the code itself is non-trivial. Essentially, as we process
an initializer list we build up a fully-explicit representation of the
initializer list, where each of the subobject initializations occurs
in order. Designators serve to "fill in" subobject initializations in
a non-linear way. The fully-explicit representation makes initializer
lists (both with and without designators) easy to grok for codegen and
later semantic analyses. We keep the syntactic form of the initializer
list linked into the AST for those clients interested in exactly what
the user wrote.

Known limitations:
  - Designating a member of a union that isn't the first member may
    result in bogus initialization (we warn about this)
  - GNU array-range designators are not supported (we warn about this)

llvm-svn: 63242
2009-01-28 21:54:33 +00:00
Ted Kremenek c783209605 retain/release checker: Always generate an "autorelease" summary for an "autorelease" message, and have the summary processing logic treat it as a no-op in GC mode. This change is motivated to encode more of the semantics in the summaries themselves for eventual better diagnostics.
llvm-svn: 63241
2009-01-28 21:44:40 +00:00
Dan Gohman 511d5ece2b SDOperand has been renamed to SDValue. SDNode::Val is now
accessed via SDNode::getNode.

llvm-svn: 63240
2009-01-28 21:36:46 +00:00
Dan Gohman f52ac41566 Add more comments describing SDNode operator codes.
llvm-svn: 63239
2009-01-28 21:34:36 +00:00
Daniel Dunbar 804c0441c2 Handle complex types in ASTContext::mergeTypes
llvm-svn: 63238
2009-01-28 21:22:12 +00:00
Ted Kremenek f675864e3c Add autorelease test case.
llvm-svn: 63237
2009-01-28 21:20:48 +00:00
Dale Johannesen 666bf20441 Add DebugLoc-aware constructors for SDNode derived
classes (those that reasonably have a DebugLoc
associated with them).

llvm-svn: 63236
2009-01-28 21:18:29 +00:00
Dan Gohman 7a1b4538a0 Add some comments on ISD::NodeType.
llvm-svn: 63234
2009-01-28 21:13:08 +00:00
Devang Patel d7ecb3b661 Do not forget to derived type while constructing an array type.
llvm-svn: 63233
2009-01-28 21:08:20 +00:00
Ted Kremenek 62224c1d7f Add more PTH diagnostics for invalid PTH files, etc.
llvm-svn: 63232
2009-01-28 21:02:43 +00:00
Ted Kremenek 3b0589e4b4 Enhance PTHManager::Create() to take an optional Diagnostic* argument that can be used to report issues such as a missing PTH file.
llvm-svn: 63231
2009-01-28 20:49:33 +00:00
Ted Kremenek 5241832d1d Fix TextDiagnosticPrinter::HandleDiagnostic to handle invalid FullSourceLocs that do not have a SourceManager.
llvm-svn: 63230
2009-01-28 20:47:47 +00:00
Ted Kremenek bf16554640 Add method FullSourceLoc::getBufferData().
llvm-svn: 63229
2009-01-28 20:46:26 +00:00
Ted Kremenek 3587d0b762 Tweak doxygen comment. No functionality change.
llvm-svn: 63228
2009-01-28 20:45:37 +00:00
Chris Lattner df17987c19 Fix some issues with volatility, move "CanConvertToScalar" check
after the others.

llvm-svn: 63227
2009-01-28 20:16:43 +00:00
Steve Naroff 16c8e598ae Name change (isTypeName->getTypeName).
Since it doesn't return a bool, is shouldn't be prefixed with 'is'.

llvm-svn: 63226
2009-01-28 19:39:02 +00:00
Daniel Dunbar ad0d48d372 Fix test case (for -### printing version)
llvm-svn: 63223
2009-01-28 19:30:43 +00:00
Chris Lattner 1498e62117 strengthen this test.
llvm-svn: 63222
2009-01-28 19:29:30 +00:00
Daniel Dunbar 36ccb30a35 ccc: Support -v; invent a version number for ccc for now, will be
shared with clang eventually.

llvm-svn: 63220
2009-01-28 19:26:20 +00:00
Steve Naroff b04867265c Change Parser::ParseFunctionDeclarator() to annotate typename tokens.
This removes ~10% of the calls to Sema::isTypeName(), which amount to a little less than a 1% reduction in usertime (for Cocoa.h).

llvm-svn: 63219
2009-01-28 19:16:40 +00:00
Fariborz Jahanian b042a59230 Some refactoring of common code. No change in functionality.
llvm-svn: 63218
2009-01-28 19:12:34 +00:00
Mon P Wang a15ea78ea6 Fixed extract element when the result needs to be promoted and the input widened.
llvm-svn: 63217
2009-01-28 18:53:39 +00:00