aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Target/PowerPC
diff options
context:
space:
mode:
authorEric Christopher <echristo@gmail.com>2015-02-13 22:48:51 +0000
committerEric Christopher <echristo@gmail.com>2015-02-13 22:48:51 +0000
commita10d58dba87fda4975c69604d3654afa89ff49e9 (patch)
tree8a2c12422c925122a6eb087bb8497acbc5352eaf /llvm/lib/Target/PowerPC
parent4ab3dbd91680508fac75fa5df894c89abf83d5b5 (diff)
downloadllvm-a10d58dba87fda4975c69604d3654afa89ff49e9.zip
llvm-a10d58dba87fda4975c69604d3654afa89ff49e9.tar.gz
llvm-a10d58dba87fda4975c69604d3654afa89ff49e9.tar.bz2
Move the target machine variable so that it's initialized early
enough we can use it to initialize frame lowering. llvm-svn: 229168
Diffstat (limited to 'llvm/lib/Target/PowerPC')
-rw-r--r--llvm/lib/Target/PowerPC/PPCSubtarget.cpp4
-rw-r--r--llvm/lib/Target/PowerPC/PPCSubtarget.h3
2 files changed, 3 insertions, 4 deletions
diff --git a/llvm/lib/Target/PowerPC/PPCSubtarget.cpp b/llvm/lib/Target/PowerPC/PPCSubtarget.cpp
index 0bda665..6f70218 100644
--- a/llvm/lib/Target/PowerPC/PPCSubtarget.cpp
+++ b/llvm/lib/Target/PowerPC/PPCSubtarget.cpp
@@ -49,9 +49,9 @@ PPCSubtarget::PPCSubtarget(const std::string &TT, const std::string &CPU,
: PPCGenSubtargetInfo(TT, CPU, FS), TargetTriple(TT),
IsPPC64(TargetTriple.getArch() == Triple::ppc64 ||
TargetTriple.getArch() == Triple::ppc64le),
- TargetABI(PPC_ABI_UNKNOWN),
+ TargetABI(PPC_ABI_UNKNOWN), TM(TM),
FrameLowering(initializeSubtargetDependencies(CPU, FS)), InstrInfo(*this),
- TLInfo(TM, *this), TSInfo(TM.getDataLayout()), TM(TM) {}
+ TLInfo(TM, *this), TSInfo(TM.getDataLayout()) {}
void PPCSubtarget::initializeEnvironment() {
StackAlignment = 16;
diff --git a/llvm/lib/Target/PowerPC/PPCSubtarget.h b/llvm/lib/Target/PowerPC/PPCSubtarget.h
index ed1e9ac..ce17c1e 100644
--- a/llvm/lib/Target/PowerPC/PPCSubtarget.h
+++ b/llvm/lib/Target/PowerPC/PPCSubtarget.h
@@ -119,12 +119,11 @@ protected:
PPC_ABI_ELFv1,
PPC_ABI_ELFv2
} TargetABI;
-
+ const PPCTargetMachine &TM;
PPCFrameLowering FrameLowering;
PPCInstrInfo InstrInfo;
PPCTargetLowering TLInfo;
PPCSelectionDAGInfo TSInfo;
- const PPCTargetMachine &TM;
public:
/// This constructor initializes the data members to match that