Commit Graph

58340 Commits

Author SHA1 Message Date
Chris Lattner 6750113d54 force a 32-bit triple.
llvm-svn: 69729
2009-04-21 21:42:41 +00:00
Daniel Dunbar d1148a7f72 Make sure to mark the interface as completed when we see an
@implementation that closes a @class delcaration.
 - I don't know how to make a test case for this, but this strengthens
   the invariants that hold internally. The functionality change here
   is the edit to SemaDeclObjC.cpp.

llvm-svn: 69728
2009-04-21 21:41:56 +00:00
Daniel Dunbar d361c345c6 Force triple (test case fails for platforms with the non-fragile ABI).
llvm-svn: 69727
2009-04-21 21:17:29 +00:00
Daniel Dunbar 46285d8084 We no longer accept @defs with the non-fragile ABI.
llvm-svn: 69721
2009-04-21 21:16:23 +00:00
Chris Lattner a8c92540dd temporarily downgrade to a warning.
llvm-svn: 69720
2009-04-21 21:14:41 +00:00
Ted Kremenek 01c9af18c9 Plist diagnostics: Remove deprecated single-point locations in control-flow
pieces.

llvm-svn: 69719
2009-04-21 21:03:00 +00:00
Fariborz Jahanian ece1b2b0e1 Patch to diagnose use of objc's @defs in nonfragile abi.
llvm-svn: 69710
2009-04-21 20:28:41 +00:00
Dan Gohman e14efcc9f4 When turning (ashr(shl(x, n), n)) into sext(trunc(x)), the width of the
type to truncate to should be the number of bits of the value that are
preserved, not the number that are clobbered with sign-extension.
This fixes regressions in ldecod.

llvm-svn: 69704
2009-04-21 20:18:36 +00:00
Ted Kremenek a8e8bc24b3 Added over-release test case.
llvm-svn: 69703
2009-04-21 20:01:03 +00:00
Ted Kremenek 9bb660c3f4 Recommit 69694 but this time also include the header changes (sorry for breaking
the build).

llvm-svn: 69702
2009-04-21 19:56:58 +00:00
Chris Lattner 37920f5359 reject sizeof(itf) when itf is a forward declared interface, or when
in non-fragile abi mode.  rdar://6811884

llvm-svn: 69701
2009-04-21 19:55:16 +00:00
Mikhail Glushenkov 2c332fec97 Support --with-llvmgccdir and friends in llvmc, take 2.
Should now work when building with objdir != srcdir and when llvm-gcc is not
available.

Thanks to Duncan Sands for testing and advice!

llvm-svn: 69700
2009-04-21 19:46:10 +00:00
Douglas Gregor fa9ab53d95 Fix emission of static tentative definitions referenced from other static functions
llvm-svn: 69699
2009-04-21 19:28:58 +00:00
Daniel Dunbar 2655f85975 Revert 69694 (use of undefined getSymbol)
llvm-svn: 69697
2009-04-21 18:54:52 +00:00
Fariborz Jahanian f5fec02d0c More objc2's ivar layout bitmap. No change in functionality.
llvm-svn: 69695
2009-04-21 18:33:06 +00:00
Ted Kremenek 99de8ae19c Add pretty-printing for CodeTextRegions.
llvm-svn: 69694
2009-04-21 18:31:19 +00:00
Ted Kremenek 7421c0161a Lexically order the implementation of MemRegion 'print' methods. No functionality change.
llvm-svn: 69688
2009-04-21 18:09:22 +00:00
Chris Lattner b534f6a601 don't bother emitting a zero byte memset at all. We used to get them
in cases like this:

typedef struct {
  short instance;
  char name[0];
} ATTR_LIST_ENTRY2;

void test() {
  ATTR_LIST_ENTRY2 X = (ATTR_LIST_ENTRY2) { .instance = 7, };
}  

While it is safe to emit them, it is pretty silly.

llvm-svn: 69687
2009-04-21 17:59:23 +00:00
Ted Kremenek 30fb341f4f Use 'getAs<CodeTextRegion>' instead of 'dyn_cast<CodeTextRegion>' to handle any
layered regions.

llvm-svn: 69686
2009-04-21 17:37:26 +00:00
Devang Patel 55f84db7ea Test case for revision 69683.
llvm-svn: 69684
2009-04-21 17:21:01 +00:00
Ted Kremenek dab465d820 Grammar fix.
llvm-svn: 69682
2009-04-21 17:14:24 +00:00
Douglas Gregor beecd58e21 Explictly track tentative definitions within Sema, then hand those
tentative definitions off to the ASTConsumer at the end of the
translation unit. 

Eliminate CodeGen's internal tracking of tentative definitions, and
instead hook into ASTConsumer::CompleteTentativeDefinition. Also,
tweak the definition-deferal logic for C++, where there are no
tentative definitions.

Fixes <rdar://problem/6808352>, and will make it much easier for
precompiled headers to cope with tentative definitions in the future.

llvm-svn: 69681
2009-04-21 17:11:58 +00:00
Chris Lattner 69223bb7f5 fix a crash on a pointless but valid zero-length memset, rdar://6808691
llvm-svn: 69680
2009-04-21 16:52:12 +00:00
Anton Korobeynikov f7d0c1a5e6 Silence warnings.
Patch by Jay Foad!

llvm-svn: 69679
2009-04-21 16:04:56 +00:00
Anton Korobeynikov 5a4b52dc0c Drop obsolete reference to __eprintf.
Patch by Jay Foad!

llvm-svn: 69678
2009-04-21 16:04:41 +00:00
Anton Korobeynikov c6cd4b5016 'The "or die" is intended to catch the case where nm returned a
non-zero exit status, so nm will already have printed some error
messages.'

Patch by Jay Foad!

llvm-svn: 69677
2009-04-21 16:04:14 +00:00
Daniel Dunbar 108098d56c Fix test typo.
llvm-svn: 69676
2009-04-21 16:03:31 +00:00
Daniel Dunbar 93c1914de3 Use an ASTRecordLayout to compute the sizeof an interface, not
addRecordToClass.
 - Among other things, this fixes a crash when applying sizeof to an
   interface with synthesized ivars, although things still aren't
   "correct" here.

llvm-svn: 69675
2009-04-21 15:48:54 +00:00
Steve Naroff 426662ba79 Add pch reader/writer support for most of DeclObjC.h. Very close to reading/writing all ObjC AST nodes that we will encounter in header files (still a few FIXME's).
Once selector support is in place, we should be able to take this for a spin (and add test cases).

llvm-svn: 69674
2009-04-21 15:12:33 +00:00
Duncan Sands 7ce5cc6bd1 Get rid of what looks like a copy-and-pasted typo.
Spotted by gcc-4.5.

llvm-svn: 69673
2009-04-21 09:44:39 +00:00
Rafael Espindola 47ed1f5293 TLS_addr64 and TLS_addr32 define RDI and EAX. They don't use them.
This fixes PR4002.

llvm-svn: 69672
2009-04-21 08:22:09 +00:00
Chris Lattner 3501d43a10 implement semantic analysis for @synchronized, fixing a crash on invalid
rdar://6810940 - @synchronized has no sema checks

llvm-svn: 69670
2009-04-21 06:11:25 +00:00
Chris Lattner 6af6edb8b7 this time with more workingness.
llvm-svn: 69669
2009-04-21 06:06:09 +00:00
Sanjiv Gupta 4c5dfd3c45 Pass and return aggregate types directly to function calls.
llvm-svn: 69668
2009-04-21 06:01:16 +00:00
Chris Lattner c70dd56477 add support for goto checking and @synchronized blocks,
rdar://6810106

llvm-svn: 69667
2009-04-21 06:01:00 +00:00
Chris Lattner e08c43a3b0 fix massive testsuite failures from Alexei's patch due to inverted logic.
llvm-svn: 69666
2009-04-21 06:00:24 +00:00
Sanjiv Gupta 3e3ef7c4d9 Handle direct aggregate type arguments.
llvm-svn: 69665
2009-04-21 05:54:51 +00:00
Chris Lattner 2f5693f62d Split preprocessor initialization logic out of clang-cc into
libfrontend.  Patch by Alexei Svitkine!

llvm-svn: 69664
2009-04-21 05:40:52 +00:00
Chris Lattner a80b2bdb25 document new form of -fdiagnostics-print-source-range-in
llvm-svn: 69663
2009-04-21 05:35:32 +00:00
Chris Lattner 6968641ac5 rename -fprint-source-range-info -> -fdiagnostics-print-source-range-info.
Temporarily accept both of them, I'll rip out the old one after awhile.

llvm-svn: 69662
2009-04-21 05:34:31 +00:00
Chris Lattner 1f02e054a9 Fix PR4027 + rdar://6808859, we were rejecting implicit casts of
aggregates even though we already accept explicit ones.  Easy fix.

llvm-svn: 69661
2009-04-21 05:19:11 +00:00
Chris Lattner 16f11c7319 downgrade from extwarn to warning.
llvm-svn: 69660
2009-04-21 04:54:03 +00:00
Chris Lattner d6e97af74a improve MacroInfo to track the source range of the macro definition,
patch by Alexei Svitkine!

llvm-svn: 69659
2009-04-21 04:46:33 +00:00
Chris Lattner a9aeea9f27 use of predefined identifiers like __func__ at global scope warn in sema,
but crashed codegen.  Fix this to report the name of the llvm function.
This fixes rdar://6808051

llvm-svn: 69658
2009-04-21 04:41:23 +00:00
Chris Lattner 92b29b2f9f make "in included from" and "in instatiation from" messages respect
-fno-show-location, patch by Alexei Svitkine (PR4024)

llvm-svn: 69657
2009-04-21 03:57:54 +00:00
Chris Lattner cd6d4b105a add a preprocessor callback function for #undef, patch by
Alexei Svitkine!

llvm-svn: 69656
2009-04-21 03:42:09 +00:00
Dan Gohman 0ec0537403 Teach ScalarEvolution how to recognize zext-inreg and sext-inreg,
as they appear in LLVM IR. This isn't particularly interesting
on its own; this is just setting up some infrastructure.

llvm-svn: 69655
2009-04-21 02:26:00 +00:00
Anders Carlsson 6f2878360c Add a CXXDestroyExpr. Add classof member functions to CXXTempVarDecl.
llvm-svn: 69654
2009-04-21 02:22:11 +00:00
Sanjiv Gupta f09cb95236 Use an APInt of target int size to detect overflow while parsing multichars.
So 'abc' on i16 platforms will warn but not on i32 platforms.

llvm-svn: 69653
2009-04-21 02:21:29 +00:00
Anders Carlsson 21d30b41fc Add the beginnings of a CXXTempVarDecl class.
llvm-svn: 69652
2009-04-21 01:57:48 +00:00