summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* Re-commit "Enable DWARF accelerator tables by default when tuning for lldb ↵Pavel Labath2018-09-061-1/+1
| | | | | | | | | | | | | | | | | (-glldb => -gpubnames)"" This recommits r341472, which was reverted due to test failures on macos bots. The issue was that a macos target implies -glldb which, together with this patch added a -gpubnames switch where there previously wasn't one. The intentions of those checks was to check that -gpubnames is not emitted by default so I add an explicit -ggdb arg to those command lines to get same behavior on all platforms (the fact that -glldb *does* set -gpubnames is tested by a separate test). Differential Revision: https://reviews.llvm.org/D51576 llvm-svn: 341564
* Reverting r 341390 because it is causing test failures on GreenDragon.A Bergen2018-09-061-9/+0
| | | | | | http://lab.llvm.org:8080/green/job/clang-stage1-cmake-RA-incremental/52810/ llvm-svn: 341560
* Remove unnecessary semicolon to silence -Wpedantic warning. NFCI.Simon Pilgrim2018-09-061-1/+1
| | | | llvm-svn: 341556
* [OpenCL] Relax diagnostics on OpenCL access qualifiersAndrew Savonichev2018-09-062-16/+42
| | | | | | | | | | | | | | | | | Summary: Emit warning for multiple access qualifiers if they do not conflict. Patch by Alexey Bader Reviewers: Anastasia, yaxunl Reviewed By: Anastasia Subscribers: asavonic, bader, cfe-commits Differential Revision: https://reviews.llvm.org/D51302 llvm-svn: 341553
* Revert "[DebugInfo] Generate debug information for labels. (Fix PR37395)"Sam McCall2018-09-063-39/+0
| | | | | | | | | This reverts commit r341519, which generates debug info that causes backend crashes. (with -split-dwarf-file) Details in https://reviews.llvm.org/D50495 llvm-svn: 341549
* Fix the -print-multi-directory flag to print the selected multilib.Christian Bruel2018-09-062-13/+11
| | | | | | | | | | | | | | Summary: Fix -print-multi-directory to print the selected multilib Reviewers: jroelofs Reviewed By: jroelofs Subscribers: jroelofs, timshen, thakis, srhines, cfe-commits Differential Revision: https://reviews.llvm.org/D51354 llvm-svn: 341547
* [OpenCL] Disallow negative attribute argumentsAndrew Savonichev2018-09-061-2/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Negative arguments in kernel attributes are silently bitcast'ed to unsigned, for example: __attribute__((reqd_work_group_size(1, -1, 1))) __kernel void k() {} is a complete equivalent of: __attribute__((reqd_work_group_size(1, 4294967294, 1))) __kernel void k() {} This is likely an error, so the patch forbids negative arguments in several OpenCL attributes. Users who really want 4294967294 can still use it as an unsigned representation. Reviewers: Anastasia, yaxunl, bader Reviewed By: Anastasia, yaxunl, bader Subscribers: bader, cfe-commits Differential Revision: https://reviews.llvm.org/D50259 llvm-svn: 341539
* [DebugInfo] Generate debug information for labels. (Fix PR37395)Hsiangkai Wang2018-09-063-0/+39
| | | | | | | | | | | | Generate DILabel metadata and call llvm.dbg.label after label statement to associate the metadata with the label. After fixing PR37395. After fixing problems in LiveDebugVariables. Differential Revision: https://reviews.llvm.org/D45045 llvm-svn: 341519
* PR38627: Fix handling of exception specification adjustment forRichard Smith2018-09-057-45/+104
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | destructors. We previously tried to patch up the exception specification after completing the class, which went wrong when the exception specification was needed within the class body (in particular, by a friend redeclaration of the destructor in a nested class). We now mark the destructor as having a not-yet-computed exception specification immediately after creating it. This requires delaying various checks against the exception specification (where we'd previously have just got the wrong exception specification, and now find we have an exception specification that we can't compute yet) when those checks fire while the class is being defined. This also exposed an issue that we were missing a CodeSynthesisContext for computation of exception specifications (otherwise we'd fail to make the module containing the definition of the class visible when computing its members' exception specs). Adding that incidentally also gives us a diagnostic quality improvement. This has also exposed an pre-existing problem: making the exception specification evaluation context a non-SFINAE context (as it should be) results in a bootstrap failure; PR38850 filed for this. llvm-svn: 341499
* Revert "Enable DWARF accelerator tables by default when tuning for lldb ↵Pavel Labath2018-09-051-1/+1
| | | | | | | | (-glldb => -gpubnames)" This reverts commit r341472 due to breakage in green dragon bots. llvm-svn: 341492
* Forbid address spaces on compound literals in local scope.John McCall2018-09-051-6/+14
| | | | | | Patch by Bevin Hansson! llvm-svn: 341491
* [Sema] Don't warn about omitting unavailable enum constants in a switchErik Pilkington2018-09-051-1/+15
| | | | | | | | rdar://42717026 Differential revision: https://reviews.llvm.org/D51649 llvm-svn: 341490
* Add -Wobjc-property-assign-on-object-type.John McCall2018-09-051-0/+8
| | | | | | | | | | | | This is a warning about using 'assign' instead of 'unsafe_unretained' in Objective-C property declarations. It's off by default because there isn't consensus in the Objective-C steering group that this is the right thing to do, but we're nonetheless okay with adding it because there's a substantial pool of Objective-C programmers who will appreciate the warning. Patch by Alfred Zien! llvm-svn: 341489
* [OPENMP][NVPTX] Disable runtime-type info for CUDA devices.Alexey Bataev2018-09-051-0/+5
| | | | | | RTTI is not supported by the NVPTX target. llvm-svn: 341483
* [Sema] Store MacroInfo in CodeCompletionResult for macro results.Eric Liu2018-09-051-7/+7
| | | | | | | | | | | | | | Summary: This provides information about the macro definition. For example, it can be used to compute macro USRs. Reviewers: sammccall Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D51675 llvm-svn: 341476
* Enable DWARF accelerator tables by default when tuning for lldb (-glldb => ↵Pavel Labath2018-09-051-1/+1
| | | | | | | | | | | | | | | | | | -gpubnames) Summary: DWARF v5 accelerator tables provide a considerable performance improvement for lldb and will make the default -glldb behavior same on all targets (right now we emit apple tables on apple targets, but these are not controlled by -gpubnames, only by -glldb). Reviewers: dblaikie Subscribers: probinson, clayborg, JDevlieghere, aprantl, cfe-commits Differential Revision: https://reviews.llvm.org/D51576 llvm-svn: 341472
* Fix -Wdocumentation warning. NFCI.Simon Pilgrim2018-09-051-1/+1
| | | | llvm-svn: 341460
* [VFS] Cache the current working directory for the real FS.Eric Liu2018-09-051-2/+16
| | | | | | | | | | Reviewers: sammccall Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D51641 llvm-svn: 341455
* clang-format: Fix formatting C++ namespaces with preceding 'inline' or ↵Sam McCall2018-09-056-22/+24
| | | | | | | | | | | | | | | | | | | | | | 'export' specifier This fixes formatting namespaces with preceding 'inline' and 'export' (Modules TS) specifiers. This change fixes namespaces not being identified as such with preceding 'inline' or 'export' specifiers. Motivation: I was experimenting with the Modules TS (-fmodules-ts) and found it would be useful if clang-format would correctly format 'export namespace'. While making the changes, I noticed that similar issues still exist with 'inline namespace', and addressed them as well. Patch by Marco Elver! Reviewers: klimek, djasper, owenpan, sammccall Reviewed By: owenpan, sammccall Subscribers: owenpan, cfe-commits Differential Revision: https://reviews.llvm.org/D51036 llvm-svn: 341450
* [ODRHash] Extend hash to support all Type's.Richard Trieu2018-09-042-26/+232
| | | | llvm-svn: 341421
* Revert r341373, since it fails on some targets.Tim Shen2018-09-042-11/+13
| | | | | | Differential Revision: https://reviews.llvm.org/D51354 llvm-svn: 341418
* clang-cl: Pass /Brepro to linker if it was passed to the compilerNico Weber2018-09-041-0/+9
| | | | | | Differential Revision: https://reviews.llvm.org/D51635 llvm-svn: 341390
* Fix the -print-multi-directory flag to print the selected multilib.Christian Bruel2018-09-042-13/+11
| | | | | | | | | | | | | | Summary: Fix -print-multi-directory to print the selected multilib Reviewers: jroelofs Reviewed By: jroelofs Subscribers: srhines, cfe-commits Differential Revision: https://reviews.llvm.org/D51354 llvm-svn: 341373
* Adding HardLink Support to VirtualFileSystem.Ilya Biryukov2018-09-041-49/+119
| | | | | | | | | | | | | | | | | | | | | | | Summary: Added support of creating a hardlink from one file to another file. After a hardlink is added between two files, both file will have the same: 1. UniqueID (inode) 2. Size 3. Buffer This will bring replay of compilation closer to the actual compilation. There are instances where clang checks for the UniqueID of the file/header to be loaded which leads to a different behavior during replay as all files have different UniqueIDs. Patch by Utkarsh Saxena! Reviewers: ilya-biryukov Reviewed By: ilya-biryukov Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D51359 llvm-svn: 341366
* [x86/SLH] Add a real Clang flag and LLVM IR attribute for SpeculativeChandler Carruth2018-09-044-5/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Load Hardening. Wires up the existing pass to work with a proper IR attribute rather than just a hidden/internal flag. The internal flag continues to work for now, but I'll likely remove it soon. Most of the churn here is adding the IR attribute. I talked about this Kristof Beyls and he seemed at least initially OK with this direction. The idea of using a full attribute here is that we *do* expect at least some forms of this for other architectures. There isn't anything *inherently* x86-specific about this technique, just that we only have an implementation for x86 at the moment. While we could potentially expose this as a Clang-level attribute as well, that seems like a good question to defer for the moment as it isn't 100% clear whether that or some other programmer interface (or both?) would be best. We'll defer the programmer interface side of this for now, but at least get to the point where the feature can be enabled without relying on implementation details. This also allows us to do something that was really hard before: we can enable *just* the indirect call retpolines when using SLH. For x86, we don't have any other way to mitigate indirect calls. Other architectures may take a different approach of course, and none of this is surfaced to user-level flags. Differential Revision: https://reviews.llvm.org/D51157 llvm-svn: 341363
* Revert "Disable the GNUstep v2 ABI on Windows."David Chisnall2018-09-041-1/+2
| | | | | | | | | This reverts commit b4547c9cadd2f8adfe3f3182e4c56e466c5256cb. Apparently git llvm push from the monorepo does not respect branches and pushes the current branch to master. llvm-svn: 341352
* Disable the GNUstep v2 ABI on Windows.David Chisnall2018-09-041-2/+1
| | | | | | | | | | | The code remains so that we can potentially reenable it in a point release, but the driver will reject it. Several issues were raised during testing that made it clear that this was not quite ready for general consumption. Approved by: Hans Wennborg llvm-svn: 341350
* Add header guards to some headers that are missing themArgyrios Kyrtzidis2018-09-031-0/+5
| | | | llvm-svn: 341324
* [ASTImporter] Merge ExprBitsGabor Marton2018-09-031-2/+15
| | | | | | | | | | | | | | | | | | | | | | | | Summary: Some `Expr` classes set up default values for the `ExprBits` of `Stmt`. These default values are then overwritten by the parser sometimes. One example is `InitListExpr` which sets the value kind to be an rvalue in the ctor. However, this bit may change after the `InitListExpr` is created. There may be other expressions similar to `InitListExpr` in this sense, thus the safest solution is to copy the expression bits. The lack of copying `ExprBits` causes an assertion in the analyzer engine in a specific case: Since the value kind is not imported, the analyzer engine believes that the given InitListExpr is an rvalue, thus it creates a nonloc::CompoundVal instead of creating memory region (as in case of an lvalue reference). Reviewers: a_sidorin, r.stahl, xazax.hun, a.sidorin Subscribers: rnkovacs, dkrupp, cfe-commits Differential Revision: https://reviews.llvm.org/D51533 llvm-svn: 341316
* [Aarch64] Fix linker emulation for Aarch64 big endianPeter Smith2018-09-031-1/+1
| | | | | | | | | | | | | | This patch fixes target linker emulation for aarch64 big endian. aarch64_be_linux is not recognized by gnu ld. The equivalent emulation mode supported by gnu ld is aarch64linuxb. Patch by: Bharathi Seshadri Reviewed by: Peter Smith Differential Revision: https://reviews.llvm.org/D42930 llvm-svn: 341312
* [OpenCL] Traverse vector types for ocl extensions supportAlexey Sotkin2018-09-031-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Given the following kernel: __kernel void foo() { double d; double4 dd; } and cl_khr_fp64 is disabled, the compilation would fail due to the presence of 'double d', but when removed, it passes. The expectation is that extended vector types of unsupported types will also be unsupported. The patch adds the check for this scenario. Patch by: Ofir Cohen Reviewers: bader, Anastasia, AlexeySotkin, yaxunl Reviewed By: Anastasia Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D51296 llvm-svn: 341309
* Fix Bug 38713: clang-format mishandles a short block after "default:" in a ↵Jonas Toth2018-09-021-0/+6
| | | | | | | | | | | | | | | | | | | switch statement Summary: See https://bugs.llvm.org/show_bug.cgi?id=38713 Patch by Owen Pan! Reviewers: djasper, klimek, sammccall Reviewed By: sammccall Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D51294 llvm-svn: 341284
* [X86] Add ktest intrinsics to match gcc and icc.Craig Topper2018-08-313-0/+116
| | | | | | | | | | | | These aren't documented in the Intel Intrinsics Guide, but are supported by gcc and icc. Includes these intrinsics: _ktestc_mask8_u8, _ktestz_mask8_u8, _ktest_mask8_u8 _ktestc_mask16_u8, _ktestz_mask16_u8, _ktest_mask16_u8 _ktestc_mask32_u8, _ktestz_mask32_u8, _ktest_mask32_u8 _ktestc_mask64_u8, _ktestz_mask64_u8, _ktest_mask64_u8 llvm-svn: 341265
* [WebAssembly] clang-format (NFC)Heejin Ahn2018-08-312-15/+13
| | | | | | | | | | Summary: This patch runs clang-format on all wasm-only files. Subscribers: dschuff, sbc100, jgravelle-google, sunfish, jfb, cfe-commits Differential Revision: https://reviews.llvm.org/D51448 llvm-svn: 341254
* [X86] Add k-mask conversion and load/store instrinsics to match gcc and icc.Craig Topper2018-08-314-0/+91
| | | | | | | | | | | | This adds: _cvtmask8_u32, _cvtmask16_u32, _cvtmask32_u32, _cvtmask64_u64 _cvtu32_mask8, _cvtu32_mask16, _cvtu32_mask32, _cvtu64_mask64 _load_mask8, _load_mask16, _load_mask32, _load_mask64 _store_mask8, _store_mask16, _store_mask32, _store_mask64 These are currently missing from the Intel Intrinsics Guide webpage. llvm-svn: 341251
* [X86] Add kshift intrinsics to match gcc and icc.Craig Topper2018-08-315-0/+76
| | | | | | | | | | | | | | This adds the following intrinsics: _kshiftli_mask8 _kshiftli_mask16 _kshiftli_mask32 _kshiftli_mask64 _kshiftri_mask8 _kshiftri_mask16 _kshiftri_mask32 _kshiftri_mask64 llvm-svn: 341234
* Refactor Addlibgcc to make the when and what logic more straightfoward.Sterling Augustine2018-08-311-12/+31
| | | | | | Add Android tests. llvm-svn: 341231
* [DEBUGINFO] Add support for emission of the debug directives only.Alexey Bataev2018-08-313-2/+17
| | | | | | | | | | | | | | | | Summary: Added option -gline-directives-only to support emission of the debug directives only. It behaves very similar to -gline-tables-only, except that it sets llvm debug info emission kind to llvm::DICompileUnit::DebugDirectivesOnly. Reviewers: echristo Subscribers: aprantl, fedor.sergeev, JDevlieghere, cfe-commits Differential Revision: https://reviews.llvm.org/D51177 llvm-svn: 341212
* Allow binding to NamedValue resulting from let expressionStephen Kelly2018-08-301-2/+21
| | | | | | | | Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D51259 llvm-svn: 341142
* Extract parseBindID methodStephen Kelly2018-08-301-31/+38
| | | | | | | | Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D51258 llvm-svn: 341141
* Add dump() method for SourceRangeStephen Kelly2018-08-301-0/+54
| | | | | | | | Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D50662 llvm-svn: 341140
* [MS ABI] Fix mangling issue with dynamic initializer stubs.Zachary Turner2018-08-301-2/+5
| | | | | | | | | | | | | | | | | | | | There are two types of dynamic initializer stubs. There's `dynamic initializer for 'x''(void) and `dynamic initializer for `static Foo::Bar StaticDataMember''(void) The second case is disambiguated from the first by the presence of a ? after the operator code. So the first will appear something like ?__E<name> while the second will appear something like ?__E?<name>. clang-cl was mangling these both the same though. This patch matches behavior with cl. Differential Revision: https://reviews.llvm.org/D51500 llvm-svn: 341117
* Reverted the "[CUDA/OpenMP] Define only some host macros during device ↵Artem Belevich2018-08-301-46/+6
| | | | | | | | | | | | | | | | compilation" The changes were breaking CUDA compilation. Reverted revisions: r340681 D50845 [CUDA/OpenMP] Define only some host macros during device compilation r340772 D51312 [OpenMP][NVPTX] Use appropriate _CALL_ELF macro when offloading r340967 D51441 Add predefined macro __gnu_linux__ for proper aux-triple llvm-svn: 341115
* Revert r341107. That change breaks lto-android in a way is untested.Sterling Augustine2018-08-301-30/+12
| | | | llvm-svn: 341114
* Refactor Addlibgcc to make the when and what logic more straightfoward.Sterling Augustine2018-08-301-12/+30
| | | | | | | No functional change. A forthcoming change will add support for -shared-libgcc. llvm-svn: 341107
* Add missing -Wc++11-compat / -Wc++14-compat warnings for:Richard Smith2018-08-302-11/+29
| | | | | | | | * generic lambdas * return type deduction * class template argument deduction llvm-svn: 341098
* [OPENMP] Fix PR38710: static functions are not emitted as implicitlyAlexey Bataev2018-08-303-19/+23
| | | | | | | | | 'declare target'. All the functions, referenced in implicit|explicit target regions must be emitted during code emission for the device. llvm-svn: 341093
* [analyzer] InnerPointerChecker: Fix a segfault when checking symbolic strings.Artem Dergachev2018-08-301-0/+3
| | | | | | | | | | Return value of dyn_cast_or_null should be checked before use. Otherwise we may put a null pointer into the map as a key and eventually crash in checkDeadSymbols. Differential Revision: https://reviews.llvm.org/D51385 llvm-svn: 341092
* [libFuzzer] Port to WindowsMatt Morehouse2018-08-301-0/+13
| | | | | | | | | | | | | | | | | | | | Summary: Port libFuzzer to windows-msvc. This patch allows libFuzzer targets to be built and run on Windows, using -fsanitize=fuzzer and/or fsanitize=fuzzer-no-link. It allows these forms of coverage instrumentation to work on Windows as well. It does not fix all issues, such as those with -fsanitize-coverage=stack-depth, which is not usable on Windows as of this patch. It also does not fix any libFuzzer integration tests. Nearly all of them fail to compile, fixing them will come in a later patch, so libFuzzer tests are disabled on Windows until them. Patch By: metzman Reviewers: morehouse, rnk Reviewed By: morehouse, rnk Subscribers: #sanitizers, delcypher, morehouse, kcc, eraman Differential Revision: https://reviews.llvm.org/D51022 llvm-svn: 341082
* [HIP] Add -fvisibility hidden option to clangYaxun Liu2018-08-301-0/+6
| | | | | | | | | | AMDGPU target need -fvisibility hidden option for clang to work around a limitation of no PLT support, otherwise there is compilation error at -O0. Differential Revision: https://reviews.llvm.org/D51434 llvm-svn: 341077
OpenPOWER on IntegriCloud