Commit Graph

81621 Commits

Author SHA1 Message Date
Dale Johannesen b36c70913b Revert 100573, it's causing some testsuite problems.
llvm-svn: 100578
2010-04-06 22:45:26 +00:00
Fariborz Jahanian 6a0a2e0ccc Patch to not build ivar ASTs when they are ilegally
declared in categories.

llvm-svn: 100577
2010-04-06 22:43:48 +00:00
John McCall 2351cb9139 Devote a special diagnostic to the typo
(void*) someFunction(5, 10, 15, 20);
where the cast is presumably meant to be to 'void'.

llvm-svn: 100574
2010-04-06 22:24:14 +00:00
Dale Johannesen 85b35b6214 Move printing of DEBUG_VALUE comments to target-independent place.
There is probably a more elegant way to do this.

llvm-svn: 100573
2010-04-06 22:21:07 +00:00
Ted Kremenek f969841a1a Teach MemRegion::getBaseRegion() about ObjCIvarRegions. We want to treat
them the same way as fields.  This fixes a regression in RegionStore::RemoveDeadbindings()
that emerged from going to the cluster-based analysis.

llvm-svn: 100570
2010-04-06 22:06:03 +00:00
Bob Wilson 5202269dc4 Expand SELECT and SELECT_CC for NEON vector types.
Radar 7770501.

llvm-svn: 100568
2010-04-06 22:02:24 +00:00
Dale Johannesen d1976e35c4 Allow for the possibility that a debug-value points
to a SDNode that didn't have code generated for it.

llvm-svn: 100566
2010-04-06 21:59:56 +00:00
Stuart Hastings 4bd3dd956f Reverting 100530 & 100531 due to regressions in the GDB test suite.
llvm-svn: 100563
2010-04-06 21:38:29 +00:00
John McCall a8ae222d0e Implement the protected access restriction ([class.protected]), which requires
that protected members be used on objects of types which derive from the
naming class of the lookup.  My first N attempts at this were poorly-founded,
largely because the standard is very badly worded here.

llvm-svn: 100562
2010-04-06 21:38:20 +00:00
Jim Grosbach 4dac890600 Fix PR6696 and PR6663
When a frame pointer is not otherwise required, and dynamic stack alignment
is necessary solely due to the spilling of a register with larger alignment
requirements than the default stack alignment, the frame pointer can be both
used as a general purpose register and a frame pointer. That goes poorly, for
obvious reasons. This patch brings back a bit of old logic for identifying
the use of such registers and conservatively reserves the frame pointer
during register allocation in such cases.

For now, implement for X86 only since it's 32-bit linux which is hitting this,
and we want a targeted fix for 2.7. As a follow-on, this will be expanded
to handle other targets, as theoretically the problem could arise elsewhere
as well.

llvm-svn: 100559
2010-04-06 20:26:37 +00:00
Douglas Gregor c01890e1cc When code completion produces an overload set as its results (e.g.,
while we're completing in the middle of a function call), also produce
"ordinary" name results that show what can be typed at that point.

llvm-svn: 100558
2010-04-06 20:19:47 +00:00
Douglas Gregor 2cb6c30673 Do not produce semicolons at the end of code-completion results
llvm-svn: 100557
2010-04-06 20:11:37 +00:00
Bill Wendling 167dffdb69 Make this hack more specific to the Apple gcc 4.2 non-LLVM compiler.
llvm-svn: 100556
2010-04-06 20:07:21 +00:00
Douglas Gregor 285560929f Only prove macros as code-completion results when we're in a case
statement or for ordinary names. This means that we won't show macros
when completing, e.g., member expressions such as "p->".

llvm-svn: 100555
2010-04-06 20:02:15 +00:00
Jakob Stoklund Olesen 41051a0bfe Don't try to collapse DomainValues onto an incompatible SSE domain.
This fixes the Bullet regression on i386/nocona.

llvm-svn: 100553
2010-04-06 19:48:56 +00:00
Ted Kremenek 7deb7050d5 Fix ccc-analyzer's handling of quoted arguments in the build command. Fixes PR 6791.[B
llvm-svn: 100551
2010-04-06 19:41:24 +00:00
Gabor Greif df323a51f5 performance: get rid of repeated dereferencing of use_iterator by caching its result
llvm-svn: 100550
2010-04-06 19:32:30 +00:00
Gabor Greif 679728790b make more two predicates constant
llvm-svn: 100549
2010-04-06 19:24:18 +00:00
Douglas Gregor 9d2ddb2e5d When sending a message to "id", apply some heuristics to try to narrow
down the set of code-completion results based on Objective-C
conventions. 

llvm-svn: 100548
2010-04-06 19:22:33 +00:00
Gabor Greif 08355d6cda performance: get rid of repeated dereferencing of use_iterator by caching its result
llvm-svn: 100547
2010-04-06 19:14:05 +00:00
Gabor Greif a21bc0fbd5 const-ize predicate ValueIsOnlyUsedLocallyOrStoredToOneGlobal
llvm-svn: 100546
2010-04-06 18:58:22 +00:00
Chris Lattner e6485c5873 add a testcase that the integrated assembler rejects, this verifies
that the integrated assembler is working.

llvm-svn: 100545
2010-04-06 18:46:25 +00:00
Gabor Greif 0439789023 use CallSite to access calls vs. invokes uniformly
and remove assumptions about operand order

llvm-svn: 100544
2010-04-06 18:45:08 +00:00
Chris Lattner 5ec32e7fd8 teach clang to install the inline asm diagnostic handler,
allowing backend errors to be mapped through clang's 
diagnostics subsystem, including the backend location info.

We now get:

$ clang asm.c -c -o t.o -integrated-as
<inline asm>:1:2: error: unrecognized instruction
        abc incl    %eax
        ^
1 diagnostic generated.

With colors, and correct "# diagnostics generated".

llvm-svn: 100543
2010-04-06 18:38:50 +00:00
Chris Lattner 6c61f4434c this accessor doesn't need to copy the string.
llvm-svn: 100542
2010-04-06 18:37:22 +00:00
Chris Lattner 97c4cb8947 enhance SMDiagnostic to also maintain a pointer to the SourceMgr.
Add a simplified constructor for clients that don't have locations
like "file not found" errors.

llvm-svn: 100538
2010-04-06 18:06:18 +00:00
Chris Lattner 6d67213ebb reduce indentation, tidy.
llvm-svn: 100537
2010-04-06 17:52:14 +00:00
Blaine Garst 55050630a9 improved wording around ABI
llvm-svn: 100536
2010-04-06 17:46:43 +00:00
Douglas Gregor d720daf8bc Make code-completion for Objective-C message sends to "id" work in the
presence of precompiled headers by forcibly loading all of the
methods we know about from the PCH file before constructing our
code-completion list.

llvm-svn: 100535
2010-04-06 17:30:22 +00:00
Chris Lattner c0e8a59ac9 fit in 80 cols
llvm-svn: 100534
2010-04-06 17:29:22 +00:00
Fariborz Jahanian 440a6832c5 Put type restriction on convesion to nonconforming 'id' back in
block pointer type comparison.

llvm-svn: 100533
2010-04-06 17:23:39 +00:00
Evan Cheng a910f17a20 Code clean up. Move includes from VirtRegRewriter.h to VirtRegRewriter.cpp.
llvm-svn: 100532
2010-04-06 17:19:55 +00:00
Stuart Hastings c067196984 Revise debug info machinery to digest nested functions and classes.
A certain GDB testsuite case (local.cc) has a function nested inside a
class nested inside another function.  GCC presents the innermost
function to llvm-convert first.  Heretofore, the debug info mistakenly
placed the inner function at module scope.  This patch walks the GCC
context links and instantiates the outer class and function so the
debug info is properly nested.  Radar 7426545.

llvm-svn: 100530
2010-04-06 17:19:32 +00:00
Daniel Dunbar 3d45e17d15 Driver: Add a Tool::hasGoodDiagnostics hook, and use it to simplify logic for
deciding when we need to emit an extra "command failed" diagnostic.
 - This also fixes the case where we were emitting that extra diagnostics, even
   when using clang w/ the integrated assembler, which has good diagnostics.

llvm-svn: 100529
2010-04-06 17:07:49 +00:00
Douglas Gregor 6285f754fa Implement support for code completion of an Objective-C message send to
"id" or an expression of type "id". In these cases, we produce a list
of all of the (class or instance) methods, respectively, that we know about.

Note that this implementation does not yet work well with precompiled
headers; that's coming soon.

llvm-svn: 100528
2010-04-06 16:40:00 +00:00
Douglas Gregor e7938a04c8 Add test for code completion of Objective-C message sends to classes.
llvm-svn: 100527
2010-04-06 15:27:03 +00:00
Douglas Gregor be9ea80abf Perform code-completion within ParseCastExpression, which handles,
e.g., the right-hand side of binary expressions.

llvm-svn: 100526
2010-04-06 15:09:27 +00:00
John Criswell 9003e0f0c7 Adding SAFECode to the list of projects that work with LLVM 2.7.
llvm-svn: 100525
2010-04-06 14:52:14 +00:00
Mon P Wang bf86224d5e Remove assert to treat memmove and memset like memcpy
llvm-svn: 100521
2010-04-06 08:27:51 +00:00
Owen Anderson ee3570f0ff Use a ManagedCleanup to prevent leaking the PassRegistrar map. In breaks the
use case where someone wants to resurrect LLVM after calling llvm_shutdown,
but I'm not aware of any clients that are affected by this.

llvm-svn: 100519
2010-04-06 04:20:48 +00:00
Douglas Gregor 6314641822 clang-wpa fixes for Diagnostic
llvm-svn: 100518
2010-04-06 04:03:12 +00:00
Jakob Stoklund Olesen 2ae30e864d Avoid overflowing a signed integer which triggers undefined behaviour.
Overflowing an unsigned integer is fine and behaves as you would expect.
Also fix a pasto, allowing SignExtend64 to take a 64-bit argument.

llvm-svn: 100517
2010-04-06 03:12:43 +00:00
Zhongxing Xu 0f290ec0f0 Fix PR 6725. It looks like the copy constructor gets elided during inlining.
This bug only shows up with GCC 4.4.1 Release-Asserts build.

llvm-svn: 100516
2010-04-06 03:01:56 +00:00
Dan Gohman 91ce8e9a5c Add a const qualifier.
llvm-svn: 100515
2010-04-06 01:31:12 +00:00
Douglas Gregor ff8f4f6262 Unbreak build
llvm-svn: 100514
2010-04-06 01:25:58 +00:00
Daniel Dunbar 196ea449ed IRgen: Move BitFieldIsSigned bit into CGBitFieldInfo.
llvm-svn: 100513
2010-04-06 01:07:44 +00:00
Daniel Dunbar d45491077a Simplify.
llvm-svn: 100512
2010-04-06 01:07:41 +00:00
Daniel Dunbar 60d81e8611 Simplify.
llvm-svn: 100511
2010-04-06 01:07:39 +00:00
Chris Lattner 92aba5a817 propagate cookie management out one layer of function calls.
llvm-svn: 100510
2010-04-06 00:58:50 +00:00
Chris Lattner 59126b2500 report errors through LLVMContext's inline asm handler if available.
llvm-svn: 100509
2010-04-06 00:55:39 +00:00