MachineModuleInfo: Avoid dummy constructor, use INITIALIZE_TM_PASS
authorMatthias Braun <matze@braunis.de>
Wed, 24 Aug 2016 00:42:05 +0000 (00:42 +0000)
committerMatthias Braun <matze@braunis.de>
Wed, 24 Aug 2016 00:42:05 +0000 (00:42 +0000)
commitc3b2e80b9d7615190bb5d50f17d6524c2fd8d66d
tree464f32d68c01481e6c6ec8ec9d6954ebd7a4f5be
parent7fe0681e28379ed875367b7fdd4032b761c0bc1c
MachineModuleInfo: Avoid dummy constructor, use INITIALIZE_TM_PASS

Change this pass constructor to just accept a const TargetMachine * and
use INITIALIZE_TM_PASS, that way we can get rid of the dummy
constructor. The pass will still fail when calling the default
constructor leading to TM == nullptr, this is no different than before
but is more in line what other codegen passes are doing and avoids the
dummy constructor.

llvm-svn: 279598
llvm/include/llvm/CodeGen/MachineModuleInfo.h
llvm/include/llvm/Target/TargetMachine.h
llvm/lib/CodeGen/LLVMTargetMachine.cpp
llvm/lib/CodeGen/MachineModuleInfo.cpp
llvm/tools/llc/llc.cpp
llvm/unittests/MI/LiveIntervalTest.cpp