summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* Addressed the issue in <rdar://problem/6479085>, where we failed toDouglas Gregor2009-01-097-105/+141
| | | | | | | | | | | | | | | rewrite @class declarations that showed up within linkage specifications because those @class declarations never made it any place where the rewriter could find them. Moved all of the ObjC*Decl nodes over to ScopedDecls, so that they can live in the appropriate top-level or transparent DeclContext near the top level, e.g., TranslationUnitDecl or LinkageSpecDecl. Objective-C declarations now show up in a traversal of the declarations in a DeclContext (they didn't before!). This way, the rewriter finds all Objective-C declarations within linkage specifications. llvm-svn: 61966
* Re-enable PTH testing for Cocoa.h and Carbon.h (and include testing for ↵Ted Kremenek2009-01-093-4/+6
| | | | | | Objective-C++). llvm-svn: 61965
* Adding support for ObjC methods which have c-styleFariborz Jahanian2009-01-094-4/+9
| | | | | | parameter list. This is work in progress. llvm-svn: 61964
* Enable support for '-x objective-c++-header'.Ted Kremenek2009-01-091-10/+24
| | | | llvm-svn: 61963
* Simpler solution to LiteralSupport compatibility: just add one whitespace ↵Ted Kremenek2009-01-091-27/+15
| | | | | | character after each cached string. llvm-svn: 61962
* Invert assertion condition.Ted Kremenek2009-01-091-1/+1
| | | | llvm-svn: 61961
* Temporarily revert r61956 and r61957 (PTH tests failing).Ted Kremenek2009-01-092-4/+2
| | | | llvm-svn: 61960
* 61949 accidentally introduced an escaped newline. Fix this by makingDan Gohman2009-01-081-1/+1
| | | | | | the comment a little more verbose. llvm-svn: 61959
* Enhance -fsyntax-only test of Carbon.h to also include testing for PTH.Ted Kremenek2009-01-081-1/+2
| | | | llvm-svn: 61958
* Enhance -fsyntax-only test of Cocoa.h to also include testing for PTH.Ted Kremenek2009-01-081-1/+2
| | | | llvm-svn: 61957
* PTH: For the cached spellings of literals, store one whitespace character ↵Ted Kremenek2009-01-081-12/+27
| | | | | | after the spelling to accomodate sanity checking in LiteralSuppoert.cpp. llvm-svn: 61956
* Convert DwarfWriter into a pass.Devang Patel2009-01-088-76/+83
| | | | | | Now Users request DwarfWriter through getAnalysisUsage() instead of creating an instance of DwarfWriter object directly. llvm-svn: 61955
* Add mm_malloc.h, patch by Sam Weinig.Anders Carlsson2009-01-081-0/+59
| | | | llvm-svn: 61954
* Place warning about 'readonly' property attributes whichFariborz Jahanian2009-01-083-2/+10
| | | | | | | are related to setter syntax under -Wreadonly-setter-attrs to prevent warnings in projects built with gcc. llvm-svn: 61953
* Revert my previous, failed attempt to pretty-print anonymous struct/union ↵Douglas Gregor2009-01-084-27/+11
| | | | | | accesses well. Added a FIXME so we know to revisit this later llvm-svn: 61951
* Delete unnecessary parens around return values.Dan Gohman2009-01-083-4/+4
| | | | llvm-svn: 61950
* Fix the comment for lltok::backslash.Dan Gohman2009-01-081-1/+1
| | | | llvm-svn: 61949
* Fix the path to llvm/Assembly/Parser.h in a comment.Dan Gohman2009-01-081-1/+1
| | | | llvm-svn: 61948
* Correct the form of the atomic opcode names in a comment.Dan Gohman2009-01-081-2/+2
| | | | llvm-svn: 61947
* Do not inline functions with (dynamic) alloca intoDale Johannesen2009-01-085-4/+70
| | | | | | | | | | | functions that don't already have a (dynamic) alloca. Dynamic allocas cause inefficient codegen and we shouldn't propagate this (behavior follows gcc). Two existing tests assumed such inlining would be done; they are hacked by adding an alloca in the caller, preserving the point of the tests. llvm-svn: 61946
* Use mayBeOverridden here, in anticipation of theDuncan Sands2009-01-081-2/+2
| | | | | | day when more linkage types will be handled. llvm-svn: 61944
* Fix ObjCInterfaceDecl::Destroy and ObjCProtocolDecl::Destroy to iterate and ↵Ted Kremenek2009-01-081-10/+4
| | | | | | destroy all contained ObjCMethodDecls in one sweep. This fixes a use-after-free error found by valgrind. llvm-svn: 61943
* Remove double-insertion of EnumConstantDecls. Thanks to Zhongxing Xu for ↵Douglas Gregor2009-01-081-5/+0
| | | | | | pointing this out llvm-svn: 61942
* Added iterator mechanism to ObjCContainerDecl to iterate over both class and ↵Ted Kremenek2009-01-081-12/+26
| | | | | | instance methods at the same time. llvm-svn: 61941
* Unify the code for defining tags in C and C++, so that we alwaysDouglas Gregor2009-01-0820-155/+229
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | introduce a Scope for the body of a tag. This reduces the number of semantic differences between C and C++ structs and unions, and will help with other features (e.g., anonymous unions) in C. Some important points: - Fields are now in the "member" namespace (IDNS_Member), to keep them separate from tags and ordinary names in C. See the new test in Sema/member-reference.c for an example of why this matters. In C++, ordinary and member name lookup will find members in both the ordinary and member namespace, so the difference between IDNS_Member and IDNS_Ordinary is erased by Sema::LookupDecl (but only in C++!). - We always introduce a Scope and push a DeclContext when we're defining a tag, in both C and C++. Previously, we had different actions and different Scope/CurContext behavior for enums, C structs/unions, and C++ structs/unions/classes. Now, it's one pair of actions. (Yay!) There's still some fuzziness in the handling of struct/union/enum definitions within other struct/union/enum definitions in C. We'll need to do some more cleanup to eliminate some reliance on CurContext before we can solve this issue for real. What we want is for something like this: struct X { struct T { int x; } t; }; to introduce T into translation unit scope (placing it at the appropriate point in the IdentifierResolver chain, too), but it should still have struct X as its lexical declaration context. PushOnScopeChains isn't smart enough to do that yet, though, so there's a FIXME test in nested-redef.c llvm-svn: 61940
* Add missing castToDeclContext/castFromDeclContext hooks.Steve Naroff2009-01-081-0/+24
| | | | llvm-svn: 61939
* Remove a dead decl.Steve Naroff2009-01-081-5/+0
| | | | llvm-svn: 61938
* Move FIXME to a better location.Steve Naroff2009-01-081-5/+5
| | | | llvm-svn: 61937
* Removed ObjCContainerDecl::getPropertyMethods()...doesn't belong in the AST.Steve Naroff2009-01-082-73/+53
| | | | | | Moved logic to Sema::ProcessPropertyDecl(). llvm-svn: 61936
* Remove redundant method context (now that ObjCMethodDecl isa ScopedDecl).Steve Naroff2009-01-084-15/+10
| | | | | | | | Convert clients to use the standard getDeclContext() API. Doug, thanks for the review! llvm-svn: 61935
* ValueTracker can't assume that an alloca with no specified alignment Chris Lattner2009-01-082-1/+27
| | | | | | | | will get its preferred alignment. It has to be careful and cautiously assume it will just get the ABI alignment. This prevents instcombine from rounding up the alignment of a load/store without adjusting the alignment of the alloca. llvm-svn: 61934
* one more crash from PR3281, we now diagnose:Chris Lattner2009-01-081-2/+9
| | | | | | | llvm-as: t.ll:2:39: function may not return opaque type %"bwmoyl" = tail call coldcc opaque @g() ^ llvm-svn: 61933
* remove some exclusions that don't exist anymore.Chris Lattner2009-01-081-3/+0
| | | | llvm-svn: 61932
* this testcase is huge and hasn't regressed ever, I don't think it is worth ↵Chris Lattner2009-01-081-24452/+0
| | | | | | keeping. llvm-svn: 61931
* Initialized member variable 'Implicit' in Decl's ctor.Ted Kremenek2009-01-081-1/+1
| | | | llvm-svn: 61930
* This is a large/messy diff that unifies the ObjC AST's with DeclContext.Steve Naroff2009-01-0816-253/+334
| | | | | | | | | | | | | | | - ObjCContainerDecl's (ObjCInterfaceDecl/ObjCCategoryDecl/ObjCProtocolDecl), ObjCCategoryImpl, & ObjCImplementation are all DeclContexts. - ObjCMethodDecl is now a ScopedDecl (so it can play nicely with DeclContext). - ObjCContainerDecl now does iteration/lookup using DeclContext infrastructure (no more linear search:-) - Removed ASTContext argument to DeclContext::lookup(). It wasn't being used and complicated it's use from an ObjC AST perspective. - Added Sema::ProcessPropertyDecl() and removed Sema::diagnosePropertySetterGetterMismatch(). - Simplified Sema::ActOnAtEnd() considerably. Still more work to do. - Fixed an incorrect casting assumption in Sema::getCurFunctionOrMethodDecl(), now that ObjCMethodDecl is a ScopedDecl. - Removed addPropertyMethods from ObjCInterfaceDecl/ObjCCategoryDecl/ObjCProtocolDecl. This passes all the tests on my machine. Since many of the changes are central to the way ObjC finds it's methods, I expect some fallout (and there are still a handful of FIXME's). Nevertheless, this should be a step in the right direction. llvm-svn: 61929
* Add DebugInfo based APIs to record source line info.Devang Patel2009-01-081-4/+43
| | | | llvm-svn: 61928
* * Moved author attribution to CREDITS.TXTMisha Brukman2009-01-082-10/+11
| | | | | | * Removed trailing whitespace llvm-svn: 61927
* * Alphabetized #includesMisha Brukman2009-01-081-56/+56
| | | | | | * Removed trailing whitespace llvm-svn: 61926
* Add isSubRegionOf() method to SubRegion.Zhongxing Xu2009-01-082-0/+15
| | | | llvm-svn: 61924
* Some generic clean-ups. Also make the StringMapEntryInitializer ↵Bill Wendling2009-01-081-45/+44
| | | | | | specialization apply only to the tests that are actually testing it. llvm-svn: 61923
* * Don't explicitly cast "0" to "void*". This doesn't work well with specializedBill Wendling2009-01-082-6/+20
| | | | | | | | | StringMapEntryInitializer classes. Leave it for the compiler to figure out what the type is and what "0" should be transformed into. * Un-disable the unit tests which test the StringMapEntryInitializer class. llvm-svn: 61922
* the new scalarrepl changes are optimizing away a temporary alloca in Chris Lattner2009-01-081-41/+0
| | | | | | | | check242, which invalidates this test. This test is an x86-32 ABI test that is trying to be run in a target-independent way, which is not going to work very well. Just remove the test. llvm-svn: 61921
* Fix comment because we could have arbitrary number of overloaded functions with Zhongxing Xu2009-01-081-1/+1
| | | | | | the same name. llvm-svn: 61920
* 80-column violation fix.Bill Wendling2009-01-081-1/+1
| | | | llvm-svn: 61919
* add some more crazy strlen and memcpy stuff I noticed in spec.Chris Lattner2009-01-081-0/+99
| | | | llvm-svn: 61918
* add some notes about strlen craziness in eon.Chris Lattner2009-01-081-0/+57
| | | | llvm-svn: 61917
* Remove extra blank line and space.Misha Brukman2009-01-081-2/+1
| | | | llvm-svn: 61916
* This implements the second half of the fix for PR3290, handlingChris Lattner2009-01-082-2/+125
| | | | | | | | | loads from allocas that cover the entire aggregate. This handles some memcpy/byval cases that are produced by llvm-gcc. This triggers a few times in kc++ (with std::pair<std::_Rb_tree_const_iterator <kc::impl_abstract_phylum*>,bool>) and once in 176.gcc (with %struct..0anon). llvm-svn: 61915
* * Added unittests for StringMapMisha Brukman2009-01-082-2/+193
| | | | | | | | | * Fixed but in StringMap::clear() * Removed trailing whitespace Original patch by Talin. llvm-svn: 61914
OpenPOWER on IntegriCloud