summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* gn build: Use "git rev-parse --git-dir" to discover the path to the .git ↵Peter Collingbourne2019-01-101-7/+8
| | | | | | | | | | directory. This makes it compatible with worktrees. Differential Revision: https://reviews.llvm.org/D56422 llvm-svn: 350897
* [MachineCombiner][NFC] Prevent dereferencing past-the-end object in an MRI ↵Gerolf Hoflehner2019-01-101-0/+2
| | | | | | container llvm-svn: 350896
* [MemorySSA] Disable checkClobberSanity for SkipSelfWalker.Alina Sbirlea2019-01-101-1/+2
| | | | | | | | | Sanity will fail for this, since we're exploring getting a clobber further than the sanity check expects. Ideally we need to teach the sanity check to differentiate between the two walkers based on the SkipSelf bool in the query. llvm-svn: 350895
* gn build: Merge r350893Nico Weber2019-01-101-0/+1
| | | | llvm-svn: 350894
* [llvm-objcopy] [COFF] Add support for removing symbolsMartin Storsjo2019-01-1011-14/+290
| | | | | | Differential Revision: https://reviews.llvm.org/D55881 llvm-svn: 350893
* Update clang-tools-extra for r350891 from Clang.Aaron Ballman2019-01-103-36/+26
| | | | llvm-svn: 350892
* Correct the source range returned from preprocessor callbacks.Aaron Ballman2019-01-104-38/+170
| | | | | | This adjusts the source range passed in to the preprocessor callbacks to only include the condition range itself, rather than all of the conditionally skipped tokens. llvm-svn: 350891
* NFC: Change case of identifiersStephen Kelly2019-01-103-13/+13
| | | | llvm-svn: 350890
* Change SymbolFile::ParseTypes to ParseTypesForCompileUnit.Zachary Turner2019-01-1014-52/+42
| | | | | | | | | | | | | | | | | | | | | | | | | The function SymbolFile::ParseTypes previously accepted a SymbolContext. This makes it extremely difficult to implement faithfully, because you have to account for all possible combinations of members being set in the SymbolContext. On the other hand, no clients of this function actually care about implementing this function to this strict of a standard. AFAICT, there is actually only 1 client in the entire codebase, and it is the function ParseAllDebugSymbols, which is itself only called for testing purposes when dumping information. At this call-site, the only field it sets is the CompileUnit, meaning that an implementer of a SymbolFile need not worry about any examining or handling any other fields which might be set. By restricting this API to accept exactly a CompileUnit& and nothing more, we can simplify the life of new SymbolFile plugin implementers by making it clear exactly what the necessary and sufficient set of functionality they need to implement is, while at the same time removing some dead code that tried to handle other types of SymbolContext fields that were never going to be set anyway. Differential Revision: https://reviews.llvm.org/D56462 llvm-svn: 350889
* [NativePDB] Add support for parsing typedef records.Zachary Turner2019-01-108-61/+349
| | | | | | | | | | | | | | | | | | | | Typedefs are represented as S_UDT records in the globals stream. This creates a strange situation where "types" are actually represented as "symbols", so they need special handling. In order to test this, we don't just use lldb and print out some variables causing the AST to get created, because variables whose type is a typedef will have debug info referencing the original type, not the typedef. So we use lldb-test instead which will parse all debug info in the entire file. This exposed some problems with lldb-test and the native reader, mainly that certain types of obscure symbols which we can find when iterating every single record would trigger crashes. These have been fixed as well so that lldb-test can be used to test this functionality. Differential Revision: https://reviews.llvm.org/D56461 llvm-svn: 350888
* [Sema] Call CheckPlaceholderExpr to resolve typeof or decltypeAkira Hatanaka2019-01-106-7/+19
| | | | | | | | | | | | | | | placeholder expressions while an unevaluated context is still on the expression evaluation context stack. This prevents recordUseOfWeek from being called when a weak variable is used as an operand of a decltype or a typeof expression and fixes spurious -Warc-repeated-use-of-weak warnings. rdar://problem/45742525 Differential Revision: https://reviews.llvm.org/D55662 llvm-svn: 350887
* Avoid use-after-free in ~LegacyRTDyldObjectLinkingLayerSanjoy Das2019-01-101-1/+4
| | | | | | | | | | Reviewers: lhames Subscribers: mcrosier, jlebar, bixia, llvm-commits Differential Revision: https://reviews.llvm.org/D56521 llvm-svn: 350886
* [HIP] Use nul instead of /dev/null when running on windowsYaxun Liu2019-01-101-1/+7
| | | | | | | | When clang is running on windows, /dev/null is not available. Use nul as empty input file instead. Differential Revision: https://reviews.llvm.org/D56225 llvm-svn: 350885
* [libcxx] Reorganize tests since the application of P0602R4Louis Dionne2019-01-1013-112/+294
| | | | | | | | | | | | | | | | | Summary: P0602R4 makes the special member functions of optional and variant conditionally trivial based on the types in the optional/variant. We already implemented that, but the tests were organized as if this were a non-standard extension. This patch reorganizes the tests in a way that makes more sense since this is not an extension anymore. Reviewers: EricWF, mpark, mclow.lists Subscribers: christof, jkorous, dexonsmith, libcxx-commits Differential Revision: https://reviews.llvm.org/D54772 llvm-svn: 350884
* [TSan] Remove ignore_interceptors_accesses flagJulian Lettner2019-01-105-91/+35
| | | | | | | | | | | | | | | | | | | | | | Summary: It has been superseded by the `ignore_noninstrumented_modules` flag and is no longer needed. Also simplify a test that checks that `mmap_interceptor` respects ignore annotations (`thr->ignore_reads_and_writes `). Relevant: https://reviews.llvm.org/rL269855 <rdar://problem/46263073> Remove obsolete Apple-specific suppression option Reviewers: dcoughlin, kubamracek, dvyukov, delcypher Reviewed By: dvyukov Subscribers: jfb, llvm-commits, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D55075 llvm-svn: 350883
* [sanitizer_common] Define __sanitizer_FILE on NetBSDMichal Gorny2019-01-104-12/+65
| | | | | | Differential Revision: https://reviews.llvm.org/D56109 llvm-svn: 350882
* [sanitizer_common] Remove support for tirpc/rpc/xdr.hMichal Gorny2019-01-104-11/+2
| | | | | | | | | | | | | Remove the partial support for rpc/xdr.h from libtirpc. Since it is an entirely external library, we ought to build it sanitized separately and not attempt to intercept like the libc implementation. Besides, the existing code for tirpc support was neither complete nor working. Noted by @krytarowski. Differential Revision: https://reviews.llvm.org/D47817 llvm-svn: 350881
* [GVN] Update BlockRPONumber prior to use.Matt Davis2019-01-102-2/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The original patch addressed the use of BlockRPONumber by forcing a sequence point when accessing that map in a conditional. In short we found cases where that map was being accessed with blocks that had not yet been added to that structure. For context, I've kept the wall of text below, to what we are trying to fix, by always ensuring a updated BlockRPONumber. == Backstory == I was investigating an ICE (segfault accessing a DenseMap item). This failure happened non-deterministically, with no apparent reason and only on a Windows build of LLVM (from October 2018). After looking into the crashes (multiple core files) and running DynamoRio, the cores and DynamoRio (DR) log pointed to the same code in `GVN::performScalarPRE()`. The values in the map are unsigned integers, the keys are `llvm::BasicBlock*`. Our test case that triggered this warning and periodic crash is rather involved. But the problematic line looks to be: GVN.cpp: Line 2197 ``` if (BlockRPONumber[P] >= BlockRPONumber[CurrentBlock] && ``` To test things out, I cooked up a patch that accessed the items in the map outside of the condition, by forcing a sequence point between accesses. DynamoRio stopped warning of the issue, and the test didn't seem to crash after 1000+ runs. My investigation was on an older version of LLVM, (source from October this year). What it looks like was occurring is the following, and the assembly from the latest pull of llvm in December seems to confirm this might still be an issue; however, I have not witnessed the crash on more recent builds. Of course the asm in question is generated from the host compiler on that Windows box (not clang), but it hints that we might want to consider how we access the BlockRPONumber map in this conditional (line 2197, listed above). In any case, I don't think the host compiler is wrong, rather I think it is pointing out a possibly latent bug in llvm. 1) There is no sequence point for the `>=` operation. 2) A call to a `DenseMapBase::operator[]` can have the side effect of the map reallocating a larger store (more Buckets, via a call to `DenseMap::grow`). 3) It seems perfectly legal for a host compiler to generate assembly that stores the result of a call to `operator[]` on the stack (that's what my host compile of GVN.cpp is doing) . A second call to `operator[]` //might// encourage the map to 'grow' thus making any pointers to the map's store invalid. The `>=` compares the first and second values. If the first happens to be a pointer produced from operator[], it could be invalid when dereferenced at the time of comparison. The assembly generated from the Window's host compiler does show the result of the first access to the map via `operator[]` produces a pointer to an unsigned int. And that pointer is being stored on the stack. If a second call to the map (which does occur) causes the map to grow, that address (on the stack) is now invalid. Reviewers: t.p.northover, efriedma Reviewed By: efriedma Subscribers: efriedma, llvm-commits Differential Revision: https://reviews.llvm.org/D55974 llvm-svn: 350880
* Use MemorySSA in LICM to do sinking and hoisting.Alina Sbirlea2019-01-1018-156/+354
| | | | | | | | | | | | | | | | | | Summary: Step 2 in using MemorySSA in LICM: Use MemorySSA in LICM to do sinking and hoisting, all under "EnableMSSALoopDependency" flag. Promotion is disabled. Enable flag in LICM sink/hoist tests to test correctness of this change. Moved one test which relied on promotion, in order to test all sinking tests. Reviewers: sanjoy, davide, gberry, george.burgess.iv Subscribers: llvm-commits, Prazek Differential Revision: https://reviews.llvm.org/D40375 llvm-svn: 350879
* fixup: sphinx warningNick Desaulniers2019-01-101-1/+1
| | | | | | | | | | Fixes the sphinx warning: tools/clang/docs/DiagnosticsReference.rst:7889: WARNING: Title underline too short. That I just introduced in r350877. llvm-svn: 350878
* [SemaCXX] add -Woverride-init alias to -Winitializer-overridesNick Desaulniers2019-01-103-0/+7
| | | | | | | | | | | | | | | | Summary: https://bugs.llvm.org/show_bug.cgi?id=40251 https://github.com/ClangBuiltLinux/linux/issues/307 Reviewers: rsmith Reviewed By: rsmith Subscribers: cfe-commits, nathanchance, srhines Differential Revision: https://reviews.llvm.org/D56522 llvm-svn: 350877
* lldbtest.py: try to fix a runtime exceptionAdrian Prantl2019-01-101-4/+7
| | | | | | found on http://green.lab.llvm.org/green/view/LLDB/job/lldb-cmake-matrix/32/consoleFull#15046896708254eaf0-7326-4999-85b0-388101f2d404 llvm-svn: 350876
* [X86] Call SimplifyDemandedBits on conditions of X86ISD::SHRUNKBLENDCraig Topper2019-01-106-111/+105
| | | | | | | | | | This extends to combineVSelectToShrunkBlend to be able to resimplify SHRUNKBLENDS that have already been created. This should help some of the regressions from D56387 Differential Revision: https://reviews.llvm.org/D56421 llvm-svn: 350875
* Fix false positive unsequenced access and modification warning in array ↵Nicolas Lesser2019-01-103-16/+37
| | | | | | | | | | | | | | | | | | | | subscript expression. Summary: In the [expr.sub] p1, we can read that for a given E1[E2], E1 is sequenced before E2. Patch by Mateusz Janek. Reviewers: rsmith, Rakete1111 Reviewed By: rsmith, Rakete1111 Subscribers: riccibruno, lebedev.ri, Rakete1111, hiraditya, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D50766 llvm-svn: 350874
* [X86] Simplify the BRCOND handling for FCMP_UNE.Craig Topper2019-01-101-28/+11
| | | | | | | | | | Despite what the comment says, FCMP_UNE would be an OR not an AND. In the lowering code the first branch created still goes to the original destination. The second branch was exchanged to go to where the subsequent unconditional branch went. This is different than what we do for FCMP_OEQ where both branches that we create go to the original unconditional branch. As far as I can tell, I think this means we don't need to exchange the branch target with the unconditional branch for FCMP_UNE at all. Differential Revision: https://reviews.llvm.org/D56309 llvm-svn: 350873
* Filesystem tests: fix fs.op.relativeJF Bastien2019-01-101-43/+83
| | | | | | | | | | | | Summary: The test wasn't using the testing infrastructure properly. Reviewers: ldionne, mclow.lists, EricWF Subscribers: christof, jkorous, dexonsmith, libcxx-commits Differential Revision: https://reviews.llvm.org/D56519 llvm-svn: 350872
* [llvm-objdump][MachO] Fix test to work on WindowsFrancis Visoiu Mistrih2019-01-101-1/+1
| | | | | | This fails in http://lab.llvm.org:8011/builders/clang-x64-windows-msvc/builds/3208/steps/stage%201%20check/logs/stdio. llvm-svn: 350871
* [analyzer] [hotfix] Fix the testsGeorge Karpenkov2019-01-101-5/+7
| | | | | | The error must have crept during the cherry-pick. llvm-svn: 350870
* [analyzer] Update the category name for RetainCountChecker reportsGeorge Karpenkov2019-01-1014-109/+107
| | | | | | | | | | ..now that it includes OSObjects rdar://46509986 Differential Revision: https://reviews.llvm.org/D56404 llvm-svn: 350869
* [analyzer] [NFC] [RetainCountChecker] Remove dead unused mapGeorge Karpenkov2019-01-101-6/+0
| | | | | | Differential Revision: https://reviews.llvm.org/D56402 llvm-svn: 350868
* [analyzer] Quote the type of the leaked/problematic object in diagnostics ↵George Karpenkov2019-01-1011-2500/+1263
| | | | | | | | for readability Differential Revision: https://reviews.llvm.org/D56344 llvm-svn: 350867
* [analyzer] [NFC] Reverse the argument order for "diff" in testsGeorge Karpenkov2019-01-1035-36/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | The current argument order has "expected" and "actual" the wrong way around, so that the diff shows the change from expected to actual, not from actual to expected. Namely, if the expected diagnostics contains the string "foo", but the analyzer emits "bar", we really want to see: ``` - foo + bar ``` not ``` - bar + foo ``` since adapting to most changes would require applying that diff to the expected output. Differential Revision: https://reviews.llvm.org/D56340 llvm-svn: 350866
* [analyzer] [NFC] Reduce redundancy in RetainSummaryManager by using a functionGeorge Karpenkov2019-01-102-24/+11
| | | | | | Differential Revision: https://reviews.llvm.org/D56282 llvm-svn: 350865
* [analyzer] [RetainCountChecker] [NFC] Remove SummaryLogGeorge Karpenkov2019-01-104-103/+46
| | | | | | | | | | | | | | The complicated machinery for passing the summary log around is actually only used for one thing! To figure out whether the "dealloc" message was sent. Since I have tried to extend it for other uses and failed (it's actually very hard to use), I think it's much better to simply use a tag and remove the summary log altogether. Differential Revision: https://reviews.llvm.org/D56228 llvm-svn: 350864
* [analyzer] [RetainCountChecker] [NFC] Another minor cleanupGeorge Karpenkov2019-01-102-16/+15
| | | | | | Differential Revision: https://reviews.llvm.org/D56224 llvm-svn: 350863
* [analyzer] [RetainCountChecker] [NFC] Refactor the way attributes are handledGeorge Karpenkov2019-01-102-91/+113
| | | | | | | | | | | | | Make sure all checks for attributes go through a centralized function, which checks whether attribute handling is enabled, and performs validation. The type of the attribute is returned. Sadly, metaprogramming is required as attributes have no sensible static getters. Differential Revision: https://reviews.llvm.org/D56222 llvm-svn: 350862
* [analyzer] [RetainCountChecker] Remove redundant enum UnarySummaryKindGeorge Karpenkov2019-01-102-19/+9
| | | | | | Differential Revision: https://reviews.llvm.org/D56072 llvm-svn: 350861
* [analyzer] [RetainCountChecker] Remove obsolete "MakeCollectable" enum valueGeorge Karpenkov2019-01-103-11/+1
| | | | | | Differential Revision: https://reviews.llvm.org/D56071 llvm-svn: 350860
* [analyzer] [RetainCountChecker] [NFC] Remove redundant enum items *Msg, as ↵George Karpenkov2019-01-105-82/+69
| | | | | | | | the object type is already communicated by a separate field Differential Revision: https://reviews.llvm.org/D56070 llvm-svn: 350859
* [analyzer] [NFC] Track object type with ArgEffect in RetainCountChecker.George Karpenkov2019-01-106-141/+180
| | | | | | | | This would be needed in the future. https://reviews.llvm.org/D56040 llvm-svn: 350858
* [analyzer] [NFC] Move ObjKind into a separate top-level enum in ↵George Karpenkov2019-01-106-69/+70
| | | | | | | | | | RetainSummaryManager. Allows using it in future outside of RetEffect. Differential Revision: https://reviews.llvm.org/D56039 llvm-svn: 350857
* Split -Wdelete-non-virtual-dtor into two groupsErik Pilkington2019-01-103-3/+37
| | | | | | | | | | | | | This group controls two diagnostics: deleting an abstract class with a non-virtual dtor, which is a guaranteed crash, and deleting a non-abstract polymorphic class with a non-virtual dtor, which is just suspicious. rdar://40380564 Differential revision: https://reviews.llvm.org/D56405 llvm-svn: 350856
* Remove an external test file. NFC.Rui Ueyama2019-01-102-9/+5
| | | | llvm-svn: 350855
* [lit] Make it possible for the lit test suite to pass withDan Liew2019-01-101-1/+1
| | | | | | | | | `FILECHECK_OPTS=-v` set in the environment. Follow up to r350850 as requested by Joel E. Denny in https://reviews.llvm.org/D56541 . llvm-svn: 350854
* TrapInstr must be 4 bytes long. Currently we write two zeros on every two bytes.Rui Ueyama2019-01-102-1/+4
| | | | llvm-svn: 350853
* [analyzer][CrossTU][NFC] Generalize to external definitions instead of ↵Rafael Stahl2019-01-1024-124/+126
| | | | | | | | | | | | | | | | external functions Summary: This is just changing naming and documentation to be general about external definitions that can be imported for cross translation unit analysis. There is at least a plan to add VarDecls: D46421 Reviewers: NoQ, xazax.hun, martong, a.sidorin, george.karpenkov, serge-sans-paille Reviewed By: xazax.hun, martong Subscribers: mgorny, whisperity, baloghadamsoftware, szepet, rnkovacs, mikhail.ramalho, Szelethus, donat.nagy, dkrupp, cfe-commits Differential Revision: https://reviews.llvm.org/D56441 llvm-svn: 350852
* [llvm-objdump][MachO] Fix error reporting after r350848 and r350849Francis Visoiu Mistrih2019-01-102-6/+7
| | | | llvm-svn: 350851
* [FileCheck] Don't propagate `FILECHECK_DUMP_INPUT_ON_FAILURE` andDan Liew2019-01-101-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | `FILECHECK_OPTS` into environment for FileCheck tests. Summary: This fixes the following FileCheck tests: * FileCheck/dump-input-enable.txt * FileCheck/match-full-lines.txt when `FILECHECK_DUMP_INPUT_ON_FAILURE` is set in the environment. By default llvm-lit propagates `FILECHECK_DUMP_INPUT_ON_FAILURE` and `FILECHECK_OPTS` from llvm-lit's environment into the test environment. Unfortunately this can break FileCheck's tests because they expect that these environment variables not to be set. rdar://problem/47176262 Reviewers: jdenny, probinson, george.karpenkov Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D56541 llvm-svn: 350850
* [llvm-objdump][MachO] Use the -dsym file name when reporting errorsFrancis Visoiu Mistrih2019-01-102-2/+9
| | | | | | Instead of using the binary filename. llvm-svn: 350849
* [llvm-objdump][MachO] Correctly handle the llvm::Error when -dsym has errorsFrancis Visoiu Mistrih2019-01-102-2/+6
| | | | | | | | | In an assert build, the Error gets destroyed and we get "Program aborted due to an unhandled Error:". In release, we get an empty message. llvm-svn: 350848
OpenPOWER on IntegriCloud