aboutsummaryrefslogtreecommitdiff
path: root/lib/Frontend/RewriteObjC.cpp
AgeCommit message (Collapse)Author
2010-03-30the big refactoring bits of PR3782.Rafael Espindola
This introduces FunctionType::ExtInfo to hold the calling convention and the noreturn attribute. The next patch will extend it to include the regparm attribute and fix the bug. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99920 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-16Let SourceManager::getBufferData return StringRef instead of a pair of two ↵Benjamin Kramer
const char*. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98630 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-16Give SourceManager a Diagnostic object with which to report errors,Douglas Gregor
and start simplifying the interfaces in SourceManager that can fail. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98594 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-15Introduce a new BufferResult class to act as the return type ofDouglas Gregor
SourceManager's getBuffer() (and similar) operations. This abstract can be used to force callers to cope with errors in getBuffer(), such as missing files and changed files. Fix a bunch of callers to use the new interface. Add some very basic checks for file consistency (file size, modification time) into ContentCache::getBuffer(), although these checks don't help much until we've updated the main callers (e.g., SourceManager::getSpelling()). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98585 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-11Add tentative support for accessing local variables withFariborz Jahanian
external linkage (static, extern, etc.) in blocks in rewriter. wip. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98265 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-10Change the 'super' messaging API in the rewriter.Fariborz Jahanian
Fixes radar 7738452. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98190 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-04Patch to get around a rewriter bug rewriting storage classFariborz Jahanian
on a block API struct definition. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97754 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-04Fixes a bug whereby static const block var has static Fariborz Jahanian
moved incorrectly. (radar 7714443). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97734 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-02Cast a pointer to 'long long' to satisfy all compilation models.Fariborz Jahanian
Satisfies radar 7703202. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97532 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-01More rewriter of nested blocks fun stuff.Fariborz Jahanian
Radar 7696893. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97520 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-26Prevent rewriter crash when variable type is missing.Fariborz Jahanian
Fixes radar 7692183. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97281 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-26Minor cleanup of the rewriter.Fariborz Jahanian
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97280 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-26Removed some unused code in rewriter.Fariborz Jahanian
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97274 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-26Fix rewriting of byref variables in nested blocks.Fariborz Jahanian
Fixes radar 7692350. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97254 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-26Rewriting of imported variable from outerFariborz Jahanian
blocks's argument in the inner block requires special treatment. Fixes radar 7692419. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97244 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-26Support rewriting of property synthesis with retain/copyFariborz Jahanian
attributes. Fixes radar 7214439. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97203 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-24Implement nasty rewriting of nested blocks when innerFariborz Jahanian
blocks use variables not used in any of the outer blocks. (Fixes radar 7682149). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97073 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-24Fix rewriting of a method when return type isFariborz Jahanian
a block pointer type. Fixes radar 7682149. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97008 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-23Fixes a rewriting of qualified-id type which exposed a biggerFariborz Jahanian
rewriting problem. Fixes radar 7680953. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96987 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-22Fixes a rewriting of byref variable when its initializer isFariborz Jahanian
itself rewritten. Radar 7669784. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96798 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-21Eliminate the default arguments to ASTContext::getFunctionType(),Douglas Gregor
fixing up a few callers that thought they were propagating NoReturn information but were in fact saying something about exception specifications. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96766 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-19Revert: "Change InitListExpr to allocate the array for holding references"Ted Kremenek
This was causing buildbot breakage. This reverts commit d46e952cc8cb8d9eed8657d9a0b267910a0f745a. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96652 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-19Change InitListExpr to allocate the array for holding referencesTed Kremenek
to initializer expressions in an array allocated using ASTContext. This plugs a memory leak when ASTContext uses a BumpPtrAllocator to allocate memory for AST nodes. In my mind this isn't an ideal solution; it would be nice to have a general "vector"-like class that allocates memory using ASTContext, but whose guts could be separated from the methods of InitListExpr itself. I haven't gone and taken this approach yet because it isn't clear yet if we'll eventually want an alternate solution for recylcing memory using by InitListExprs as we are constructing the ASTs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96642 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-19Patch removes IVars list from ObjCInterfaceDecl andFariborz Jahanian
instead relies on their DeclContext for iteration, etc. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96638 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-18__typeof should be able to handle block pointer types whenFariborz Jahanian
rewriting. Fixes radar 7659483. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96549 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-16Minor rewriter cleanup and a test for a block rewriting bug.Fariborz Jahanian
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96361 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-16Fix rewriter bug when function call inside block with block parameter Fariborz Jahanian
causes C++ compile error (radar 7651312). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96352 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-15Fix a broken rewritin of @implementation keyword.Fariborz Jahanian
(fixes radar 7649577). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96270 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-14Pass StringRefs to InsertText/ReplaceText in RewriteObjC and remove a ton of ↵Benjamin Kramer
unnecessary length arguments. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96164 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-12Fixes a rewriter bug rewriting function decl.Fariborz Jahanian
with block-pointer-type as one or more of its arguments. Fixes radar 7638400. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95992 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-11Fixes a rewriting bug where order of constructor expression arguments did ↵Fariborz Jahanian
not match order of constructor arguments (all block API specific). This was exposed only in a large block literal expression in a large file where PtrSet container size execceded its limit and required reallocation. Fixes radar 7638294 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95936 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-11Allocate the SubExprs array in ObjCMessageExpr using the allocator ↵Ted Kremenek
associated with ASTContext. This fixes yet another leak (<rdar://problem/7639260>). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95930 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-11Eliminate a bunch of unnecessary ASTContexts from members functions ofDouglas Gregor
Decl subclasses. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95841 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-10Patch to rewrite blocks into unique api names.Fariborz Jahanian
Fixes radar 7630551 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95796 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-10Provide rewriting suppport for use of __typeof__Fariborz Jahanian
in a declaration statement. Fixes radar 7628153. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95788 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-10Comment out category's property decls. in rewrite.Fariborz Jahanian
Fixes radar 7630636. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95744 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-05Add guard in RewriteObjC::HandleTopLevelSingleDecl() to not doTed Kremenek
anything when Sema has issued an error. This matches the behavior in RewriteObjC::HandleTranslationUnit(). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95434 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-05Fixes a minor rewriter bug messaging inside a function call.Fariborz Jahanian
Fixes radar 7617047. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95392 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-05Some clean up of replacement text API no longer needed byFariborz Jahanian
my recent changes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95391 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-05Fix a nested ivar reference rewriting bug.Fariborz Jahanian
(Fixes radar 7607605). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95341 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-04Fix rewriting of 'const' __block variables inFariborz Jahanian
the rewriter. (Fixes radar 7607781). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95267 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-03Fix more rewriting of protocol-quialified 'id' type.Fariborz Jahanian
(Fixes radar 7607413). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95257 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-02Fix up rewriting of protocol qualified types in objc rewriter.Fariborz Jahanian
Fixes radar 7589414. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95097 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-29Fixes rewriter bug rewriting byref related API where a structFariborz Jahanian
definition comes after where it is needed. Fixes radar 7589385. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94788 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-28Fixes a rewrite bug rewriting nested ivars reference.Fariborz Jahanian
(Radar 7583971). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94724 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-26Added assert to the rewrite.Fariborz Jahanian
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94584 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-26Refix rewriting of an ivar access when it isFariborz Jahanian
type-cast to its sub-class (radar 7575882). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94559 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-26Fix a regression caused by my rewriting of cast of ivarFariborz Jahanian
access (was radar 7575882). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94481 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-25Fixes a rewriting bug of access ivar of a variable castFariborz Jahanian
to subclass. (Fixes radar 7575882). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94444 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-21Patch to implement rewriting of properties.Fariborz Jahanian
Fixes radar 7562952. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94087 91177308-0d34-0410-b5e6-96231b3b80d8