[llvm-branch-commits] [clang] 043b898 - [LLVMARM-13] Add function for defining HighTec specific macros, call it from ARM targets.
Konstantin Schwarz via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Thu Sep 30 00:43:38 PDT 2021
Author: Konstantin Schwarz
Date: 2019-01-17T11:35:06+01:00
New Revision: 043b8986368f76ba8fa2c5e34db83537e8af6d47
URL: https://github.com/llvm/llvm-project/commit/043b8986368f76ba8fa2c5e34db83537e8af6d47
DIFF: https://github.com/llvm/llvm-project/commit/043b8986368f76ba8fa2c5e34db83537e8af6d47.diff
LOG: [LLVMARM-13] Add function for defining HighTec specific macros, call it from ARM targets.
Added:
Modified:
clang/lib/Basic/Targets.cpp
clang/lib/Basic/Targets.h
clang/lib/Basic/Targets/AArch64.cpp
clang/lib/Basic/Targets/ARM.cpp
Removed:
################################################################################
diff --git a/clang/lib/Basic/Targets.cpp b/clang/lib/Basic/Targets.cpp
index 1ef2fe3b81416..5ee68fd92ce2a 100644
--- a/clang/lib/Basic/Targets.cpp
+++ b/clang/lib/Basic/Targets.cpp
@@ -112,6 +112,10 @@ void addMinGWDefines(const llvm::Triple &Triple, const LangOptions &Opts,
addCygMingDefines(Opts, Builder);
}
+void addHighTecDefines(MacroBuilder &Builder) {
+ Builder.defineMacro("__HIGHTEC__");
+}
+
//===----------------------------------------------------------------------===//
// Driver code
//===----------------------------------------------------------------------===//
diff --git a/clang/lib/Basic/Targets.h b/clang/lib/Basic/Targets.h
index d450aa3f37ed6..3c31890c8e15b 100644
--- a/clang/lib/Basic/Targets.h
+++ b/clang/lib/Basic/Targets.h
@@ -46,6 +46,9 @@ void addMinGWDefines(const llvm::Triple &Triple, const clang::LangOptions &Opts,
LLVM_LIBRARY_VISIBILITY
void addCygMingDefines(const clang::LangOptions &Opts,
clang::MacroBuilder &Builder);
+
+LLVM_LIBRARY_VISIBILITY
+void addHighTecDefines(clang::MacroBuilder &Builder);
} // namespace targets
} // namespace clang
#endif // LLVM_CLANG_LIB_BASIC_TARGETS_H
diff --git a/clang/lib/Basic/Targets/AArch64.cpp b/clang/lib/Basic/Targets/AArch64.cpp
index 3444591ac5933..ddca8369b7423 100644
--- a/clang/lib/Basic/Targets/AArch64.cpp
+++ b/clang/lib/Basic/Targets/AArch64.cpp
@@ -211,6 +211,8 @@ void AArch64TargetInfo::getTargetDefines(const LangOptions &Opts,
Builder.defineMacro("__GCC_HAVE_SYNC_COMPARE_AND_SWAP_2");
Builder.defineMacro("__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4");
Builder.defineMacro("__GCC_HAVE_SYNC_COMPARE_AND_SWAP_8");
+
+ addHighTecDefines(Builder);
}
ArrayRef<Builtin::Info> AArch64TargetInfo::getTargetBuiltins() const {
diff --git a/clang/lib/Basic/Targets/ARM.cpp b/clang/lib/Basic/Targets/ARM.cpp
index 19fcc5abea97e..8d49f124c854a 100644
--- a/clang/lib/Basic/Targets/ARM.cpp
+++ b/clang/lib/Basic/Targets/ARM.cpp
@@ -752,6 +752,8 @@ void ARMTargetInfo::getTargetDefines(const LangOptions &Opts,
getTargetDefinesARMV82A(Opts, Builder);
break;
}
+
+ addHighTecDefines(Builder);
}
const Builtin::Info ARMTargetInfo::BuiltinInfo[] = {
More information about the llvm-branch-commits
mailing list