summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Adding hasDeclaration overload for TemplateSpecializationTypeEdwin Vane2013-02-254-16/+101
| | | | | | | | | | | | | | TemplateSpecializationType doesn't quite have getDecl(). Need to go through TemplateName to get a TemplateDecl. Added test cases for the hasDeclaration() overload for TemplateSpecializationType. Also introduced the type matcher templateSpecializationType() used by the new hasDeclaration() test case. Updated LibASTMatchersReference. Reviewers: klimek llvm-svn: 176025
* Support in hasDeclaration for types with getDecl()Edwin Vane2013-02-252-2/+26
| | | | | | | | | | | Re-introducing r175532. The has_getDecl metafunction didn't compile with Visual Studio. This revision uses approaches has_getDecl from a different angle that isn't a problem for Visual Studio. Added dedicated tests for the metafunction. Reviewers: klimek llvm-svn: 176024
* Fix spelling noticed by Duncan.Chandler Carruth2013-02-251-3/+3
| | | | llvm-svn: 176023
* Fix the root cause of PR15348 by correctly handling alignment 0 onChandler Carruth2013-02-254-0/+38
| | | | | | | | | | | | | | | | | | | | | | | | memory intrinsics in the SDAG builder. When alignment is zero, the lang ref says that *no* alignment assumptions can be made. This is the exact opposite of the internal API contracts of the DAG where alignment 0 indicates that the alignment can be made to be anything desired. There is another, more explicit alignment that is better suited for the role of "no alignment at all": an alignment of 1. Map the intrinsic alignment to this early so that we don't end up generating aligned DAGs. It is really terrifying that we've never seen this before, but we suddenly started generating a large number of alignment 0 memcpys due to the new code to do memcpy-based copying of POD class members. That patch contains a bug that rounds bitfield alignments down when they are the first field. This can in turn produce zero alignments. This fixes weird crashes I've seen in library users of LLVM on 32-bit hosts, etc. llvm-svn: 176022
* Reverting r176019. Corrupt patch.Edwin Vane2013-02-252-36/+2
| | | | llvm-svn: 176021
* [Sanitizer] one more fix for signed/unsigned mismatch in comparisonAlexey Samsonov2013-02-251-2/+2
| | | | llvm-svn: 176020
* Support in hasDeclaration for types with getDecl()Edwin Vane2013-02-252-2/+36
| | | | | | | | | | | Re-introducing r175532. The has_getDecl metafunction didn't compile with Visual Studio. This revision approaches has_getDecl from a different angle that isn't a problem for Visual Studio. Added dedicated tests for the metafunction. Reviewers: klimek llvm-svn: 176019
* Update generated documentation after recent matcher addition.Daniel Jasper2013-02-251-0/+55
| | | | llvm-svn: 176018
* Add matcher for AccessSpecDecls.Daniel Jasper2013-02-252-0/+103
| | | | | | | Also, add matchers isPrivate(), isProtected() and isPublic(), that restrict the matching of such AccessSpecDecls and all other Decls. llvm-svn: 176017
* [Sanitizer] fix signed/unsigned compare warnings in ↵Alexey Samsonov2013-02-252-4/+4
| | | | | | sanitizer_stacktrace_test. Build sanitizer_common tests with -Werror as we use predictable just-built Clang for building them llvm-svn: 176014
* [TSan] Add interceptor for malloc_usable_size()Alexey Samsonov2013-02-255-0/+28
| | | | llvm-svn: 176013
* [TSan] remove temporary build directory in 'make clean' commandAlexey Samsonov2013-02-251-0/+1
| | | | llvm-svn: 176012
* [analyzer] Relax assumption in FindLastStoreBRVisitor that the thing we are ↵Ted Kremenek2013-02-251-31/+34
| | | | | | | | | | | | looking for is always a VarRegion. This was triggering assertion failures when analyzing the LLVM codebase. This is fallout from r175988. I've got delta chewing away on a test case, but I wanted the fix to go in now. llvm-svn: 176011
* [analyzer] add the notion of an "interesting" lvalue expression for ↵Ted Kremenek2013-02-253-4/+20
| | | | | | | | | | ExplodedNode pruning. r175988 modified the ExplodedGraph trimming algorithm to retain all nodes for "lvalue" expressions. This patch refines that notion to only "interesting" expressions that would be used for diagnostics. llvm-svn: 176010
* Add more attributes from the command line to functions.Bill Wendling2013-02-2544-449/+444
| | | | | | | This is an ongoing process. Any command line option which a back-end cares about should be added here. llvm-svn: 176009
* <rdar://problem/13282582>Han Ming Ong2013-02-251-1/+9
| | | | | | Need available CPU on target device to support CPU reporting. llvm-svn: 176008
* Make pseudos FEXT_CCRX16_ins and FEXT_CCRXI16_ins into custom emitters.Reed Kotler2013-02-255-69/+70
| | | | llvm-svn: 176007
* Documentation: add an idea for a (weird) clang toolDmitri Gribenko2013-02-251-0/+4
| | | | llvm-svn: 176005
* DIBuilder: support structs with vtable pointers in the same way as classesDavid Blaikie2013-02-252-12/+18
| | | | llvm-svn: 176004
* Update Clang for a minor DIBuilder breaking change.David Blaikie2013-02-251-10/+9
| | | | llvm-svn: 176003
* Make psuedo FEXT_T8I816_ins into a custom emitter.Reed Kotler2013-02-245-61/+39
| | | | llvm-svn: 176002
* Moving initialization into the initializer list and correcting ↵Aaron Ballman2013-02-241-4/+3
| | | | | | capitalization, as suggested by Chandler. llvm-svn: 176001
* Documentation: add an idea for an automatic refactoringDmitri Gribenko2013-02-241-0/+4
| | | | llvm-svn: 176000
* Allow breaking between a type and name in variable declarations.Daniel Jasper2013-02-244-46/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes llvm.org/PR14967 and is generall necessary to avoid situations where the column limit is exceeded. The challenge is restricting such lines splits, otherwise clang-format suddenly starts breaking at bad places. Before: ReallyLongReturnType<TemplateParam1, TemplateParam2> ReallyReallyLongFunctionName( const std::string &SomeParameter, const SomeType<string, SomeOtherTemplateParameter> &ReallyReallyLongParameterName, const SomeType<string, SomeOtherTemplateParameter> &AnotherLongParameterName) {} After: ReallyLongReturnType<TemplateParam1, TemplateParam2> ReallyReallyLongFunctionName( const std::string &SomeParameter, const SomeType<string, SomeOtherTemplateParameter> & ReallyReallyLongParameterName, const SomeType<string, SomeOtherTemplateParameter> & AnotherLongParameterName) {} llvm-svn: 175999
* Fix PR14364.Bill Schmidt2013-02-244-20/+27
| | | | | | | | | | | This removes a const_cast hack from PPCRegisterInfo::hasReservedSpillSlot(). The proper place to save the frame index for the CR spill slot is in the PPCFunctionInfo object, not the PPCRegisterInfo object. No new test cases, as this just reimplements existing function. Existing tests such as test/CodeGen/PowerPC/crsave.ll are sufficient. llvm-svn: 175998
* [ELF][Hexagon] add _SDA_BASE_(absolute symbol pointing to start of quickdata)Shankar Easwaran2013-02-247-2/+61
| | | | llvm-svn: 175997
* Add the testcase from PR13573, this used to crash.Benjamin Kramer2013-02-241-0/+5
| | | | | | The error is a bit strange tbh, but better than crashing. llvm-svn: 175996
* CVP: If we have a PHI with an incoming select, try to skip the select.Benjamin Kramer2013-02-242-5/+44
| | | | | | | | | | This is a common pattern with dyn_cast and similar constructs, when the PHI no longer depends on the select it can often be turned into a simpler construct or even get hoisted out of the loop. PR15340. llvm-svn: 175995
* Fix invalid IR in test, missing incoming value for PHI node.Benjamin Kramer2013-02-241-1/+1
| | | | llvm-svn: 175994
* [ELF] Change functions to virtual, in ExecutableAtomsShankar Easwaran2013-02-241-7/+7
| | | | llvm-svn: 175993
* [ELF]Change name of runtime files, so that targets can change runtime files ↵Shankar Easwaran2013-02-241-3/+4
| | | | | | that they own llvm-svn: 175992
* TypoFrancois Pichet2013-02-241-1/+1
| | | | llvm-svn: 175991
* [analyzer] tracking stores/constraints now works for ObjC ivars or struct ↵Ted Kremenek2013-02-249-466/+895
| | | | | | | | | | | | | | | | | | | | | | | fields. This required more changes than I originally expected: - ObjCIvarRegion implements "canPrintPretty" et al - DereferenceChecker indicates the null pointer source is an ivar - bugreporter::trackNullOrUndefValue() uses an alternate algorithm to compute the location region to track by scouring the ExplodedGraph. This allows us to get the actual MemRegion for variables, ivars, fields, etc. We only hand construct a VarRegion for C++ references. - ExplodedGraph no longer drops nodes for expressions that are marked 'lvalue'. This is to facilitate the logic in the previous bullet. This may lead to a slight increase in size in the ExplodedGraph, which I have not measured, but it is likely not to be a big deal. I have validated each of the changed plist output. Fixes <rdar://problem/12114812> llvm-svn: 175988
* Add "KnownSVal" to represent SVals that cannot be UnknownSVal.Ted Kremenek2013-02-244-26/+34
| | | | | | | This provides a few sundry cleanups, and allows us to provide a compile-time check for a case that was a runtime assertion. llvm-svn: 175987
* Add regression test for serialized diagnostics for notes without locations.Ted Kremenek2013-02-241-0/+30
| | | | | | This meant to be included in r175802. llvm-svn: 175986
* Revert r169638 because it broke Mesa llvmpipe tests.Nadav Rotem2013-02-243-8/+3
| | | | | | Fix PR15239. llvm-svn: 175985
* Make psuedo FEXT_T8I816_ins a custom inserter. It should be expandedReed Kotler2013-02-244-22/+34
| | | | | | as early as possible; which means during instruction selection. llvm-svn: 175984
* [ELF][Hexagon]add typeZeroFillFastShankar Easwaran2013-02-2413-20/+62
| | | | llvm-svn: 175983
* PR15338: Don't assert if -fsanitize=bounds sees array indexing on an incompleteRichard Smith2013-02-242-1/+10
| | | | | | array type. llvm-svn: 175982
* Add a use of an otherwise unused variable to remove a warning in non-AssertsCameron Zwarich2013-02-241-0/+1
| | | | | | builds. llvm-svn: 175981
* TwoAddressInstructionPass::tryInstructionTransform() only potentially returnsCameron Zwarich2013-02-241-5/+4
| | | | | | | true when shouldOnlyCommute is false, so we can remove code that checks otherwise. llvm-svn: 175980
* TwoAddrInstructionPass::tryInstructionTransform() has a case where it callsCameron Zwarich2013-02-241-5/+10
| | | | | | | | | | | | | | | | itself recursively with a new instruction that has not been finalized, in order to determine whether to keep the instruction. On 'make check' and test-suite the only cases where the recursive invocation made any transformations were simple instruction commutations, so I am restricting the recursive invocation to do only this. The other cases wouldn't work correctly when updating LiveIntervals, since the new instructions don't have slot indices and LiveIntervals hasn't yet been updated. If the other transformations were actually triggering in any test case it would be possible to support it with a lot of effort, but since they don't it's not worth it. llvm-svn: 175979
* [preprocessor] Use MacroDirective in the preprocessor callbacks to make ↵Argyrios Kyrtzidis2013-02-2415-98/+113
| | | | | | | | available the full information about the macro (e.g if it was imported and where). llvm-svn: 175978
* Add comments for the MacroDirective & MacroInfo classes.Argyrios Kyrtzidis2013-02-241-2/+17
| | | | llvm-svn: 175977
* In Sema::InstantiateStaticDataMemberDefinition, pass the var decl to the ↵Argyrios Kyrtzidis2013-02-242-3/+15
| | | | | | | | | | | | consumer just using ASTConsumer::HandleCXXStaticMemberVarInstantiation(), don't pass it with ASTConsumer::HandleTopLevelDecl. ASTConsumer::HandleTopLevelDecl is intended for user-written top-level decls; a consumer can treat an instantiated static data member however it wants of course. llvm-svn: 175976
* Add new base instruction def for cmpi, cmp, slt and sltu so that def/usesReed Kotler2013-02-231-5/+10
| | | | | | proper. Fixed this already a few days ago for slti. llvm-svn: 175975
* TargetInstrInfo::commuteInstruction() doesn't actually return a new instructionCameron Zwarich2013-02-231-13/+3
| | | | | | | unless it was requested to with an optional parameter that defaults to false, so we don't need to handle that case in TwoAddressInstructionPass. llvm-svn: 175974
* Better formatting of conditional expressions.Daniel Jasper2013-02-233-53/+74
| | | | | | | | | | | | | | | | | | | | | | | In conditional expressions, if the condition is split over multiple lines, also break before both operands. This prevents formattings like: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa == aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ? b : c; Which are bad, because they suggestion incorrect operator precedence: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa == (aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ? b : c); This lead to the discovery that the expression parser incorrectly handled conditional operators and that it could also handle semicolons (which in turn reduced the amount of special casing for for-loops). As a side-effect, we can now apply the bin-packing configuration to the sections of for-loops. llvm-svn: 175973
* [ELF][Writer] Add hash table.Michael J. Spencer2013-02-233-0/+48
| | | | llvm-svn: 175972
* Reference the canonical commit (r175462) in the value casting release note.David Blaikie2013-02-231-1/+3
| | | | llvm-svn: 175971
OpenPOWER on IntegriCloud