summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/TargetMachine.cpp
diff options
context:
space:
mode:
authorEric Christopher <echristo@gmail.com>2015-03-19 22:36:32 +0000
committerEric Christopher <echristo@gmail.com>2015-03-19 22:36:32 +0000
commit72e23a219c7b612399f99bf28ee58a81077618c5 (patch)
tree975d2ebbbb46c366d02c259a1a3aec2b7d68c9dd /llvm/lib/Target/TargetMachine.cpp
parentc759fe90bc19fe408f58b106626b32b790b3de5e (diff)
downloadbcm5719-llvm-72e23a219c7b612399f99bf28ee58a81077618c5.tar.gz
bcm5719-llvm-72e23a219c7b612399f99bf28ee58a81077618c5.zip
Add a TargetMachine local MCRegisterInfo and MCInstrInfo so that
they can be used without a subtarget in constructing subtarget independent passes. llvm-svn: 232775
Diffstat (limited to 'llvm/lib/Target/TargetMachine.cpp')
-rw-r--r--llvm/lib/Target/TargetMachine.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/llvm/lib/Target/TargetMachine.cpp b/llvm/lib/Target/TargetMachine.cpp
index 56e7e8b24bd..31dbdc6f9a7 100644
--- a/llvm/lib/Target/TargetMachine.cpp
+++ b/llvm/lib/Target/TargetMachine.cpp
@@ -22,6 +22,7 @@
#include "llvm/MC/MCAsmInfo.h"
#include "llvm/MC/MCCodeGenInfo.h"
#include "llvm/MC/MCContext.h"
+#include "llvm/MC/MCInstrInfo.h"
#include "llvm/MC/MCSectionMachO.h"
#include "llvm/MC/MCTargetOptions.h"
#include "llvm/MC/SectionKind.h"
@@ -40,12 +41,14 @@ TargetMachine::TargetMachine(const Target &T, StringRef DataLayoutString,
StringRef TT, StringRef CPU, StringRef FS,
const TargetOptions &Options)
: TheTarget(T), DL(DataLayoutString), TargetTriple(TT), TargetCPU(CPU),
- TargetFS(FS), CodeGenInfo(nullptr), AsmInfo(nullptr),
- RequireStructuredCFG(false), Options(Options) {}
+ TargetFS(FS), CodeGenInfo(nullptr), AsmInfo(nullptr), MRI(nullptr),
+ MII(nullptr), RequireStructuredCFG(false), Options(Options) {}
TargetMachine::~TargetMachine() {
delete CodeGenInfo;
delete AsmInfo;
+ delete MRI;
+ delete MII;
}
/// \brief Reset the target options based on the function's attributes.
OpenPOWER on IntegriCloud