summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix text range end columns in SARIF to be exclusiveJoe Ranieri2019-08-273-17/+20
| | | | | | | | According to the SARIF specification, "a text region does not include the character specified by endColumn". Differential Revision: https://reviews.llvm.org/D65206 llvm-svn: 370060
* Quote the token being diagnosed for C11 extensions.Aaron Ballman2019-08-274-31/+31
| | | | llvm-svn: 370059
* Speculatively fix the build bots after r370052.Aaron Ballman2019-08-271-4/+4
| | | | llvm-svn: 370058
* [lldb][NFC] Add missing invalid_core_file to TestTargetCommand testRaphael Isemann2019-08-271-0/+1
| | | | llvm-svn: 370057
* [DAGCombiner] Add node to the worklist in topological order in ↵Amaury Sechet2019-08-271-4/+4
| | | | | | | | | | | | | | | | parallelizeChainedStores Summary: As per title. Reviewers: craig.topper, efriedma, RKSimon, lebedev.ri Subscribers: llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D66659 llvm-svn: 370056
* [X86][AVX] Add SimplifyDemandedVectorElts support for KSHIFTL/KSHIFTRSimon Pilgrim2019-08-272-3/+26
| | | | | | Differential Revision: https://reviews.llvm.org/D66527 llvm-svn: 370055
* Stabilize TestIOHandlerCompletionPavel Labath2019-08-271-1/+2
| | | | | | | | | | | | pexpect gives as raw data going to a terminal. This means that if the completed line does not fit the emulated line, the returned data will contain line breaks. On my machine these line breaks happened to be inside the "iohandler/completion" string that the test was searching for. Work around this by telling pexpect to emulate a very wide terminal. llvm-svn: 370054
* [IntrinsicEmitter] Support scalable vectors in intrinsicsCullen Rhodes2019-08-277-9/+119
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch adds support for scalable vectors in intrinsics, enabling intrinsics such as the following to be defined: declare <vscale x 4 x i32> @llvm.something.nxv4i32(<vscale x 4 x i32>) Support for this is implemented by defining a new type descriptor for scalable vectors and adding mangling support for scalable vector types in the name mangling scheme used by 'any' types in intrinsic signatures. Tests have been added for IRBuilder to test scalable vectors work as expected when using intrinsics through this interface. This required implementing an intrinsic that is explicitly defined with scalable vectors, e.g. LLVMType<nxv4i32>, an SVE floating-point convert intrinsic was used for this. The behaviour of the overloaded type LLVMScalarOrSameVectorWidth with scalable vectors is tested using the existing masked load intrinsic. Also added an .ll test to test the Verifier catches a bad intrinsic argument when passing a fixed-width predicate (mask) to the masked.load intrinsic where a scalable is expected. Patch by Paul Walker Reviewed By: sdesmalen Differential Revision: https://reviews.llvm.org/D65930 llvm-svn: 370053
* Implement codegen for MSVC unions with reference members.Aaron Ballman2019-08-272-14/+50
| | | | | | | | Currently, clang accepts a union with a reference member when given the -fms-extensions flag. This change fixes the codegen for this case. Patch by Dominic Ferreira. llvm-svn: 370052
* Testing commit access; NFCJoe Ranieri2019-08-271-1/+0
| | | | llvm-svn: 370051
* [lldb][NFC] Add some tests for the target subcommandsRaphael Isemann2019-08-271-1/+145
| | | | llvm-svn: 370050
* [ELF][ARM] Allow PT_LOAD to have overlapping p_offset ranges on EM_ARMFangrui Song2019-08-2750-671/+668
| | | | | | | | | | | | Port the D64906 technique to ARM. It deletes 3 alignments at PT_LOAD boundaries for the default case: the size of an arm binary decreases by at most 12kb. Reviewed By: grimar Differential Revision: https://reviews.llvm.org/D66749 llvm-svn: 370049
* [ELF][ARM] Add --no-show-raw-insn and -soname to some ARM testsFangrui Song2019-08-2719-68/+60
| | | | | | | Delete some insignificant addresses to make it simpler for layout changes. llvm-svn: 370048
* [lldb][NFC] Give added test method a unique nameRaphael Isemann2019-08-271-2/+2
| | | | | | | | Otherwise dotest doesn't run the test and just lets it always pass. Also update the comment to explain that we do directory and not file completion. llvm-svn: 370047
* [NFC] Added tests for D66651David Bolvansky2019-08-271-0/+181
| | | | llvm-svn: 370046
* [ASTImporter] Fix name conflict handling with different strategiesGabor Marton2019-08-277-114/+450
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are numorous flaws about the name conflict handling, this patch attempts fixes them. Changes in details: * HandleNameConflict return with a false DeclarationName Hitherto we effectively never returned with a NameConflict error, even if the preceding StructuralMatch indicated a conflict. Because we just simply returned with the parameter `Name` in HandleNameConflict and that name is almost always `true` when converted to `bool`. * Add tests which indicate wrong NameConflict handling * Add to ConflictingDecls only if decl kind is different Note, we might not indicate an ODR error when there is an existing record decl and a enum is imported with same name. But there are other cases. E.g. think about the case when we import a FunctionTemplateDecl with name f and we found a simple FunctionDecl with name f. They overload. Or in case of a ClassTemplateDecl and CXXRecordDecl, the CXXRecordDecl could be the 'templated' class, so it would be false to report error. So I think we should report a name conflict error only when we are 100% sure of that. That is why I think it should be a general pattern to report the error only if the kind is the same. * Fix failing ctu test with EnumConstandDecl In ctu-main.c we have the enum class 'A' which brings in the enum constant 'x' with value 0 into the global namespace. In ctu-other.c we had the enum class 'B' which brought in the same name ('x') as an enum constant but with a different enum value (42). This is clearly an ODR violation in the global namespace. The solution was to rename the second enum constant. * Introduce ODR handling strategies Reviewers: a_sidorin, shafik Differential Revision: https://reviews.llvm.org/D59692 llvm-svn: 370045
* [clang] Ensure that statements, expressions and types are trivially destructibleBruno Ricci2019-08-272-0/+24
| | | | | | | | | | | | | | | Since statements, expressions and types are allocated with the BumpPtrAllocator from ASTContext their destructor is not executed. Two classes are currently exempted from the check : InitListExpr due to its ASTVector and ConstantArrayType due to its APInt. No functional changes. Differential Revision: https://reviews.llvm.org/D66646 Reviewed By: lebedev.ri, gribozavr llvm-svn: 370044
* [lldb] Allow partial completions to fix directory completion.Raphael Isemann2019-08-275-9/+53
| | | | | | | | | | | | On the command line we usually insert a space after a completion to indicate that the completion was successful. After the completion API refactoring, this also happens with directories which essentially breaks file path completion (as adding a space terminates the path and starts a new arg). This patch restores the old behavior by again allowing partial completions. Also extends the iohandler and SB API tests as the implementation for this is different in Editline and SB API. llvm-svn: 370043
* Add error handling to the DataExtractor classPavel Labath2019-08-275-51/+388
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This is motivated by D63591, where we realized that there isn't a really good way of telling whether a DataExtractor is reading actual data, or is it just returning default values because it reached the end of the buffer. This patch resolves that by providing a new "Cursor" class. A Cursor object encapsulates two things: - the current position/offset in the DataExtractor - an error object Storing the error object inside the Cursor enables one to use the same pattern as the std::{io}stream API, where one can blindly perform a sequence of reads and only check for errors once at the end of the operation. Similarly to the stream API, as soon as we encounter one error, all of the subsequent operations are skipped (return default values) too, even if the would suceed with clear error state. Unlike the std::stream API (but in line with other llvm APIs), we force the error state to be checked through usage of llvm::Error. Reviewers: probinson, dblaikie, JDevlieghere, aprantl, echristo Subscribers: kristina, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D63713 llvm-svn: 370042
* [clang] Ensure that comment classes are trivially destructibleBruno Ricci2019-08-271-0/+15
| | | | | | | | | | | As in D66646, these classes are also allocated with a BumpPtrAllocator, and therefore should be trivially destructible. Differential Revision: https://reviews.llvm.org/D66722 Reviewed By: Mordante, gribozavr llvm-svn: 370041
* [DAGCombiner] Add node to the worklist in topological order after ↵Amaury Sechet2019-08-271-1/+1
| | | | | | | | | | | | | | | | relegalization. Summary: As per title. Reviewers: craig.topper, efriedma, RKSimon, lebedev.ri Subscribers: llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D66702 llvm-svn: 370040
* Refactor GlobList from an ad-hoc linked list to a vectorDmitri Gribenko2019-08-272-20/+31
| | | | | | | | | | | | Summary: I think it makes method implementations more obvious. Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D66788 llvm-svn: 370039
* [InstCombine] Fold select with ctlz to cttzDavid Bolvansky2019-08-272-38/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Handle pattern [0]: int ctz(unsigned int a) { int c = __clz(a & -a); return a ? 31 - c : c; } In reality, the compiler can generate much better code for cttz, so fold away this pattern. https://godbolt.org/z/c5kPtV [0] https://community.arm.com/community-help/f/discussions/2114/count-trailing-zeros Reviewers: spatel, nikic, lebedev.ri, dmgreen, hfinkel Reviewed By: hfinkel Subscribers: hfinkel, javed.absar, kristof.beyls, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D66308 llvm-svn: 370037
* AArch64: avoid creating cycle in DAG for post-increment NEON ops.Tim Northover2019-08-272-1/+20
| | | | | | | | | | | Inserting a value into Visited has the effect of terminating a search for predecessors if that node is seen. This is legitimate for the base address, and acts as a slight performance optimization, but the vector-building node can be paert of a legitimate cycle so we shouldn't stop searching there. PR43056. llvm-svn: 370036
* [ReleaseNotes] MemorySanitizer support of ASLR on FreeBSDDavid Carlier2019-08-271-0/+3
| | | | | | | | | | Reviewers: sylvestre.ledru, kcc Reviewed By: sylvestre.ledru Differential Revision: https://reviews.llvm.org/D66792 llvm-svn: 370035
* [llvm-objdump] - Remove one overload of reportError. NFCI.George Rimar2019-08-273-47/+34
| | | | | | | | | | | | | | | | | There is a problem with reportError we have. Declaration says we have ArchiveName that follows the FileName: reportError(Error E, StringRef FileName, StringRef ArchiveName,... Though implementation have them reversed. I cleaned it up and removed an excessive reportError(Error E, StringRef File) version. Rebased on top of D66418. Differential revision: https://reviews.llvm.org/D66517 llvm-svn: 370034
* [Driver] Add an option for createInvocationFromCommandLine to recover on errorsIlya Biryukov2019-08-275-13/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Previously, it would always return nullptr on any error. This change adds a parameter, controlling whether the function should attempt to return a non-null result even if unknown arguments (or other errors were encountered). The new behavior is only used in clangd. Considered an alternative of changing the return value instead of adding a new parameter, but that would require updating all callsites. Settled with the parameter to minimize the code changes. Reviewers: gribozavr Reviewed By: gribozavr Subscribers: nridge, jkorous, arphaman, kadircet, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D66731 llvm-svn: 370033
* [yaml2obj] - Don't allow setting StOther and Other/Visibility at the same time.George Rimar2019-08-274-20/+73
| | | | | | | | | | | | | | | This is a follow up discussed in the comments of D66583. Currently, if for example, we have both StOther and Other set in YAML document for a symbol, then yaml2obj reports an "unknown key 'Other'" error. It happens because 'mapOptional()' is never called for 'Other/Visibility' in this case, leaving those unhandled. This message does not describe the reason of the error well. This patch fixes it. Differential revision: https://reviews.llvm.org/D66642 llvm-svn: 370032
* [clangd] Fix for r370029 test that got left in my clientSam McCall2019-08-271-1/+1
| | | | llvm-svn: 370030
* [clangd] Fix toHalfOpenFileRange where start/end endpoints are in different ↵Sam McCall2019-08-274-32/+143
| | | | | | | | | | | | | | | | files due to #include Summary: https://github.com/clangd/clangd/issues/129 Reviewers: SureYeaah Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D66590 llvm-svn: 370029
* GlobList: added a clear test for pattern priorityDmitri Gribenko2019-08-271-1/+35
| | | | | | | | | | | | | | Summary: The last glob that matches the string decides whether that string is included or excluded. Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D66787 llvm-svn: 370028
* DWARFExpression: Simplify class interfacePavel Labath2019-08-2710-85/+71
| | | | | | | | | | | | | | | | | Summary: The DWARFExpression methods have a lot of arguments. This removes two of them by removing the ability to slice the expression via two offset+size parameters. This is a functionality that it is not always needed, and when it is, we already have a different handy way of slicing a data extractor which we can use instead. Reviewers: JDevlieghere, clayborg Subscribers: aprantl, lldb-commits Differential Revision: https://reviews.llvm.org/D66745 llvm-svn: 370027
* Fix an unused variable warning in no-assert buildsPavel Labath2019-08-271-0/+1
| | | | llvm-svn: 370026
* [asan_symbolize] Fix broken pipe handling for python 2.7Alexander Richardson2019-08-271-3/+9
| | | | | | | | I D65322 I added a check for BrokenPipeError. However, python 2.7 doesn't have BrokenPipeError. To be python 2.7 and 3 compatible we need to catch IOError instead and check for errno == errno.EPIPE. llvm-svn: 370025
* NFC: clang-format r370008 to suppress lint errorsVitaly Buka2019-08-272-7/+6
| | | | llvm-svn: 370023
* Revert "[clangd] Release notes" (wrong branch)Sam McCall2019-08-271-92/+1
| | | | | | This reverts commit 51029e5c153bd33efa015e2ec35b60247d046ce4. llvm-svn: 370022
* Relax test introduced in D65322Alexander Richardson2019-08-271-2/+2
| | | | | | | | | | | It is possible that addr2line returns a valid function and file name for the passed address on some build configuations. The test is only checking that asan_symbolize doesn't assert any more when passed a valid file with an invalid address so there is no need to check that it can't find a valid function name. This should fix http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux llvm-svn: 370021
* Fix TestStdCXXDisassembly.pyPavel Labath2019-08-271-1/+1
| | | | | | missing decorator import. llvm-svn: 370020
* CommandObjectExpression: Fix a misleading-indentation warningPavel Labath2019-08-271-96/+94
| | | | llvm-svn: 370019
* [SelectionDAGBuilder] Hide existence of ConstantDataVector vector from ↵Craig Topper2019-08-271-6/+5
| | | | | | | | | | | | | | | visitGetElementPtr. ConstantDataVector is a specialized verison of ConstantVector that stores data in a packed array of bits instead of as individual pointers to other Constants. But we really shouldn't expose that if we can void it. And we should handle regular ConstantVector equally well. This removes a dyn_cast to ConstantDataVector and just calls getSplatValue directly on a Constant* if the type is a vector. llvm-svn: 370018
* [SelectionDAGBuilder] Fix typo in comment. NFCCraig Topper2019-08-271-1/+1
| | | | llvm-svn: 370017
* [ValueTracking] Add AllowNonInbounds parameter to ↵Hideto Ueno2019-08-271-8/+10
| | | | | | | | GetPointerBaseWithConstantOffset function This commit was part of D65402. llvm-svn: 370016
* [Attributor] Clamp operator to extend known stateHideto Ueno2019-08-271-0/+14
| | | | | | | | | | | | | | | | | Summary: Similar to `^=` operator for IntegerState, this patch introduces a `+=` operator to "clamp" known information. Reviewers: jdoerfert, sstefan1 Reviewed By: jdoerfert Subscribers: llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D66635 llvm-svn: 370015
* [Attributor] Introduce an API to delete stuffJohannes Doerfert2019-08-272-0/+37
| | | | | | | | | | | | | | | | | Summary: During the fixpoint iteration, including the manifest stage, we should not delete stuff as other abstract attributes might have a reference to the value. Through the API this can now be done safely at the very end. Reviewers: uenoku, sstefan1 Subscribers: hiraditya, bollu, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D66779 llvm-svn: 370014
* [NFC] Replace the FIXME I added in rL369989 with a comment clarifying the ↵Philip Reames2019-08-271-3/+3
| | | | | | | | current code The current approach is restrictive (as all of geps must be multiples of the alignment), but correct. llvm-svn: 370013
* [lld][WebAssembly] Create optional symbols after handling --export/--undefinedSam Clegg2019-08-273-2/+34
| | | | | | | | | | | Handling of --export/--undefined can pull in lazy symbols which in turn can pull in referenced to optional symbols. We need to delay the creation of optional symbols until all possible references to them have been created. Differential Revision: https://reviews.llvm.org/D66768 llvm-svn: 370012
* Fix buildbotDavid Carlier2019-08-272-4/+7
| | | | llvm-svn: 370011
* [lld][WebAssembly] Store table base in config rather than passing it around. ↵Sam Clegg2019-08-274-12/+16
| | | | | | | | | | | NFC. I've got another change that makes more use of this value in other places. Differential Revision: https://reviews.llvm.org/D66777 llvm-svn: 370010
* [Sanitizer] Using huge page on FreeBSD for shadow mappingDavid Carlier2019-08-274-4/+29
| | | | | | | | | | | | | - Unless explicit configuration, using FreeBSD super pages feature for shadow mapping. - asan only for now. Reviewers: dim, emaste, vitalybuka Reviewed By: vitalybuka Differential Revision: https://reviews.llvm.org/D65851 llvm-svn: 370008
* [sanitizer] Add lld into dependency of sanitizer_common unittestsVitaly Buka2019-08-271-0/+5
| | | | llvm-svn: 370007
OpenPOWER on IntegriCloud