summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend/InitPreprocessor.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Add -std=c++20 flag, replace C++2a with C++20 throughout the ClangRichard Smith2020-02-191-17/+27
| | | | | | | | | | | | | user interface and documentation, and update __cplusplus for C++20. WG21 considers the C++20 standard to be finished (even though it still has some more steps to pass through in the ISO process). The old flag names are accepted for compatibility, as usual, and we still have lots of references to C++2a in comments and identifiers; those can be cleaned up separately. (cherry picked from commit 24ad121582454e625bdad125c90d9ac0dae948c8)
* [Concepts] Deprecate -fconcepts-ts, enable Concepts under -std=c++2aSaar Raz2020-01-241-6/+1
| | | | | | | | | Now with concepts support merged and mostly complete, we do not need -fconcepts-ts (which was also misleading as we were not implementing the TS) and can enable concepts features under C++2a. A warning will be generated if users still attempt to use -fconcepts-ts. (cherry picked from commit 67c608a9695496cfc9d3fdf9d0b12b554ac6b4df)
* [Concepts] Requires ExpressionsSaar Raz2020-01-241-0/+3
| | | | | | | | | | Implement support for C++2a requires-expressions. Re-commit after compilation failure on some platforms due to alignment issues with PointerIntPair. Differential Revision: https://reviews.llvm.org/D50360 (cherry picked from commit a0f50d731639350c7a79f140f026c27a18215531)
* Fix crash on init-capture packs where the type of the initializer is ↵Richard Smith2019-12-191-1/+2
| | | | non-dependent.
* Implement latest C++ feature test macro recommendations.Richard Smith2019-12-191-4/+14
| | | | | | | | We don't yet advertise init capture packs, because I found some bugs while testing it. We reject-valid and then crash on both of these: template<int ...a> auto x = [...y = a] {}; template<int ...a> auto x = [y = a...] {};
* Mark the major papers for C++20 consistent comparisons as "done", andRichard Smith2019-12-151-0/+1
| | | | start publishing the corresponding feature-test macro.
* [SYCL] Add support for auxiliary triple specification to FrontendAlexey Bader2019-12-111-1/+2
| | | | | | | | | | | | | | | | | Summary: Add host predefined macros to compilation for SYCL device, which is required for pre-processing host specific includes (e.g. system headers). Reviewers: ABataev, jdoerfert Subscribers: ebevhan, Anastasia, cfe-commits, keryell, Naghasan, Fznamznon Tags: #clang Differential Revision: https://reviews.llvm.org/D71286 Signed-off-by: Alexey Bader <alexey.bader@intel.com>
* Prune include of DataLayout.h from include/clang/Basic/TargetInfo.h. NFCBjorn Pettersson2019-10-211-0/+1
| | | | | | | | | | | | | | | | | | | | | | | Summary: Use a forward declaration of DataLayout instead of including DataLayout.h in clangs TargetInfo.h. This reduces include dependencies toward DataLayout.h (and other headers such as DerivedTypes.h, Type.h that is included by DataLayout.h). Needed to move implemantation of TargetInfo::resetDataLayout from TargetInfo.h to TargetInfo.cpp. Reviewers: rnk Reviewed By: rnk Subscribers: jvesely, nhaehnle, cfe-commits, llvm-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D69262 llvm-svn: 375438
* [clang-scan-deps] Support for clang --analyze in clang-scan-depsJan Korous2019-10-141-4/+5
| | | | | | | | | | | | | | | The goal is to have 100% fidelity in clang-scan-deps behavior when --analyze is present in compilation command. At the same time I don't want to break clang-tidy which expects __static_analyzer__ macro defined as built-in. I introduce new cc1 options (-setup-static-analyzer) that controls the macro definition and is conditionally set in driver. Differential Revision: https://reviews.llvm.org/D68093 llvm-svn: 374815
* Add -fgnuc-version= to control __GNUC__ and other GCC macrosReid Kleckner2019-10-101-14/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I noticed that compiling on Windows with -fno-ms-compatibility had the side effect of defining __GNUC__, along with __GNUG__, __GXX_RTTI__, and a number of other macros for GCC compatibility. This is undesirable and causes Chromium to do things like mix __attribute__ and __declspec, which doesn't work. We should have a positive language option to enable GCC compatibility features so that we can experiment with -fno-ms-compatibility on Windows. This change adds -fgnuc-version= to be that option. My issue aside, users have, for a long time, reported that __GNUC__ doesn't match their expectations in one way or another. We have encouraged users to migrate code away from this macro, but new code continues to be written assuming a GCC-only environment. There's really nothing we can do to stop that. By adding this flag, we can allow them to choose their own adventure with __GNUC__. This overlaps a bit with the "GNUMode" language option from -std=gnu*. The gnu language mode tends to enable non-conforming behaviors that we'd rather not enable by default, but the we want to set things like __GXX_RTTI__ by default, so I've kept these separate. Helps address PR42817 Reviewed By: hans, nickdesaulniers, MaskRay Differential Revision: https://reviews.llvm.org/D68055 llvm-svn: 374449
* Mark P0784R7 as complete and start defining its feature-test macro.Richard Smith2019-10-031-0/+1
| | | | | | | Note that this only covers the language side of this feature. (The library side has its own feature test macro.) llvm-svn: 373548
* Revert "[static analyzer] Define __clang_analyzer__ macro in driver"Jan Korous2019-09-241-0/+4
| | | | | | This reverts commit fbd13570b0d5f92ef2cf6bcfe7cc2f6178500187. llvm-svn: 372687
* [static analyzer] Define __clang_analyzer__ macro in driverJan Korous2019-09-241-4/+0
| | | | | | Differential Revision: https://reviews.llvm.org/D67938 llvm-svn: 372679
* [c++20] P1143R2: Add support for the C++20 'constinit' keyword.Richard Smith2019-09-041-1/+3
| | | | | | | | | | | | | This is mostly the same as the [[clang::require_constant_initialization]] attribute, but has a couple of additional syntactic and semantic restrictions. In passing, I added a warning for the attribute form being added after we have already seen the initialization of the variable (but before we see the definition); that case previously slipped between the cracks and the attribute was silently ignored. llvm-svn: 370972
* Implement P1668R1Erich Keane2019-08-191-0/+1
| | | | | | | Allow inline assembly statements in unexecuted branches of constexpr functions. llvm-svn: 369281
* [OpenCL] Fix lang mode predefined macros for C++ mode.Anastasia Stulova2019-08-121-9/+9
| | | | | | | | | | | | | In C++ mode we should only avoid adding __OPENCL_C_VERSION__, all other predefined macros about the language mode are still valid. This change also fixes the language version check in the headers accordingly. Differential Revision: https://reviews.llvm.org/D65941 llvm-svn: 368552
* [OPENMP]Set default version to OpenMP 4.5.Alexey Bataev2019-08-071-5/+5
| | | | | | | Since clang fully supports OpenMP 4.5, set the default version to 4.5 instead of 3.1. llvm-svn: 368172
* [OPENMP]Add standard macro value _OPENMP for OpenMP 5.0.Alexey Bataev2019-08-071-0/+3
| | | | | | | | | According to the OpenMP standard, compiler must define _OPENMP macro, which has value in format yyyymm, where yyyy is the year of the standard and mm is the month of the standard. For OpenMP 5.0 this value must be set to 201811. llvm-svn: 368170
* [OpenCL] Update comments/diagnostics to refer to C++ for OpenCLAnastasia Stulova2019-07-181-1/+1
| | | | | | | | | Clang doesn't implement OpenCL C++, change the comments to reflect that. Differential Revision: https://reviews.llvm.org/D64867 llvm-svn: 366421
* Update __VERSION__ to remove the hardcoded 4.2.1 versionSylvestre Ledru2019-07-151-4/+3
| | | | | | | | | | | | | | | | | | Summary: Just like in https://reviews.llvm.org/D56803 for -dumpversion Reviewers: rnk Reviewed By: rnk Subscribers: dexonsmith, lebedev.ri, hubert.reinterpretcast, xbolva00, fedor.sergeev, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D63048 llvm-svn: 366091
* This reverts commit 632a36bfcfc8273c1861f04ff6758d863c47c784.Sylvestre Ledru2019-07-131-0/+6
| | | | | | | | | | | | Some targets such as Python 2.7.16 still use VERSION in their builds. Without VERSION defined, the source code has syntax errors. Reverting as it will probably break many other things. Noticed by Sterling Augustine llvm-svn: 365992
* Remove __VERSION__Sylvestre Ledru2019-07-121-6/+0
| | | | | | | | | | | | | | | | | | | | Summary: It has been introduced in 2011 for gcc compat: https://github.com/llvm-mirror/clang/commit/ad1a4c6e89594e704775ddb6b036ac982fd68cad it is probably time to remove it Reviewers: rnk, dexonsmith Reviewed By: rnk Subscribers: dschuff, aheejin, fedor.sergeev, arphaman, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D64062 llvm-svn: 365962
* Fix the predefined exponent limit macros for the 16-bit IEEE format.John McCall2019-05-311-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | The magnitude range of normalized _Float16 is 2^-14 (~6e-5) to (2-2^-10)*2^15 (65504). You might think, then, that the code is correct to defne FLT16_MIN_EXP and FLT16_MAX_EXP to be -14 and 15 respectively. However, for some reason the C specification actually specifies a bias for these macros: C11 5.2.4.2.2: - minimum negative integer such that FLT_RADIX raised to one less than that power is a normalized floating-point number, e_min: FLT_MIN_EXP DBL_MIN_EXP LDBL_MIN_EXP - maximum integer such that FLT_RADIX raised to one less than that power is a representable finite floating-point number, e_max: FLT_MAX_EXP DBL_MAX_EXP LDBL_MAX_EXP FLT16_MIN_EXP and FLT16_MAX_EXP should clearly be biased the same way, and other compilers do in fact do so, as do our OpenCL headers for `half`. Additionally, FLT16_MIN_10_EXP is just wrong. llvm-svn: 362183
* [SPIR] Simplified target checking.Anastasia Stulova2019-05-091-2/+1
| | | | | | | | | | Switched to Triple::isSPIR() helper to simplify code. Patch by kpet (Kevin Petit)! Differential revision: https://reviews.llvm.org/D61639 llvm-svn: 360325
* [c++20] Add support for explicit(bool), as described in P0892R2.Richard Smith2019-05-091-0/+2
| | | | | | | | Patch by Tyker! Differential Revision: https://reviews.llvm.org/D60934 llvm-svn: 360311
* Revert r359949 "[clang] adding explicit(bool) from c++2a"Hans Wennborg2019-05-061-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This caused Clang to start erroring on the following: struct S {   template <typename = int> explicit S(); }; struct T : S {}; struct U : T {   U(); }; U::U() {} $ clang -c /tmp/x.cc /tmp/x.cc:10:4: error: call to implicitly-deleted default constructor of 'T' U::U() {}    ^ /tmp/x.cc:5:12: note: default constructor of 'T' is implicitly deleted because base class 'S' has no default constructor struct T : S {};            ^ 1 error generated. See discussion on the cfe-commits email thread. This also reverts the follow-ups r359966 and r359968. > this patch adds support for the explicit bool specifier. > > Changes: > - The parsing for the explicit(bool) specifier was added in ParseDecl.cpp. > - The storage of the explicit specifier was changed. the explicit specifier was stored as a boolean value in the FunctionDeclBitfields and in the DeclSpec class. now it is stored as a PointerIntPair<Expr*, 2> with a flag and a potential expression in CXXConstructorDecl, CXXDeductionGuideDecl, CXXConversionDecl and in the DeclSpec class. > - Following the AST change, Serialization, ASTMatchers, ASTComparator and ASTPrinter were adapted. > - Template instantiation was adapted to instantiate the potential expressions of the explicit(bool) specifier When instantiating their associated declaration. > - The Add*Candidate functions were adapted, they now take a Boolean indicating if the context allowing explicit constructor or conversion function and this boolean is used to remove invalid overloads that required template instantiation to be detected. > - Test for Semantic and Serialization were added. > > This patch is not yet complete. I still need to check that interaction with CTAD and deduction guides is correct. and add more tests for AST operations. But I wanted first feedback. > Perhaps this patch should be spited in smaller patches, but making each patch testable as a standalone may be tricky. > > Patch by Tyker > > Differential Revision: https://reviews.llvm.org/D60934 llvm-svn: 360024
* [clang] adding explicit(bool) from c++2aNicolas Lesser2019-05-041-0/+2
| | | | | | | | | | | | | | | | | | | | | this patch adds support for the explicit bool specifier. Changes: - The parsing for the explicit(bool) specifier was added in ParseDecl.cpp. - The storage of the explicit specifier was changed. the explicit specifier was stored as a boolean value in the FunctionDeclBitfields and in the DeclSpec class. now it is stored as a PointerIntPair<Expr*, 2> with a flag and a potential expression in CXXConstructorDecl, CXXDeductionGuideDecl, CXXConversionDecl and in the DeclSpec class. - Following the AST change, Serialization, ASTMatchers, ASTComparator and ASTPrinter were adapted. - Template instantiation was adapted to instantiate the potential expressions of the explicit(bool) specifier When instantiating their associated declaration. - The Add*Candidate functions were adapted, they now take a Boolean indicating if the context allowing explicit constructor or conversion function and this boolean is used to remove invalid overloads that required template instantiation to be detected. - Test for Semantic and Serialization were added. This patch is not yet complete. I still need to check that interaction with CTAD and deduction guides is correct. and add more tests for AST operations. But I wanted first feedback. Perhaps this patch should be spited in smaller patches, but making each patch testable as a standalone may be tricky. Patch by Tyker Differential Revision: https://reviews.llvm.org/D60934 llvm-svn: 359949
* [SYCL] Add clang front-end option to enable SYCL device compilation flow.Alexey Bader2019-02-251-0/+6
| | | | | | Patch by Mariya Podchishchaeva <mariya.podchishchaeva@intel.com> llvm-svn: 354773
* Enable coroutines under -std=c++2a.Richard Smith2019-02-231-1/+1
| | | | llvm-svn: 354736
* Make predefined FLT16 macros conditional on support for the typeNemanja Ivanovic2019-02-201-1/+2
| | | | | | | | | | | | We unconditionally predefine these macros. However, they may be used to determine if the type is supported. In that case, there are unnecessary failures to compile the code. This is the proposed fix for https://bugs.llvm.org/show_bug.cgi?id=40559 Differential revision: https://reviews.llvm.org/D57577 llvm-svn: 354512
* [OpenCL][PR40603] In C++ preserve compatibility with OpenCL C v2.0Anastasia Stulova2019-02-071-4/+3
| | | | | | | | | | Valid OpenCL C code should still compile in C++ mode. This change enables extensions and OpenCL types. Differential Revision: https://reviews.llvm.org/D57824 llvm-svn: 353431
* Update the file headers across all of the LLVM projects in the monorepoChandler Carruth2019-01-191-4/+3
| | | | | | | | | | | | | | | | | to reflect the new license. We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach. Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository. llvm-svn: 351636
* Implementation Feature Test Macros for P0722R3Chris Kennelly2019-01-111-0/+1
| | | | | | | | | | | | | | | | | Summary: P1353R0, adopted in San Diego, specified an implementation feature test macro for destroying delete (P0722R3). The implementation of the feature (https://reviews.llvm.org/rL315662) is not guarded behind a flag, so the macro is not conditional on language version. Reviewers: rsmith Reviewed By: rsmith Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D55741 llvm-svn: 350934
* PTH-- Remove feature entirely-Erich Keane2018-12-041-20/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When debugging a boost build with a modified version of Clang, I discovered that the PTH implementation stores TokenKind in 8 bits. However, we currently have 368 TokenKinds. The result is that the value gets truncated and the wrong token gets picked up when including PTH files. It seems that this will go wrong every time someone uses a token that uses the 9th bit. Upon asking on IRC, it was brought up that this was a highly experimental features that was considered a failure. I discovered via googling that BoostBuild (mostly Boost.Math) is the only user of this feature, using the CC1 flag directly. I believe that this can be transferred over to normal PCH with minimal effort: https://github.com/boostorg/build/issues/367 Based on advice on IRC and research showing that this is a nearly completely unused feature, this patch removes it entirely. Note: I considered leaving the build-flags in place and making them emit an error/warning, however since I've basically identified and warned the only user, it seemed better to just remove them. Differential Revision: https://reviews.llvm.org/D54547 Change-Id: If32744275ef1f585357bd6c1c813d96973c4d8d9 llvm-svn: 348266
* [c++20] Implement P0482R6: enable -fchar8_t by default in C++20 mode.Richard Smith2018-11-141-4/+4
| | | | | | | | | | | | | This unfortunately results in a substantial breaking change when switching to C++20, but it's not yet clear what / how much we should do about that. We may want to add a compatibility conversion from u8 string literals to const char*, similar to how C++98 provided a compatibility conversion from string literals to non-const char*, but that's not handled by this patch. The feature can be disabled in C++20 mode with -fno-char8_t. llvm-svn: 346892
* NFC: Remove the ObjC1/ObjC2 distinction from clang (and related projects)Erik Pilkington2018-10-301-5/+5
| | | | | | | | | | We haven't supported compiling ObjC1 for a long time (and never will again), so there isn't any reason to keep these separate. This patch replaces LangOpts::ObjC1 and LangOpts::ObjC2 with LangOpts::ObjC. Differential revision: https://reviews.llvm.org/D53547 llvm-svn: 345637
* 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
* Add predefined macro __gnu_linux__ for proper aux-tripleYaxun Liu2018-08-291-0/+1
| | | | | | | | | | | | Clang predefine macro __linx__ for aux-triple with Linux OS but does not predefine macro __gnu_linux__. This causes some compilation error for certain applications, e.g. Eigen. This patch fixes that. Differential Revision: https://reviews.llvm.org/D51441 llvm-svn: 340967
* [OpenMP][NVPTX] Use appropriate _CALL_ELF macro when offloadingGheorghe-Teodor Bercea2018-08-271-1/+6
| | | | | | | | | | | | | | Summary: When offloading to a device and using the powerpc64le version of the auxiliary triple, the _CALL_ELF macro is not set correctly to 2 resulting in the attempt to include a header that does not exist. This patch fixes this problem. Reviewers: Hahnfeld, ABataev, caomhin Reviewed By: Hahnfeld Subscribers: guansong, cfe-commits Differential Revision: https://reviews.llvm.org/D51312 llvm-svn: 340772
* [CUDA/OpenMP] Define only some host macros during device compilationJonas Hahnfeld2018-08-251-6/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | When compiling CUDA or OpenMP device code Clang parses header files that expect certain predefined macros from the host architecture. To make this work the compiler passes the host triple via the -aux-triple argument and (until now) pulls in all macros for that "auxiliary triple" unconditionally. However this results in defines like __SSE_MATH__ that will trigger inline assembly making use of the "advertised" target features. See the discussion of D47849 and PR38464 for a detailed explanation of the encountered problems. Instead of blacklisting "known bad" examples this patch starts adding defines that are needed for certain headers like bits/wordsize.h and bits/mathinline.h. The disadvantage of this approach is that it decouples the definitions from their target toolchain. However in my opinion it's more important to keep definitions for one header close together. For one this will include a clear documentation why these particular defines are needed. Furthermore it simplifies maintenance because adding defines for a new header or support for a new aux-triple only needs to touch one piece of code. Differential Revision: https://reviews.llvm.org/D50845 llvm-svn: 340681
* [Preprocessor] Allow libc++ to detect when aligned allocation is unavailable.Volodymyr Sapsai2018-08-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Libc++ needs to know when aligned allocation is supported by clang, but is otherwise unavailable at link time. Otherwise, libc++ will incorrectly end up generating calls to `__builtin_operator_new`/`__builtin_operator_delete` with alignment arguments. This patch implements the following changes: * The `__cpp_aligned_new` feature test macro to no longer be defined when aligned allocation is otherwise enabled but unavailable. * The Darwin driver no longer passes `-faligned-alloc-unavailable` when the user manually specifies `-faligned-allocation` or `-fno-aligned-allocation`. * Instead of a warning Clang now generates a hard error when an aligned allocation or deallocation function is referenced but unavailable. Patch by Eric Fiselier. Reviewers: rsmith, vsapsai, erik.pilkington, ahatanak, dexonsmith Reviewed By: rsmith Subscribers: Quuxplusone, cfe-commits Differential Revision: https://reviews.llvm.org/D45015 llvm-svn: 338934
* P0096R5, P0941R2: Update to match latest feature test macro specification.Richard Smith2018-06-141-49/+53
| | | | llvm-svn: 334677
* As discussed with SG10, bump version of __cpp_deduction_guides macro to ↵Richard Smith2018-05-301-1/+1
| | | | | | indicate support for P0620R0. llvm-svn: 333587
* Revert "Revert r332955 "GNUstep Objective-C ABI version 2""David Chisnall2018-05-221-0/+13
| | | | llvm-svn: 332963
* Revert r332955 "GNUstep Objective-C ABI version 2"Bjorn Pettersson2018-05-221-13/+0
| | | | | | | Reverted due to buildbot failures. Seems like isnumber() is some Apple addition to cctype. llvm-svn: 332957
* GNUstep Objective-C ABI version 2David Chisnall2018-05-221-0/+13
| | | | | | | | | | | | | | | | | | | | | Summary: This includes initial support for the (hopefully final) updated Objective-C ABI, developed here: https://github.com/davidchisnall/clang-gnustep-abi-2 It also includes some cleanups and refactoring from older GNU ABIs. The current version is ELF only, other formats to follow. Reviewers: rjmccall, DHowett-MSFT Reviewed By: rjmccall Subscribers: smeenai, cfe-commits Differential Revision: https://reviews.llvm.org/D46052 llvm-svn: 332950
* [OPENMP-SIMD] Fix PR37536: Fix definition of _OPENMP macro.Alexey Bataev2018-05-211-13/+15
| | | | | | | | if `-fopenmp-simd` is specified alone, `_OPENMP` macro should not be defined. If `-fopenmp-simd` is specified along with the `-fopenmp`, `_OPENMP` macro should be defined with the value `201511`. llvm-svn: 332852
* Remove \brief commands from doxygen comments.Adrian Prantl2018-05-091-2/+2
| | | | | | | | | | | | | | | | | | | This is similar to the LLVM change https://reviews.llvm.org/D46290. We've been running doxygen with the autobrief option for a couple of years now. This makes the \brief markers into our comments redundant. Since they are a visual distraction and we don't want to encourage more \brief markers in new code either, this patch removes them all. Patch produced by for i in $(git grep -l '\@brief'); do perl -pi -e 's/\@brief //g' $i & done for i in $(git grep -l '\\brief'); do perl -pi -e 's/\\brief //g' $i & done Differential Revision: https://reviews.llvm.org/D46320 llvm-svn: 331834
* Implement P0482R2, support for char8_t type.Richard Smith2018-05-011-0/+6
| | | | | | | | | | | | This is not yet part of any C++ working draft, and so is controlled by the flag -fchar8_t rather than a -std= flag. (The GCC implementation is controlled by a flag with the same name.) This implementation is experimental, and will be removed or revised substantially to match the proposal as it makes its way through the C++ committee. llvm-svn: 331244
* [HIP] Add predefined macros __HIPCC__ and __HIP_DEVICE_COMPILE__Yaxun Liu2018-04-251-2/+6
| | | | | | Differential Revision: https://reviews.llvm.org/D45441 llvm-svn: 330824
OpenPOWER on IntegriCloud