summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend/PCHWriter.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Add support for the weakref attribute. We still produce "alias weak" as ↵Rafael Espindola2010-02-231-1/+1
| | | | | | llvm-gcc does, but are more strict on what uses of weakref we accept. llvm-svn: 96992
* Sort cases.Ted Kremenek2010-02-181-2/+2
| | | | llvm-svn: 96536
* Add 'ns_returns_not_retained' and 'cf_returns_not_retained' attributes toTed Kremenek2010-02-181-2/+4
| | | | | | | match 'ns_returns_retained' and 'cf_returns_retained' respectively. These are not yet hooked up to the static analyzer. llvm-svn: 96535
* Add IBAction attribute to keep the IBOutlet attribute company.Ted Kremenek2010-02-171-0/+1
| | | | llvm-svn: 96447
* Implementing unused function warning.Tanya Lattner2010-02-121-0/+10
| | | | llvm-svn: 95940
* clang -cc1: Add -fsjlj-exceptions, which requires far too much button pushing.Daniel Dunbar2010-02-101-0/+1
| | | | llvm-svn: 95785
* Implement synthesizing properties by default.Fariborz Jahanian2010-02-091-1/+4
| | | | | | | | | This is a non-fragile-abi feature only. Since it breaks existing code, it is currently placed under -fobjc-nonfragile-abi2 option for test purposes only until further notice. WIP. llvm-svn: 95685
* Roll r95513 back in.Sam Weinig2010-02-071-0/+9
| | | | llvm-svn: 95515
* Roll out r95513, it seems to have broken self hosting.Sam Weinig2010-02-071-9/+0
| | | | llvm-svn: 95514
* Add PCH support for CXXBoolLiteralExpr and CXXNullPtrLiteralExpr.Sam Weinig2010-02-071-0/+9
| | | | llvm-svn: 95513
* First stage of adding AltiVec supportJohn Thompson2010-02-051-0/+2
| | | | llvm-svn: 95335
* Add VarDecl::isThisDeclarationADefinition(), which properly encapsulates the ↵Sebastian Redl2010-01-311-5/+3
| | | | | | logic for when a variable declaration is a (possibly tentativ) definition. Add a few functions building on this, and shift C tentative definition handling over to this new functionality. This shift also kills the Sema::TentativeDefinitions map and instead simply stores all declarations in the renamed list. The correct handling for multiple tentative definitions is instead shifted to the final walk of the list. llvm-svn: 94968
* (1) Rename getClangSubversionRevision() to getClangRevision(), andTed Kremenek2010-01-221-8/+7
| | | | | | | | | | | | | | | | | have it return a StringRef instead of an integer (to be more VCS agnostic). (2) Add getClangFullRepositoryVersion(), which contains an amalgamation of the repository name and the revision. (3) Change PCH to only emit the string returned by getClangFullRepositoryVersion() instead of also emitting the value of getClangSubversionRevision() (which has been removed). This is functionally equivalent. More cleanup to version string generation pending... llvm-svn: 94231
* Rename pch::SVN_BRANCH_REVISION to pch::VERSION_CONTROL_BRANCH_REVISION.Ted Kremenek2010-01-221-3/+3
| | | | llvm-svn: 94214
* Rename getClangSubversionPath() -> getClangRepositoryPath() and have it ↵Ted Kremenek2010-01-221-1/+1
| | | | | | return a StringRef. llvm-svn: 94213
* Use the llvm coding convention for indentation for switch.Mike Stump2010-01-201-1/+1
| | | | llvm-svn: 93966
* Improve source-location information for builtin TypeLocs, from EneaDouglas Gregor2010-01-181-1/+7
| | | | | | Zaffanella (with a couple of my tweaks). llvm-svn: 93733
* Encoding calling conventions in the type system, from Charles Davis!Douglas Gregor2010-01-181-0/+2
| | | | llvm-svn: 93726
* Add type source information for both kinds of typeof types.John McCall2010-01-131-2/+7
| | | | | | Patch by Enea Zaffanella. llvm-svn: 93344
* Generalize target weirdness handling having proper layering in mind:Anton Korobeynikov2010-01-101-1/+4
| | | | | | | | | 1. Add helper class for sema checks for target attributes 2. Add helper class for codegen of target attributes As a proof-of-concept - implement msp430's 'interrupt' attribute. llvm-svn: 93118
* Teach Preprocessor::macro_begin/macro_end to lazily load all macroDouglas Gregor2010-01-041-2/+0
| | | | | | | | definitions from a precompiled header. This ensures that code-completion with macro names behaves the same with or without precompiled headers. llvm-svn: 92497
* Get rid of FixedWidthIntType, as suggested by Chris and Eli.Anders Carlsson2009-12-291-10/+0
| | | | llvm-svn: 92246
* Serialize the NoReturn bit on FunctionTypes for precompiled headersDouglas Gregor2009-12-221-0/+1
| | | | llvm-svn: 91911
* Fix a few MSVC warnings.Daniel Dunbar2009-12-181-4/+4
| | | | llvm-svn: 91714
* Implement runtime checks for undefined behavior. WIP.Mike Stump2009-12-121-0/+1
| | | | | | | | | | | | | This implements a new flag -fcatch-undefined-behavior. The flag turns on additional runtime checks for: T a[I]; a[i] abort when i < 0 or i >= I. Future stuff includes shifts by >= bitwidth amounts. llvm-svn: 91198
* DeclaratorInfo -> TypeSourceInfo. Makes an effort to rename associated ↵John McCall2009-12-071-5/+5
| | | | | | | | | | | | | | | | | | | | | variables, but the results are imperfect. For posterity, I did: cat <<EOF > $cmdfile s/DeclaratorInfo/TypeSourceInfo/g s/DInfo/TInfo/g s/TypeTypeSourceInfo/TypeSourceInfo/g s/SourceTypeSourceInfo/TypeSourceInfo/g EOF find lib -name '*.cpp' -not -path 'lib/Parse/*' -exec sed -i '' -f $cmdfile '{}' \; find lib -name '*.h' -exec sed -i '' -f $cmdfile '{}' \; find include -name '*.h' -not -path 'include/clang/Parse/*' -not -path 'include/clang/Basic/*' -exec sed -i '' -f $cmdfile '{}' \; llvm-svn: 90743
* Fix "using typename" and the instantiation of non-dependent using declarations.John McCall2009-12-041-0/+11
| | | | llvm-svn: 90614
* Add DeclarationName support for C++0x operator literals. They should now work asAlexis Hunt2009-11-291-0/+4
| | | | | | | function names outside of templates - they'll probably cause some damage there as they're largely untested. llvm-svn: 90064
* Remove VISIBILITY_HIDDEN from anonymous namespaces in libFrontend.Benjamin Kramer2009-11-281-5/+4
| | | | llvm-svn: 90033
* Allow user re-definition of SEL as well as accessing its fields.Fariborz Jahanian2009-11-251-1/+1
| | | | | | This fixes pr5611. llvm-svn: 89895
* Parse C++ member check attributes - base_check, hiding, and override.Alexis Hunt2009-11-251-0/+5
| | | | | | The attributes are currently ignored. llvm-svn: 89837
* This patch implements objective-c's 'SEL' type as a built-inFariborz Jahanian2009-11-211-0/+5
| | | | | | | | | | | | | | | | | | type and fixes a long-standing code gen. crash reported in at least two PRs and a radar. (radar 7405040 and pr5025). There are couple of remaining issues that I would like for Ted. and Doug to look at: Ted, please look at failure in Analysis/MissingDealloc.m. I have temporarily added an expected-warning to make the test pass. This tests has a declaration of 'SEL' type which may not co-exist with the new changes. Doug, please look at a FIXME in PCHWriter.cpp/PCHReader.cpp. I think the changes which I have ifdef'ed out are correct. They need be considered for in a few Indexer/PCH test cases. llvm-svn: 89561
* Added rudimentary C++0x attribute support.Alexis Hunt2009-11-211-0/+1
| | | | | | | | | | | | | | The following attributes are currently supported in C++0x attribute lists (and in GNU ones as well): - align() - semantics believed to be conformant to n3000, except for redeclarations and what entities it may apply to - final - semantics believed to be conformant to CWG issue 817's proposed wording, except for redeclarations - noreturn - semantics believed to be conformant to n3000, except for redeclarations - carries_dependency - currently ignored (this is an optimization hint) llvm-svn: 89543
* First part of changes to eliminate problems with cv-qualifiers andDouglas Gregor2009-11-161-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | sugared types. The basic problem is that our qualifier accessors (getQualifiers, getCVRQualifiers, isConstQualified, etc.) only look at the current QualType and not at any qualifiers that come from sugared types, meaning that we won't see these qualifiers through, e.g., typedefs: typedef const int CInt; typedef CInt Self; Self.isConstQualified() currently returns false! Various bugs (e.g., PR5383) have cropped up all over the front end due to such problems. I'm addressing this problem by splitting each qualifier accessor into two versions: - the "local" version only returns qualifiers on this particular QualType instance - the "normal" version that will eventually combine qualifiers from this QualType instance with the qualifiers on the canonical type to produce the full set of qualifiers. This commit adds the local versions and switches a few callers from the "normal" version (e.g., isConstQualified) over to the "local" version (e.g., isLocalConstQualified) when that is the right thing to do, e.g., because we're printing or serializing the qualifiers. Also, switch a bunch of Context.getCanonicalType(T1).getUnqualifiedType() == Context.getCanonicalType(T2).getQualifiedType() expressions over to Context.hasSameUnqualifiedType(T1, T2) llvm-svn: 88969
* Introduce a new representation for template templateDouglas Gregor2009-11-111-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | parameters. Rather than storing them as either declarations (for the non-dependent case) or expressions (for the dependent case), we now (always) store them as TemplateNames. The primary change here is to add a new kind of TemplateArgument, which stores a TemplateName. However, making that change ripples to every switch on a TemplateArgument's kind, also affecting TemplateArgumentLocInfo/TemplateArgumentLoc, default template arguments for template template parameters, type-checking of template template arguments, etc. This change is light on testing. It should fix several pre-existing problems with template template parameters, such as: - the inability to use dependent template names as template template arguments - template template parameter default arguments cannot be instantiation However, there are enough pieces missing that more implementation is required before we can adequately test template template parameters. llvm-svn: 86777
* Add support for cdecl attribute. (As far as I know, it doesn't affect CodeGenEli Friedman2009-11-091-0/+3
| | | | | | | | unless we start implementing command-line switches which override the default calling convention, so the effect is mostly to silence unknown attribute warnings.) llvm-svn: 86571
* Adding -fshort-wchar option.John Thompson2009-11-051-0/+1
| | | | llvm-svn: 86167
* Track source information for template arguments and template specializationJohn McCall2009-10-291-1/+22
| | | | | | | types. Preserve it through template instantiation. Preserve it through PCH, although TSTs themselves aren't serializable, so that's pretty much meaningless. llvm-svn: 85500
* Remove OriginalTypeParmDecl; the original type is the one specifiedJohn McCall2009-10-231-1/+0
| | | | | | | | | | | | | in the DeclaratorInfo, if one is present. Preserve source information through template instantiation. This is made more complicated by the possibility that ParmVarDecls don't have DIs, which is possibly worth fixing in the future. Also preserve source information for function parameters in ObjC method declarations. llvm-svn: 84971
* When building types from declarators, instead of building two types (one forJohn McCall2009-10-221-14/+9
| | | | | | | | | | | | | | | | | | | | | the DeclaratorInfo, one for semantic analysis), just build a single type whose canonical type will reflect the semantic analysis (assuming the type is well-formed, of course). To make that work, make a few changes to the type system: * allow the nominal pointee type of a reference type to be a (possibly sugared) reference type. Also, preserve the original spelling of the reference type. Both of these can be ignored on canonical reference types. * Remove ObjCProtocolListType and preserve the associated source information on the various ObjC TypeLocs. Preserve the spelling of protocol lists except in the canonical form. * Preserve some level of source type structure on parameter types, but canonicalize on the canonical function type. This is still a WIP. Drops code size, makes strides towards accurate source location representation, slight (~1.7%) progression on Cocoa.h because of complexity drop. llvm-svn: 84907
* Extend out the block descriptor structure for debug information withMike Stump2009-10-221-0/+1
| | | | | | the copy/dispose helpers as appropriate. llvm-svn: 84817
* Refine the type of the first parameter to block invoke functions.Mike Stump2009-10-201-0/+1
| | | | | | | WIP. I have yet to find the magic incantation to get the structure type to be defined. If someone has a pointer, love to hear it. llvm-svn: 84590
* Move clients to use IdentifierInfo::getNameStart() instead of getName()Daniel Dunbar2009-10-181-2/+2
| | | | llvm-svn: 84436
* When performing template-substitution into a type, don't just replace theJohn McCall2009-10-181-0/+12
| | | | | | | | | | | | | | | | | | TemplateTypeParmType with the substituted type directly; instead, replace it with a SubstTemplateTypeParmType which will note that the type was originally written as a template type parameter. This makes it reasonable to preserve source information even through template substitution. Also define the new SubstTemplateTypeParmType class, obviously. For consistency with current behavior, we stringize these types as if they were the underlying type. I'm not sure this is the right thing to do. At any rate, I paled at adding yet another clause to the don't-desugar 'if' statement, so I extracted a function to do it. The new function also does The Right Thing more often, I think: e.g. if we have a chain of typedefs leading to a vector type, we will now desugar all but the last one. llvm-svn: 84412
* Clone the full Type hierarchy into the TypeLoc hierarchy. NormalizeJohn McCall2009-10-181-38/+109
| | | | | | | | | | | | | TypeLoc class names to be $(Type classname)Loc. Rewrite the visitor. Provide skeleton implementations for all the new TypeLocs. Handle all cases in PCH. Handle a few more cases when inserting location information in SemaType. It should be extremely straightforward to add new location information to existing TypeLoc objects now. llvm-svn: 84386
* Switch to llvm::HashString.Daniel Dunbar2009-10-171-3/+4
| | | | llvm-svn: 84375
* Write the preprocessor block after we write out types + declarations,Douglas Gregor2009-10-171-1/+2
| | | | | | | | so that we catch any macros used within the declarations and types. Also, properly store a NULL selector. llvm-svn: 84334
* Merge the "types" and "declarations" blocks in the precompiled headerDouglas Gregor2009-10-171-35/+19
| | | | | | | | | | | | | | | format, so that we don't end up with multiple declaration and types blocks. Also, fix a few obscure bugs with PCH loading and generation: - If the DeclIDs DenseMap reallocates while we are writing a declaration (due to recursively writing other declarations), we could end up writing a bad ID to ExternalDefinitions. - When loading an ArrayLoc (part of DeclaratorInfo), we need to set the size expression to NULL if no size expression was provided. PCH -> AST rewriting is still partly broken, unfortunately. llvm-svn: 84293
* While writing source-location entries to a PCH file, go through anDouglas Gregor2009-10-161-7/+6
| | | | | | | interface that can load those source-location entries on demand (from another PCH file). llvm-svn: 84287
* Factor out routines to encode/decode DeclaratorInfos and move them into theJohn McCall2009-10-161-0/+79
| | | | | | core PCH reader/writer implementation files. llvm-svn: 84278
OpenPOWER on IntegriCloud