summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Fixed a problem where persistent variables didSean Callanan2012-09-207-20/+107
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | not correctly store the contents of Objective-C classes. This was due to a combination of factors: 1) Types were only being completed if we were looking inside them for specific ivars (using FindExternalVisibleDeclsByName). We now look the complete type up at every FindExternalLexicalDecls. 2) Even if the types were completed properly, ValueObjectConstResult overrode the type of every ValueObject using the complete type for its class from the debug information. Superclasses of complete classes are not guaranteed to be complete. Although "frame variable" uses the debug information, the expression parser does now piece together complete types at every level (as described in Bullet 1), so I provided a way for the expression parser to prevent overriding. 3) Type sizes were being miscomputed by ClangASTContext. It ignored the ISA pointer and only counted fields. We now correctly count the ISA in the size of an object. <rdar://problem/12315386> llvm-svn: 164333
* Thread-safety analysis: fix bug where shared trylock was treatedDeLesley Hutchins2012-09-202-1/+31
| | | | | | as exclusive. llvm-svn: 164332
* Re-adding this previously removed file.Greg Clayton2012-09-201-0/+18
| | | | llvm-svn: 164331
* Ignore PHI-defs for -new-coalescer interference checks.Jakob Stoklund Olesen2012-09-202-4/+56
| | | | | | | | A PHI can't create interference on its own. If two live ranges interfere at a PHI, they must also interfere when leaving one of the PHI predecessors. llvm-svn: 164330
* Extend -new-coalescer SSA update to handle mapped values as well.Jakob Stoklund Olesen2012-09-202-9/+62
| | | | | | | | | | | | | The old-fashioned many-to-one value mapping doesn't always work when merging vector lanes. A value can map to multiple different values, and it can even be necessary to insert new PHIs. When a value number is defined by a copy from a value number that required SSa update, include the live range of the copied value number in the SSA update as well. It is not necessarily a copy of the original value number any longer. llvm-svn: 164329
* This file is causing problems. I am going to remove it and try re-adding it.Greg Clayton2012-09-201-18/+0
| | | | llvm-svn: 164328
* Show the size of what we are dematerializing in the output log for "lldb expr".Greg Clayton2012-09-201-1/+1
| | | | llvm-svn: 164327
* Only emit DW_AT_object_pointer if this is a definition.Eric Christopher2012-09-202-5/+2
| | | | llvm-svn: 164326
* SimplifyCFG: sink common codes from IF, ELSE blocks down to END block.Manman Ren2012-09-202-0/+226
| | | | | | | | | | | | We already have HoistThenElseCodeToIf, this patch implements SinkThenElseCodeToEnd. When END block has only two predecessors and each predecessor terminates with unconditional branches, we compare instructions in IF and ELSE blocks backwards and check whether we can sink the common instructions down. rdar://12191395 llvm-svn: 164325
* Thread safety analysis: properly canonicalize calls to virtual methods withinDeLesley Hutchins2012-09-202-4/+48
| | | | | | lock expressions. llvm-svn: 164324
* If the range in a for range statement doesn't have a viable begin/end function,Richard Smith2012-09-205-36/+70
| | | | | | | | | | | | | but can be dereferenced to form an expression which does have viable begin/end functions, then typo-correct the range, even if something else goes wrong with the statement (such as inaccessible begin/end or the wrong type of loop variable). In order to ensure we recover correctly and produce any followup diagnostics in this case, redo semantic analysis on the for-range statement outside of the diagnostic trap, after issuing the typo-correction. llvm-svn: 164323
* Compile shared libraries with dSYM files when requested on darwin. Prior to ↵Greg Clayton2012-09-201-0/+5
| | | | | | this, we never had dSYM files for shared libraries unless it was a dylib only Makefile. llvm-svn: 164322
* <rdar://problem/12315386>Greg Clayton2012-09-205-13/+74
| | | | | | Test suite to catch fragile base class ivar issues. llvm-svn: 164321
* Try to make these tests more portable.Evan Cheng2012-09-203-7/+7
| | | | llvm-svn: 164320
* Fix typo. (s/Explided/Exploded/)David Blaikie2012-09-201-1/+1
| | | | | | Patch by Sean McBride. llvm-svn: 164318
* Fix broken check lines.Benjamin Kramer2012-09-201-3/+3
| | | | llvm-svn: 164317
* Improvements to my patch in r164143 perFariborz Jahanian2012-09-208-92/+91
| | | | | | Richard's comments. // rdar://12202422 llvm-svn: 164316
* Make the wchar_t promotion test consistent across different hosts by ↵David Blaikie2012-09-201-2/+2
| | | | | | | | | | | | specifying a target triple. This test behavior differs depending (at least) on whether sizeof(wchar_t) == sizeof(int) or not. When they are equal, the first redeclaration will fail because decltype(+L'x') is unsigned int instead of the expected int. This occurs on ARM. llvm-svn: 164315
* Remove a test that is non-portable (cannot be execute on cross builds, for ↵David Blaikie2012-09-201-18/+0
| | | | | | | | | | | | example) While it might be nice to have a quick end-to-end sanity test, it's just not really the right place for it & would require more work to enable lit to provide a detection flag ("XFAIL: cross" or similar) than the value we get from having this test. Early on it might've made more sense, but these days we've got some pretty good coverage across the stack with more targeted tests. llvm-svn: 164314
* Include types when a definition's type differs from a prior declaration.David Blaikie2012-09-203-3/+3
| | | | | | | | | | | | | This is some really old code (took me a while to find the test cases) & the diagnostic text is slightly incorrect (it should really only apply to re/declarations/, redefinitions are an error regardless of whether the types match). Not sure if anyone cares about it, though. For now this just makes the diagnostic more clear in less obvious cases where the type of a declaration might not be explicitly written (eg: because it uses decltype) llvm-svn: 164313
* Fix function names in coding style examplesAndrew Trick2012-09-201-4/+4
| | | | llvm-svn: 164311
* More work for reading the Objective-C runtime.Sean Callanan2012-09-204-68/+347
| | | | | | | | | We can now read the relevant data structures for the method list, and use a callback mechanism to report their details to the AppleObjCTypeVendor, which constructs appropriate Clang types. llvm-svn: 164310
* Revert r164308 to fix buildbots.Bill Wendling2012-09-205-33/+30
| | | | llvm-svn: 164309
* Make the 'get*AlignmentFromAttr' functions into member functions within the ↵Bill Wendling2012-09-205-30/+33
| | | | | | Attributes class. llvm-svn: 164308
* Remove more bare uses of the different Attribute enums.Bill Wendling2012-09-202-16/+32
| | | | llvm-svn: 164307
* Specify cpu to get the correct instruction ordering. Remove XFAIL.Roman Divacky2012-09-201-6/+1
| | | | llvm-svn: 164306
* Make the 'getAsString' function a method of the Attributes class.Bill Wendling2012-09-204-54/+54
| | | | llvm-svn: 164305
* Add some matchers for basic AST nodes.Daniel Jasper2012-09-203-0/+144
| | | | | | | Patch by Gábor Horváth. Review: http://llvm-reviews.chandlerc.com/D45 llvm-svn: 164304
* StmtPrinter: Print floating point literals with the right suffix to ↵Benjamin Kramer2012-09-203-4/+29
| | | | | | | | disambiguate them from integers. Based on a patch by Olaf Krzikalla, UDL fixes by me. llvm-svn: 164303
* Be more consistent about ending suggestions with a '?'Nico Weber2012-09-201-2/+2
| | | | llvm-svn: 164301
* clang/test/Analysis: Fix the declaration of strlen() for 32 bit targets.NAKAMURA Takumi2012-09-202-4/+3
| | | | | | | | | | - Inputs/system-header-simulator.h: Declare strlen() with size_t. - malloc-interprocedural.c: Move the definition of size_t into the header above. Then XFAIL can be pruned. llvm-svn: 164300
* Disable source fortification on Darwin with AddressSanitizer.Alexander Potapenko2012-09-203-0/+12
| | | | | | ASan doesn't play well with -D_FORTIFY_SOURCE, which is enabled by default starting at OS X 10.7 llvm-svn: 164299
* Provide better error messages for incorrect matchers.Daniel Jasper2012-09-201-15/+17
| | | | | | | | | | | | By changing the conversion operator into a conversion constructor, we can enabled based on the template parameters leading to better error messages. E.g.: stmt(decl()) will now create an error message including: note: candidate function not viable: no known conversion from 'clang::ast_matchers::internal::BindableMatcher<clang::Decl>' to 'const clang::ast_matchers::internal::Matcher<clang::Stmt>' for 1st argument llvm-svn: 164298
* Fix 80-col violations.Nadav Rotem2012-09-201-13/+19
| | | | llvm-svn: 164297
* Make sure lli compiles all code before invalidating instruction caches.Tim Northover2012-09-201-0/+3
| | | | | | Patch from Amara Emerson. llvm-svn: 164296
* test/Analysis/malloc-interprocedural.c: Mark it as XFAIL: cygwin,mingw,msvc ↵NAKAMURA Takumi2012-09-201-0/+2
| | | | | | for now. Investigating. llvm-svn: 164295
* Bump to lldb-168, debugserver-193.Jason Molenda2012-09-205-27/+27
| | | | llvm-svn: 164291
* Both OpenBSD and Bitrig need to include machine/endian.h to get theEric Christopher2012-09-202-1/+29
| | | | | | | | _BYTE_ORDER define. Patch by David Hill. llvm-svn: 164286
* Change enum type in a static table to uint8_t instead. Saves about 700 ↵Craig Topper2012-09-201-6/+6
| | | | | | hundred bytes of static data. Change unsigned char in same table to uint8_t for explicitness. llvm-svn: 164285
* Update the LLDB_DISABLE_PYTHON ifdef in FormatManager::LoadObjCFormatters toJason Molenda2012-09-201-1/+1
| | | | | | get FormatManager.cpp to build on no-python platforms again. llvm-svn: 164284
* Specify CPu to prevent failure on ATOM due to different code schedulingMichael Liao2012-09-201-1/+1
| | | | llvm-svn: 164283
* Fix Sphinx warnings.Sean Silva2012-09-202-3/+4
| | | | | | Toctree was not being interlinked properly. llvm-svn: 164282
* Re-work X86 code generation of atomic ops with spin-loopMichael Liao2012-09-2013-553/+1709
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Rewrite/merge pseudo-atomic instruction emitters to address the following issue: * Reduce one unnecessary load in spin-loop previously the spin-loop looks like thisMBB: newMBB: ld t1 = [bitinstr.addr] op t2 = t1, [bitinstr.val] not t3 = t2 (if Invert) mov EAX = t1 lcs dest = [bitinstr.addr], t3 [EAX is implicit] bz newMBB fallthrough -->nextMBB the 'ld' at the beginning of newMBB should be lift out of the loop as lcs (or CMPXCHG on x86) will load the current memory value into EAX. This loop is refined as: thisMBB: EAX = LOAD [MI.addr] mainMBB: t1 = OP [MI.val], EAX LCMPXCHG [MI.addr], t1, [EAX is implicitly used & defined] JNE mainMBB sinkMBB: * Remove immopc as, so far, all pseudo-atomic instructions has all-register form only, there is no immedidate operand. * Remove unnecessary attributes/modifiers in pseudo-atomic instruction td * Fix issues in PR13458 - Add comprehensive tests on atomic ops on various data types. NOTE: Some of them are turned off due to missing functionality. - Revise tests due to the new spin-loop generated. llvm-svn: 164281
* Sphinxify DebuggingJITedCodeSean Silva2012-09-202-184/+147
| | | | | | LGTM by Michael Spencer llvm-svn: 164280
* The keywords "true" and "false" shouldn't warn under -Wundef.Eli Friedman2012-09-202-1/+4
| | | | llvm-svn: 164279
* Fix static function names in CodingStandards examples.Andrew Trick2012-09-201-6/+6
| | | | | | Try not to violate conventions immediately before explaining them. llvm-svn: 164278
* [analyzer] MallocChecker should not do post-call checks on inlined functions.Jordan Rose2012-09-202-2/+39
| | | | | | | | | | | If someone provides their own function called 'strdup', or 'reallocf', or even 'malloc', and we inlined it, the inlining should have given us all the malloc-related information we need. If we then try to attach new information to the return value, we could end up with spurious warnings. <rdar://problem/12317671> llvm-svn: 164276
* Revert "[analyzer] Remove constraints on dead symbols as part of ↵Jordan Rose2012-09-203-29/+9
| | | | | | | | | | | | | | | | | removeDeadBindings." While we definitely want this optimization in the future, we're not currently handling constraints on symbolic /expressions/ correctly. These should stay live even if the SymExpr itself is no longer referenced because could recreate an identical SymExpr later. Only once the SymExpr can no longer be recreated -- i.e. a component symbol is dead -- can we safely remove the constraints on it. This liveness issue is tracked by <rdar://problem/12333297>. This reverts r163444 / 24c7f98828e039005cff3bd847e7ab404a6a09f8. llvm-svn: 164275
* Handle lambdas where the lambda-declarator is an explicit "(void)". PR13854.Eli Friedman2012-09-204-18/+31
| | | | llvm-svn: 164274
* Per C++11 [class.friend]p3, the 'friend' keyword must appear first in aRichard Smith2012-09-206-13/+46
| | | | | | non-function friend declaration. Patch by Josh Magee! llvm-svn: 164273
OpenPOWER on IntegriCloud