diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2017-04-20 21:20:51 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2017-04-20 21:20:51 +0000 |
commit | 583e75cce441388bc562fa225d23499261a0091e (patch) | |
tree | 5944a7c248d4a8c858db45abc3444eb69270a3c8 /lib/Basic | |
parent | 7442d6faa2719e4e7d33a7021c406c5a4facd74d (diff) | |
download | src-583e75cce441388bc562fa225d23499261a0091e.tar.gz src-583e75cce441388bc562fa225d23499261a0091e.zip |
Vendor import of clang trunk r300890:vendor/clang/clang-trunk-r300890
Notes
Notes:
svn path=/vendor/clang/dist/; revision=317220
svn path=/vendor/clang/clang-trunk-r300890/; revision=317221; tag=vendor/clang/clang-trunk-r300890
Diffstat (limited to 'lib/Basic')
-rw-r--r-- | lib/Basic/Attributes.cpp | 11 | ||||
-rw-r--r-- | lib/Basic/OpenMPKinds.cpp | 6 | ||||
-rw-r--r-- | lib/Basic/Targets.cpp | 9 |
3 files changed, 20 insertions, 6 deletions
diff --git a/lib/Basic/Attributes.cpp b/lib/Basic/Attributes.cpp index c215366fc398..b7570d03c85a 100644 --- a/lib/Basic/Attributes.cpp +++ b/lib/Basic/Attributes.cpp @@ -1,4 +1,5 @@ #include "clang/Basic/Attributes.h" +#include "clang/Basic/AttrSubjectMatchRules.h" #include "clang/Basic/IdentifierTable.h" #include "llvm/ADT/StringSwitch.h" using namespace clang; @@ -15,3 +16,13 @@ int clang::hasAttribute(AttrSyntax Syntax, const IdentifierInfo *Scope, return 0; } + +const char *attr::getSubjectMatchRuleSpelling(attr::SubjectMatchRule Rule) { + switch (Rule) { +#define ATTR_MATCH_RULE(NAME, SPELLING, IsAbstract) \ + case attr::NAME: \ + return SPELLING; +#include "clang/Basic/AttrSubMatchRulesList.inc" + } + llvm_unreachable("Invalid subject match rule"); +} diff --git a/lib/Basic/OpenMPKinds.cpp b/lib/Basic/OpenMPKinds.cpp index 5a8bb61eaadf..76a0e18c2d73 100644 --- a/lib/Basic/OpenMPKinds.cpp +++ b/lib/Basic/OpenMPKinds.cpp @@ -854,14 +854,10 @@ bool clang::isOpenMPTaskingDirective(OpenMPDirectiveKind Kind) { bool clang::isOpenMPLoopBoundSharingDirective(OpenMPDirectiveKind Kind) { return Kind == OMPD_distribute_parallel_for || Kind == OMPD_distribute_parallel_for_simd || - Kind == OMPD_distribute_simd || Kind == OMPD_teams_distribute || - Kind == OMPD_teams_distribute_simd || Kind == OMPD_teams_distribute_parallel_for_simd || Kind == OMPD_teams_distribute_parallel_for || - Kind == OMPD_target_teams_distribute || Kind == OMPD_target_teams_distribute_parallel_for || - Kind == OMPD_target_teams_distribute_parallel_for_simd || - Kind == OMPD_target_teams_distribute_simd; + Kind == OMPD_target_teams_distribute_parallel_for_simd; } void clang::getOpenMPCaptureRegions( diff --git a/lib/Basic/Targets.cpp b/lib/Basic/Targets.cpp index a457f6deee75..d7f1793e377c 100644 --- a/lib/Basic/Targets.cpp +++ b/lib/Basic/Targets.cpp @@ -5467,9 +5467,11 @@ public: Builder.defineMacro("__arm__"); // For bare-metal none-eabi. if (getTriple().getOS() == llvm::Triple::UnknownOS && - getTriple().getEnvironment() == llvm::Triple::EABI) + (getTriple().getEnvironment() == llvm::Triple::EABI || + getTriple().getEnvironment() == llvm::Triple::EABIHF)) Builder.defineMacro("__ELF__"); + // Target properties. Builder.defineMacro("__REGISTER_PREFIX__", ""); @@ -6118,6 +6120,11 @@ public: MacroBuilder &Builder) const override { // Target identification. Builder.defineMacro("__aarch64__"); + // For bare-metal none-eabi. + if (getTriple().getOS() == llvm::Triple::UnknownOS && + (getTriple().getEnvironment() == llvm::Triple::EABI || + getTriple().getEnvironment() == llvm::Triple::EABIHF)) + Builder.defineMacro("__ELF__"); // Target properties. Builder.defineMacro("_LP64"); |