summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
* [CodeGenObjC] Use a constant value for non-fragile ivar offsets when possibleErik Pilkington2019-01-174-31/+91
| | | | | | | | | | | | | | | If a class inherits from NSObject and has an implementation, then we can assume that ivar offsets won't need to be updated by the runtime. This allows us to index into the object using a constant value and avoid loading from the ivar offset variable. This patch was adapted from one written by Pete Cooper. rdar://problem/10132568 Differential revision: https://reviews.llvm.org/D56802 llvm-svn: 351461
* [ObjC] Follow-up r350768 and allow the use of unavailable methods that areAlex Lorenz2019-01-173-9/+25
| | | | | | | | | | | | | | | | declared in a parent class from within the @implementation context This commit extends r350768 and allows the use of methods marked as unavailable that are declared in a parent class/category from within the @implementation of the class where the method is marked as unavailable. This allows users to call init that's marked as unavailable even if they don't define it. rdar://47134898 Differential Revision: https://reviews.llvm.org/D56816 llvm-svn: 351459
* TLS: Respect visibility for thread_local variables on Darwin (PR40327)Vlad Tsyrklevich2019-01-173-5/+24
| | | | | | | | | | | | | | | | | | Summary: Teach clang to mark thread wrappers for thread_local variables with hidden visibility when the original variable is marked with hidden visibility. This is necessary on Darwin which exposes the thread wrapper instead of the thread variable. The thread wrapper would previously always be created with default visibility unless it had linkonce*/weak_odr linkage. Reviewers: rjmccall Reviewed By: rjmccall Differential Revision: https://reviews.llvm.org/D56818 llvm-svn: 351457
* CodeGen: Cast llvm.flt.rounds result to match __builtin_flt_roundsAnton Korobeynikov2019-01-173-0/+24
| | | | | | | | | | | | | llvm.flt.rounds returns an i32, but the builtin expects an integer. On targets where integers are not 32-bits clang tries to bitcast the result, causing an assertion failure. The patch enables newlib build for msp430. Patch by Edward Jones! Differential Revision: https://reviews.llvm.org/D24461 llvm-svn: 351449
* [NewPM] Add -fsanitize={memory,thread} handling to clangPhilip Pfaffe2019-01-171-0/+11
| | | | | | | | | | | | Summary: This is the missing bit to drive thread and memory sanitizers through clang using the new PassManager. Reviewers: chandlerc, fedor.sergeev, vitalybuka, leonardchan Subscribers: bollu, llvm-commits Differential Revision: https://reviews.llvm.org/D56831 llvm-svn: 351423
* [CMake][Fuchsia] Disable modules for the second stage buildPetr Hosek2019-01-171-1/+0
| | | | | | | | This made the toolchain build 50% slower. Differential Revision: https://reviews.llvm.org/D56825 llvm-svn: 351415
* [X86] Add custom emission for the avx512 scatter builtins to convert from ↵Craig Topper2019-01-173-48/+156
| | | | | | scalar integer to vXi1 for the mask arguments to the intrinsics. llvm-svn: 351408
* [Frontend] Make WrapperFrontendAction call WrappedAction.PrepareToExecuteAction.Volodymyr Sapsai2019-01-172-0/+4
| | | | | | | | | | | | | | | | | Fixes `-emit-header-module` when GenerateHeaderModuleAction is wrapped by another frontend action. rdar://problem/47302588 Reviewers: rsmith, arphaman Reviewed By: arphaman Subscribers: jkorous, dexonsmith, cfe-commits Differential Revision: https://reviews.llvm.org/D56766 llvm-svn: 351402
* [analyzer] Another RetainCountChecker cleanupGeorge Karpenkov2019-01-162-45/+40
| | | | | | | | | This is not NFC strictly speaking, since it unifies CleanupAttr handling, so that out parameters now also understand it. Differential Revision: https://reviews.llvm.org/D56759 llvm-svn: 351394
* [analyzer] [NFC] Yet another minor cleanup of RetainCountCheckerGeorge Karpenkov2019-01-162-33/+18
| | | | | | Differential Revision: https://reviews.llvm.org/D56744 llvm-svn: 351393
* Recommit r351160 "[X86] Make _xgetbv/_xsetbv on non-windows platforms"Craig Topper2019-01-169-16/+160
| | | | | | V8 has been fixed now. llvm-svn: 351391
* [X86] Add versions of the avx512 gather intrinsics that take the mask as a ↵Craig Topper2019-01-163-32/+140
| | | | | | | | | | vXi1 vector instead of a scalar We need to custom handle these so we can turn the scalar mask into a vXi1 vector. Differential Revision: https://reviews.llvm.org/D56530 llvm-svn: 351390
* Fix libc++ mac driver test to pass on WindowsReid Kleckner2019-01-161-4/+3
| | | | | | | There is a substitution for 'clang-check' to absolutize it, so the '$(which clang-check)' is unnecessary. llvm-svn: 351383
* PR40329: [adl] Fix determination of associated classes when searching aRichard Smith2019-01-163-18/+66
| | | | | | | | | | | | | | | | | | | | | | | member enum and then its enclosing class. There are situations where ADL will collect a class but not the complete set of associated classes / namespaces of that class. When that happened, and we later tried to collect those associated classes / namespaces, we would previously short-circuit the lookup and not find them. Eg, for: struct A : B { enum E; }; if we first looked for associated classes/namespaces of A::E, we'd find only A. But if we then tried to also collect associated classes/namespaces of A (which should include the base class B), we would not add B because we had already visited A. This also fixes a minor issue where we would fail to collect associated classes from an overloaded class member access expression naming a static member function. llvm-svn: 351382
* [Fixed Point Arithmetic] Fixed Point SubtractionLeonard Chan2019-01-162-11/+454
| | | | | | | | | This patch covers subtraction between fixed point types and other fixed point types or integers, using the conversion rules described in 4.1.4 of N1169. Differential Revision: https://reviews.llvm.org/D55844 llvm-svn: 351371
* [Fixed Point Arithmetic] Add APFixedPoint to APValueLeonard Chan2019-01-169-22/+99
| | | | | | | | This adds APFixedPoint to the union of values that can be represented with an APValue. Differential Revision: https://reviews.llvm.org/D56746 llvm-svn: 351368
* [Fixed Point Arithmetic] Fixed Point AdditionLeonard Chan2019-01-169-20/+667
| | | | | | | | | | | | | | | | | | This patch covers addition between fixed point types and other fixed point types or integers, using the conversion rules described in 4.1.4 of N1169. Usual arithmetic rules do not apply to binary operations when one of the operands is a fixed point type, and the result of the operation must be calculated with the full precision of the operands, so we should not perform any casting to a common type. This patch does not include constant expression evaluation for addition of fixed point types. That will be addressed in another patch since I think this one is already big enough. Differential Revision: https://reviews.llvm.org/D53738 llvm-svn: 351364
* Add a REQUIRES: darwin line for a mac test.Jeremy Morse2019-01-161-1/+1
| | | | | | | | This test, apparently for macs, fails on Windows as lit can't emulate the shell subprocess $(which...) correctly. Some other netbsd and linux buildbots also fail here. Limit to macs as a temporary workaround. llvm-svn: 351360
* Added test cases for dumping variadic-like functions; NFC.Aaron Ballman2019-01-163-0/+26
| | | | llvm-svn: 351355
* Added a test case for dumping blocks that capture 'this'; NFC.Aaron Ballman2019-01-161-0/+17
| | | | llvm-svn: 351350
* [MSP430] Improve support of 'interrupt' attributeAnton Korobeynikov2019-01-165-18/+56
| | | | | | | | | | | | * Accept as an argument constants in range 0..63 (aligned with TI headers and linker scripts provided with TI GCC toolchain). * Emit function attribute 'interrupt'='xx' instead of aliases (used in the backend to create a section for particular interrupt vector). * Add more diagnostics. Patch by Kristina Bessonova! Differential Revision: https://reviews.llvm.org/D56663 llvm-svn: 351344
* [MSP430] Fix msp430-toolchain.c on Windows (added in r351228)Anton Korobeynikov2019-01-161-16/+16
| | | | | | | | Patch by Kristina Bessonova! Differential Revision: https://reviews.llvm.org/D56776 llvm-svn: 351340
* Set '-target' flag in the test checking the MacOS include dirIlya Biryukov2019-01-161-1/+1
| | | | | | | | | | | To fix a buildbot failure on PS4, see http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-ubuntu-fast/builds/42251 The test was added in r351222 and aims to check only a particular Mac configuration. However it relied on the default compiler target by default, therefore unintentionally failing on PS4. llvm-svn: 351334
* Bump the trunk version to 9.0.0svnHans Wennborg2019-01-162-200/+15
| | | | llvm-svn: 351320
* [Support] Remove error return value from one overload of fs::make_absolutePavel Labath2019-01-161-3/+2
| | | | | | | | | | | | | | | | | | | | | | Summary: The version of make_absolute which accepted a specific directory to use as the "base" for the computation could never fail, even though it returned a std::error_code. The reason for that seems to be historical -- the CWD flavour (which can fail due to failure to retrieve CWD) was there first, and the new version was implemented by extending that. This removes the error return value from the non-CWD overload and reimplements the CWD version on top of that. This enables us to remove some dead code where people were pessimistically trying to handle the errors returned from this function. Reviewers: zturner, sammccall Subscribers: hiraditya, kristina, llvm-commits Differential Revision: https://reviews.llvm.org/D56599 llvm-svn: 351317
* Reapply [Tooling] Make clang-tool find libc++ dir on mac when running on a ↵Sam McCall2019-01-163-38/+49
| | | | | | | | | file without compilation database. This reverts commit r351282, and re-lands r351222 and r351229 with the use-after-free fixed. llvm-svn: 351316
* [NewPM][TSan] Reiterate the TSan portPhilip Pfaffe2019-01-161-2/+3
| | | | | | | | | | | | | | | | | | | Summary: Second iteration of D56433 which got reverted in rL350719. The problem in the previous version was that we dropped the thunk calling the tsan init function. The new version keeps the thunk which should appease dyld, but is not actually OK wrt. the current semantics of function passes. Hence, add a helper to insert the functions only on the first time. The helper allows hooking into the insertion to be able to append them to the global ctors list. Reviewers: chandlerc, vitalybuka, fedor.sergeev, leonardchan Subscribers: hiraditya, bollu, llvm-commits Differential Revision: https://reviews.llvm.org/D56538 llvm-svn: 351314
* UsersManual.rst: Update the clang-cl flags sectionHans Wennborg2019-01-161-7/+37
| | | | llvm-svn: 351312
* [test] Disable Python binding tests w/ LLVM_ENABLE_PIC=OFFMichal Gorny2019-01-161-0/+5
| | | | | | | | | Disable Python binding tests when LLVM_ENABLE_PIC is disabled, as libclang.so is not being built in that case. Reported by Nico Weber. Differential Revision: https://reviews.llvm.org/D56732 llvm-svn: 351304
* [SEH] Pass the frame pointer from SEH finally to finally functionsSanjin Sijaric2019-01-162-2/+36
| | | | | | | | | Pass the frame pointer that the first finally block receives onto the nested finally block, instead of generating it using localaddr. Differential Revision: https://reviews.llvm.org/D56463 llvm-svn: 351302
* [X86] Correct the type string for __builtin_ia32_gathersiv16sf to make the ↵Craig Topper2019-01-161-1/+1
| | | | | | | | indices an integer type not an FP type. The element count and width remain the same. This went unnoticed because default conversion from builtin to intrinsic will generate a bitcast if the types don't match. llvm-svn: 351301
* [WebAssembly] COWS has been renamed to WASI.Dan Gohman2019-01-163-14/+14
| | | | llvm-svn: 351298
* [SemaCXX] Unconfuse Clang when std::align_val_t is unscoped in C++03Eric Fiselier2019-01-162-5/+34
| | | | | | | | | | | | | | | | When -faligned-allocation is specified in C++03 libc++ defines std::align_val_t as an unscoped enumeration type (because Clang didn't provide scoped enumerations as an extension until 8.0). Unfortunately Clang confuses the `align_val_t` overloads of delete with the sized deallocation overloads which aren't enabled. This caused Clang to call the aligned deallocation function as if it were the sized deallocation overload. For example: https://godbolt.org/z/xXJELh This patch fixes the confusion. llvm-svn: 351294
* [EH] Rename llvm.x86.seh.recoverfp intrinsic to llvm.eh.recoverfpEli Friedman2019-01-163-10/+10
| | | | | | | | | | This is the clang counterpart to D56747. Patch by Mandeep Singh Grang. Differential Revision: https://reviews.llvm.org/D56748 llvm-svn: 351284
* Revert "[Tooling] Make clang-tool find libc++ dir on mac when running on a ↵Vlad Tsyrklevich2019-01-163-48/+38
| | | | | | | | | file without compilation database." This reverts commits r351222 and r351229, they were causing ASan/MSan failures on the sanitizer bots. llvm-svn: 351282
* Re-order type param children of ObjC nodesStephen Kelly2019-01-152-3/+3
| | | | | | | | | | Reviewers: aaron.ballman Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D55394 llvm-svn: 351272
* NFC: Some cleanups that I missed in the previous commitStephen Kelly2019-01-151-9/+6
| | | | llvm-svn: 351271
* Re-order overrides in FunctionDecl dumpStephen Kelly2019-01-152-15/+17
| | | | | | | | | | | | | | Output all content which is local to the FunctionDecl before traversing to child AST nodes. This is necessary so that all of the part which is local to the FunctionDecl can be split into a different method. Reviewers: aaron.ballman Differential Revision: https://reviews.llvm.org/D55083 llvm-svn: 351269
* NFC: Replace iterator loop with cxx_range_forStephen Kelly2019-01-151-4/+2
| | | | llvm-svn: 351268
* [clang-cl] Alias /Zc:alignedNew[-] to -f[no-]aligned-allocationReid Kleckner2019-01-152-0/+12
| | | | | | | | | | | | | | | Implements PR40180. clang-cl has one minor behavior difference with cl with this change. Clang allows the user to enable the C++17 feature of aligned allocation without enabling all of C++17, but MSVC will not call the aligned allocation overloads unless -std:c++17 is passed. While our behavior is technically incompatible, it would require making driver mode specific changes to match MSVC precisely, and clang's behavior is useful because it allows people to experiment with new C++17 features individually. Therefore, I plan to leave it as is. llvm-svn: 351249
* Enable IAS for OpenBSD SPARC.Brad Smith2019-01-152-5/+9
| | | | llvm-svn: 351245
* CodeGen: Remove debug printf unintentionally added in r351228.Peter Collingbourne2019-01-151-4/+2
| | | | llvm-svn: 351241
* Implement BlockDecl::Capture dump in terms of visitorsStephen Kelly2019-01-153-15/+25
| | | | | | | | | | Reviewers: aaron.ballman Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D56709 llvm-svn: 351239
* NFC: Implement OMPClause dump in terms of visitorsStephen Kelly2019-01-153-21/+31
| | | | | | | | | | Reviewers: aaron.ballman Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D56708 llvm-svn: 351236
* Implement CXXCtorInitializer dump in terms of VisitorStephen Kelly2019-01-153-11/+17
| | | | | | | | | | Reviewers: aaron.ballman Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D56707 llvm-svn: 351235
* [MSVC Compat] Fix typo correction for inclusion directives.Volodymyr Sapsai2019-01-152-1/+10
| | | | | | | | | | | | | | | In MSVC compatibility mode we were checking not the typo corrected filename but the original filename. Reviewers: christylee, compnerd Reviewed By: christylee Subscribers: jkorous, dexonsmith, sammccall, hokein, cfe-commits Differential Revision: https://reviews.llvm.org/D56631 llvm-svn: 351232
* [Nios2] Remove Nios2 backendCraig Topper2019-01-1510-342/+0
| | | | | | | | As mentioned here http://lists.llvm.org/pipermail/llvm-dev/2019-January/129121.html This backend is incomplete and has not been maintained in several months. Differential Revision: https://reviews.llvm.org/D56690 llvm-svn: 351230
* [Tooling] Fix broken compliation databse tests.Haojian Wu2019-01-151-34/+18
| | | | | | I forgot to update the unittest in r351222. llvm-svn: 351229
* [MSP430] Provide a toolchain descriptionAnton Korobeynikov2019-01-1520-8/+748
| | | | | | | | | | | | | | | This is an initial implementation for msp430 toolchain including -mmcu option support -mhwmult options support -integrated-as by default The toolchain uses msp430-elf-as as a linker and supports msp430-gcc toolchain tree. Patch by Kristina Bessonova! Differential Revision: https://reviews.llvm.org/D56658 llvm-svn: 351228
* [Tooling] Make clang-tool find libc++ dir on mac when running on a file ↵Haojian Wu2019-01-152-4/+30
| | | | | | | | | | | | | | | | | | | | | | without compilation database. Summary: This is a regression of r348365. When clang-tools run on a file without a complation database (`clang-check /tmp/t.cc`), we will use fixed compilation database as a fallback. However the actual compiler path in the fallback complation command is just `clang-tool` which is insufficient to detect the libc++ dir. Reviewers: ilya-biryukov, EricWF Reviewed By: ilya-biryukov Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D56680 llvm-svn: 351222
OpenPOWER on IntegriCloud