Commit Graph

13934 Commits

Author SHA1 Message Date
Douglas Gregor 2683c28ff6 Improve parser recovery when we try to parse a call expression but the
called function itself is invalid (e.g., because of a semantic error
referring to that declaration). Fixes <rdar://problem/8044142>.

llvm-svn: 105175
2010-05-30 22:23:08 +00:00
Nick Lewycky 71eac6e114 Make macro safe in the face of users who pass "addr+64". Addition of void* is
invalid.

llvm-svn: 105172
2010-05-30 18:26:21 +00:00
Anders Carlsson 107b4e096c Remove unused parameter to FinalOverriders::PropagateOverrider.
llvm-svn: 105171
2010-05-30 18:23:41 +00:00
Nick Lewycky 6cbc3f7de4 Refactor the Is{Std,Clang,LLVM}Namespace methods and rename 'isClangAttr' to
'IsClangAttr' to match prevailing style in this file. Patch by Jon Mulder!

llvm-svn: 105170
2010-05-30 18:05:23 +00:00
Alexis Hunt ed05325dbe Convert DeclNodes to use TableGen.
The macros required for DeclNodes use have changed to match the use of
StmtNodes. The FooFirst enumerator constants have been named firstFoo
to match usage elsewhere.

llvm-svn: 105165
2010-05-30 07:21:58 +00:00
Anders Carlsson 7498b32117 And now for the best part: Removing the old code.
llvm-svn: 105162
2010-05-30 06:56:46 +00:00
Anders Carlsson b1fcdd063c Turn on the new empty base subobject tracking code. It's a bit faster than the previous code. However, it still has quadratic performance, something which I intend to fix shortly in a subsequent patch.
llvm-svn: 105161
2010-05-30 06:52:33 +00:00
Douglas Gregor 6ed3eb8a48 Teach code-completion for calls to be more careful with a
potentially-NULL "function" argument.

llvm-svn: 105152
2010-05-30 06:10:08 +00:00
Eli Friedman c8731be34d Fix for PR7040: Don't try to compute the LLVM type for a function where it
isn't possible to compute.

This patch is mostly refactoring; the key change is the addition of the code
starting with the comment, "Check whether the function has a computable LLVM
signature."  The solution here is essentially the same as the way the
vtable code handles such functions.

llvm-svn: 105151
2010-05-30 06:03:20 +00:00
Douglas Gregor 7aa6b229fe Teach code completion to adjust its completion priorities based on the
type that we expect to see at a given point in the grammar, e.g., when
initializing a variable, returning a result, or calling a function. We
don't prune the candidate set at all, just adjust priorities to favor
things that should type-check, using an ultra-simplified type system.

llvm-svn: 105128
2010-05-30 01:49:25 +00:00
Daniel Dunbar 0e15c9aef6 Accept '#pragma options align=mac68k' on Darwin/PPC and Darwin/PPC64.
llvm-svn: 105116
2010-05-30 00:07:30 +00:00
Anders Carlsson a7774a685d Cleanup.
llvm-svn: 105114
2010-05-29 21:10:24 +00:00
Anders Carlsson a60b86a3fa Make EmptySubobjectMap::CanPlaceBaseAtOffset take a BaseSubobjectInfo as well.
llvm-svn: 105113
2010-05-29 20:49:49 +00:00
Anders Carlsson d7f3fcf248 Change RecordLayoutBuilder::LayoutBase to take a BaseSubobjectInfo. No functionality change.
llvm-svn: 105112
2010-05-29 20:47:33 +00:00
Anders Carlsson 6b0d914ad0 Rework the way virtual primary bases are added when laying out classes. Instead of doing it as a separate step, we now use the BaseSubobjectInfo and use it when laying out the bases. This fixes a bug where we would either not add a primary virtual base at all, or add it at the wrong offset.
llvm-svn: 105110
2010-05-29 19:44:50 +00:00
Anders Carlsson d6ff5d7787 Change LayoutVirtualBase to also take a BaseSubobjectInfo.
llvm-svn: 105104
2010-05-29 17:48:36 +00:00
Anders Carlsson bb0e6787b0 Change RecordLayoutBuilder::LayoutNonVirtualBase to take a BaseSubobjectInfo. No functionality change.
llvm-svn: 105103
2010-05-29 17:42:25 +00:00
Anders Carlsson e3c24c7033 Move computing the base subobject info for a class into the RecordLayoutBuilder because we're going to need it to be able to correctly add offsets for primary virtual bases.
llvm-svn: 105102
2010-05-29 17:35:14 +00:00
Zhongxing Xu 94aec9381d Revert r105097. Thinking about a better fix.
llvm-svn: 105099
2010-05-29 06:49:04 +00:00
Zhongxing Xu 928a190a8e Fix PR7218. Patch by Jordy Rose.
llvm-svn: 105097
2010-05-29 06:23:24 +00:00
Douglas Gregor 117ef277cb More PowerPC paths on Darwin
llvm-svn: 105084
2010-05-29 01:21:11 +00:00
Douglas Gregor eb0bdf08dc Add C++ include paths for Darwin PowerPC
llvm-svn: 105083
2010-05-29 01:15:12 +00:00
Chris Lattner 2304c4d0ff add fedora 13 paths, patch by Hendrik Richter.
llvm-svn: 105082
2010-05-29 01:01:38 +00:00
John McCall f7bcc81213 Copy source information for the inner type of an elaborated type; fixes some
valgrind problems.

llvm-svn: 105062
2010-05-28 23:32:21 +00:00
Nate Begeman b9ed185e33 Implement remaining items in neon td file. Still need to modify emitter to generate a proper header.
llvm-svn: 105058
2010-05-28 23:15:59 +00:00
Fariborz Jahanian 6e81492151 Empty enum in c is now error to match gcc's behavior.
(radar 8040068).

llvm-svn: 105011
2010-05-28 22:23:22 +00:00
Douglas Gregor 7e5aeac10a Only provide a source location for an anonymous tag if the location is valid
llvm-svn: 105010
2010-05-28 21:47:04 +00:00
Anders Carlsson a7f3cdb0f2 Rename BaseInfo to BaseSubobjectInfo.
llvm-svn: 105007
2010-05-28 21:24:37 +00:00
Anders Carlsson 056818f8a2 Move BaseInfo outside of the EmptySubobject class.
llvm-svn: 105002
2010-05-28 21:13:31 +00:00
Daniel Dunbar a688566f0a Sema: Fix comment, apparently #pragma options align=power is just the same as
align=native, at least for the platforms we support.

llvm-svn: 105000
2010-05-28 20:08:00 +00:00
Daniel Dunbar 51c3387b5e Fix personality function name when using SjLj exceptions.
llvm-svn: 104999
2010-05-28 19:43:36 +00:00
Daniel Dunbar 5794c6fa43 Sema: Just ignore '#pragma options align=power' for now, this is no worse than
what we used to be doing, and makes sure that paired '#pragma options
align=reset' won't fail.

llvm-svn: 104998
2010-05-28 19:43:33 +00:00
Fariborz Jahanian 93bef10131 Fix a miscompile of wchar pascal strings.
(radar 8020384)

llvm-svn: 104996
2010-05-28 19:40:48 +00:00
John McCall f24d7bbbcd A more minimal fix for PR6762.
llvm-svn: 104991
2010-05-28 18:45:08 +00:00
John McCall 61d8258fa3 Roll back r104941.
llvm-svn: 104990
2010-05-28 18:25:28 +00:00
Jakob Stoklund Olesen f298e02c9d Let the backend decide which scheduler and register allocator to use.
Currently, the backend uses the same policy, but it will soon switch to
-regalloc=fast for -O0.

llvm-svn: 104984
2010-05-28 18:13:31 +00:00
Fariborz Jahanian 3336de141a zero-cost exception API for NeXt runtime.
rethrow inside @catch block must use objc_exception_rethrow
API. Fixes radar 8037512. Test will be added to LLVM
test suite.

llvm-svn: 104964
2010-05-28 17:34:43 +00:00
Daniel Dunbar 99ca8b71cd Driver: Spell -relax-all correctly when calling the cc1as tool.
llvm-svn: 104955
2010-05-28 16:43:21 +00:00
John McCall f9c94093f9 Disable exception-spec compatibility checking under -fno-exceptions.
Fixes PR7243.

llvm-svn: 104942
2010-05-28 08:37:35 +00:00
John McCall 2177a9b65a Add a new attribute on records, __attribute__((adl_invisible)), and define
the x86-64 __va_list_tag with this attribute.  The attribute causes the
affected type to behave like a fundamental type when considered by ADL.

(x86-64 is the only target we currently provide with a struct-based
__builtin_va_list)

Fixes PR6762.

llvm-svn: 104941
2010-05-28 08:20:36 +00:00
John McCall 08bede4c7b Don't just skip over the entire tag definition if the parser action didn't
give us a decl back.  Makes -cc1 -parse-noop handle a substantially larger
amount of the C++ grammar.

llvm-svn: 104940
2010-05-28 08:11:17 +00:00
John McCall 0af3d3b0f4 Optimize and complete associated-class-and-namespace collection from
a type.

llvm-svn: 104938
2010-05-28 06:08:54 +00:00
Douglas Gregor ed2540d205 When we complain about a member being inaccessible due to a constraint
along an access path, add another note pointing at the member we
actually found.

llvm-svn: 104937
2010-05-28 04:34:55 +00:00
Douglas Gregor 1f1be08645 Add CMake goop to get arm_neon.h generated
llvm-svn: 104934
2010-05-28 04:22:06 +00:00
Nate Begeman 07f9b0c784 Convert arm_neon.h into arm_neon.td, from which arm_neon.h will be built
Add Makefile support for building arm_neon.h from arm_neon.td
Need to figure out an appropriate cmake rule for this.

llvm-svn: 104928
2010-05-28 02:20:47 +00:00
Daniel Dunbar eaff5fa30a Frontend: Sprinkle in some C++ header paths for ARM/Darwin. Also, don't add x86
paths on non-x86.

I really detest this file.

llvm-svn: 104921
2010-05-28 01:54:31 +00:00
Dan Gohman ed0347333e This cast is no longer needed; the FIXME is fixed.
llvm-svn: 104919
2010-05-28 01:45:35 +00:00
John McCall 4583186b8b When filtering out previous declarations of friend functions, consider the
lookup context, not the direct semantic context.  Fixes PR7230.

llvm-svn: 104917
2010-05-28 01:41:47 +00:00
Dan Gohman 3743b8cf49 This cast is no longer required.
llvm-svn: 104916
2010-05-28 01:39:35 +00:00
Douglas Gregor d37c59dae7 Don't put method bodies into code completions unless code patterns are
turned on.

llvm-svn: 104909
2010-05-28 00:57:46 +00:00