summaryrefslogtreecommitdiffstats
path: root/clang/lib/Basic/Targets/TCE.cpp
diff options
context:
space:
mode:
authorErich Keane <erich.keane@intel.com>2017-07-21 22:37:03 +0000
committerErich Keane <erich.keane@intel.com>2017-07-21 22:37:03 +0000
commitebba592682084a6c9d31a213dd2e0c6a680197b6 (patch)
treeff710b9575c5190c54f136ebb0c8375f97f6ba43 /clang/lib/Basic/Targets/TCE.cpp
parentb8cc0544d258962ba32c2554e054d69996fe1f84 (diff)
downloadbcm5719-llvm-ebba592682084a6c9d31a213dd2e0c6a680197b6.tar.gz
bcm5719-llvm-ebba592682084a6c9d31a213dd2e0c6a680197b6.zip
Break up Targets.cpp into a header/impl pair per target type[NFCI]
Targets.cpp is getting unwieldy, and even minor changes cause the entire thing to cause recompilation for everyone. This patch bites the bullet and breaks it up into a number of files. I tended to keep function definitions in the class declaration unless it caused additional includes to be necessary. In those cases, I pulled it over into the .cpp file. Content is copy/paste for the most part, besides includes/format/etc. Differential Revision: https://reviews.llvm.org/D35701 llvm-svn: 308791
Diffstat (limited to 'clang/lib/Basic/Targets/TCE.cpp')
-rw-r--r--clang/lib/Basic/Targets/TCE.cpp35
1 files changed, 35 insertions, 0 deletions
diff --git a/clang/lib/Basic/Targets/TCE.cpp b/clang/lib/Basic/Targets/TCE.cpp
new file mode 100644
index 00000000000..bf89c1dc549
--- /dev/null
+++ b/clang/lib/Basic/Targets/TCE.cpp
@@ -0,0 +1,35 @@
+//===--- TCE.cpp - Implement TCE target feature support -------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+//
+// This file implements TCE TargetInfo objects.
+//
+//===----------------------------------------------------------------------===//
+
+#include "TCE.h"
+#include "Targets.h"
+#include "clang/Basic/MacroBuilder.h"
+
+using namespace clang;
+using namespace clang::targets;
+
+void TCETargetInfo::getTargetDefines(const LangOptions &Opts,
+ MacroBuilder &Builder) const {
+ DefineStd(Builder, "tce", Opts);
+ Builder.defineMacro("__TCE__");
+ Builder.defineMacro("__TCE_V1__");
+}
+
+void TCELETargetInfo::getTargetDefines(const LangOptions &Opts,
+ MacroBuilder &Builder) const {
+ DefineStd(Builder, "tcele", Opts);
+ Builder.defineMacro("__TCE__");
+ Builder.defineMacro("__TCE_V1__");
+ Builder.defineMacro("__TCELE__");
+ Builder.defineMacro("__TCELE_V1__");
+}
OpenPOWER on IntegriCloud