summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/XCore/XCoreTargetMachine.cpp
diff options
context:
space:
mode:
authorMatthias Braun <matze@braunis.de>2017-05-30 21:36:41 +0000
committerMatthias Braun <matze@braunis.de>2017-05-30 21:36:41 +0000
commit5e394c3d6f2731b22a4632071b9b0aed116989f9 (patch)
tree7ccf3ce18c7b20c293a886f839fd34f8cabb11b6 /llvm/lib/Target/XCore/XCoreTargetMachine.cpp
parentfb26d9a2865e41320d0a891d35ed7d23e679815d (diff)
downloadbcm5719-llvm-5e394c3d6f2731b22a4632071b9b0aed116989f9.tar.gz
bcm5719-llvm-5e394c3d6f2731b22a4632071b9b0aed116989f9.zip
TargetPassConfig: Keep a reference to an LLVMTargetMachine; NFC
TargetPassConfig is not useful for targets that do not use the CodeGen library, so we may just as well store a pointer to an LLVMTargetMachine instead of just to a TargetMachine. While at it, also change the constructor to take a reference instead of a pointer as the TM must not be nullptr. llvm-svn: 304247
Diffstat (limited to 'llvm/lib/Target/XCore/XCoreTargetMachine.cpp')
-rw-r--r--llvm/lib/Target/XCore/XCoreTargetMachine.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Target/XCore/XCoreTargetMachine.cpp b/llvm/lib/Target/XCore/XCoreTargetMachine.cpp
index 2950e2efbea..1a1cbd47488 100644
--- a/llvm/lib/Target/XCore/XCoreTargetMachine.cpp
+++ b/llvm/lib/Target/XCore/XCoreTargetMachine.cpp
@@ -54,7 +54,7 @@ namespace {
/// XCore Code Generator Pass Configuration Options.
class XCorePassConfig : public TargetPassConfig {
public:
- XCorePassConfig(XCoreTargetMachine *TM, PassManagerBase &PM)
+ XCorePassConfig(XCoreTargetMachine &TM, PassManagerBase &PM)
: TargetPassConfig(TM, PM) {}
XCoreTargetMachine &getXCoreTargetMachine() const {
@@ -70,7 +70,7 @@ public:
} // end anonymous namespace
TargetPassConfig *XCoreTargetMachine::createPassConfig(PassManagerBase &PM) {
- return new XCorePassConfig(this, PM);
+ return new XCorePassConfig(*this, PM);
}
void XCorePassConfig::addIRPasses() {
OpenPOWER on IntegriCloud