Commit Graph

54335 Commits

Author SHA1 Message Date
Ted Kremenek 02b63b4287 Add test case illustrating special handling of 'SenTestCase' subclasses for the missing -dealloc check.
llvm-svn: 64494
2009-02-13 22:26:30 +00:00
Chris Lattner 7f14efe66c improve wording in a diagnostic to make it clear that we never intend to support
the vla-in-structure extension that GCC does.  PR3562
Also wrap some long lines.

llvm-svn: 64493
2009-02-13 22:13:02 +00:00
Daniel Dunbar 128a138a57 IRgen support for attribute used.
- PR3566

llvm-svn: 64492
2009-02-13 22:08:43 +00:00
Chris Lattner 303284acfc If x is an invalid field decl, don't construct an expression for P->x,
just silently return an error to avoid bogus diagnostics.

llvm-svn: 64491
2009-02-13 22:08:30 +00:00
Ted Kremenek 2fd18ec43a PTH: Cache directory and negative 'stat' calls. This gives us a 1% performance improvement on Cocoa.h (fsyntax-only+PTH).
llvm-svn: 64490
2009-02-13 22:07:44 +00:00
Chris Lattner b3ef533286 wrap some crazy long lines.
llvm-svn: 64489
2009-02-13 21:51:45 +00:00
Daniel Dunbar 6b8720e723 Pull MayDeferGeneration out of EmitGlobal.
- Fix emission of static functions with constructor attribute while I
   was here.
<rdar://problem/6140899> [codegen] "static" and attribute-constructor interact poorly

llvm-svn: 64488
2009-02-13 21:18:01 +00:00
Daniel Dunbar 08b26a0587 Rename EmitStatics (etc) to EmitDeferred; provide basic infrastructure
for attribute used support.  
- No functionality change.

llvm-svn: 64487
2009-02-13 20:29:50 +00:00
Mike Stump 499ae7ec91 Let the backend unique these.
llvm-svn: 64486
2009-02-13 20:17:16 +00:00
Chris Lattner 9631dfd1c1 document __builtin_shufflevector
llvm-svn: 64485
2009-02-13 20:00:20 +00:00
Mike Stump 52d9c49d88 Fix spelling.
llvm-svn: 64482
2009-02-13 19:38:12 +00:00
Mike Stump 2c867aec40 Move DescriptorUniqueCount into CGM.
llvm-svn: 64481
2009-02-13 19:36:03 +00:00
Chris Lattner 9ef847be12 Fix rdar://6562329, a static analyzer crash Ted noticed on
wine sources.  This was happening because HighlightMacros was 
calling EnterMainFile multiple times on the same preprocessor
object and getting an assert due to the new #line stuff (the
file in question was bison output with #line directives).

The fix for this is to not reenter the file.  Instead, 
relex the tokens in raw mode, swizzle them a bit and repreprocess
the token stream.  An added bonus of this is that rewrite macros
will now hilight the macro definition as well as its uses.  Woo.

llvm-svn: 64480
2009-02-13 19:33:24 +00:00
Mike Stump 7ab278db06 Move NSConcreteStackBlock into CGM.
llvm-svn: 64479
2009-02-13 19:29:27 +00:00
Daniel Dunbar fee07a0b47 Sema/AST support for attribute used. Patch by Anders Johnson (with small tweaks & test case)!
llvm-svn: 64478
2009-02-13 19:23:53 +00:00
Ted Kremenek 29942a349c Add some boilerplate to the PTH file to prepare for the caching of stats for directories (and negative stats too).
llvm-svn: 64477
2009-02-13 19:13:46 +00:00
Douglas Gregor 10a451cb36 Eliminate an unused variable
llvm-svn: 64476
2009-02-13 19:13:32 +00:00
Mike Stump 1676c5b2d8 Reflow to 80col.
llvm-svn: 64475
2009-02-13 19:12:34 +00:00
Douglas Gregor 4feb36de04 Remove DeclGroupOwningRef, since we intend for declarations to be owned
by DeclContexts (always) rather than by statements. 

DeclContext currently goes out of its way to avoid destroying any
Decls that might be owned by a DeclGroupOwningRef. However, in an
error-recovery situation, a failure in a declaration statement can
cause all of the decls in a DeclGroupOwningRef to be destroyed after
they've already be added into the DeclContext. Hence, DeclContext is
left with already-destroyed declarations, and bad things happen. This
problem was causing failures that showed up as assertions on x86 Linux
in test/Parser/objc-forcollection-neg-2.m.

llvm-svn: 64474
2009-02-13 19:06:18 +00:00
Mike Stump 9319db8a11 Move GlobalUniqueCount up into CGM.
llvm-svn: 64473
2009-02-13 18:36:05 +00:00
Douglas Gregor 1d672f84a6 Fix capitalization in a diagnostic
llvm-svn: 64472
2009-02-13 18:20:19 +00:00
Anders Carlsson 860189c19d Add new files to Xcode project
llvm-svn: 64471
2009-02-13 18:09:59 +00:00
Fariborz Jahanian d8fc1053ab Fixed a 64bit code gen bug of a cateogory
implementation with no category declaration!

llvm-svn: 64470
2009-02-13 17:52:22 +00:00
Daniel Dunbar abe6ef932f x86_64 ABI: Support va_arg passed in mixed registers.
- Now at 1274 passes on gcc compat suite vs 1262.

llvm-svn: 64469
2009-02-13 17:46:31 +00:00
Dan Gohman 55ea72179c In CodeGenPrepare's debug output, use WriteAsOperand instead of
printing getName(), so that unnamed values are printed correctly.

llvm-svn: 64468
2009-02-13 17:45:12 +00:00
Daniel Dunbar 72e90d7fb0 ccc: Suffix for PCH files is appended, not replaced. (Test case)
llvm-svn: 64467
2009-02-13 17:42:52 +00:00
Daniel Dunbar b903a072b1 ccc: Suffix for PCH files is appended, not replaced.
llvm-svn: 64466
2009-02-13 17:42:34 +00:00
Dan Gohman a2730abaaa Complete the sentance in this comment. I have reservations
about the code it describes, but at least now the comment
is right.

llvm-svn: 64465
2009-02-13 17:36:42 +00:00
Duncan Sands a738e8b854 Correct a comment: since AccessArguments is now
being used for atomic intrinsics, it seems the
access may be volatile.  No code was exploiting
the original non-volatile definition, so only
the comment needs changing.

llvm-svn: 64464
2009-02-13 17:36:13 +00:00
Duncan Sands 566ed10244 If a function only reads memory, then we know that...
it only reads memory!  The other change has no
functional effect, it just seems more logical to
go in order of decreasing knowledge.

llvm-svn: 64463
2009-02-13 17:32:26 +00:00
Mike Stump 971f9b6619 Condense NSConcreteGlobalBlock handling.
llvm-svn: 64461
2009-02-13 17:23:42 +00:00
Nick Lewycky d234a845f9 Mark strto* as readonly when the endptr is null.
llvm-svn: 64460
2009-02-13 17:08:33 +00:00
Mike Stump 52197c7763 Calculate size correctly.
llvm-svn: 64459
2009-02-13 17:03:17 +00:00
Mike Stump c2c38331ca Size should be unsigned.
llvm-svn: 64458
2009-02-13 16:55:51 +00:00
Mike Stump 85284bacab Condense all the blocks code into CGBlocks.cpp.
llvm-svn: 64457
2009-02-13 16:19:19 +00:00
Mike Stump 92bbd6d435 Fixup types, the runtime uses int, not int32.
llvm-svn: 64456
2009-02-13 16:01:35 +00:00
Mike Stump 57d7354635 Fix cmake builds.
llvm-svn: 64455
2009-02-13 15:42:50 +00:00
Mike Stump b7074c0013 Fixup spacing a tad.
llvm-svn: 64454
2009-02-13 15:32:32 +00:00
Nick Lewycky a0e83a0952 On strtod and friends, mark 'endptr' nocapture in the function prototype, and
mark the first argument nocapture if endptr=NULL for each particular call.

llvm-svn: 64453
2009-02-13 15:31:46 +00:00
Mike Stump 005c9a62b5 Move GenericBlockLiteralType into CGM.
llvm-svn: 64452
2009-02-13 15:25:34 +00:00
Mike Stump 650c932d80 Move BlockDescriptorType into CGM.
llvm-svn: 64451
2009-02-13 15:16:56 +00:00
Mike Stump 5b31ed3ff0 80col.
llvm-svn: 64450
2009-02-13 14:24:50 +00:00
Duncan Sands 51495609df Reapply r64301. These uses of "inline" can cause strange
link-time failures when building with optimization.  Just
get rid of them.

llvm-svn: 64449
2009-02-13 09:42:34 +00:00
Evan Cheng cf4bd2319c Switch from new[] + delete[] to malloc + free since llvm does not catch C++ exceptions.
llvm-svn: 64448
2009-02-13 08:24:55 +00:00
Anders Carlsson 6ee8a7dac5 Start warning about unknown attributes.
llvm-svn: 64447
2009-02-13 08:22:04 +00:00
Anders Carlsson b4f3134ca3 Add a new Ignored attribute type, and use it for may_alias.
llvm-svn: 64446
2009-02-13 08:16:43 +00:00
Anders Carlsson 63784f4e5e Add CodeGen support for the nodebug attribute.
llvm-svn: 64445
2009-02-13 08:11:52 +00:00
Evan Cheng 333db7abbd If new[] fails, return 0 rather then trying to dereference a null pointer.
llvm-svn: 64444
2009-02-13 07:54:34 +00:00
Nick Lewycky cdccffe731 Reapply r64300:
Make sure the SCC pass manager initializes any contained
function pass managers.  Without this, simplify-libcalls
would add nocapture attributes when run on its own, but
not when run as part of -std-compile-opts or similar.

llvm-svn: 64443
2009-02-13 07:15:53 +00:00
Nick Lewycky c60bd012bc BasicAA was making the assumption that a local allocation which hadn't escaped
couldn't ever be the return of call instruction. However, it's quite possible
that said local allocation is itself the return of a function call. That's
what malloc and calloc are for, actually.

llvm-svn: 64442
2009-02-13 07:06:27 +00:00