aboutsummaryrefslogtreecommitdiff
path: root/lib/Rewrite
AgeCommit message (Collapse)Author
2012-02-10objc translator: more modern metadata stuff.Fariborz Jahanian
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150281 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-10objctive-c translator: modern metadata for ivars. wip.Fariborz Jahanian
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150275 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-10objc translator: mode modern abi stuff.Fariborz Jahanian
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150212 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-08last piece of metadata to complete modern metadata forFariborz Jahanian
protocol definitions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150106 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-08More rewriting of objective-c moderin abi metadata.Fariborz Jahanian
All protocol related metadata is close to completion. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150084 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-08modern objc rewriter: mode metadata stuff. wip.Fariborz Jahanian
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150030 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-07modern objc abi rewriter: mode protocol metadataFariborz Jahanian
for modern objc abi. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150011 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-07Revert my patches which removed Diagnostic.h includes by moving some ↵Benjamin Kramer
operator overloads out of line. This seems to negatively affect compile time onsome ObjC tests (which use a lot of partial diagnostics I assume). I have to come up with a way to keep them inline without including Diagnostic.h everywhere. Now adding a new diagnostic requires a full rebuild of e.g. the static analyzer which doesn't even use those diagnostics. This reverts commit 6496bd10dc3a6d5e3266348f08b6e35f8184bc99. This reverts commit 7af19b817ba964ac560b50c1ed6183235f699789. This reverts commit fdd15602a42bbe26185978ef1e17019f6d969aa7. This reverts commit 00bd44d5677783527d7517c1ffe45e4d75a0f56f. This reverts commit ef9b60ffed980864a8db26ad30344be429e58ff5. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150006 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-07objc rewriter: modern metadata for protocol decls. wip.Fariborz Jahanian
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150002 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-07objc rewriter: start supporting modern objective-c abiFariborz Jahanian
in objective-c rewriter. wip. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149989 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-05Basic: import SmallString<> into clang namespaceDylan Noblesmith
(I was going to fix the TODO about DenseMap too, but that would break self-host right now. See PR11922.) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149799 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-05Basic: import OwningPtr<> into clang namespaceDylan Noblesmith
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149798 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-04Move a method from IdentifierTable.h out of line and remove the SmallString ↵Benjamin Kramer
include. Fix all the transitive include users. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149783 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-04Remove Diagnostic.h include from Preprocessor.h.Benjamin Kramer
- Move the offending methods out of line and fix transitive includers. - This required changing an enum in the PPCallback API into an unsigned. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149782 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-27In FixItRecompile::BeginInvocation() reset the diagnostics before executingArgyrios Kyrtzidis
the original action. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149120 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-27In FixItRecompile::BeginInvocation(), check the return value of ↵Argyrios Kyrtzidis
BeginSourceFile(). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149107 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-26Remove the headers now that ::close() is not used.Argyrios Kyrtzidis
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149044 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-26In FixItRewriteToTemp::RewriteFilename don't try to close the file descriptorArgyrios Kyrtzidis
with close(); return it instead. Fixes mingw build and eliminates possible racing issues. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149043 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-26Rewrite/FrontendActions.cpp: Tweak to unbreak msvc.NAKAMURA Takumi
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149041 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-26Add missing include of <unistd.h>Douglas Gregor
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149035 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-26Introduce 3 new fixit options:Argyrios Kyrtzidis
-fixit-recompile applies fixits and recompiles the result -fixit-to-temporary applies fixits to temporary files -fix-only-warnings">, applies fixits for warnings only, not errors Combining "-fixit-recompile -fixit-to-temporary" allows testing the result of fixits without touching the original sources. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149027 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-20Per PR 11814, use Monospace instead of Andale Mono.Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148567 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-17Remove unreachable code in Clang. (replace with llvm_unreachable where ↵David Blaikie
appropriate or when GCC requires it) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148292 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-12Add IsImplicit field in ObjCMessageExpr that is true when the messageArgyrios Kyrtzidis
was constructed, e.g. for a property access. This allows the selector identifier locations machinery for ObjCMessageExpr to function correctly, in that there are not real locations to handle/report for such a message. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148013 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-06Fix uninitialized variable warning.Chad Rosier
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147678 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-02Fix canonicalization of protocol-qualified typesDouglas Gregor
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147421 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-01Eliminate ObjCForwardProtocolDecl, which is redundant now thatDouglas Gregor
ObjCProtocolDecl modules forward declarations properly. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147415 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-01Move the data that corresponds to the definition of a protocol into aDouglas Gregor
separately-allocated DefinitionData structure. Introduce various functions that will help with the separation of declarations from definitions (isThisDeclarationADefinition(), hasDefinition(), getDefinition()). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147408 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-01Use declaresSameEntity() when comparing ObjCProtocolDecls, andDouglas Gregor
getCanonicalDecl() when putting ObjCProtocolDecls into a set. This is groundwork for making ObjCProtocolDecl redeclarable. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147406 91177308-0d34-0410-b5e6-96231b3b80d8
2011-12-27Eliminate ObjCClassDecl, which is redundant now that ObjCInterfaceDeclDouglas Gregor
covers both declarations (@class) and definitions (@interface) of an Objective-C class. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147299 91177308-0d34-0410-b5e6-96231b3b80d8
2011-12-21objc, objc rewriter. Fixes couple of bugs oneFariborz Jahanian
because of recent refactoring and one in the rewriter. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147070 91177308-0d34-0410-b5e6-96231b3b80d8
2011-12-15Move ObjCInterfaceDecl's "EndLoc" into DefinitionData, since it onlyDouglas Gregor
applies to an actual definition. Plus, clarify the purpose of this field and give the accessor a different name, since getLocEnd() is supposed to be the same as getSourceRange().getEnd(). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146694 91177308-0d34-0410-b5e6-96231b3b80d8
2011-12-15Keep track of all declarations of an Objective-C class (both forwardDouglas Gregor
declarations and definitions) as ObjCInterfaceDecls within the same redeclaration chain. This new representation matches what we do for C/C++ variables/functions/classes/templates/etc., and makes it possible to answer the query "where are all of the declarations of this class?" git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146679 91177308-0d34-0410-b5e6-96231b3b80d8
2011-12-15Replace all comparisons between ObjCInterfaceDecl pointers with callsDouglas Gregor
to declaresSameEntity(), as a baby step toward tracking forward declarations of Objective-C classes precisely. Part of <rdar://problem/10583531>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146618 91177308-0d34-0410-b5e6-96231b3b80d8
2011-12-08More refactoring of objective-C rewriter.Fariborz Jahanian
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146160 91177308-0d34-0410-b5e6-96231b3b80d8
2011-12-05More refactoring of objc rewriter.Fariborz Jahanian
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145867 91177308-0d34-0410-b5e6-96231b3b80d8
2011-12-05More objc rewriter refactoring.Fariborz Jahanian
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145841 91177308-0d34-0410-b5e6-96231b3b80d8
2011-12-05Some early refactoring of objective-c rewriter.Fariborz Jahanian
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145824 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-18Change ASTConsumer::HandleTopLevelDecl to return true for the parser to continueArgyrios Kyrtzidis
parsing or false to abort parsing. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144943 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-09objc rewriter: use a more specific name for local variable usedFariborz Jahanian
in fast enumeration rewrite. // rdar://10415026 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144191 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-06Change the AST representation of operations on Objective-CJohn McCall
property references to use a new PseudoObjectExpr expression which pairs a syntactic form of the expression with a set of semantic expressions implementing it. This should significantly reduce the complexity required elsewhere in the compiler to deal with these kinds of expressions (e.g. IR generation's special l-value kind, the static analyzer's Message abstraction), at the lower cost of specifically dealing with the odd AST structure of these expressions. It should also greatly simplify efforts to implement similar language features in the future, most notably Managed C++'s properties and indexed properties. Most of the effort here is in dealing with the various clients of the AST. I've gone ahead and simplified the ObjC rewriter's use of properties; other clients, like IR-gen and the static analyzer, have all the old complexity *and* all the new complexity, at least temporarily. Many thanks to Ted for writing and advising on the necessary changes to the static analyzer. I've xfailed a small diagnostics regression in the static analyzer at Ted's request. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143867 91177308-0d34-0410-b5e6-96231b3b80d8
2011-10-25Restore r142914 and r142915, now with missing file and apparentJohn McCall
GCC compiler workaround. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142931 91177308-0d34-0410-b5e6-96231b3b80d8
2011-10-25Revert r142914 and r142915, due to possibly missing file.NAKAMURA Takumi
r142914: "Introduce a placeholder type for "pseudo object"" r142915: "Pull the pseudo-object stuff into its own file." git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142921 91177308-0d34-0410-b5e6-96231b3b80d8
2011-10-25Introduce a placeholder type for "pseudo object"John McCall
expressions: expressions which refer to a logical rather than a physical l-value, where the logical object is actually accessed via custom getter/setter code. A subsequent patch will generalize the AST for these so that arbitrary "implementing" sub-expressions can be provided. Right now the only client is ObjC properties, but this should be generalizable to similar language features, e.g. Managed C++'s __property methods. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142914 91177308-0d34-0410-b5e6-96231b3b80d8
2011-10-11objc rewriter: Restore objc_msgSend_stret/objc_msgSendSuper_stret declarationFariborz Jahanian
to their fragile-abi representation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141735 91177308-0d34-0410-b5e6-96231b3b80d8
2011-10-07objc rewriter. Fix declaration of objc_msgSend_stret/objc_msgSendSuper_stret.Fariborz Jahanian
Fix an assert crash when casting a CF type to 'id'. // rdar://10250911 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141369 91177308-0d34-0410-b5e6-96231b3b80d8
2011-10-07Rename TagDecl::isDefinition -> isCompleteDefinitionJohn McCall
for better self-documenting code, since the semantics are subtly different from getDefinition(). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141355 91177308-0d34-0410-b5e6-96231b3b80d8
2011-10-04Improve location fidelity of objc decls.Argyrios Kyrtzidis
-Add the location of the class name to all objc container decls, not just ObjCInterfaceDecl. -Make objc decls consistent with the rest of the NamedDecls and have getLocation() point to the class name, not the location of '@'. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141061 91177308-0d34-0410-b5e6-96231b3b80d8
2011-10-03ArrayRef'ize ObjCMessageExprArgyrios Kyrtzidis
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140986 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-29Introduce a pure virtual clone() method to DiagnosticConsumer, so thatDouglas Gregor
we have the ability to create a new, distict diagnostic consumer when we go off and build a module. This avoids the currently horribleness where the same diagnostic consumer sees diagnostics for multiple translation units (and multiple SourceManagers!) causing all sorts of havok. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140743 91177308-0d34-0410-b5e6-96231b3b80d8