summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/R600/AMDGPUTargetMachine.cpp
diff options
context:
space:
mode:
authorAditya Nandakumar <aditya_nandakumar@apple.com>2014-11-13 09:26:31 +0000
committerAditya Nandakumar <aditya_nandakumar@apple.com>2014-11-13 09:26:31 +0000
commita27193297f76d9847ec6c62042444a0c69b7dac7 (patch)
treeba5bf0e2f6265070a71090a97cc6ffb94b320b2d /llvm/lib/Target/R600/AMDGPUTargetMachine.cpp
parent8e586617c462178145cad3563bcfd7e9c30fdf67 (diff)
downloadbcm5719-llvm-a27193297f76d9847ec6c62042444a0c69b7dac7.tar.gz
bcm5719-llvm-a27193297f76d9847ec6c62042444a0c69b7dac7.zip
This patch changes the ownership of TLOF from TargetLoweringBase to TargetMachine so that different subtargets could share the TLOF effectively
llvm-svn: 221878
Diffstat (limited to 'llvm/lib/Target/R600/AMDGPUTargetMachine.cpp')
-rw-r--r--llvm/lib/Target/R600/AMDGPUTargetMachine.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/Target/R600/AMDGPUTargetMachine.cpp b/llvm/lib/Target/R600/AMDGPUTargetMachine.cpp
index ca4d0cae9b2..6f8ce1ad47b 100644
--- a/llvm/lib/Target/R600/AMDGPUTargetMachine.cpp
+++ b/llvm/lib/Target/R600/AMDGPUTargetMachine.cpp
@@ -22,6 +22,7 @@
#include "SIInstrInfo.h"
#include "llvm/Analysis/Passes.h"
#include "llvm/CodeGen/MachineFunctionAnalysis.h"
+#include "llvm/CodeGen/TargetLoweringObjectFileImpl.h"
#include "llvm/CodeGen/MachineModuleInfo.h"
#include "llvm/CodeGen/Passes.h"
#include "llvm/IR/Verifier.h"
@@ -54,12 +55,14 @@ AMDGPUTargetMachine::AMDGPUTargetMachine(const Target &T, StringRef TT,
CodeModel::Model CM,
CodeGenOpt::Level OptLevel)
: LLVMTargetMachine(T, TT, CPU, FS, Options, RM, CM, OptLevel),
+ TLOF(new TargetLoweringObjectFileELF()),
Subtarget(TT, CPU, FS, *this), IntrinsicInfo() {
setRequiresStructuredCFG(true);
initAsmInfo();
}
AMDGPUTargetMachine::~AMDGPUTargetMachine() {
+ delete TLOF;
}
namespace {
OpenPOWER on IntegriCloud