llvm-project/llvm/unittests/CodeGen
Guozhi Wei b217a78720 [unittests/CodeGen] Remove unique_ptr from the result of createTargetMachine
The object contained in unique_ptr will be automatically deleted at the end of
the current scope. In createMachineFunction,

  auto TM = createTargetMachine();

creates a TM contained in unique_ptr, a reference of the TM is stored in a
MachineFunction object, but at the end of the function, the TM is deleted, so
later access to the TM(and contained STI, TRI ...) through MachineFunction
object is invalid.

So we should not use unique_ptr<BogusTargetMachine> in functions
createMachineFunction and createTargetMachine.

Differential Revision: https://reviews.llvm.org/D131790
2022-08-16 22:06:50 +00:00
..
GlobalISel [GIsel] Add missing libcall for G_MUL to LegalizerHelper 2022-08-02 13:35:25 -04:00
AArch64SelectionDAGTest.cpp Move TargetRegistry.(h|cpp) from Support to MC 2021-10-08 14:51:48 -07:00
AMDGPUMetadataTest.cpp Cleanup includes: LLVMTarget 2022-03-10 10:00:29 +01:00
AllocationOrderTest.cpp
AsmPrinterDwarfTest.cpp [MC] De-capitalize SwitchSection. NFC 2022-06-10 22:50:55 -07:00
CMakeLists.txt [reland][Debuginfo][DWARF][NFC] Refactor DwarfStringPoolEntryRef. 2022-07-01 20:08:09 +03:00
DIEHashTest.cpp [DWARF] Add linkagename to hash 2022-07-08 10:15:25 -07:00
DIETest.cpp [CodeGen][Debuginfo][NFC] Refactor DIE values SizeOf method to not depend on AsmPrinter. 2022-01-12 13:15:26 +03:00
DwarfStringPoolEntryRefTest.cpp [reland][Debuginfo][DWARF][NFC] Refactor DwarfStringPoolEntryRef. 2022-07-01 20:08:09 +03:00
InstrRefLDVTest.cpp Reapply D124184, [DebugInfo][InstrRef] Add a size operand to DBG_PHI 2022-04-26 15:49:22 +01:00
LexicalScopesTest.cpp [Codegen][tablgen][NFC] Allow meta instruction to be target dependent 2022-03-18 13:09:01 +08:00
LowLevelTypeTest.cpp GlobalISel: Add LLT helper to multiply vector sizes 2022-04-19 21:04:32 -04:00
MFCommon.inc [unittests/CodeGen] Remove unique_ptr from the result of createTargetMachine 2022-08-16 22:06:50 +00:00
MachineInstrBundleIteratorTest.cpp
MachineInstrTest.cpp Move TargetRegistry.(h|cpp) from Support to MC 2021-10-08 14:51:48 -07:00
MachineOperandTest.cpp [unittests/CodeGen] Remove unique_ptr from the result of createTargetMachine 2022-08-16 22:06:50 +00:00
PassManagerTest.cpp Cleanup codegen includes 2022-03-16 08:43:00 +01:00
RegAllocScoreTest.cpp Fix MSVC "not all control paths return a value" warning. NFC. 2021-12-07 18:09:44 +00:00
ScalableVectorMVTsTest.cpp [llvm] Add enum iteration to Sequence 2021-07-21 12:48:53 +00:00
SelectionDAGAddressAnalysisTest.cpp Move TargetRegistry.(h|cpp) from Support to MC 2021-10-08 14:51:48 -07:00
TargetOptionsTest.cpp Move TargetRegistry.(h|cpp) from Support to MC 2021-10-08 14:51:48 -07:00
TestAsmPrinter.cpp Move TargetRegistry.(h|cpp) from Support to MC 2021-10-08 14:51:48 -07:00
TestAsmPrinter.h [MC] Lower case the first letter of EmitCOFF* EmitWin* EmitCV*. NFC 2022-05-26 00:14:08 -07:00
TypeTraitsTest.cpp