summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [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
* Revert r369927 - [DAGCombiner] Remove a bunch of redundant AddToWorklist calls.Richard Trieu2019-08-271-20/+121
| | | | | | | This change causes instrumented builds of Clang to have a fatal error in the backend. https://reviews.llvm.org/D66537 has the details. llvm-svn: 370006
* [WinEH] Allocate space in funclets stack to save XMM CSRsPengfei Wang2019-08-278-19/+208
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This is an alternate approach to D63396 Currently funclets reuse the same stack slots that are used in the parent function for saving callee-saved xmm registers. If the parent function modifies a callee-saved xmm register before an excpetion is thrown, the catch handler will overwrite the original saved value. This patch allocates space in funclets stack for saving callee-saved xmm registers and uses RSP instead RBP to access memory. Signed-off-by: Pengfei Wang <pengfei.wang@intel.com> Reviewers: rnk, RKSimon, craig.topper, annita.zhang, LuoYuanke, andrew.w.kaylor Subscribers: hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D66596 Signed-off-by: Pengfei Wang <pengfei.wang@intel.com> llvm-svn: 370005
* Fix clangd's IndexAction for FileSkipped API updateAlex Lorenz2019-08-271-2/+2
| | | | llvm-svn: 370004
* [test] Disable two of the recently (re)enabled tests on Windows.Jonas Devlieghere2019-08-272-0/+2
| | | | | | This disables two tests on Windows that I re-enabled in r369995. llvm-svn: 370003
* [ConnectionFileDescriptor] Add shutdown check in ::Write.Jonas Devlieghere2019-08-271-3/+12
| | | | | | | | | | | | The disconnect method sets the shutdown flag to true. This currently only prevents any reads from happening, but not writes, which is incorrect. Presumably this was just an oversight when adding synchronization to the class. This adds the same shutdown check to the Write method. Over-the-shoulder reviewed by Jim! llvm-svn: 370002
* [Analysis] In EmitGEPOffset, use Constant::getUniqueInteger to handle struct ↵Craig Topper2019-08-271-4/+1
| | | | | | | | | | | | | | indices in vector GEPs. We previously called getSplatValue if the index had a vector type, but getSplatValue returns null for non-splats. This would cause a nullptr dereference if it wasn't a splat. Using getUniqueInteger gives us an assert if its a vector type, but the value isn't a splat. This is what is used in SelectionDAGBuilder's code that expands GEPs as well. llvm-svn: 370001
* Revert "[clang-scan-deps] Minimizer: Correctly handle multi-line content ↵Richard Smith2019-08-272-51/+14
| | | | | | | | | | | | with CR+LF line endings" This reverts commit r369986. This change added a dependency on the 'dos2unix' tool, which is not one of our accepted test dependencies and may not exist on all machines that build Clang. llvm-svn: 370000
* Don't lose the FoundDecl and template arguments for a DeclRefExpr inRichard Smith2019-08-271-5/+12
| | | | | | TreeTransform. llvm-svn: 369999
* Use FileEntryRef for PPCallbacks::FileSkippedAlex Lorenz2019-08-278-15/+55
| | | | | | | | This fixes the issue where a filename dependendency was missing if the file that was skipped was included through a symlink in an earlier run, if the file manager was reused between runs. llvm-svn: 369998
* [MemorySSA] Fix insertUse.Alina Sbirlea2019-08-272-5/+67
| | | | | | | | Actually call the renamePass on inserted Phis. Fixes PR42940. Subscribers: llvm-commits llvm-svn: 369997
* Add PhaseOrdering/lifetime-sanitizer.ll testsVitaly Buka2019-08-271-0/+71
| | | | | | | | | | | | Reviewers: lebedev.ri Subscribers: llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D66761 llvm-svn: 369996
* [dotest] Remove long running test "decorator" and re-enable tests.Jonas Devlieghere2019-08-2711-48/+0
| | | | | | | | | | | | Today I discovered the skipLongRunningTest decorator and to my surprise all the tests were passing without the decorator. They don't seem to be that expensive either, they take a few seconds but we have tests that take much longer than that. As such I propose to remove the decorator and enable them by default. Differential revision: https://reviews.llvm.org/D66774 llvm-svn: 369995
* AMDGPU: Combine directly on mul24 intrinsicsMatt Arsenault2019-08-273-7/+129
| | | | | | | | | The problem these are supposed to work around can occur before the intrinsics are lowered into the nodes. Try to directly simplify them so they are matched before the bit assert operations can be optimized out. llvm-svn: 369994
OpenPOWER on IntegriCloud