diff options
author | Richard Trieu <rtrieu@google.com> | 2019-05-14 23:17:18 +0000 |
---|---|---|
committer | Richard Trieu <rtrieu@google.com> | 2019-05-14 23:17:18 +0000 |
commit | 2e50dc78c5e2ad367ed2fa79a8a5bcd6acf3a27f (patch) | |
tree | ed727a1e362e79b2927785fc00bb7323a377ffd2 /llvm/lib/Target/Lanai/TargetInfo | |
parent | 092f85a594d0c2c10ef0bb29d5488a20f0dcf374 (diff) | |
download | bcm5719-llvm-2e50dc78c5e2ad367ed2fa79a8a5bcd6acf3a27f.tar.gz bcm5719-llvm-2e50dc78c5e2ad367ed2fa79a8a5bcd6acf3a27f.zip |
[Lanai] Create a TargetInfo header. NFC
Move the declarations of getThe<Name>Target() functions into a new header in
TargetInfo and make users of these functions include this new header.
This fixes a layering problem.
llvm-svn: 360726
Diffstat (limited to 'llvm/lib/Target/Lanai/TargetInfo')
-rw-r--r-- | llvm/lib/Target/Lanai/TargetInfo/LanaiTargetInfo.cpp | 6 | ||||
-rw-r--r-- | llvm/lib/Target/Lanai/TargetInfo/LanaiTargetInfo.h | 20 |
2 files changed, 22 insertions, 4 deletions
diff --git a/llvm/lib/Target/Lanai/TargetInfo/LanaiTargetInfo.cpp b/llvm/lib/Target/Lanai/TargetInfo/LanaiTargetInfo.cpp index 65fba887eea..93deb891dec 100644 --- a/llvm/lib/Target/Lanai/TargetInfo/LanaiTargetInfo.cpp +++ b/llvm/lib/Target/Lanai/TargetInfo/LanaiTargetInfo.cpp @@ -6,17 +6,15 @@ // //===----------------------------------------------------------------------===// -#include "llvm/IR/Module.h" +#include "TargetInfo/LanaiTargetInfo.h" #include "llvm/Support/TargetRegistry.h" using namespace llvm; -namespace llvm { -Target &getTheLanaiTarget() { +Target &llvm::getTheLanaiTarget() { static Target TheLanaiTarget; return TheLanaiTarget; } -} // namespace llvm extern "C" void LLVMInitializeLanaiTargetInfo() { RegisterTarget<Triple::lanai> X(getTheLanaiTarget(), "lanai", "Lanai", diff --git a/llvm/lib/Target/Lanai/TargetInfo/LanaiTargetInfo.h b/llvm/lib/Target/Lanai/TargetInfo/LanaiTargetInfo.h new file mode 100644 index 00000000000..429cf0234a6 --- /dev/null +++ b/llvm/lib/Target/Lanai/TargetInfo/LanaiTargetInfo.h @@ -0,0 +1,20 @@ +//===-- LanaiTargetInfo.h - Lanai Target Implementation ---------*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +#ifndef LLVM_LIB_TARGET_LANAI_TARGETINFO_LANAITARGETINFO_H +#define LLVM_LIB_TARGET_LANAI_TARGETINFO_LANAITARGETINFO_H + +namespace llvm { + +class Target; + +Target &getTheLanaiTarget(); + +} // namespace llvm + +#endif // LLVM_LIB_TARGET_LANAI_TARGETINFO_LANAITARGETINFO_H |