Eli Friedman
2696b1e25e
Default builtin creation to off; we don't really want to be doing it
...
without a relevant source location anyway. Fixes the issue with weird
warnings when including objc/Object.h on OS X.
llvm-svn: 72978
2009-06-06 02:08:44 +00:00
Mike Stump
dedc0968cf
Avoid warnings.
...
llvm-svn: 72976
2009-06-05 23:49:48 +00:00
Mike Stump
cbc2bcaf17
As an optimization, we maintain a cache of generated
...
___Block_byref_id_object_dispose and ___Block_byref_id_object_copy
functions so that we can simply reuse instead of creating a new one.
Additionally, add an assert to ensure no one yet tries to align a
__block variable beyond the alignment of a pointer as the codegen is
incomplete.
llvm-svn: 72974
2009-06-05 23:26:36 +00:00
Ted Kremenek
a03705c82d
Fix:
...
<rdar://problem/6948053> False positive: object substitution during -init* methods warns about returning +0 when using -fobjc-gc-only
llvm-svn: 72971
2009-06-05 23:18:01 +00:00
Ted Kremenek
ea1c221334
Enhance attribute cf_returns_retained to also work (in the analyzer)
...
for non-Objctive-C pointer types. This implicitly documents that the
return type is a CF object reference.
llvm-svn: 72968
2009-06-05 23:00:33 +00:00
Daniel Dunbar
feeeda70e2
weak_import should not make definitions have weak linkage.
...
- <rdar://problem/6948703> clang treats weak_import like weak
llvm-svn: 72967
2009-06-05 22:58:34 +00:00
Anton Korobeynikov
5bda50f84e
Update cmake script
...
llvm-svn: 72963
2009-06-05 22:08:54 +00:00
Anton Korobeynikov
244360d62b
Factor out TargetABIInfo stuff into separate file. No functionality change.
...
llvm-svn: 72962
2009-06-05 22:08:42 +00:00
Devang Patel
9e24386c65
Set function Attribute::NoImplicitFloat appropriately.
...
llvm-svn: 72961
2009-06-05 22:05:48 +00:00
Fariborz Jahanian
6845383426
Use of DeclContext for objc's ivars. No functionality
...
change. More to follow.
llvm-svn: 72951
2009-06-05 18:16:35 +00:00
Anders Carlsson
b3d05d6d11
Improvements to CXXExprWithTemporaries in preparation for fixing a bug with default arguments that have temporaries.
...
llvm-svn: 72944
2009-06-05 15:38:08 +00:00
Daniel Dunbar
4be99ff767
ABI handling: Fix nasty thinko where IRgen could generate an out-of-bounds read
...
when generating a coercion for ABI handling purposes.
- This may only manifest itself when building at -O0, but the practical effect
is that other arguments may get clobbered.
- <rdar://problem/6930451> [irgen] ABI coercion clobbers other arguments
llvm-svn: 72932
2009-06-05 07:58:54 +00:00
Eli Friedman
327f0b5593
Add driver support for -fsigned-char/-funsigned-char.
...
llvm-svn: 72930
2009-06-05 07:21:14 +00:00
Eli Friedman
9ffd4a9b96
Move CharIsSigned from TargetInfo to LangOptions.
...
llvm-svn: 72928
2009-06-05 07:05:05 +00:00
Eli Friedman
302c4e1683
Address review comments for #pragma weak.
...
llvm-svn: 72926
2009-06-05 06:28:29 +00:00
Anders Carlsson
184cb4123e
Make TemplateArgumentListBuilder take an ASTContext (because we're probably going to need it later). Move push_back to the .cpp file. If the passed in template argument is a type, assert that it's canonical.
...
llvm-svn: 72918
2009-06-05 05:31:27 +00:00
Anders Carlsson
c8e7113a9f
Make the TemplateArgumentList take a TemplateArgumentListBuilder.
...
llvm-svn: 72917
2009-06-05 04:47:51 +00:00
Anders Carlsson
1b28c3efe2
Change the specialization decls to take a TemplateArgumentListBuilder.
...
llvm-svn: 72916
2009-06-05 04:06:48 +00:00
Anders Carlsson
8aa89d4049
Add a helper class for building template argument lists.
...
llvm-svn: 72915
2009-06-05 03:43:12 +00:00
Anders Carlsson
03c9e87410
Fix another crash and actually make the test case work.
...
llvm-svn: 72913
2009-06-05 02:45:24 +00:00
Eli Friedman
5ed5198a5a
Start of a Sema implementation for #pragma weak. This isn't really the
...
right approach, but I'm still not sure what the best way to go about this is.
llvm-svn: 72912
2009-06-05 02:44:36 +00:00
Anders Carlsson
dd096d888b
Fix a case when the TemplateArgs vector can be empty.
...
llvm-svn: 72911
2009-06-05 02:12:32 +00:00
Daniel Dunbar
dd050567c1
Fix -Asserts build warnings.
...
llvm-svn: 72910
2009-06-05 02:03:25 +00:00
Douglas Gregor
b7ae10f764
Several improvements to template argument deduction:
...
- Once we have deduced template arguments for a class template partial
specialization, we use exactly those template arguments for instantiating
the definition of the class template partial specialization.
- Added template argument deduction for non-type template parameters.
- Added template argument deduction for dependently-sized array types.
With these changes, we can now implement, e.g., the remove_reference
type trait. Also, Daniel's Ackermann template metaprogram now compiles
properly.
llvm-svn: 72909
2009-06-05 00:53:49 +00:00
Eli Friedman
f5867dd51a
Add parser support for #pragma weak.
...
llvm-svn: 72907
2009-06-05 00:49:58 +00:00
Devang Patel
6e467b1a46
Set function attribute llvm::Attribute::NoRedZone appropriately.
...
llvm-svn: 72902
2009-06-04 23:32:02 +00:00
Eli Friedman
319ce956a9
Fix up this compatibility hack to be more compatible with gcc.
...
llvm-svn: 72901
2009-06-04 23:03:07 +00:00
Eli Friedman
fd4b1559db
Move a couple Darwin-specific defines into getDarwinDefines.
...
llvm-svn: 72900
2009-06-04 23:00:29 +00:00
Eli Friedman
fa90b154ca
Minor simplification.
...
llvm-svn: 72887
2009-06-04 20:23:20 +00:00
Eli Friedman
4a4fefcd29
PR4326: Handle constant evaluation for void* pointer subtraction
...
correctly.
llvm-svn: 72886
2009-06-04 20:04:03 +00:00
Fariborz Jahanian
7dae11446f
More refactoring/cleanup of objc ivars.
...
llvm-svn: 72871
2009-06-04 17:08:55 +00:00
Chris Lattner
0261e5c960
Make ReplaceUsesOfNonProtoTypeWithRealFunction verify that a call is *to* the
...
function of interest, not an operand of it.
llvm-svn: 72869
2009-06-04 16:47:43 +00:00
Chris Lattner
5e4702db61
DefineBuiltinMacro is always passed two args, remove the defaulted third
...
one.
llvm-svn: 72868
2009-06-04 16:47:09 +00:00
Torok Edwin
a1581e1a7a
forward -fno-color-diagnostics to clang-cc.
...
llvm-svn: 72856
2009-06-04 07:27:53 +00:00
Torok Edwin
c91b6e0ff8
Add ANSI color support for clang.
...
llvm-svn: 72855
2009-06-04 07:18:23 +00:00
Anders Carlsson
40f8f8d4d7
Minor improvements to template parameter writing.
...
llvm-svn: 72848
2009-06-04 05:37:43 +00:00
Douglas Gregor
6cc628edf4
Eliminate a warning
...
llvm-svn: 72846
2009-06-04 05:28:55 +00:00
Anders Carlsson
35533d11b3
Template argument deduction for incomplete and constant array types. Doug, please review.
...
llvm-svn: 72844
2009-06-04 04:11:30 +00:00
Anders Carlsson
43c52cdc29
Use PushConditionalTempDestruction/PopConditionalTempDestruction for the ternary operator.
...
llvm-svn: 72842
2009-06-04 03:00:32 +00:00
Anders Carlsson
f47a3de83c
Use conditional temp destruction for || and &&.
...
llvm-svn: 72838
2009-06-04 02:53:13 +00:00
Anders Carlsson
7d313fc09b
Make PushCXXTemporary and PopCXXTemporary handle conditional temporaries.
...
llvm-svn: 72837
2009-06-04 02:47:33 +00:00
Anders Carlsson
44bfcf0f97
Add PushConditionalTempDestruction/PopConditionalTempDestruction.
...
llvm-svn: 72835
2009-06-04 02:22:12 +00:00
Anders Carlsson
8936009a91
Make sure to call FullExpr before parsing anything else.
...
llvm-svn: 72834
2009-06-04 02:18:15 +00:00
Anders Carlsson
ea89e2b813
Make sure to push a cleanup block.
...
llvm-svn: 72831
2009-06-04 02:08:08 +00:00
Fariborz Jahanian
7c80959a97
Cleanup/Refactoring of ivar collection. No change in functionality.
...
llvm-svn: 72827
2009-06-04 01:19:09 +00:00
Douglas Gregor
5cdac0a52e
Template argument deduction for references
...
llvm-svn: 72822
2009-06-04 00:21:18 +00:00
Douglas Gregor
55ca8f6443
When performing template argument deduction, ensure that multiple
...
deductions of the same template parameter are equivalent. This allows
us to implement the is_same type trait (!).
Also, move template argument deduction into its own file and update a
few build systems with this change (grrrr).
llvm-svn: 72819
2009-06-04 00:03:07 +00:00
Mike Stump
fa0c645bae
Fix cmake builds.
...
llvm-svn: 72814
2009-06-03 22:24:28 +00:00
Eli Friedman
dd27484888
PR4316: Fix IRGen for cast-to-union extension.
...
llvm-svn: 72803
2009-06-03 20:45:06 +00:00
Anders Carlsson
4c49bb95f8
More temporary work.
...
llvm-svn: 72796
2009-06-03 19:05:16 +00:00