Commit Graph

13622 Commits

Author SHA1 Message Date
Eli Friedman 5a996fc0fc Now that LLVM CodeGen can handle the generic variations a bit better,
get rid of a few more clang vector builtins.

llvm-svn: 73015
2009-06-07 07:12:56 +00:00
Douglas Gregor e183993ffa CMake: Install Clang's headers into the right place in the build tree, for regression testing
llvm-svn: 73014
2009-06-07 07:09:23 +00:00
Eli Friedman 07bbeca406 PR4339: make sure to properly extend/trunc the index of a vector element
insert/extract; the relevant instructions are defined to take only an 
i32.

llvm-svn: 73005
2009-06-06 19:09:26 +00:00
Eli Friedman 5f75ff84b7 Test changes to account for removed builtins.
llvm-svn: 73004
2009-06-06 18:15:42 +00:00
Ted Kremenek 800c20f11a Update checker build.
llvm-svn: 73001
2009-06-06 17:44:12 +00:00
Fariborz Jahanian 28c5a8ba4a Adds synthesize ivars to DeclContext.
llvm-svn: 73000
2009-06-06 16:36:41 +00:00
Anton Korobeynikov 18adbf5f07 Add new ABIArgInfo kind: Extend. This allows target to implement its own argument
zero/sign extension logic (consider, e.g. target has only 64 bit registers and thus
i32's should be extended as well).

llvm-svn: 72998
2009-06-06 09:36:29 +00:00
Eli Friedman 6813eb125f Get rid of a bunch of dead builtins.
llvm-svn: 72996
2009-06-06 08:31:46 +00:00
Eli Friedman 4d8d7d3263 Replace more calls to builtins with generic code.
llvm-svn: 72995
2009-06-06 08:08:06 +00:00
Eli Friedman f5f303f92f Fix obvious typo.
llvm-svn: 72994
2009-06-06 07:42:17 +00:00
Anders Carlsson 8544647e9c Make ParmVarDecl::getDefaultArg() more robust, it now asserts that the argument is not unparsed. Add a new hasDefaultArg() and use it in places where getDefaultArg() was called when the argument was unparsed.
llvm-svn: 72984
2009-06-06 04:14:07 +00:00
Eli Friedman d00fd2885e Fix some casts to work without -flax-vector-conversions.
llvm-svn: 72981
2009-06-06 03:45:06 +00:00
Eli Friedman ebd9314f32 Misc fixes to MMX/SSE intrinsics: a few small bug fixes, and getting rid
of calls to builtins for constructs which can be expressed directly.

llvm-svn: 72979
2009-06-06 02:13:04 +00:00
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
Douglas Gregor 30018a6860 Switch CMake testing over to use Daniels new(er) Python-based infrastructure.
llvm-svn: 72977
2009-06-05 23:57:17 +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
Douglas Gregor fa93480937 Clean up Clang regression testing in CMake, so that we get more
logical output when running all of the Clang regression tests at once.

llvm-svn: 72947
2009-06-05 16:26:18 +00:00
Douglas Gregor 0770532f5a First cut at regression testing Clang with CMake
llvm-svn: 72945
2009-06-05 16:00:31 +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
Eli Friedman 2468f8625a PR3443: Add stpcpy builtin (plus a few other related builtins). Yes,
we're still missing a mechanism to disable these in strict mode, but 
that's not a new issue.

llvm-svn: 72936
2009-06-05 08:20:10 +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 6be4b393b9 Add -fsigned-char option to clang-cc.
llvm-svn: 72929
2009-06-05 07:12:17 +00:00
Eli Friedman 9ffd4a9b96 Move CharIsSigned from TargetInfo to LangOptions.
llvm-svn: 72928
2009-06-05 07:05:05 +00:00
Eli Friedman d7bcad67d4 Add a couple of FreeBSD-specific command-line options.
llvm-svn: 72927
2009-06-05 06:29:09 +00:00
Eli Friedman 302c4e1683 Address review comments for #pragma weak.
llvm-svn: 72926
2009-06-05 06:28:29 +00:00
Daniel Dunbar 635b8050c4 Add an XFAIL test to demonstrate references in Obj-C++, this currently crashes.
llvm-svn: 72923
2009-06-05 06:03:19 +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
Eli Friedman 3c1291d384 Update test to work with the limited Sema for #pragma weak.
llvm-svn: 72914
2009-06-05 02:49:06 +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 8df7462f69 Test for parsing #pragma weak.
llvm-svn: 72908
2009-06-05 00:50:43 +00:00
Eli Friedman f5867dd51a Add parser support for #pragma weak.
llvm-svn: 72907
2009-06-05 00:49:58 +00:00
Devang Patel 21dd8d4ae4 NoRedZone attribute test case.
llvm-svn: 72905
2009-06-04 23:45:55 +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