Daniel Dunbar
f5f359fb73
Clean up handling of visibility.
...
llvm-svn: 69027
2009-04-14 06:00:08 +00:00
Chris Lattner
73920ce565
reduce indentation, no functionality change.
...
llvm-svn: 69026
2009-04-14 05:33:52 +00:00
Chris Lattner
6a0f907a5e
do not set visibility on "private" or "available externally" linkage objects.
...
llvm-svn: 69025
2009-04-14 05:27:13 +00:00
Chris Lattner
825676afdf
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.
llvm-svn: 69024
2009-04-14 05:15:20 +00:00
Chris Lattner
ce2ab6f425
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.
llvm-svn: 69023
2009-04-14 05:07:49 +00:00
Sanjiv Gupta
92bb846e2b
Handle aggregate type arguments to direct and indirect calls.
...
llvm-svn: 69022
2009-04-14 02:49:52 +00:00
Mike Stump
4c0dc0e48a
Use hasAttr instead of getAttr for conditionals.
...
llvm-svn: 69021
2009-04-14 02:45:29 +00:00
Daniel Dunbar
0ca1660129
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.
llvm-svn: 69020
2009-04-14 02:25:56 +00:00
Daniel Dunbar
b76b745707
Add VarDecl::getStorageClassSpecifierString (StorageClass -> const char*).
...
- No functionality change.
llvm-svn: 69019
2009-04-14 02:08:49 +00:00
Dale Johannesen
b866ce73b2
Use the output of the asm so the optimizer won't
...
delete it.
llvm-svn: 69018
2009-04-14 01:51:40 +00:00
Owen Anderson
a1902318e3
LoopIndexSplit needs to inform the loop pass manager of the instructions it is
...
deleting, not just the basic block.
llvm-svn: 69011
2009-04-14 01:04:19 +00:00
Mike Stump
ca5ae66122
Fixup CodeGen for __weak __block variables. Radar 6756266
...
llvm-svn: 69010
2009-04-14 00:57:29 +00:00
Mike Stump
d74673133d
Fix build error.
...
llvm-svn: 69009
2009-04-14 00:56:59 +00:00
Dale Johannesen
83593f4167
Do not force asm's to be chained if they don't touch
...
memory and aren't volatile. This was interfering with
good scheduling.
llvm-svn: 69008
2009-04-14 00:56:56 +00:00
Steve Naroff
323827e8d0
Change dyn_cast<> to isa<>. Pointed out by Anders (thanks).
...
llvm-svn: 69007
2009-04-14 00:40:09 +00:00
Evan Cheng
9787183b9b
Fix PR3934 part 2. findOnlyInterestingUse() was not setting IsCopy and IsDstPhys which are returned by value and used by callee. This happened to work on the earlier test cases because of a logic error in the caller side.
...
llvm-svn: 69006
2009-04-14 00:32:25 +00:00
Douglas Gregor
1a0d0b9acc
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.
llvm-svn: 69005
2009-04-14 00:24:19 +00:00
Steve Naroff
e4e55d2706
Fix crasher in ASTContext::getObjCEncodingForMethodDecl().
...
This was exposed as a result of something else that was recently fixed.
llvm-svn: 69004
2009-04-14 00:03:58 +00:00
Douglas Gregor
a541485bab
Partial PCH support for FileScopeAsmDecl and BlockDecl. Both require
...
expression or statement serialization before we can test them.
llvm-svn: 69002
2009-04-13 22:49:25 +00:00
Daniel Dunbar
097f630dad
Make these errors more noticable in build logs.
...
llvm-svn: 68998
2009-04-13 22:26:09 +00:00
Douglas Gregor
92f056fadf
PCH support for functions and their parameters.
...
llvm-svn: 68997
2009-04-13 22:18:37 +00:00
Bob Wilson
59dbbb2bb4
Change SelectionDAG type legalization to allow BUILD_VECTOR operands to be
...
promoted to legal types without changing the type of the vector. This is
following a suggestion from Duncan
(http://lists.cs.uiuc.edu/pipermail/llvmdev/2009-February/019923.html ).
The transformation that used to be done during type legalization is now
postponed to DAG legalization. This allows the BUILD_VECTORs to be optimized
and potentially handled specially by target-specific code.
It turns out that this is also consistent with an optimization done by the
DAG combiner: a BUILD_VECTOR and INSERT_VECTOR_ELT may be combined by
replacing one of the BUILD_VECTOR operands with the newly inserted element;
but INSERT_VECTOR_ELT allows its scalar operand to be larger than the
element type, with any extra high bits being implicitly truncated. The
result is a BUILD_VECTOR where one of the operands has a type larger the
the vector element type.
Any code that operates on BUILD_VECTORs may now need to be aware of the
potential type discrepancy between the vector element type and the
BUILD_VECTOR operands. This patch updates all of the places that I could
find to handle that case.
llvm-svn: 68996
2009-04-13 22:05:19 +00:00
Eli Friedman
20bb5e02a5
Minor work related to removing the assumption that value initialization
...
implies an all-zero bit pattern.
llvm-svn: 68994
2009-04-13 21:47:26 +00:00
Eli Friedman
c08711e840
Minor simplification.
...
llvm-svn: 68992
2009-04-13 21:41:57 +00:00
Eli Friedman
337cd3a536
PR3461: reject initializer for incomplete type. Based on patch by Tim
...
Northover.
llvm-svn: 68991
2009-04-13 21:28:54 +00:00
Daniel Dunbar
c0a4ea0c02
Remove CheckBuiltinMacros script, obsoleted since we support -dM now.
...
llvm-svn: 68990
2009-04-13 21:26:41 +00:00
Daniel Dunbar
115b8dd72b
Ignore Output directory
...
llvm-svn: 68989
2009-04-13 21:25:25 +00:00
Douglas Gregor
183671e2d2
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.
llvm-svn: 68988
2009-04-13 21:20:57 +00:00
Daniel Dunbar
4184ac847f
Update to use hasAttr() instead of getAttr().
...
- No functionality change.
llvm-svn: 68987
2009-04-13 21:08:27 +00:00
Dan Gohman
6c1426308c
Rename COPY_TO_SUBCLASS to COPY_TO_REGCLASS, and generalize
...
it accordingly. Thanks to Jakob Stoklund Olesen for pointing
out how this might be useful.
llvm-svn: 68986
2009-04-13 21:06:25 +00:00
Douglas Gregor
c3b1dd163b
Print the number (and percentage) of identifiers read from the PCH file as part of its statistics
...
llvm-svn: 68985
2009-04-13 20:50:16 +00:00
Douglas Gregor
85c0fcd66d
Introduce PCH (de-)serialization for most compound types, excluding
...
Objective-C types and record types for the moment.
llvm-svn: 68984
2009-04-13 20:46:52 +00:00
Daniel Dunbar
a431deb03c
Reapply 68936, turned out to that clang's better debug info exposed a
...
codegenerator bug.
llvm-svn: 68983
2009-04-13 20:46:33 +00:00
Steve Naroff
fb46e8658c
Move/update recent FIXME (wrt UTF-8 checking for ObjC @-strings).
...
llvm-svn: 68982
2009-04-13 20:26:29 +00:00
Bob Wilson
f6c2195383
Refactor some code in SelectionDAGLegalize::ExpandBUILD_VECTOR.
...
llvm-svn: 68981
2009-04-13 20:20:30 +00:00
Chris Lattner
648fa92fe1
upgrade "extra tokens at end of directive" to warn by default.
...
llvm-svn: 68980
2009-04-13 20:19:36 +00:00
Evan Cheng
f0843803a0
PR3934: Fix a bogus two-address pass assertion.
...
llvm-svn: 68979
2009-04-13 20:04:24 +00:00
Bill Wendling
7aba8e30c4
Get rid of some compile warnings.
...
llvm-svn: 68978
2009-04-13 19:45:05 +00:00
Douglas Gregor
afbe7d53f5
Add a static APInt::getNumWords
...
llvm-svn: 68977
2009-04-13 19:43:10 +00:00
Fariborz Jahanian
b6d5b54839
In objc2's None-Fragile ABI, one cannot use the super class ivar for
...
setter/getter synthesis.
llvm-svn: 68976
2009-04-13 19:30:37 +00:00
Steve Naroff
84073ec51f
Fixed crasher in <rdar://problem/6780904> [irgen] Assertion failed: (Result == conversionOK && "UTF-8 to UTF-16 conversion failed"), function GetAddrOfConstantCFString, file CodeGenModule.cpp, line 1063.
...
Still a diagnostic related FIXME (will discuss with Daniel/Fariborz offline).
llvm-svn: 68975
2009-04-13 19:08:08 +00:00
Douglas Gregor
1daeb69f95
Add PCH support for enumerations and enumerators.
...
llvm-svn: 68974
2009-04-13 18:14:40 +00:00
Devang Patel
0431504fb2
Right now, Debugging information to encode scopes (DW_TAG_lexical_block) relies on DBG_LABEL. Unfortunately this intefers with the quality of optimized code.
...
This patch updates dwarf writer to encode scoping information in DWARF only in FastISel mode.
llvm-svn: 68973
2009-04-13 18:13:16 +00:00
Daniel Dunbar
f3d0dccfff
Revert 68936, LLVM still isn't ready to handle debug info + optimization.
...
llvm-svn: 68972
2009-04-13 18:03:39 +00:00
Anders Carlsson
1235bbce7e
Use the new guard variable mangling function and get rid of the old code.
...
llvm-svn: 68971
2009-04-13 18:03:33 +00:00
Anders Carlsson
0c08f6fdde
Add support for mangling guard variables.
...
llvm-svn: 68969
2009-04-13 18:02:10 +00:00
Steve Naroff
42959b2660
Change diagnostic as a result of researching <rdar://problem/6779809> missing interface name in "error: cannot declare variable inside a class, protocol or category ''.
...
Since ObjC 2.0 class "extensions" have a null name, the diagnostic above is actually "correct". Nevertheless, it is confusing. Decided to remove the name entirely (from my perspective, it didn't add any value). Also simplified the text of the diagnostic a bit.
llvm-svn: 68967
2009-04-13 17:58:46 +00:00
Daniel Dunbar
2cba6be499
Fix assertion failure in PTH when tokens followed a closing #endif.
...
- Ted, please check.
- Missing test case because PTH won't reliably cache the tokens in a
test case. *cough*
llvm-svn: 68966
2009-04-13 17:57:49 +00:00
Douglas Gregor
a8854654ac
Make the reading of the line table from a PCH file more robust against
...
the unlikely event that the filename IDs in the stored line table end
up being different from the filename IDs in the newly-created line
table.
llvm-svn: 68965
2009-04-13 17:12:42 +00:00
Devang Patel
80be3511ed
Reapply 68847.
...
Now debug_inlined section is covered by TAI->doesDwarfUsesInlineInfoSection(), which is false by default.
llvm-svn: 68964
2009-04-13 17:02:03 +00:00