diff options
author | Eric Christopher <echristo@gmail.com> | 2014-06-13 00:20:35 +0000 |
---|---|---|
committer | Eric Christopher <echristo@gmail.com> | 2014-06-13 00:20:35 +0000 |
commit | 1ee246100e7145c7fd27b417f128840037aa1f54 (patch) | |
tree | 553704a7f1879589de957ba7b6d59c137f1200eb /lib/Target/ARM/ARMSubtarget.h | |
parent | 740a75968a1ffc246c8f54a83cdaffe4d0cb3494 (diff) | |
download | llvm-1ee246100e7145c7fd27b417f128840037aa1f54.tar.gz llvm-1ee246100e7145c7fd27b417f128840037aa1f54.tar.bz2 llvm-1ee246100e7145c7fd27b417f128840037aa1f54.tar.xz |
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210861 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/ARM/ARMSubtarget.h')
-rw-r--r-- | lib/Target/ARM/ARMSubtarget.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/Target/ARM/ARMSubtarget.h b/lib/Target/ARM/ARMSubtarget.h index 6abae8b3cd..820d9f12fd 100644 --- a/lib/Target/ARM/ARMSubtarget.h +++ b/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: |