summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [analyzer] RetainCount: Suppress retain detection heuristic on some CM methods.Artem Dergachev2018-12-212-2/+39
| | | | | | | | | | | | If it ends with "Retain" like CFRetain and returns a CFTypeRef like CFRetain, then it is not necessarily a CFRetain. But it is indeed true that these two return something retained. Differential Revision: https://reviews.llvm.org/D55907 rdar://problem/39390714 llvm-svn: 349862
* Fix typoAdrian Prantl2018-12-201-2/+2
| | | | llvm-svn: 349861
* Remove dead code.Rui Ueyama2018-12-201-4/+0
| | | | | | | | This code is no-op because of r349849. Differential Revision: https://reviews.llvm.org/D55962 llvm-svn: 349859
* Fix stack-buffer-overflow in lldb_private::Host::FindProcessesJonas Devlieghere2018-12-201-1/+1
| | | | | | | Found by the address sanitizer on GreenDragon: http://green.lab.llvm.org/green/view/LLDB/job/lldb-sanitized/1628/console llvm-svn: 349858
* [ARM] Complete the Thumb1 shift+and->shift+shift transforms.Eli Friedman2018-12-205-17/+125
| | | | | | | | | | | | | | This saves materializing the immediate. The additional forms are less common (they don't usually show up for bitfield insert/extract), but they're still relevant. I had to add a new target hook to prevent DAGCombine from reversing the transform. That isn't the only possible way to solve the conflict, but it seems straightforward enough. Differential Revision: https://reviews.llvm.org/D55630 llvm-svn: 349857
* [lldb] Add a "display-recognized-arguments" target setting to show ↵Kuba Mracek2018-12-208-15/+57
| | | | | | | | recognized arguments by default Differential Revision: https://reviews.llvm.org/D55954 llvm-svn: 349856
* [NativePDB] Create VarDecls for global variables.Zachary Turner2018-12-209-7/+279
| | | | | | | | | | Previously we would create these for local variables but not for global variables. Also updated existing tests which created global variables to check for them in the resulting AST. llvm-svn: 349854
* [CodeGen] Fix a test from r349848 by replacing `objc_` with `llvm.objc.`Volodymyr Sapsai2018-12-201-2/+2
| | | | llvm-svn: 349853
* Revert "[asan] Disable test on powerpc64be"Vitaly Buka2018-12-201-3/+0
| | | | | | | | Now the test is passing on that bot. Some incremental build issues? This reverts commit e00b5a5229ae02088d9f32a4e328eaa08abaf354. llvm-svn: 349852
* Disable a few tests on the green dragon sanitzier bot.Adrian Prantl2018-12-203-0/+10
| | | | | | | | These are tests that found actual, but hard to fix, bugs that are tracked elsewhere. Leaving them red only distracts from new failures this bot finds. llvm-svn: 349851
* Simplify. NFC.Rui Ueyama2018-12-201-12/+7
| | | | llvm-svn: 349850
* [ELF] Move IsNeeded logic from SymbolTable::addShared to MarkLive, and check ↵Fangrui Song2018-12-204-4/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | IsUsedInRegularObj Summary: In glibc, libc.so is a linker script with an as-needed dependency on ld-linux-x86-64.so.2 GROUP ( /lib/x86_64-linux-gnu/libc.so.6 /usr/lib/x86_64-linux-gnu/libc_nonshared.a AS_NEEDED ( /lib/x86_64-linux-gnu/ld-linux-x86-64.so.2 ) ) ld-linux-x86-64.so.2 (as-needed) defines some symbols which resolve undefined references in libc.so.6, it will therefore be added as a DT_NEEDED entry, which isn't necessary. The test case as-needed-not-in-regular.s emulates the libc.so scenario, where ld.bfd and gold don't add DT_NEEDED for a.so The relevant code in gold/resolve.cc: // If we have a non-WEAK reference from a regular object to a // dynamic object, mark the dynamic object as needed. if (to->is_from_dynobj() && to->in_reg() && !to->is_undef_binding_weak()) to->object()->set_is_needed(); in_reg() appears to do something similar to IsUsedInRegularObj. This patch makes lld do the similar thing, but moves the check from addShared to a later stage MarkLive where all symbols are scanned. Reviewers: ruiu, pcc, espindola Reviewed By: ruiu Subscribers: emaste, arichardson, llvm-commits Differential Revision: https://reviews.llvm.org/D55902 llvm-svn: 349849
* [CodeGen] Fix assertion on emitting cleanup for object with inlined ↵Volodymyr Sapsai2018-12-203-0/+96
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | inherited constructor and non-trivial destructor. Fixes assertion > Assertion failed: (isa<X>(Val) && "cast<Ty>() argument of incompatible type!"), function cast, file llvm/Support/Casting.h, line 255. It was triggered by trying to cast `FunctionDecl` to `CXXMethodDecl` as `CGF.CurCodeDecl` in `CallBaseDtor::Emit`. It was happening because cleanups were emitted in `ScalarExprEmitter::VisitExprWithCleanups` after destroying `InlinedInheritingConstructorScope`, so `CodeGenFunction.CurCodeDecl` didn't correspond to expected cleanup decl. Fix the assertion by emitting cleanups before leaving `InlinedInheritingConstructorScope` and changing `CurCodeDecl`. Test cases based on a patch by Shoaib Meenai. Fixes PR36748. rdar://problem/45805151 Reviewers: rsmith, rjmccall Reviewed By: rjmccall Subscribers: jkorous, dexonsmith, cfe-commits, smeenai, compnerd Differential Revision: https://reviews.llvm.org/D55543 llvm-svn: 349848
* [InstCombine] [NFC] testcases for canonicalize MUL with NEG operandChen Zheng2018-12-201-0/+44
| | | | llvm-svn: 349847
* Fix Windows build failures caused by r349839Tom Stellard2018-12-201-6/+6
| | | | llvm-svn: 349846
* Add support for namespaces on #pragma clang attributeErik Pilkington2018-12-208-21/+152
| | | | | | | | | | | | | | | | Namespaces are introduced by adding an "identifier." before a push/pop directive. Pop directives with namespaces can only pop a attribute group that was pushed with the same namespace. Push and pop directives that don't opt into namespaces have the same semantics. This is necessary to prevent a pitfall of using multiple #pragma clang attribute directives spread out in a large file, particularly when macros are involved. It isn't easy to see which pop corripsonds to which push, so its easy to inadvertently pop the wrong group. Differential revision: https://reviews.llvm.org/D55628 llvm-svn: 349845
* [asan] Disable test on powerpc64beVitaly Buka2018-12-201-0/+3
| | | | llvm-svn: 349844
* Revert "[driver] [analyzer] Fix a backward compatibility issue after r348038."Artem Dergachev2018-12-203-95/+3
| | | | | | | | | | | | This reverts commits r349824, r349828, r349835. More buildbot failures were noticed. Differential Revision: https://reviews.llvm.org/D55823 rdar://problem/46504165 llvm-svn: 349843
* [ObjC] Messages to 'self' in class methods that return 'instancetype' shouldAlex Lorenz2018-12-203-29/+88
| | | | | | | | | | | | | | | | | | | | | | | | use the pointer to the class as the result type of the message Prior to this commit, messages to self in class methods were treated as instance methods to a Class value. When these methods returned instancetype the compiler only saw id through the instancetype, and not the Interface *. This caused problems when that return value was a receiver in a message send, as the compiler couldn't select the right method declaration and had to rely on a selection from the global method pool. This commit modifies the semantics of such message sends and uses class messages that are dispatched to the interface that corresponds to the class that contains the class method. This ensures that instancetypes are correctly interpreted by the compiler. This change is safe under ARC (as self can't be reassigned), however, it also applies to MRR code as we are assuming that the user isn't doing anything unreasonable. rdar://20940997 Differential Revision: https://reviews.llvm.org/D36790 llvm-svn: 349841
* cmake: Remove uses of add_llvm_loadable_module macroTom Stellard2018-12-203-3/+3
| | | | | | This was removed from llvm in r349839. llvm-svn: 349840
* cmake: Remove add_llvm_loadable_module()Tom Stellard2018-12-207-44/+17
| | | | | | | | | | | | | | | | | Summary: This function is very similar to add_llvm_library(), so this patch merges it into add_llvm_library() and replaces all calls to add_llvm_loadable_module(lib ...) with add_llvm_library(lib MODULE ...) Reviewers: philip.pfaffe, beanz, chandlerc Reviewed By: philip.pfaffe Subscribers: chapuni, mgorny, llvm-commits Differential Revision: https://reviews.llvm.org/D51748 llvm-svn: 349839
* [gn check] Unbreak check-lld if llvm_install_binutils_symlinks is falseNico Weber2018-12-202-6/+8
| | | | | | | | The check-lld target was missing the dependency on llvm-nm and llvm-objdump in that case. Differential Revision: https://reviews.llvm.org/D55941 llvm-svn: 349836
* [driver] [analyzer] Fix redundant test output.Artem Dergachev2018-12-202-2/+4
| | | | | | | | | | | The -c flag causes a .o file to appear every time we run a test. Remove it. Differential Revision: https://reviews.llvm.org/D55823 rdar://problem/46504165 llvm-svn: 349835
* [gn build] Add build file for clang/lib/CodeGen and ↵Nico Weber2018-12-203-0/+103
| | | | | | | | llvm/lib/ProfileData/Coverage Differential Revision: https://reviews.llvm.org/D55931 llvm-svn: 349834
* [gn build] Add build files for ↵Nico Weber2018-12-205-0/+131
| | | | | | | | clang/lib/{Frontend,Frontend/Rewrite,Serialization} Differential Revision: https://reviews.llvm.org/D55930 llvm-svn: 349833
* [gn build] Add build file for clang/lib/DriverNico Weber2018-12-204-0/+99
| | | | | | | | | Mostly boring, except for the spurious dependency on StaticAnalyzer/Checkers -- see comments in the code. Differential Revision: https://reviews.llvm.org/D55927 llvm-svn: 349832
* [gn build] Add build file for clang/lib/ParseNico Weber2018-12-203-0/+52
| | | | | | | | | | | | | | | | | Nothing really interesting. One thing to consider is where the clang_tablegen() invocations that generate files that are private to a library should be. The CMake build puts them in clang/include/clang/Parse (in this case), but maybe putting them right in clang/lib/Parse/BUILD.gn makes mor sense. (For clang_tablegen() calls that generate .inc files used by the public headers, putting the call in the public BUILD file makes sense.) For now, I've put the build file in the public header folder, since that matches CMake and what I did in the last 2 clang patches, but I'm not sure I like this. Differential Revision: https://reviews.llvm.org/D55925 llvm-svn: 349831
* [gn build] Add build files for clang-format and ↵Nico Weber2018-12-206-6/+88
| | | | | | | | lib/{Format,Rewrite,Tooling/Core,Tooling/Inclusions} Differential Revision: https://reviews.llvm.org/D55924 llvm-svn: 349830
* [driver] [analyzer] Fix buildbots after r349824.Artem Dergachev2018-12-202-2/+2
| | | | | | | | | | Buildbots can't find the linker, which we don't really need in our tests. Differential Revision: https://reviews.llvm.org/D55823 rdar://problem/46504165 llvm-svn: 349828
* [llvm-objcopy] [COFF] Avoid memcpy() with null parameters in more places. NFC.Martin Storsjo2018-12-201-4/+4
| | | | | | | | | This fixes all cases of errors in asan+ubsan builds. Also use std::copy instead of if+memcpy in the previously updated spot, for consistency. llvm-svn: 349826
* Declares __cpu_model as dso localHaibo Huang2018-12-203-0/+14
| | | | | | | | __builtin_cpu_supports and __builtin_cpu_is use information in __cpu_model to decide cpu features. Before this change, __cpu_model was not declared as dso local. The generated code looks up the address in GOT when reading __cpu_model. This makes it impossible to use these functions in ifunc, because at that time GOT entries have not been relocated. This change makes it dso local. Differential Revision: https://reviews.llvm.org/D53850 llvm-svn: 349825
* [driver] [analyzer] Fix a backward compatibility issue after r348038.Artem Dergachev2018-12-203-3/+93
| | | | | | | | | | | | | | | | | | | Since r348038 we emit an error every time an -analyzer-config option is not found. The driver, however, suppresses this error with another flag, -analyzer-config-compatibility-mode, so backwards compatibility is maintained, while analyzer developers still enjoy the new typo-free experience. The backwards compatibility turns out to be still broken when the -analyze action is not specified; it is still possible to specify -analyzer-config in that case. This should be fixed now. Patch by Kristóf Umann! Differential Revision: https://reviews.llvm.org/D55823 rdar://problem/46504165 llvm-svn: 349824
* [CodeGen] Generate llvm.loop.parallel_accesses instead of ↵Michael Kruse2018-12-2017-262/+326
| | | | | | | | | | | | | | llvm.mem.parallel_loop_access metadata. Instead of generating llvm.mem.parallel_loop_access metadata, generate llvm.access.group on instructions and llvm.loop.parallel_accesses on loops. There is one access group per generated loop. This is clang part of D52116/r349725. Differential Revision: https://reviews.llvm.org/D52117 llvm-svn: 349823
* [GlobalISel][AArch64] Add G_FCEIL to isPreISelGenericFloatingPointOpcodeJessica Paquette2018-12-202-0/+17
| | | | | | | | | If you don't do this, then if you hit a G_LOAD in getInstrMapping, you'll end up with GPRs on the G_FCEIL instead of FPRs. This causes a fallback. Add it to the switch, and add a test verifying that this happens. llvm-svn: 349822
* [API] Remove redundants get() from smart pointers. NFCJonas Devlieghere2018-12-2021-104/+97
| | | | | | | Removes redundant calls to ::get() from smart pointers in the source/API directory.. llvm-svn: 349821
* Make the "too many braces in scalar initialization" extension causeRichard Smith2018-12-202-1/+24
| | | | | | SFINAE failures. llvm-svn: 349820
* DebugInfo: Fix for missing comp_dir handling with r349207David Blaikie2018-12-202-9/+42
| | | | | | | | | | | When deciding lazily whether a CU would be split or non-split I accidentally dropped some handling for the line tables comp_dir (by doing it lazily it was too late to be handled properly by the MC line table code). Move that bit of the code back to the non-lazy place. llvm-svn: 349819
* [dotest] Consider unexpected passes as failures.Jonas Devlieghere2018-12-202-6/+7
| | | | | | | | | | | | | | | Unexpected successes should be considered failures because they can hide regressions when not addressed. When a test is fixed and not re-enabled, it can easily regress without us noticing. I couldn't find a good way to make this change other than changing it in the unittest2 framework. I know this is less than optimal but since we have the dependency checked in and the change is pretty fundamental to the framework I think it's not unreasonable. Differential revision: https://reviews.llvm.org/D55835 llvm-svn: 349818
* [sanitizer] Support running without fd 0,1,2.Evgeniy Stepanov2018-12-207-9/+75
| | | | | | | | | | | | | | | | | | | Summary: Support running with no open file descriptors (as may happen to "init" process on linux). * Remove a check that writing to stderr succeeds. * When opening a file (ex. for log_path option), dup the new fd out of [0, 2] range to avoid confusing the program. (2nd attempt, this time without the sanitizer_rtems change) Reviewers: pcc, vitalybuka Subscribers: kubamracek, llvm-commits Differential Revision: https://reviews.llvm.org/D55801 llvm-svn: 349817
* Fix the example checker plugin after r349812.Aaron Ballman2018-12-201-1/+3
| | | | llvm-svn: 349816
* Fix build failures from r349812 due to a missing argument.Aaron Ballman2018-12-201-1/+2
| | | | llvm-svn: 349815
* [NFC][pstl] Re-run Clang-format on the whole repositoryLouis Dionne2018-12-201-2/+2
| | | | llvm-svn: 349814
* [lldbsuite] Un-xfail several tests in TestInferiorCrashing on WindowsStella Stamenova2018-12-201-21/+4
| | | | | | Several of the tests are now passing. This change is enabling them. llvm-svn: 349813
* Allow direct navigation to static analysis checker documentation through ↵Aaron Ballman2018-12-2012-421/+635
| | | | | | | | SARIF exports. This adds anchors to all of the documented checks so that you can directly link to a check by a stable name. This is useful because the SARIF file format has a field for specifying a URI to documentation for a rule and some viewers, like CodeSonar, make use of this information. These links are then exposed through the SARIF exporter. llvm-svn: 349812
* [Sema] Don't try to account for the size of an incomplete type in ↵Bruno Ricci2018-12-202-2/+19
| | | | | | | | | | | | | | | | | CheckArrayAccess When checking that the array access is not out-of-bounds in CheckArrayAccess it is possible that the type of the base expression after IgnoreParenCasts is incomplete, even though the type of the base expression before IgnoreParenCasts is complete. In this case we have no information about whether the array access is out-of-bounds and we should just bail-out instead. This fixes PR39746 which was caused by trying to obtain the size of an incomplete type. Differential Revision: https://reviews.llvm.org/D55862 Reviewed By: efriedma llvm-svn: 349811
* [llvm-objcopy] [COFF] Don't call memcpy() with a null argument. NFC.Martin Storsjo2018-12-201-1/+2
| | | | | | | | | It is invalid to call memcpy with a null pointer, even if the size is zero. This should fix the sanitizer buildbot. llvm-svn: 349808
* [ConstantFolding] Consolidate and extend bitcount intrinsic tests; NFCNikita Popov2018-12-204-57/+187
| | | | | | | Move constant folding tests into ConstantFolding/bitcount.ll and drop various tests in other places. Add coverage for undefs. llvm-svn: 349806
* [ConstantFolding] Add undef tests for overflow intrinsics; NFCNikita Popov2018-12-201-0/+71
| | | | llvm-svn: 349805
* [ConstantFolding] Regenerate test checks; NFCNikita Popov2018-12-201-78/+58
| | | | | | | Bring overflow-ops.ll into current format. Remove redundant entry blocks. llvm-svn: 349804
* [ConstantFolding] Add tests for funnel shifts with undef operands; NFCNikita Popov2018-12-201-0/+167
| | | | llvm-svn: 349803
OpenPOWER on IntegriCloud