]> granicus.if.org Git - llvm/commit
TargetPassConfig: Keep a reference to an LLVMTargetMachine; NFC
authorMatthias Braun <matze@braunis.de>
Tue, 30 May 2017 21:36:41 +0000 (21:36 +0000)
committerMatthias Braun <matze@braunis.de>
Tue, 30 May 2017 21:36:41 +0000 (21:36 +0000)
commit7d0dde023f8f0a55c4088a659582dc1616d17d1c
tree3c52cae318d125647b899b115e32c0423f8fc37e
parent837e2e977f46721745805dbce8a08fbb40c066b9
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304247 91177308-0d34-0410-b5e6-96231b3b80d8
19 files changed:
include/llvm/CodeGen/TargetPassConfig.h
lib/CodeGen/TargetPassConfig.cpp
lib/Target/AArch64/AArch64TargetMachine.cpp
lib/Target/AMDGPU/AMDGPUTargetMachine.cpp
lib/Target/ARM/ARMTargetMachine.cpp
lib/Target/AVR/AVRTargetMachine.cpp
lib/Target/BPF/BPFTargetMachine.cpp
lib/Target/Hexagon/HexagonTargetMachine.cpp
lib/Target/Lanai/LanaiTargetMachine.cpp
lib/Target/MSP430/MSP430TargetMachine.cpp
lib/Target/Mips/MipsTargetMachine.cpp
lib/Target/NVPTX/NVPTXTargetMachine.cpp
lib/Target/PowerPC/PPCTargetMachine.cpp
lib/Target/RISCV/RISCVTargetMachine.cpp
lib/Target/Sparc/SparcTargetMachine.cpp
lib/Target/SystemZ/SystemZTargetMachine.cpp
lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp
lib/Target/X86/X86TargetMachine.cpp
lib/Target/XCore/XCoreTargetMachine.cpp