summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/R600/AMDGPUTargetMachine.h
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Target/R600/AMDGPUTargetMachine.h')
-rw-r--r--llvm/lib/Target/R600/AMDGPUTargetMachine.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/llvm/lib/Target/R600/AMDGPUTargetMachine.h b/llvm/lib/Target/R600/AMDGPUTargetMachine.h
index c3c67f0aee4..8aa97cfd987 100644
--- a/llvm/lib/Target/R600/AMDGPUTargetMachine.h
+++ b/llvm/lib/Target/R600/AMDGPUTargetMachine.h
@@ -29,6 +29,9 @@ namespace llvm {
//===----------------------------------------------------------------------===//
class AMDGPUTargetMachine : public LLVMTargetMachine {
+private:
+ const DataLayout DL;
+
protected:
TargetLoweringObjectFile *TLOF;
AMDGPUSubtarget Subtarget;
@@ -42,7 +45,7 @@ public:
// FIXME: This is currently broken, the DataLayout needs to move to
// the target machine.
const DataLayout *getDataLayout() const override {
- return getSubtargetImpl()->getDataLayout();
+ return &DL;
}
const AMDGPUSubtarget *getSubtargetImpl() const override {
return &Subtarget;
OpenPOWER on IntegriCloud