Skip to content

Commit 4c79fec

Browse files
author
git apple-llvm automerger
committed
Merge commit '78424e5f8417' from llvm.org/master into apple/master
2 parents 41fb486 + 78424e5 commit 4c79fec

File tree

5 files changed

+12
-4
lines changed

5 files changed

+12
-4
lines changed

clang/include/clang/Basic/TargetInfo.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,15 @@
1919
#include "clang/Basic/Specifiers.h"
2020
#include "clang/Basic/TargetCXXABI.h"
2121
#include "clang/Basic/TargetOptions.h"
22+
#include "llvm/ADT/APFloat.h"
2223
#include "llvm/ADT/APInt.h"
24+
#include "llvm/ADT/ArrayRef.h"
2325
#include "llvm/ADT/IntrusiveRefCntPtr.h"
2426
#include "llvm/ADT/Optional.h"
2527
#include "llvm/ADT/SmallSet.h"
2628
#include "llvm/ADT/StringMap.h"
2729
#include "llvm/ADT/StringRef.h"
2830
#include "llvm/ADT/Triple.h"
29-
#include "llvm/IR/DataLayout.h"
3031
#include "llvm/Support/DataTypes.h"
3132
#include "llvm/Support/VersionTuple.h"
3233
#include <cassert>
@@ -35,6 +36,7 @@
3536

3637
namespace llvm {
3738
struct fltSemantics;
39+
class DataLayout;
3840
}
3941

4042
namespace clang {
@@ -198,9 +200,7 @@ class TargetInfo : public virtual TransferrableTargetInfo,
198200
// TargetInfo Constructor. Default initializes all fields.
199201
TargetInfo(const llvm::Triple &T);
200202

201-
void resetDataLayout(StringRef DL) {
202-
DataLayout.reset(new llvm::DataLayout(DL));
203-
}
203+
void resetDataLayout(StringRef DL);
204204

205205
public:
206206
/// Construct a target for the given options.

clang/lib/Basic/TargetInfo.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
#include "clang/Basic/LangOptions.h"
1818
#include "llvm/ADT/APFloat.h"
1919
#include "llvm/ADT/STLExtras.h"
20+
#include "llvm/IR/DataLayout.h"
2021
#include "llvm/Support/ErrorHandling.h"
2122
#include "llvm/Support/TargetParser.h"
2223
#include <cstdlib>
@@ -136,6 +137,10 @@ TargetInfo::TargetInfo(const llvm::Triple &T) : TargetOpts(), Triple(T) {
136137
// Out of line virtual dtor for TargetInfo.
137138
TargetInfo::~TargetInfo() {}
138139

140+
void TargetInfo::resetDataLayout(StringRef DL) {
141+
DataLayout.reset(new llvm::DataLayout(DL));
142+
}
143+
139144
bool
140145
TargetInfo::checkCFProtectionBranchSupported(DiagnosticsEngine &Diags) const {
141146
Diags.Report(diag::err_opt_not_valid_on_target) << "cf-protection=branch";

clang/lib/Basic/Targets/AMDGPU.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
#include "clang/Basic/MacroBuilder.h"
1818
#include "clang/Basic/TargetBuiltins.h"
1919
#include "llvm/ADT/StringSwitch.h"
20+
#include "llvm/IR/DataLayout.h"
2021

2122
using namespace clang;
2223
using namespace clang::targets;

clang/lib/Frontend/InitPreprocessor.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
#include "clang/Lex/PreprocessorOptions.h"
2525
#include "clang/Serialization/ASTReader.h"
2626
#include "llvm/ADT/APFloat.h"
27+
#include "llvm/IR/DataLayout.h"
2728
using namespace clang;
2829

2930
static bool MacroBodyEndsInBackslash(StringRef MacroBody) {

clang/unittests/AST/DeclTest.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
#include "clang/Basic/LLVM.h"
1818
#include "clang/Tooling/Tooling.h"
1919
#include "gtest/gtest.h"
20+
#include "llvm/IR/DataLayout.h"
2021

2122
using namespace clang::ast_matchers;
2223
using namespace clang::tooling;

0 commit comments

Comments
 (0)