[llvm] [unittests] Remove temporary files after they're not needed
authorSergej Jaskiewicz <jaskiewiczs@icloud.com>
Mon, 6 Jul 2020 12:55:49 +0000 (15:55 +0300)
committerSergej Jaskiewicz <jaskiewiczs@icloud.com>
Tue, 1 Sep 2020 21:34:44 +0000 (00:34 +0300)
commitfad75598d272b9a5591fb7d9b591cf00cdf5022c
tree12b58a54d96c1fe02d85a92869b893e2645264b3
parent520ab710fb6f9829b4e70fda1dcc91ed4f614d0a
[llvm] [unittests] Remove temporary files after they're not needed

Some LLVM unit tests forget to clean up temporary files and
directories. Introduce RAII classes for cleaning them up.

Refactor the tests to use those classes.

Differential Revision: https://reviews.llvm.org/D83228
llvm/include/llvm/Testing/Support/SupportHelpers.h
llvm/unittests/ProfileData/SampleProfTest.cpp
llvm/unittests/Support/CommandLineTest.cpp
llvm/unittests/Support/FileCollectorTest.cpp
llvm/unittests/Support/FileUtilitiesTest.cpp
llvm/unittests/Support/LockFileManagerTest.cpp
llvm/unittests/Support/TarWriterTest.cpp
llvm/unittests/Support/VirtualFileSystemTest.cpp
llvm/unittests/tools/llvm-exegesis/Mips/BenchmarkResultTest.cpp
llvm/unittests/tools/llvm-exegesis/X86/SnippetFileTest.cpp