diff options
author | Bjorn Pettersson <bjorn.a.pettersson@ericsson.com> | 2019-10-21 17:58:14 +0000 |
---|---|---|
committer | Bjorn Pettersson <bjorn.a.pettersson@ericsson.com> | 2019-10-21 17:58:14 +0000 |
commit | 08b8248b46f3c18bde7e042ebe4d2873f71559df (patch) | |
tree | 359f36190555bf568a6ecd3e0df0368187af7e04 /include | |
parent | f8ae7e9d59f1d46c86c99ef065f416076b0de50e (diff) | |
download | clang-08b8248b46f3c18bde7e042ebe4d2873f71559df.tar.gz |
Prune include of DataLayout.h from include/clang/Basic/TargetInfo.h. NFC
Summary:
Use a forward declaration of DataLayout instead of including
DataLayout.h in clangs TargetInfo.h. This reduces include
dependencies toward DataLayout.h (and other headers such as
DerivedTypes.h, Type.h that is included by DataLayout.h).
Needed to move implemantation of TargetInfo::resetDataLayout
from TargetInfo.h to TargetInfo.cpp.
Reviewers: rnk
Reviewed By: rnk
Subscribers: jvesely, nhaehnle, cfe-commits, llvm-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D69262
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@375438 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r-- | include/clang/Basic/TargetInfo.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/include/clang/Basic/TargetInfo.h b/include/clang/Basic/TargetInfo.h index 36109f1ccc..9a3bb98693 100644 --- a/include/clang/Basic/TargetInfo.h +++ b/include/clang/Basic/TargetInfo.h @@ -19,14 +19,15 @@ #include "clang/Basic/Specifiers.h" #include "clang/Basic/TargetCXXABI.h" #include "clang/Basic/TargetOptions.h" +#include "llvm/ADT/APFloat.h" #include "llvm/ADT/APInt.h" +#include "llvm/ADT/ArrayRef.h" #include "llvm/ADT/IntrusiveRefCntPtr.h" #include "llvm/ADT/Optional.h" #include "llvm/ADT/SmallSet.h" #include "llvm/ADT/StringMap.h" #include "llvm/ADT/StringRef.h" #include "llvm/ADT/Triple.h" -#include "llvm/IR/DataLayout.h" #include "llvm/Support/DataTypes.h" #include "llvm/Support/VersionTuple.h" #include <cassert> @@ -35,6 +36,7 @@ namespace llvm { struct fltSemantics; +class DataLayout; } namespace clang { @@ -198,9 +200,7 @@ protected: // TargetInfo Constructor. Default initializes all fields. TargetInfo(const llvm::Triple &T); - void resetDataLayout(StringRef DL) { - DataLayout.reset(new llvm::DataLayout(DL)); - } + void resetDataLayout(StringRef DL); public: /// Construct a target for the given options. |