From 12cf76fe266bba04e8cb1f2d18e44e5947fab9a0 Mon Sep 17 00:00:00 2001 From: Eric Christopher Date: Thu, 19 Mar 2015 22:36:37 +0000 Subject: Add an MCSubtargetInfo variable to the TargetMachine. This enables us to remove calls to the subtarget from the TargetMachine and with a small hack for backends that require global subtarget information for module level code generation, e.g. mips abi flags, as mentioned in a fixme in the code. llvm-svn: 232776 --- llvm/lib/Target/TargetMachine.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'llvm/lib/Target/TargetMachine.cpp') diff --git a/llvm/lib/Target/TargetMachine.cpp b/llvm/lib/Target/TargetMachine.cpp index 31dbdc6f9a7..dd07f818477 100644 --- a/llvm/lib/Target/TargetMachine.cpp +++ b/llvm/lib/Target/TargetMachine.cpp @@ -42,13 +42,15 @@ TargetMachine::TargetMachine(const Target &T, StringRef DataLayoutString, const TargetOptions &Options) : TheTarget(T), DL(DataLayoutString), TargetTriple(TT), TargetCPU(CPU), TargetFS(FS), CodeGenInfo(nullptr), AsmInfo(nullptr), MRI(nullptr), - MII(nullptr), RequireStructuredCFG(false), Options(Options) {} + MII(nullptr), STI(nullptr), RequireStructuredCFG(false), + Options(Options) {} TargetMachine::~TargetMachine() { delete CodeGenInfo; delete AsmInfo; delete MRI; delete MII; + delete STI; } /// \brief Reset the target options based on the function's attributes. -- cgit v1.2.3