summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/ARM/ARMSubtarget.h
diff options
context:
space:
mode:
authorEric Christopher <echristo@gmail.com>2014-06-13 00:20:35 +0000
committerEric Christopher <echristo@gmail.com>2014-06-13 00:20:35 +0000
commita47f6804d294723f851515292db9a719bae48520 (patch)
tree1d9e42f449e2350ed5e9f45d7f386a09639fb327 /llvm/lib/Target/ARM/ARMSubtarget.h
parent0670cfaf01bc70c159132836be62c8b91e18dedb (diff)
downloadbcm5719-llvm-a47f6804d294723f851515292db9a719bae48520.tar.gz
bcm5719-llvm-a47f6804d294723f851515292db9a719bae48520.zip
Move to a private function to initialize subtarget dependencies
so we can use initializer lists for the ARMSubtarget and then use this to initialize a moved DataLayout on the subtarget from the TargetMachine. llvm-svn: 210861
Diffstat (limited to 'llvm/lib/Target/ARM/ARMSubtarget.h')
-rw-r--r--llvm/lib/Target/ARM/ARMSubtarget.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/llvm/lib/Target/ARM/ARMSubtarget.h b/llvm/lib/Target/ARM/ARMSubtarget.h
index 6abae8b3cde..820d9f12fd6 100644
--- a/llvm/lib/Target/ARM/ARMSubtarget.h
+++ b/llvm/lib/Target/ARM/ARMSubtarget.h
@@ -16,6 +16,7 @@
#include "MCTargetDesc/ARMMCTargetDesc.h"
#include "llvm/ADT/Triple.h"
+#include "llvm/IR/DataLayout.h"
#include "llvm/MC/MCInstrItineraries.h"
#include "llvm/Target/TargetSubtargetInfo.h"
#include <string>
@@ -247,7 +248,16 @@ protected:
/// \brief Reset the features for the ARM target.
void resetSubtargetFeatures(const MachineFunction *MF) override;
+
+ /// initializeSubtargetDependencies - Initializes using a CPU and feature string
+ /// so that we can use initializer lists for subtarget initialization.
+ ARMSubtarget &initializeSubtargetDependencies(StringRef CPU, StringRef FS);
+
+ const DataLayout *getDataLayout() const { return &DL; }
+
private:
+ const DataLayout DL;
+
void initializeEnvironment();
void resetSubtargetFeatures(StringRef CPU, StringRef FS);
public:
OpenPOWER on IntegriCloud