Commit Graph

50520 Commits

Author SHA1 Message Date
Chris Lattner e3d20d9545 Convert IdentifierInfo's to be printed the same as DeclarationNames
with implicit quotes around them.  This has a bunch of follow-on 
effects and requires tweaking to a whole lot of code.  This causes
a regression in two tests (xfailed) by causing it to emit things like:

  Line 10: duplicate interface declaration for category 'MyClass1' ('Category1')

instead of:

  Line 10: duplicate interface declaration for category 'MyClass1(Category1)'

I will fix this in a follow-up commit.

As part of this, I had to start switching stuff to use ->getDeclName() instead
of Decl::getName() for consistency.  This is good, but I was planning to do this
as an independent patch.  There will be several follow-on patches
to clean up some of the mess, but this patch is already too big.

llvm-svn: 59917
2008-11-23 21:45:46 +00:00
Chris Lattner f7e69d5a77 add support for inserting a DeclarationName into a diagnostic directly
without calling getAsString().  This implicitly puts quotes around the
name, so diagnostics need to be tweaked to accommodate this.

llvm-svn: 59916
2008-11-23 20:28:15 +00:00
Chris Lattner d125393d24 inserting a qualtype adds quotes implicitly
llvm-svn: 59915
2008-11-23 20:27:13 +00:00
Scott Michel 037fe56069 Roll back rev 59890, since Chris says this can never happen.
llvm-svn: 59914
2008-11-23 19:22:48 +00:00
Duncan Sands 8d6e2e13d5 Rename SetCCResultContents to BooleanContents. In
practice these booleans are mostly produced by SetCC,
however the concept is more general.

llvm-svn: 59911
2008-11-23 15:47:28 +00:00
Chris Lattner 63ecc509e3 Genericize the qualtype formating callback to support any diag argument.
No functionality change.

llvm-svn: 59908
2008-11-23 09:21:17 +00:00
Chris Lattner 6a2ed6f6dc Add support for sending QualType's directly into diags and convert two
diags over to use this.  QualTypes implicitly print single quotes around 
them for uniformity and future extension.

Doing this requires a little function pointer dance to prevent libbasic
from depending on libast.

llvm-svn: 59907
2008-11-23 09:13:29 +00:00
Chris Lattner 4e2e9f1a5d other minor edits.
llvm-svn: 59906
2008-11-23 08:32:53 +00:00
Chris Lattner c788a8bdec minor cleanups.
llvm-svn: 59905
2008-11-23 08:16:56 +00:00
Chris Lattner ddd7581c73 Make JIT::runFunction handle functions with non-C calling conventions.
llvm-svn: 59904
2008-11-23 08:00:11 +00:00
Zhongxing Xu aa86cff14c Add out-of-bound memory access warning report code.
llvm-svn: 59903
2008-11-23 05:52:28 +00:00
Zhongxing Xu 60d6cd1940 Improve test case.
llvm-svn: 59902
2008-11-23 05:50:21 +00:00
Mon P Wang 0aa8f0a549 Added -disable-mmx using a patch from Preston Gurd.
llvm-svn: 59901
2008-11-23 04:37:22 +00:00
Mon P Wang 2967480f54 Added check to avoid generating extract subvector beyond the end of the vector when normalizing vector shuffles.
llvm-svn: 59900
2008-11-23 04:35:05 +00:00
Zhongxing Xu cdf25053ee Clean up code by using utility methods.
llvm-svn: 59899
2008-11-23 04:30:35 +00:00
Chris Lattner 1fea89ccb1 finish up the diagnostics documentation. We don't
support QualType and DeclarationName yet, so some of it
is lies, however, this will be fixed shortly.

llvm-svn: 59896
2008-11-23 00:42:53 +00:00
Chris Lattner 80bec16f14 more updates
llvm-svn: 59895
2008-11-23 00:28:33 +00:00
Misha Brukman 50de2b2365 Fixed named anchor for llvm.stackprotector intrinsic.
llvm-svn: 59893
2008-11-22 23:55:29 +00:00
Chris Lattner cc6147cd3b finish documentation of %select.
llvm-svn: 59892
2008-11-22 23:50:47 +00:00
Scott Michel 0be0339baa CellSPU: Fix bug 3056. Varadic extract_element was not implemented (nor was it
ever conceived to occur).

llvm-svn: 59891
2008-11-22 23:50:42 +00:00
Scott Michel fe96a906ef Check for NULL before traversing the isa<> type hierarchy checking with a
NULL-based reference.

Note: Encountered this a few times on Tiger + gcc 4.0.1. Might just be a
platform-specific compiler issue, but it's good defensive programming in any
case.

llvm-svn: 59890
2008-11-22 23:49:26 +00:00
Anders Carlsson 7c282e4f3f Return false if we encounter a type we can't handle.
llvm-svn: 59889
2008-11-22 22:56:32 +00:00
Sebastian Redl 632ab20e1e Fix test cases broken by quote normalization in diagnostics.
llvm-svn: 59888
2008-11-22 22:39:41 +00:00
Anders Carlsson 4046e65b27 An expression is not foldable if it can't be fully evaluated. Fixes PR3060
llvm-svn: 59887
2008-11-22 22:32:07 +00:00
Fariborz Jahanian 9ac535162b Implemented ir-gen for 'implicit' properties using the new AST nodes.
llvm-svn: 59886
2008-11-22 22:30:21 +00:00
Sebastian Redl 6cae80da20 Documentation for the plural modifier.
llvm-svn: 59885
2008-11-22 22:16:45 +00:00
Anders Carlsson 475f4bce36 Case values must be evaluated
llvm-svn: 59884
2008-11-22 21:50:49 +00:00
Chris Lattner e72a8a3048 start documenting Diagnostics. Sebastian, I'd appreciate it
if you can fill in the section for %plural.

llvm-svn: 59883
2008-11-22 21:41:31 +00:00
Chris Lattner ddda82b200 consistently use single quotes for quoted things.
llvm-svn: 59882
2008-11-22 21:16:43 +00:00
Anders Carlsson 59689ed764 Use Expr::Evaluate for case statements. Fixes PR2525
llvm-svn: 59881
2008-11-22 21:04:56 +00:00
Anders Carlsson 2fedf0e8f7 Fix indentation width.
llvm-svn: 59880
2008-11-22 20:49:42 +00:00
Chris Lattner bd414e34c2 remove a dead enum
llvm-svn: 59879
2008-11-22 20:47:38 +00:00
Fariborz Jahanian 5118c418e6 Support for implicit property assignment. Error assigning to
'implicit' property with no 'setter'.

llvm-svn: 59878
2008-11-22 20:25:50 +00:00
Chris Lattner 8cd9b96ee1 add a silly testcase
llvm-svn: 59877
2008-11-22 19:57:03 +00:00
Chris Lattner 1fdb4310e3 Describe how the JIT maps fields to MachineOperands, patch by
JP Bonn!

llvm-svn: 59876
2008-11-22 19:10:48 +00:00
Fariborz Jahanian bf65ce5372 And a test case for my last patch.
llvm-svn: 59875
2008-11-22 18:40:47 +00:00
Fariborz Jahanian 8a1810f06b New AST node to access "implicit" setter/getter using property dor syntax.
Issuing diagnostics when assigning to read-only properties.
This is work in progress.

llvm-svn: 59874
2008-11-22 18:39:36 +00:00
Anton Korobeynikov bff4b37af5 Make a convenient helper for printing offsets.
llvm-svn: 59872
2008-11-22 16:15:34 +00:00
Sebastian Redl 15b02d2e62 Implement a %plural modifier for complex plural forms in diagnostics. Use it in the overload diagnostics.
llvm-svn: 59871
2008-11-22 13:44:36 +00:00
Zhongxing Xu 4c8bf0086a Remove debug code.
llvm-svn: 59870
2008-11-22 13:23:00 +00:00
Zhongxing Xu 4d45b34a8a Initial support for checking out of bound memory access. Only support
ConcreteInt index for now.

llvm-svn: 59869
2008-11-22 13:21:46 +00:00
Chris Lattner 3b0f3ef97e remove some more old Diag methods, replace with a single static helper function
llvm-svn: 59868
2008-11-22 08:32:36 +00:00
Chris Lattner bc495d775f move the Diag method for Sema to be inline. This shrinks the release-asserts
clang executable (when built with gcc 4.2 on the mac) from 14519740 to 
14495028 bytes.  This shrinks individual object files as well: SemaChecking
from 23580->22248, SemaDeclObjc from 61368->57376, SemaExpr from 
115628->110516, as well as several others.

llvm-svn: 59867
2008-11-22 08:28:49 +00:00
Chris Lattner 060068a0ef alphabeticalize.
llvm-svn: 59866
2008-11-22 08:22:53 +00:00
Chris Lattner f3cb394f41 Fix a weird inconsistency with hex floats. Previously the lexer
would not eat the "-1" in "0x0p-1", but LiteralSupport would accept
it when extensions are on.  This caused strangeness and failures 
when hexfloats were properly treated as an extension (not error)
in LiteralSupport.

llvm-svn: 59865
2008-11-22 07:39:03 +00:00
Bill Wendling 5424e6d4ec Cleanup of the [SU]ADDO type legalization code. Patch by Duncan!
"It simplifies the type legalization part a bit, and produces better code by
teaching SelectionDAG about the extra bits in an i8 SADDO/UADDO node.  In
essence, I spontaneously decided that on x86 this i8 boolean result would be
either 0 or 1, and on other platforms 0/1 or 0/-1, depending on whether the
platform likes it's boolean zero extended or sign extended."

llvm-svn: 59864
2008-11-22 07:24:01 +00:00
Chris Lattner 59acca5874 remove the NumericLiteralParser::Diag helper method, inlining it into
its call sites.  This makes it more explicit when the hasError flag is
getting set and removes a confusing difference in behavior between
PP.Diag and Diag in this code.

llvm-svn: 59863
2008-11-22 07:23:31 +00:00
Chris Lattner 1ef2028205 Move the Preprocessor::Diag methods inline. This has the interesting
(and carefully calculated) effect of allowing the compiler to reason
about the aliasing properties of DiagnosticBuilder object better,
allowing the whole thing to be promoted to registers instead of
resulting in a ton of stack traffic.

While I'm not very concerned about the performance of the Diag() method
invocations, I *am* more concerned about their code size and impact on the
non-diagnostic code.  This patch shrinks the clang executable (in 
release-asserts mode with gcc-4.2) from 14523980 to 14519816 bytes.  This
isn't much, but it shrinks the lexer from 38192 to 37776, PPDirectives.o
from 31116 to 28868 bytes, etc.

llvm-svn: 59862
2008-11-22 07:03:46 +00:00
Anders Carlsson 4d5f2e532c Add test for PR2992.
llvm-svn: 59861
2008-11-22 06:42:54 +00:00
Chris Lattner fdabe83c67 inline a method into its only two call sites.
llvm-svn: 59860
2008-11-22 06:42:31 +00:00