aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2009-04-22Rework the shadow struct that is layed out for Objective-C classes.Daniel Dunbar
- Superclasses are now always laid out their shadow structure at the first field. - Prior to this, the entire class heirarchy was flattened into a single structure which meant that alignment, padding, and bitfields weren't packed correctly (the ASTRecordLayout was correct however, which meant our debug info didn't coincide with ivar offsets, for example). - This is still very suboptimal, but I believe the ivar layout itself is now at least close to correct. - <rdar://problem/6773388> error: objc[29823]: layout bitmap sliding backwards git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69771 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-22Fix rdar://6814950 - stdint.h isn't "-pedantic -std=c89" clean,Chris Lattner
by marking the predefines buffer as a system header. The problem with stdint is that it was getting problems like this: /Volumes/Projects/cvs/llvm/Debug/lib/clang/1.0/include/stdint.h:43:9: warning: 'long long' is an extension when C99 mode is not enabled typedef __INT64_TYPE__ int64_t; ^ <built-in>:73:29: note: instantiated from: #define __INT64_TYPE__ long long ^ We correctly silence warnings in system headers, but only if the spelling location of the token came from the system header. This is designed so that if you use a system macro in your code that you don't get punished for its definition. This is all cool except that the predefines buffer wasn't considered a system header. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69770 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-22move 64-bit abi functions to lazy model, everything is lazy now, yay.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69767 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-22remove the last of the non-lazy objc runtime functions for the 32-bit ABI,Chris Lattner
7 left for 64-bit ABI. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69766 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-22number of non-lazy runtime functions from 9 -> 4.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69765 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-22make message send functions lazy, we're down from 14 non-lazy functions to 9.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69764 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-22move more EH stuff to being lazily created. An empty .m file now Chris Lattner
produces just 14 dead "declares" in llvm ir instead of 19. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69763 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-22make try/catch objc runtime functions be lazily generated.Chris Lattner
rdar://6809612 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69762 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-22rename testChris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69761 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-22Fix a problem with objc foreach loop. It turns out that objc mode changesChris Lattner
for scoping to match C99 even when in C89 mode. This patch fixes this (eliminating a "redefinition of thisKey" error), and also prevents non-sensical diagnostics in -pedantic mode like this: t.m:7:8: warning: variable declaration in for loop is a C99-specific feature for (id thisKey in keys) ; ^ git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69760 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-22Test PCH support for VLAsDouglas Gregor
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69758 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-22Eliminate a FIXME in one of the PCH test casesDouglas Gregor
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69757 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-22Fix some mishandling of the attr(gnu_inline) mode when used withChris Lattner
extern. Previously we would warn about it and ignore the attribute. This is incorrect, it should be handled as a c89 "extern inline" function. Many thanks to Matthieu Castet for pointing this out and beating me over the head until I got it. PR3988: extern inline function are not externally visible git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69756 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-21Lazy deserialization of macro definitions for precompiled headers.Douglas Gregor
This optimization improves performance on the Carbon-prefixed "Hello, World!" example by 57%. For reference, we're now about 2.25x faster than GCC PCH. We're also pulling in far less of the PCH file: *** PCH Statistics: 411/20693 types read (1.986179%) 2553/59230 declarations read (4.310316%) 1093/44646 identifiers read (2.448148%) 1/32954 statements read (0.003035%) 21/6187 macros read (0.339421%) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69755 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-21Fix crash reported in PR 3991. The analyzer doesn't reason about ObjCKVCExpr.Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69754 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-21Update Xcode project with recently added files.Steve Naroff
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69753 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-21This patch is largely due to Zhongxing Xu. I've simply applied it because ofTed Kremenek
some refactoring I did recently to StoreManager. StoreManager::CastRegion: Handle casts to void* by stripping TypedViewRegions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69751 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-21apply Eli's patch to fix PR4008, with a testcase. Thanks Eli!Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69750 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-21Resolve merge conflict better.Mike Stump
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69748 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-21fix PR4026: Clang can't codegen __func__ without implicit castChris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69747 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-21Tighten up blocks type checking. This was discussed back in theMike Stump
r56595 timeframe, but left undone. Radar 6812711 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69745 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-21Lazy deserialization of identifiers in PCH files fixed a problem withDouglas Gregor
name lookup of structures declared within other structures. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69744 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-21Fix rdar://6814047, a crash on invalid in blocks code I noticed whenChris Lattner
working on the previous fix. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69742 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-21Fix: <rdar://problem/6777209> false Dereference of null pointer in loop: ↵Ted Kremenek
pointer increment/decrement preserves non-nullness When the StoreManager doesn't reason well about pointer-arithmetic, propagate the non-nullness constraint on a pointer value when performing pointer arithmetic uisng ++/--. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69741 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-21Tweak pretty-printing of constraints.Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69740 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-21Don't bother writing a visible-declarations record for the translationDouglas Gregor
unit into the PCH file, since we won't be performing name lookup into it anyway. Reduces the size of the Carbon.h PCH file by ~200k. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69739 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-21fix marking of nested blocks with the "hasBlockDeclRefExprs" toChris Lattner
mark exactly the blocks which have references that are "live through". This fixes a rejects valid: rdar://6808730 - [sema] [blocks] block rejected at global scope git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69738 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-21Lazy deserialization of the declaration chains associated withDouglas Gregor
identifiers from a precompiled header. This patch changes the primary name lookup method for entities within a precompiled header. Previously, we would load all of the names of declarations at translation unit scope into a large DenseMap (inside the TranslationUnitDecl's DeclContext), and then perform a special "last resort" lookup into this DeclContext when we knew there was a PCH file (see Sema::LookupName). Now, when we see an identifier named for the first time, we load all of the declarations with that name that are visible from the translation unit into the IdentifierInfo's chain of declarations. Thus, the explicit "look into the translation unit's DeclContext" code is gone, and Sema effectively uses the same IdentifierInfo-based name lookup mechanism whether we are using a PCH file or not. This approach should help PCH scale with the size of the input program rather than the size of the PCH file. The "Hello, World!" application with Carbon.h as a PCH file now loads 20% of the identifiers in the PCH file rather than 85% of the identifiers. 90% of the 20% of identifiers loaded are actually loaded when we deserialize the preprocessor state. The next step is to make the preprocessor load macros lazily, which should drastically reduce the number of types, declarations, and identifiers loaded for "Hello, World". git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69737 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-21this is a warning now, return a well formed ast.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69731 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-21Refactor 'BasicStoreManager::CastRegion' and 'RegionStoreManager::CastRegion'Ted Kremenek
into StoreManager::CastRegion. Both methods were practically identical, and this is core logic that is common to all StoreManagers since it defines the basic invariants of the abstract memory model. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69730 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-21force a 32-bit triple.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69729 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-21Make sure to mark the interface as completed when we see anDaniel Dunbar
@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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69728 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-21Force triple (test case fails for platforms with the non-fragile ABI).Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69727 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-21We no longer accept @defs with the non-fragile ABI.Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69721 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-21temporarily downgrade to a warning.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69720 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-21Plist diagnostics: Remove deprecated single-point locations in control-flowTed Kremenek
pieces. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69719 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-21Patch to diagnose use of objc's @defs in nonfragile abi.Fariborz Jahanian
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69710 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-21Added over-release test case.Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69703 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-21Recommit 69694 but this time also include the header changes (sorry for breakingTed Kremenek
the build). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69702 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-21reject sizeof(itf) when itf is a forward declared interface, or whenChris Lattner
in non-fragile abi mode. rdar://6811884 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69701 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-21Fix emission of static tentative definitions referenced from other static ↵Douglas Gregor
functions git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69699 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-21Revert 69694 (use of undefined getSymbol)Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69697 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-21More objc2's ivar layout bitmap. No change in functionality.Fariborz Jahanian
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69695 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-21Add pretty-printing for CodeTextRegions.Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69694 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-21Lexically order the implementation of MemRegion 'print' methods. No ↵Ted Kremenek
functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69688 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-21don't bother emitting a zero byte memset at all. We used to get themChris Lattner
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69687 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-21Use 'getAs<CodeTextRegion>' instead of 'dyn_cast<CodeTextRegion>' to handle anyTed Kremenek
layered regions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69686 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-21Grammar fix.Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69682 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-21Explictly track tentative definitions within Sema, then hand thoseDouglas Gregor
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69681 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-21Fix test typo.Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69676 91177308-0d34-0410-b5e6-96231b3b80d8