Index: cfe/trunk/include/clang/Basic/TargetInfo.h =================================================================== --- cfe/trunk/include/clang/Basic/TargetInfo.h +++ cfe/trunk/include/clang/Basic/TargetInfo.h @@ -21,21 +21,22 @@ #include "clang/Basic/TargetCXXABI.h" #include "clang/Basic/TargetOptions.h" #include "clang/Basic/VersionTuple.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 #include #include namespace llvm { -struct fltSemantics; +class DataLayout; } namespace clang { @@ -101,9 +102,7 @@ // 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: /// \brief Construct a target for the given options. Index: cfe/trunk/lib/AST/Mangle.cpp =================================================================== --- cfe/trunk/lib/AST/Mangle.cpp +++ cfe/trunk/lib/AST/Mangle.cpp @@ -22,6 +22,7 @@ #include "clang/Basic/SourceManager.h" #include "clang/Basic/TargetInfo.h" #include "llvm/ADT/StringExtras.h" +#include "llvm/IR/DataLayout.h" #include "llvm/Support/ErrorHandling.h" #include "llvm/Support/raw_ostream.h" Index: cfe/trunk/lib/Basic/TargetInfo.cpp =================================================================== --- cfe/trunk/lib/Basic/TargetInfo.cpp +++ cfe/trunk/lib/Basic/TargetInfo.cpp @@ -17,6 +17,7 @@ #include "clang/Basic/LangOptions.h" #include "llvm/ADT/APFloat.h" #include "llvm/ADT/STLExtras.h" +#include "llvm/IR/DataLayout.h" #include "llvm/Support/ErrorHandling.h" #include using namespace clang; @@ -112,6 +113,10 @@ // Out of line virtual dtor for TargetInfo. TargetInfo::~TargetInfo() {} +void TargetInfo::resetDataLayout(StringRef DL) { + DataLayout.reset(new llvm::DataLayout(DL)); +} + /// getTypeName - Return the user string for the specified integer type enum. /// For example, SignedShort -> "short". const char *TargetInfo::getTypeName(IntType T) { Index: cfe/trunk/lib/Basic/Targets/AMDGPU.cpp =================================================================== --- cfe/trunk/lib/Basic/Targets/AMDGPU.cpp +++ cfe/trunk/lib/Basic/Targets/AMDGPU.cpp @@ -18,6 +18,7 @@ #include "clang/Basic/TargetBuiltins.h" #include "clang/Frontend/CodeGenOptions.h" #include "llvm/ADT/StringSwitch.h" +#include "llvm/IR/DataLayout.h" using namespace clang; using namespace clang::targets; Index: cfe/trunk/lib/Frontend/InitPreprocessor.cpp =================================================================== --- cfe/trunk/lib/Frontend/InitPreprocessor.cpp +++ cfe/trunk/lib/Frontend/InitPreprocessor.cpp @@ -25,6 +25,7 @@ #include "clang/Lex/PreprocessorOptions.h" #include "clang/Serialization/ASTReader.h" #include "llvm/ADT/APFloat.h" +#include "llvm/IR/DataLayout.h" using namespace clang; static bool MacroBodyEndsInBackslash(StringRef MacroBody) {