]>
granicus.if.org Git - clang/log
Chris Lattner [Wed, 15 Apr 2009 16:44:12 +0000 (16:44 +0000)]
Tblgen now passes the default mapping explicitly, instead of having it
be tied to the diag class. This requires an LLVM tree update.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69175
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 15 Apr 2009 16:43:37 +0000 (16:43 +0000)]
add a bunch of files.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69174
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Wed, 15 Apr 2009 16:35:07 +0000 (16:35 +0000)]
PCH support for string literals
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69172
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Wed, 15 Apr 2009 16:34:29 +0000 (16:34 +0000)]
Driver: Add --help-hidden
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69171
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Wed, 15 Apr 2009 16:31:36 +0000 (16:31 +0000)]
__objc_superrefs belongs to __DATA segment.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69170
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Wed, 15 Apr 2009 15:58:59 +0000 (15:58 +0000)]
PCH support for UnaryOperator, SizeOfAlignOfExpr
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69169
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Wed, 15 Apr 2009 15:55:24 +0000 (15:55 +0000)]
Start attempting to generate code for C++ ctors.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69168
91177308 -0d34-0410-b5e6-
96231b3b80d8
Steve Naroff [Wed, 15 Apr 2009 15:20:03 +0000 (15:20 +0000)]
Fix <rdar://problem/
6789707 > "warning: 'extern' variable has an initializer" not correct for __private_extern__.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69167
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 15 Apr 2009 14:42:02 +0000 (14:42 +0000)]
rename variable in comment, not just in code :).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69166
91177308 -0d34-0410-b5e6-
96231b3b80d8
Steve Naroff [Wed, 15 Apr 2009 14:38:36 +0000 (14:38 +0000)]
Fix <rdar://problem/
6791490 > [clang10 regression] [sema] invalid illegal jump diagnostic.
caused by: <rdar://problem/
6252084 > [sema] jumps into Obj-C exception blocks should be disallowed.
Sema::RecursiveCalcLabelScopes() and Sema::RecursiveCalcJumpScopes() need to pop the ScopeStack within the statement iteration loop (was outside the loop).
Eli, please review (thanks).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69165
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 15 Apr 2009 07:06:34 +0000 (07:06 +0000)]
this should be private
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69158
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 15 Apr 2009 07:05:12 +0000 (07:05 +0000)]
add another sanity check for -Werror=xx
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69157
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 15 Apr 2009 07:03:57 +0000 (07:03 +0000)]
add a missing &&
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69156
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 15 Apr 2009 07:02:57 +0000 (07:02 +0000)]
fix a broken test, that passed for the wrong reason. Two wrongs make a right! :)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69155
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 15 Apr 2009 07:01:18 +0000 (07:01 +0000)]
Rejigger how -pedantic and -pedantic-errors work and their interaction
with other diagnostic mapping. In the new scheme, -Wfoo or -Wno-foo or
-Werror=foo all override the -pedantic options, and __extension__
robustly silences all extension diagnostics in their scope.
An added bonus of this change is that MAP_DEFAULT goes away, meaning that
per-diagnostic mapping information can now be stored in 2 bits, doubling
the density of the Diagnostic::DiagMapping array. This also
substantially simplifies Diagnostic::getDiagnosticLevel.
OTOH, this temporarily introduces some "macro intensive" code in
Diagnostic.cpp. This will be addressed in a later patch.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69154
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Wed, 15 Apr 2009 06:41:24 +0000 (06:41 +0000)]
Implement support for designated initializers that refer to members of
anonymous structs or unions. Fixes PR3778.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69153
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Wed, 15 Apr 2009 05:36:58 +0000 (05:36 +0000)]
Add support for mangling C++ constructors. Review appreciated (I'm looking at you, Doug)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69150
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 15 Apr 2009 05:15:08 +0000 (05:15 +0000)]
make default diagnostic mapping more explicit in .td file.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69149
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 15 Apr 2009 04:57:48 +0000 (04:57 +0000)]
remove some commented out -Wstrict-selector-match stuff.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69148
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Wed, 15 Apr 2009 04:56:10 +0000 (04:56 +0000)]
Switch designated-initializer checking from using designator iterators
to using designator indices. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69147
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Wed, 15 Apr 2009 04:54:29 +0000 (04:54 +0000)]
Don't tip-to around BitstreamReader::JumpToBit jumping to the end of the stream. LLVM has been updated to allow this
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69146
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 15 Apr 2009 04:51:48 +0000 (04:51 +0000)]
clean up error messages.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69142
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 15 Apr 2009 04:51:29 +0000 (04:51 +0000)]
add Diagnostic.td to proj
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69141
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 15 Apr 2009 04:37:12 +0000 (04:37 +0000)]
Add support for -Werror=foo and -Wno-error=foo
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69138
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Wed, 15 Apr 2009 04:36:55 +0000 (04:36 +0000)]
Add CGCXX.h with ctor/dtor type enumerations. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69137
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 15 Apr 2009 04:27:38 +0000 (04:27 +0000)]
refactor a bunch of the warning parsing stuff to simplify it. This removes the
-Wfoo=ignore syntax. GCC supports -Wno-foo, no need to invent our own stuff.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69136
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 15 Apr 2009 04:26:10 +0000 (04:26 +0000)]
remove #include of system header, making this a) not apple specific, and
b) test dramatically faster.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69135
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Wed, 15 Apr 2009 04:10:19 +0000 (04:10 +0000)]
Simplify CodeGenFunction::GenerateCode.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69134
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Wed, 15 Apr 2009 03:36:15 +0000 (03:36 +0000)]
remove dead code.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69133
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Wed, 15 Apr 2009 02:56:18 +0000 (02:56 +0000)]
Tweaks to Objective-C metadata (32 & 64-bit) to match llvm-gcc.
- Set alignment on property lists.
- 32-bit:
o Set section on property lists.
o Fix section name for category class methods.
o Fix symbol name for property lists.
o Fix section name for class method.
o Set alignment and section on class extension structure.
o Set alignment on a number of things: instance variables, methods,
method descriptions, the symbols structure.
- 64-bit:
o Fix section flags for protocol list.
I doubt most of these were problems in practice, but it is nice to
match llvm-gcc.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69132
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Wed, 15 Apr 2009 02:37:43 +0000 (02:37 +0000)]
Driver: For clang, accept -fsigned-bitfields and reject
-funsigned-bitfields for now (clang defaults to -fsigned-bitfields).
- <rdar://problem/
6790309 > ER: Support
-fsigned-bitfields/-funsigned-bitfields
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69131
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Wed, 15 Apr 2009 00:25:59 +0000 (00:25 +0000)]
PCH support for CStyleCastExpr and BinaryOperator expression kinds.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69119
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Wed, 15 Apr 2009 00:08:05 +0000 (00:08 +0000)]
Improve "assignment to cast" diagnostic.
- Strip off extra parens when looking for casts.
- Change the location info to point at the cast (instead of the
assignment).
For example, on
int *b;
#define a ((void*) b)
void f0() {
a = 10;
}
we now emit:
/tmp/t.c:4:3: error: assignment to cast is illegal, lvalue casts are not supported
a = 10;
^ ~
/tmp/t.c:2:12: note: instantiated from:
#define a ((void*) b)
~^~~~~~~~~~
instead of:
/tmp/t.c:4:5: error: expression is not assignable
a = 10;
~ ^
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69114
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Tue, 14 Apr 2009 23:59:37 +0000 (23:59 +0000)]
PCH support for ParenExpr
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69106
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Tue, 14 Apr 2009 23:32:43 +0000 (23:32 +0000)]
Add PCH support for ImplicitCastExprs. This is the first expression
kind PCH handles that has an expression as an operand, so most of this
work is in the infrastructure to rebuild expression trees from the
serialized representation. We now store expressions in post-order
(e.g., Reverse Polish Notation), so that we can easily rebuild the
appropriate expression tree.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69101
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 14 Apr 2009 23:26:44 +0000 (23:26 +0000)]
Strip paren expressions when trying to diagnose "cast as lvalue"
extension.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69100
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 14 Apr 2009 23:22:57 +0000 (23:22 +0000)]
Change Lexer::MeasureTokenLength to take a LangOptions reference.
This allows it to accurately measure tokens, so that we get:
t.cpp:8:13: error: unknown type name 'X'
static foo::X P;
~~~~~^
instead of the woefully inferior:
t.cpp:8:13: error: unknown type name 'X'
static foo::X P;
~~~~ ^
Most of this is just plumbing to push the reference around.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69099
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Tue, 14 Apr 2009 23:15:21 +0000 (23:15 +0000)]
Diagnose properties which have no implementations;
either unimplemented setter/getter or no
implementation directive.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69098
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 14 Apr 2009 23:14:47 +0000 (23:14 +0000)]
Set alignment on __cstring metadata variables to 1 (matching
llvm-gcc).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69097
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 14 Apr 2009 22:44:26 +0000 (22:44 +0000)]
Avoid use of magic \01 prefix when unneeded.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69093
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 14 Apr 2009 22:44:23 +0000 (22:44 +0000)]
add fixitrewriter to xcode proj
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69092
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 14 Apr 2009 22:41:13 +0000 (22:41 +0000)]
Comment fix.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69091
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 14 Apr 2009 22:17:06 +0000 (22:17 +0000)]
Make the implicit-int handling error recovery stuff handle C++
nested name specifiers. Now we emit stuff like:
t.cpp:8:13: error: unknown type name 'X'
static foo::X P;
~~~~ ^
instead of:
t.cpp:8:16: error: invalid token after top level declarator
static foo::X P;
^
This is inspired by a really awful error message I got from
g++ when I misspelt diag::kind as diag::Kind.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69086
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Tue, 14 Apr 2009 21:55:33 +0000 (21:55 +0000)]
Add PCH support for PredefinedExpr and FloatingLiteral expressions
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69084
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 14 Apr 2009 21:34:55 +0000 (21:34 +0000)]
refactor "implicit int error recovery" code out of
ParseDeclarationSpecifiers into its own function, no
functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69083
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Tue, 14 Apr 2009 21:18:50 +0000 (21:18 +0000)]
PCH support for a few very, very simple kinds of expressions. Hook up
expression (de-)serialization for VLAs, variable initializers,
enum constant initializers, and bitfield widths.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69075
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 14 Apr 2009 21:16:09 +0000 (21:16 +0000)]
Fix a regression in a previous patch that broke implicit
int in a bitfield. Shantonu found this in a gcc testsuite file.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69074
91177308 -0d34-0410-b5e6-
96231b3b80d8
Steve Naroff [Tue, 14 Apr 2009 20:53:38 +0000 (20:53 +0000)]
Fix <rdar://problem/
6252084 > [sema] jumps into Obj-C exception blocks should be disallowed.
This builds on Eli's work from http://llvm.org/viewvc/llvm-project?view=rev&revision=65678.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69073
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 14 Apr 2009 20:36:01 +0000 (20:36 +0000)]
add support for -W[no-]extra-tokens
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69071
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 14 Apr 2009 20:30:29 +0000 (20:30 +0000)]
remove dead enum
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69070
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 14 Apr 2009 20:25:53 +0000 (20:25 +0000)]
Fix PR3988: extern inline functions get strong symbol definitions in
C99 mode. This is a regression from an earlier patch of mine.
This also simplifies the linkage enums a bit.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69069
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Tue, 14 Apr 2009 18:41:56 +0000 (18:41 +0000)]
Do not dead code strip global meta-data objects.
This will match gcc's behavior in the arena.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69061
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Tue, 14 Apr 2009 18:24:37 +0000 (18:24 +0000)]
Fixup whitespacing.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69055
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 14 Apr 2009 18:05:08 +0000 (18:05 +0000)]
temporarily revert r69046
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69054
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 14 Apr 2009 17:42:51 +0000 (17:42 +0000)]
Fix comment.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69053
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Tue, 14 Apr 2009 17:10:28 +0000 (17:10 +0000)]
Add a tricky, tricky test case for PCH that we currently don't handle. Committed with a FIXME so that we don't forget it
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69052
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 14 Apr 2009 17:02:11 +0000 (17:02 +0000)]
implement some sema for gnuc_inline attribute. Reject always_inline and no_inline on objc methods.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69051
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Tue, 14 Apr 2009 16:58:56 +0000 (16:58 +0000)]
Support code generation of 'this' exprs
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69050
91177308 -0d34-0410-b5e6-
96231b3b80d8
Sanjiv Gupta [Tue, 14 Apr 2009 16:46:37 +0000 (16:46 +0000)]
Literal value calculation isn't likely to overflow on targets having int as 32 or less. Fixing the assert as it otherwise triggers for PIC16 which as i16 as int.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69046
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 14 Apr 2009 16:44:36 +0000 (16:44 +0000)]
implement codegen support for __attribute((__gnuc_inline__)),
pulling some attribute munging stuff into GetLinkageForFunction.
This should fix PR3986
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69045
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 14 Apr 2009 16:30:50 +0000 (16:30 +0000)]
recognize the gnuc_inline attribute.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69044
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Tue, 14 Apr 2009 16:27:31 +0000 (16:27 +0000)]
When building a PCH file, don't perform end-of-translation-unit
wrap-up (e.g., turning tentative definitions into definitions). Also,
very that, when we actually use the PCH file, we get the ride code
generation for tentative definitions and definitions that show up in
the PCH file.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69043
91177308 -0d34-0410-b5e6-
96231b3b80d8
Steve Naroff [Tue, 14 Apr 2009 15:11:46 +0000 (15:11 +0000)]
ASTContext::mergeTypes(): Loosen up the type checking for 'Class' (treating it like 'id').
This fixes <rdar://problem/
6782722 > XCDataTipsManager.m registers, observes notifications in class methods.
The radar above is the result of clang typing 'self' in a class method as 'Class', which results in some spurious warnings (GCC types 'self' in a class method as 'id').
I considered changing the type of 'self' to 'id' (to conform to GCC), however this resulted in *many* test cases breaking. In addition, I really prefer a more strongly typed 'self'.
All in all, this is the least obtrusive fix I could find for removing the spurious warnings (though we do loose some valid warnings).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69041
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 14 Apr 2009 08:05:55 +0000 (08:05 +0000)]
Refactor how attributes are set on values.
- Pull out SetCommonAttributes, which handles the things common to
aliases, methods, functions, and variables.
- Pull out SetLLVMFunctionAttributesForDefinition, which handles the
LLVM attributes which we only want to apply to a definition (like
noinline and alwaysinline).
- Kill SetGVDeclarationAttributes (inlined into SetFunctionAttributes
and specialized).
- Kill SetFunctionAttributesForDefinition (inlined into sole caller).
- Inline SetGVDefinitionAttributes into SetMethodAttributes and
specialize.
- Rename SetGVDefinitionAttributes to SetFunctionDefinitionAttributes.
This is supposed to be a no functionality change commit, but I may
have made a mistake.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69036
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 14 Apr 2009 07:19:20 +0000 (07:19 +0000)]
Split SetGlobalValueAttributes into definition/declaration halves.
- No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69035
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 14 Apr 2009 07:08:30 +0000 (07:08 +0000)]
Rename (one) SetFunctionAttributes to SetLLVMFunctionAttributes to
disambiguate it.
- No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69034
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 14 Apr 2009 07:02:17 +0000 (07:02 +0000)]
Reduce indentation, no functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69033
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 14 Apr 2009 06:44:48 +0000 (06:44 +0000)]
defer emission of always_inline, extern_inline, and inline functions (when
not in c89 mode).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69032
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 14 Apr 2009 06:32:05 +0000 (06:32 +0000)]
give always_inline functions internal linkage. If they cannot be
inlined for some reason, then we don't want a strong or even weak
definition.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69031
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 14 Apr 2009 06:27:57 +0000 (06:27 +0000)]
set the linkage of an inline function according to its language rules.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69030
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 14 Apr 2009 06:19:49 +0000 (06:19 +0000)]
Add a comment on SetGlobalValueAttributes.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69029
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 14 Apr 2009 06:04:17 +0000 (06:04 +0000)]
add a new enum type for linkage, no functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69028
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 14 Apr 2009 06:00:08 +0000 (06:00 +0000)]
Clean up handling of visibility.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69027
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 14 Apr 2009 05:33:52 +0000 (05:33 +0000)]
reduce indentation, no functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69026
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 14 Apr 2009 05:27:13 +0000 (05:27 +0000)]
do not set visibility on "private" or "available externally" linkage objects.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69025
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 14 Apr 2009 05:15:20 +0000 (05:15 +0000)]
Offer a fixit hint for our warning about tokens at the end of a directive:
t.c:3:8: warning: extra tokens at end of #endif directive
#endif foo
^
//
Don't do this in strict-C89 mode because bcpl comments aren't
valid there, and it is too much trouble to analyze whether
C block comments are safe.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69024
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 14 Apr 2009 05:07:49 +0000 (05:07 +0000)]
Fix the #import / #include_next "extra tokens at end of #foo directive"
Warning to properly report that it is an import/include_next instead of
claiming it is a #include.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69023
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Tue, 14 Apr 2009 02:45:29 +0000 (02:45 +0000)]
Use hasAttr instead of getAttr for conditionals.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69021
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 14 Apr 2009 02:25:56 +0000 (02:25 +0000)]
Audit __private_extern__ handling.
- Exposed quite a few Sema issues and a CodeGen crash.
- See FIXMEs in test case, and in SemaDecl.cpp (PR3983).
I'm skeptical that __private_extern__ should actually be a storage
class value. I think that __private_extern__ basically amounts to
extern A __attribute__((visibility("hidden")))
and would be better off handled (a) as that, or (b) with an extra bit
in the VarDecl.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69020
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 14 Apr 2009 02:08:49 +0000 (02:08 +0000)]
Add VarDecl::getStorageClassSpecifierString (StorageClass -> const char*).
- No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69019
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Tue, 14 Apr 2009 00:57:29 +0000 (00:57 +0000)]
Fixup CodeGen for __weak __block variables. Radar
6756266
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69010
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Tue, 14 Apr 2009 00:56:59 +0000 (00:56 +0000)]
Fix build error.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69009
91177308 -0d34-0410-b5e6-
96231b3b80d8
Steve Naroff [Tue, 14 Apr 2009 00:40:09 +0000 (00:40 +0000)]
Change dyn_cast<> to isa<>. Pointed out by Anders (thanks).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69007
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Tue, 14 Apr 2009 00:24:19 +0000 (00:24 +0000)]
When writing a PCH file, keep track of all of the non-static,
non-inline external definitions (and tentative definitions) that are
found at the top level. The corresponding declarations are stored in a
record in the PCH file, so that they can be provided to the
ASTConsumer (via HandleTopLevelDecl) when the PCH file is read.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69005
91177308 -0d34-0410-b5e6-
96231b3b80d8
Steve Naroff [Tue, 14 Apr 2009 00:03:58 +0000 (00:03 +0000)]
Fix crasher in ASTContext::getObjCEncodingForMethodDecl().
This was exposed as a result of something else that was recently fixed.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69004
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Mon, 13 Apr 2009 22:49:25 +0000 (22:49 +0000)]
Partial PCH support for FileScopeAsmDecl and BlockDecl. Both require
expression or statement serialization before we can test them.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69002
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Mon, 13 Apr 2009 22:18:37 +0000 (22:18 +0000)]
PCH support for functions and their parameters.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68997
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Mon, 13 Apr 2009 21:47:26 +0000 (21:47 +0000)]
Minor work related to removing the assumption that value initialization
implies an all-zero bit pattern.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68994
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Mon, 13 Apr 2009 21:41:57 +0000 (21:41 +0000)]
Minor simplification.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68992
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Mon, 13 Apr 2009 21:28:54 +0000 (21:28 +0000)]
PR3461: reject initializer for incomplete type. Based on patch by Tim
Northover.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68991
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Mon, 13 Apr 2009 21:26:41 +0000 (21:26 +0000)]
Remove CheckBuiltinMacros script, obsoleted since we support -dM now.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68990
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Mon, 13 Apr 2009 21:25:25 +0000 (21:25 +0000)]
Ignore Output directory
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68989
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Mon, 13 Apr 2009 21:20:57 +0000 (21:20 +0000)]
PCH support for record decls/types and their fields. Now that we can
handle the definition of __builtin_va_list on x86-64, eliminate the
forced -triple in PCH tests to get better coverage.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68988
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Mon, 13 Apr 2009 21:08:27 +0000 (21:08 +0000)]
Update to use hasAttr() instead of getAttr().
- No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68987
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Mon, 13 Apr 2009 20:50:16 +0000 (20:50 +0000)]
Print the number (and percentage) of identifiers read from the PCH file as part of its statistics
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68985
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Mon, 13 Apr 2009 20:46:52 +0000 (20:46 +0000)]
Introduce PCH (de-)serialization for most compound types, excluding
Objective-C types and record types for the moment.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68984
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Mon, 13 Apr 2009 20:46:33 +0000 (20:46 +0000)]
Reapply 68936, turned out to that clang's better debug info exposed a
codegenerator bug.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68983
91177308 -0d34-0410-b5e6-
96231b3b80d8
Steve Naroff [Mon, 13 Apr 2009 20:26:29 +0000 (20:26 +0000)]
Move/update recent FIXME (wrt UTF-8 checking for ObjC @-strings).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68982
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 13 Apr 2009 20:19:36 +0000 (20:19 +0000)]
upgrade "extra tokens at end of directive" to warn by default.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68980
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Mon, 13 Apr 2009 19:30:37 +0000 (19:30 +0000)]
In objc2's None-Fragile ABI, one cannot use the super class ivar for
setter/getter synthesis.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68976
91177308 -0d34-0410-b5e6-
96231b3b80d8