diff options
author | Erich Keane <erich.keane@intel.com> | 2017-07-21 22:37:03 +0000 |
---|---|---|
committer | Erich Keane <erich.keane@intel.com> | 2017-07-21 22:37:03 +0000 |
commit | ebba592682084a6c9d31a213dd2e0c6a680197b6 (patch) | |
tree | ff710b9575c5190c54f136ebb0c8375f97f6ba43 /clang/lib/Basic/Targets/PNaCl.cpp | |
parent | b8cc0544d258962ba32c2554e054d69996fe1f84 (diff) | |
download | bcm5719-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/PNaCl.cpp')
-rw-r--r-- | clang/lib/Basic/Targets/PNaCl.cpp | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/clang/lib/Basic/Targets/PNaCl.cpp b/clang/lib/Basic/Targets/PNaCl.cpp new file mode 100644 index 00000000000..b9128c2716e --- /dev/null +++ b/clang/lib/Basic/Targets/PNaCl.cpp @@ -0,0 +1,30 @@ +//===--- PNaCl.cpp - Implement PNaCl 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 PNaCl TargetInfo objects. +// +//===----------------------------------------------------------------------===// + +#include "PNaCl.h" +#include "clang/Basic/MacroBuilder.h" + +using namespace clang; +using namespace clang::targets; + +ArrayRef<const char *> PNaClTargetInfo::getGCCRegNames() const { return None; } + +ArrayRef<TargetInfo::GCCRegAlias> PNaClTargetInfo::getGCCRegAliases() const { + return None; +} + +void PNaClTargetInfo::getArchDefines(const LangOptions &Opts, + MacroBuilder &Builder) const { + Builder.defineMacro("__le32__"); + Builder.defineMacro("__pnacl__"); +} |