summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* Merging r339210:Hans Wennborg2018-08-082-2/+19
| | | | | | | | | | | | ------------------------------------------------------------------------ r339210 | rsmith | 2018-08-08 02:42:42 +0200 (Wed, 08 Aug 2018) | 2 lines PR38286: Don't crash when attempting to define a constructor for an incomplete class template. ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_70@339236 91177308-0d34-0410-b5e6-96231b3b80d8
* Merging r339128:Hans Wennborg2018-08-081-34/+4
| | | | | | | | | | | | | | | | | | ------------------------------------------------------------------------ r339128 | theraven | 2018-08-07 14:02:46 +0200 (Tue, 07 Aug 2018) | 8 lines [objc-gnustep] Don't emit .guess ivar offset vars. These were intended to allow non-fragile and fragile ABI code to be mixed, as long as the fragile classes were higher up the hierarchy than the non-fragile ones. Unfortunately: - No one actually wants to do this. - Recent versions of Linux's run-time linker break it. ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_70@339233 91177308-0d34-0410-b5e6-96231b3b80d8
* Merging r339170:Hans Wennborg2018-08-081-0/+4
| | | | | | | | | | | | | | | ------------------------------------------------------------------------ r339170 | mstorsjo | 2018-08-07 22:02:40 +0200 (Tue, 07 Aug 2018) | 5 lines [Headers] Expand _Unwind_Exception for SEH on MinGW/x86_64 This matches how GCC defines this struct. Differential Revision: https://reviews.llvm.org/D50380 ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_70@339220 91177308-0d34-0410-b5e6-96231b3b80d8
* Merging r338627:Hans Wennborg2018-08-071-1/+1
| | | | | | | | | | | | | | | | | ------------------------------------------------------------------------ r338627 | mgorny | 2018-08-01 22:38:22 +0200 (Wed, 01 Aug 2018) | 7 lines [test] Fix %hmaptool path for standalone builds Fix %hmaptool path to refer to clang_tools_dir instead of llvm_tools_dir, in order to fix standalone builds. The tool is built as part of clang, so it won't be found in installed LLVM tools. Differential Revision: https://reviews.llvm.org/D50156 ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_70@339102 91177308-0d34-0410-b5e6-96231b3b80d8
* Merging r338942:Hans Wennborg2018-08-063-12/+15
| | | | | | | | | | | ------------------------------------------------------------------------ r338942 | rsmith | 2018-08-04 03:02:00 +0200 (Sat, 04 Aug 2018) | 1 line [www] Update cxx_status and cxx_dr_status now that Clang 7 has branched. ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_70@339002 91177308-0d34-0410-b5e6-96231b3b80d8
* Release notes for write exec detection featuresDavid Carlier2018-08-063-1/+15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_70@338993 91177308-0d34-0410-b5e6-96231b3b80d8
* Release note for DWARF v5 supportPaul Robinson2018-08-031-0/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_70@338892 91177308-0d34-0410-b5e6-96231b3b80d8
* Merging r338749:Hans Wennborg2018-08-031-1/+5
| | | | | | | | | | | | | | | | ------------------------------------------------------------------------ r338749 | mstorsjo | 2018-08-02 20:12:08 +0200 (Thu, 02 Aug 2018) | 6 lines Work around more GCC miscompiles exposed by r338464. This is the same fix as in r338478, for another occurrance of the same pattern from r338464. See gcc.gnu.org/PR86769 for details of the bug. ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_70@338845 91177308-0d34-0410-b5e6-96231b3b80d8
* Merging r338553:Hans Wennborg2018-08-021-1/+1
| | | | | | | | | | | ------------------------------------------------------------------------ r338553 | filcab | 2018-08-01 15:41:42 +0200 (Wed, 01 Aug 2018) | 1 line Use a dummy target so the test passes when default target is for a toolchain implements useIntegratedAs() -> true ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_70@338688 91177308-0d34-0410-b5e6-96231b3b80d8
* Merging r338552:Hans Wennborg2018-08-021-1/+1
| | | | | | | | | | | ------------------------------------------------------------------------ r338552 | filcab | 2018-08-01 15:41:11 +0200 (Wed, 01 Aug 2018) | 1 line Add REQUIRES: native to a test that assumes it ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_70@338687 91177308-0d34-0410-b5e6-96231b3b80d8
* Merging r338602:Hans Wennborg2018-08-025-375/+54
| | | | | | | | | | | | | | | | | | | | | ------------------------------------------------------------------------ r338602 | hans | 2018-08-01 19:51:23 +0200 (Wed, 01 Aug 2018) | 11 lines Revert r338455 "[constexpr] Support for constant evaluation of __builtin_memcpy and __builtin_memmove (in non-type-punning cases)." It caused asserts during Chromium builds, see reply on the cfe-commits thread. > This is intended to permit libc++ to make std::copy etc constexpr > without sacrificing the optimization that uses memcpy on > trivially-copyable types. > > __builtin_strcpy and __builtin_wcscpy are not handled by this change. > They'd be straightforward to add, but we haven't encountered a need for > them just yet. ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_70@338674 91177308-0d34-0410-b5e6-96231b3b80d8
* Generate docs/AttributeReference.rstHans Wennborg2018-08-011-6/+3892
| | | | | | | | | $ bin/clang-tblgen -gen-attr-docs -I../cfe.src/include \ ../cfe.src/include/clang/Basic/Attr.td \ -o ../cfe.src/docs/AttributeReference.rst git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_70@338575 91177308-0d34-0410-b5e6-96231b3b80d8
* Regenerate ClangCommandLineReference.rstHans Wennborg2018-08-011-95/+165
| | | | | | | | | | $ bin/clang-tblgen -gen-opt-docs -I../cfe.src/include \ -I../cfe.src/include/clang/Driver -I../llvm.src/include \ ../cfe.src/include/clang/Driver/ClangOptionDocs.td \ -o ../cfe.src/docs/ClangCommandLineReference.rst git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_70@338574 91177308-0d34-0410-b5e6-96231b3b80d8
* Creating release_70 branch off revision 338536Hans Wennborg2018-08-010-0/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_70@338539 91177308-0d34-0410-b5e6-96231b3b80d8
* Make test/Frontend/clang-abi-compat.cpp pass when the version goes to 8Hans Wennborg2018-08-011-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@338534 91177308-0d34-0410-b5e6-96231b3b80d8
* UserManual: Update with the latest clang-cl flagsHans Wennborg2018-08-011-0/+21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@338528 91177308-0d34-0410-b5e6-96231b3b80d8
* [AArch64][ARM] Add Armv8.4-A testsSjoerd Meijer2018-08-013-0/+126
| | | | | | | | | | This adds tests for Armv8.4-A, and also some v8.2 and v8.3 tests that were missing. Differential Revision: https://reviews.llvm.org/D50068 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@338525 91177308-0d34-0410-b5e6-96231b3b80d8
* [clang-format] Add some text proto functions to Google styleKrasimir Georgiev2018-08-011-0/+2
| | | | | | | | | | | | | | Summary: Adds 2 functions taking a text proto argument. Reviewers: djasper, klimek Reviewed By: djasper Subscribers: acoomans, cfe-commits Differential Revision: https://reviews.llvm.org/D50132 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@338524 91177308-0d34-0410-b5e6-96231b3b80d8
* wrap to 80 cols, no behavior changeNico Weber2018-08-011-7/+9
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@338520 91177308-0d34-0410-b5e6-96231b3b80d8
* [clang-format] Add @private to the list of jsdoc annotationsKrasimir Georgiev2018-08-011-1/+1
| | | | | | | | | | | | Reviewers: mprobst Reviewed By: mprobst Subscribers: acoomans, cfe-commits Differential Revision: https://reviews.llvm.org/D50138 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@338519 91177308-0d34-0410-b5e6-96231b3b80d8
* Add missing semicolon.Simon Pilgrim2018-08-011-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@338510 91177308-0d34-0410-b5e6-96231b3b80d8
* Replace 'FALL-THROUGH' comment with LLVM_FALLTHROUGH to silence warning. NFCI.Simon Pilgrim2018-08-011-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@338508 91177308-0d34-0410-b5e6-96231b3b80d8
* [Modules] Do not emit relocation error when -fno-validate-pch is setYuka Takahashi2018-08-012-3/+10
| | | | | | | | | | | | Summary: Clang emits error when implicit modules was relocated from the first build directory. However this was biting our usecase where we copy the contents of build directory to another directory in order to distribute. Differential Revision: https://reviews.llvm.org/D49852 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@338503 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix "not all control paths return a value" MSVC warning.Simon Pilgrim2018-08-011-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@338502 91177308-0d34-0410-b5e6-96231b3b80d8
* [AST] CastExpr: BasePathSize is not large enough.Roman Lebedev2018-08-017-28/+148
| | | | | | | | | | | | | | | | | | | | | | | | Summary: rC337815 / D49508 had to cannibalize one bit of `CastExprBitfields::BasePathSize` in order to squeeze `PartOfExplicitCast` boolean. That reduced the maximal value of `PartOfExplicitCast` from 9 bits (~512) down to 8 bits (~256). Apparently, that mattered. Too bad there weren't any tests. It caused [[ https://bugs.llvm.org/show_bug.cgi?id=38356 | PR38356 ]]. So we need to increase `PartOfExplicitCast` back at least to 9 bits, or a bit more. For obvious reasons, we can't do that in `CastExprBitfields` - that would blow up the size of every `Expr`. So we need to either just add a variable into the `CastExpr` (as done here), or use `llvm::TrailingObjects`. The latter does not seem to be straight-forward. Perhaps, that needs to be done not for the `CastExpr` itself, but for all of it's `final` children. Reviewers: rjmccall, rsmith, erichkeane Reviewed By: rjmccall Subscribers: bricci, hans, cfe-commits, waddlesplash Differential Revision: https://reviews.llvm.org/D50050 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@338489 91177308-0d34-0410-b5e6-96231b3b80d8
* [OpenEmbedded] Explicitly specify -rtlib in testsPetr Hosek2018-08-011-2/+2
| | | | | | | | | | | Tests added in r338294 implicitly assume that libgcc is the runtime library, but that's not the case when the user configures Clang to use compiler-rt in which case these tests will break. Explicitly request libgcc when invoking clang in these tests to avoid that. Differential Revision: https://reviews.llvm.org/D50123 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@338482 91177308-0d34-0410-b5e6-96231b3b80d8
* Work around GCC miscompile exposed by r338464.Richard Smith2018-08-011-2/+5
| | | | | | | See gcc.gnu.org/PR86769 for details of the bug. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@338478 91177308-0d34-0410-b5e6-96231b3b80d8
* [analyzer] CallEvent: Add helper methods for obtaining the callee stack frame.Artem Dergachev2018-08-014-7/+119
| | | | | | | | | | | | | Newly added methods allow reasoning about the stack frame of the call (as opposed to the stack frame on which the call was made, which was always available) - obtain the stack frame context, obtain parameter regions - even if the call is not going to be (or was not) inlined, i.e. even if the analysis has never actually entered the stack frame. Differential Revision: https://reviews.llvm.org/D49715 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@338474 91177308-0d34-0410-b5e6-96231b3b80d8
* Speculative fix for buildbot failures after r338464.Richard Smith2018-08-011-1/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@338473 91177308-0d34-0410-b5e6-96231b3b80d8
* AMDGPU: Add clamp bit to dot builtinsKonstantin Zhuravlyov2018-08-014-28/+83
| | | | | | | Differential Revision: https://reviews.llvm.org/D50011 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@338471 91177308-0d34-0410-b5e6-96231b3b80d8
* Avoid exposing name for range-based for '__range' variables in lifetime ↵Richard Smith2018-08-013-9/+13
| | | | | | warnings. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@338467 91177308-0d34-0410-b5e6-96231b3b80d8
* [P0936R0] add [[clang::lifetimebound]] attributeRichard Smith2018-08-0112-77/+383
| | | | | | | | | | | | | | | | | | | | This patch adds support for a new attribute, [[clang::lifetimebound]], that indicates that the lifetime of a function result is related to one of the function arguments. When walking an initializer to make sure that the lifetime of the initial value is at least as long as the lifetime of the initialized object, we step through parameters (including the implicit object parameter of a non-static member function) that are marked with this attribute. There's nowhere to write an attribute on the implicit object parameter, so in lieu of that, it may be applied to a function type (where it appears immediately after the cv-qualifiers and ref-qualifier, which is as close to a declaration of the implicit object parameter as we have). I'm currently modeling this in the AST as the attribute appertaining to the function type. Differential Revision: https://reviews.llvm.org/D49922 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@338464 91177308-0d34-0410-b5e6-96231b3b80d8
* [constexpr] Support for constant evaluation of __builtin_memcpy andRichard Smith2018-07-315-54/+375
| | | | | | | | | | | | | | __builtin_memmove (in non-type-punning cases). This is intended to permit libc++ to make std::copy etc constexpr without sacrificing the optimization that uses memcpy on trivially-copyable types. __builtin_strcpy and __builtin_wcscpy are not handled by this change. They'd be straightforward to add, but we haven't encountered a need for them just yet. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@338455 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r337635 "[Driver] Sanitizer support based on runtime library presence"Reid Kleckner2018-07-3122-106/+42
| | | | | | | | This change causes issues with distributed build systems, which may only have compiler binaries without any runtime libraries. See discussion about this on https://reviews.llvm.org/D15225. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@338444 91177308-0d34-0410-b5e6-96231b3b80d8
* [analyzer] Fix eliding the same destructor twice due to buggy default arguments.Artem Dergachev2018-07-312-1/+17
| | | | | | | | | | | | Because of incomplete support for CXXDefaultArgExpr, we cannot yet commit to asserting that the same destructor won't be elided twice. Suppress the assertion failure for now. Proper support is still an open problem. Differential Revision: https://reviews.llvm.org/D49213 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@338441 91177308-0d34-0410-b5e6-96231b3b80d8
* [CFG] [analyzer] NFC: Enumerate construction context layer kinds.Artem Dergachev2018-07-315-310/+420
| | | | | | | | | | | | | | | This is a refactoring patch; no functional change intended. The common part of ConstructionContextLayer and ConstructedObjectKey is factored out into a new structure, ConstructionContextItem. Various sub-kinds of ConstructionContextItem are enumerated in order to provide richer information about construction contexts. Differential Revision: https://reviews.llvm.org/D49210. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@338439 91177308-0d34-0410-b5e6-96231b3b80d8
* [serialization] PR34728: Don't assume that only a suffix of templateRichard Smith2018-07-313-15/+60
| | | | | | | | | | | | | parameters can have default arguments. At least for function templates and class template partial specializations, it's possible for a template parameter with a default argument to be followed by a non-pack template parameter with no default argument, and this case was not properly handled here. Testcase by Steve O'Brien! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@338438 91177308-0d34-0410-b5e6-96231b3b80d8
* [CFG] [analyzer] Implement function argument construction contexts.Artem Dergachev2018-07-317-51/+152
| | | | | | | | | | | | | | | | | | | | | | | | | | | | In r330377 and r338425 we have already identified what constitutes function argument constructors and added stubs in order to prevent confusing them with other temporary object constructors. Now we implement a ConstructionContext sub-class to carry all the necessary information about the construction site, namely call expression and argument index. On the analyzer side, the patch interacts with the recently implemented pre-C++17 copy elision support in an interesting manner. If on the CFG side we didn't find a construction context for the elidable constructor, we build the CFG as if the elidable constructor is not elided, and the non-elided constructor within it is a simple temporary. But the same problem may occur in the analyzer: if the elidable constructor has a construction context but the analyzer doesn't implement such context yet, the analyzer should also try to skip copy elision and still inline the non-elided temporary constructor. This was implemented by adding a "roll back" mechanism: when elision fails, roll back the changes and proceed as if it's a simple temporary. The approach is wonky, but i'm fine with that as long as it's merely a defensive mechanism that should eventually go away once all construction contexts become supported. Differential Revision: https://reviews.llvm.org/D48681. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@338436 91177308-0d34-0410-b5e6-96231b3b80d8
* [analyzer] Move InnerPointerChecker out of alpha.Reka Kovacs2018-07-312-5/+5
| | | | | | Differential Revision: https://reviews.llvm.org/D49058 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@338433 91177308-0d34-0410-b5e6-96231b3b80d8
* [OpenCL] Forbid size dependent types used as kernel argumentsAlexey Sotkin2018-07-312-4/+72
| | | | | | | | | | | | | | | | | | | | | Summary: Size_t, intptr_t, uintptr_t and ptrdiff_t cannot be used as kernel arguments, according to OpenCL Specification s6.9k: The size in bytes of these types are implementation-defined and in addition can also be different for the OpenCL device and the host processor making it difficult to allocate buffer objects to be passed as arguments to a kernel declared as pointer to these types. Patch by: Andrew Savonichev Reviewers: Anastasia, yaxunl Subscribers: yaxunl, Anastasia, cfe-commits Differential Revision: https://reviews.llvm.org/D49725 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@338432 91177308-0d34-0410-b5e6-96231b3b80d8
* [OpenCL] Check for invalid kernel arguments in array typesAlexey Sotkin2018-07-312-5/+40
| | | | | | | | | | | | | | | | | Summary: OpenCL specification forbids use of several types as kernel arguments. This patch improves existing diagnostic to look through arrays. Patch by: Andrew Savonichev Reviewers: Anastasia, yaxunl Subscribers: yaxunl, Anastasia, cfe-commits Differential Revision: https://reviews.llvm.org/D49723 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@338427 91177308-0d34-0410-b5e6-96231b3b80d8
* [CFG] [analyzer] Add construction contexts for returning C++ objects in ObjC++.Artem Dergachev2018-07-314-39/+148
| | | | | | | | | | | | Like any normal funciton, Objective-C message can return a C++ object in Objective-C++. Such object would require a construction context. This patch, therefore, is an extension of r327343 onto Objective-C++. Differential Revision: https://reviews.llvm.org/D48608 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@338426 91177308-0d34-0410-b5e6-96231b3b80d8
* [CFG] [analyzer] Add stubs for constructor and message argument constructors.Artem Dergachev2018-07-316-12/+173
| | | | | | | | | | | | | | | | | | | CFG now correctly identifies construction context for temporaries constructed for the purpose of passing into a function as an argument. Such context is still not fully implemented because the information it provides is not rich enough: it doens't contain information about argument index. It will be addresssed later. This patch is an extension of r330377 to C++ construct-expressions and Objective-C message expressions which aren't call-expressions but require similar handling. C++ new-expressions with placement arguments still remain to be handled. Differential Revision: https://reviews.llvm.org/D49826 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@338425 91177308-0d34-0410-b5e6-96231b3b80d8
* [analyzer] Reuse some code in simplifySVal().Artem Dergachev2018-07-311-21/+22
| | | | | | | | | No functional change intended. Differential Revision: https://reviews.llvm.org/D49826 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@338422 91177308-0d34-0410-b5e6-96231b3b80d8
* [analyzer] Don't try to simplify mixed Loc/NonLoc expressions.Artem Dergachev2018-07-312-0/+18
| | | | | | | | | | | | | | | | | | | This fix is similar to r337769 and addresses a regression caused by r337167. When an operation between a nonloc::LocAsInteger and a non-pointer symbol is performed, the LocAsInteger-specific part of information is lost. When the non-pointer symbol is collapsing into a constant, we cannot easily re-evaluate the result, because we need to recover the missing LocAsInteger-specific information (eg., integer type, or the very fact that this pointer was at some point converted to an integer). Add one more defensive check to prevent crashes on trying to simplify a SymSymExpr with different Loc-ness of operands. Differential Revision: git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@338420 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix riscv32-toolchain.c with CLANG_DEFAULT_CXX_STDLIBJonas Hahnfeld2018-07-311-1/+1
| | | | | | | This configuration was (again) broken after r338385 because Clang might be configured to always use libc++. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@338414 91177308-0d34-0410-b5e6-96231b3b80d8
* [OPENMP] Change linkage of offloading symbols to support droppingAlexey Bataev2018-07-3132-64/+66
| | | | | | | | offload targets. Changed the linkage of omp_offloading.img_start.<triple> and omp_offloading.img_end.<triple> symbols from external to external weak to allow dropping of some targets during linking. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@338413 91177308-0d34-0410-b5e6-96231b3b80d8
* [COFF, ARM64] Enable SEH for ARM64 WindowsMandeep Singh Grang2018-07-313-1/+17
| | | | | | | | | | | | Reviewers: rnk, mstorsjo, ssijaric, haripul, TomTan Reviewed By: rnk Subscribers: kristof.beyls, chrib, cfe-commits Differential Revision: https://reviews.llvm.org/D50029 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@338405 91177308-0d34-0410-b5e6-96231b3b80d8
* [OPENMP] Prevent problems with linking of the static variables.Alexey Bataev2018-07-314-26/+19
| | | | | | No need to change the linkage, we can avoid the problem using special variable. That points to the original variable and, thus, prevent some of the optimizations that might break the compilation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@338399 91177308-0d34-0410-b5e6-96231b3b80d8
* [RISCV] Add driver for riscv32-unknown-elf baremetal targetDavid Bolvansky2018-07-3111-1/+213
| | | | | | | | | | | | | | | | | Summary: This patch adds a driver for the baremetal RISC-V target (i.e. riscv32-unknown-elf). For reference, D39963 added basic target info and added support for riscv32-linux-unknown-elf. Patch by: asb (Alex Bradbury) Reviewers: efriedma, phosek, apazos, espindola, mgrang Reviewed By: mgrang Subscribers: jrtc27, rogfer01, MartinMosbeck, brucehoult, the_o, rkruppe, emaste, mgorny, arichardson, rbar, johnrusso, simoncook, jordy.potman.lists, sabuasal, niosHD, kito-cheng, shiva0217, zzheng, edward-jones, mgrang, cfe-commits Differential Revision: https://reviews.llvm.org/D46822 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@338385 91177308-0d34-0410-b5e6-96231b3b80d8