llvm-project/llvm/unittests
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
..
ADT [ADT] Make SmallSet::insert(const T &) return const_iterator 2022-08-15 13:53:34 +08:00
Analysis [InstCombine] Tighten up known library function signature tests (PR #56463) 2022-08-10 14:15:46 -06:00
AsmParser [AsmParserTest] Avoid pointer element type accesses (NFC) 2022-01-25 14:31:51 +01:00
BinaryFormat [llvm] Use has_value instead of hasValue (NFC) 2022-07-12 22:25:42 -07:00
Bitcode [X86][MS] Change the alignment of f80 to 16 bytes on Windows 32bits to match with ICC 2022-01-23 09:58:46 +08:00
Bitstream
CodeGen [unittests/CodeGen] Remove unique_ptr from the result of createTargetMachine 2022-08-16 22:06:50 +00:00
DebugInfo [test] Remove zlib-gnu tests 2022-07-14 16:28:57 -07:00
Debuginfod [llvm] [Debuginfod] Add HTTP Server to Debuginfod library. 2022-07-06 18:56:54 +00:00
Demangle [demangler] No need to space adjacent template closings 2022-05-09 06:14:44 -07:00
ExecutionEngine [JITLink] Add eh-frame CFI inspector, fix crash on malformed FDEs. 2022-08-14 10:49:26 -07:00
FileCheck [llvm] Use value instead of getValue (NFC) 2022-07-13 23:11:56 -07:00
Frontend Add support for lowering simd if clause to LLVM IR 2022-08-01 04:43:32 -05:00
FuzzMutate Revert "[FuzzMutate] Don't insert instructions after musttail call" 2022-03-16 17:29:27 +01:00
IR [IR] Move support for dxil::TypedPointerType to LLVM core IR. 2022-08-04 10:41:11 -04:00
InterfaceStub [llvm] Use value instead of getValue (NFC) 2022-07-13 23:11:56 -07:00
LineEditor
Linker Revert "[OpenMP][NFC] Add missing virtual destructor to silence warning" 2022-03-25 16:07:11 -05:00
MC [MCDwarf] Use emplace to avoid move assignment. NFC 2022-08-12 05:05:49 +00:00
MI [LiveIntervals] Find better anchoring end points when repairing ranges 2022-07-18 19:34:43 +01:00
MIR Use llvm::sort instead of std::sort where possible 2022-07-23 15:19:05 +02:00
ObjCopy Fix for buildbot failure: https://lab.llvm.org/buildbot#builders/110/builds/11051 2022-03-09 14:26:46 +03:00
Object [LoongArch] Define the new-style reloc types 2022-08-11 10:37:30 +08:00
ObjectYAML [llvm] Use value instead of getValue (NFC) 2022-07-13 23:11:56 -07:00
Option [OptTable] Reapply Improve error message output for grouped short options 2021-09-03 11:13:52 +01:00
Passes Remove unnecessary includes of ManagedStatic.h 2022-07-07 14:29:20 +02:00
ProfileData [llvm] LLVM_NODISCARD => [[nodiscard]]. NFC 2022-08-07 00:26:33 +00:00
Remarks Cleanup includes: DebugInfo & CodeGen 2022-03-12 17:26:40 +01:00
Support [llvm] Update FileSystem test that failed spuriously 2022-08-13 18:17:04 -07:00
TableGen [llvm] Use value instead of getValue (NFC) 2022-07-13 23:11:56 -07:00
Target [IR] Move support for dxil::TypedPointerType to LLVM core IR. 2022-08-04 10:41:11 -04:00
Testing Testing: Make TempFile safe to move; test Temp{Dir,File,Link} 2022-03-01 13:45:51 -08:00
TextAPI Use the range-based overload of llvm::sort where possible 2022-07-23 15:13:25 +02:00
Transforms [llvm] Provide utility function for MD_prof 2022-07-27 21:13:51 +00:00
XRay
tools [MCA][unittest] Hot fix for -Wpessimizing-move on test harness 2022-06-24 18:31:27 -07:00
CMakeLists.txt [test-suite][cmake] sort unit test targets 2022-05-16 16:55:40 -07:00
unittest.cfg.in