diff options
| author | 2017-01-24 08:32:59 +0000 | |
|---|---|---|
| committer | 2017-01-24 08:32:59 +0000 | |
| commit | 53d771aafdbe5b919f264f53cba3788e2c4cffd2 (patch) | |
| tree | 7eca39498be0ff1e3a6daf583cd9ca5886bb2636 /gnu/llvm/unittests/Support/MemoryBufferTest.cpp | |
| parent | In preparation of compiling our kernels with -ffreestanding, explicitly map (diff) | |
| download | wireguard-openbsd-53d771aafdbe5b919f264f53cba3788e2c4cffd2.tar.xz wireguard-openbsd-53d771aafdbe5b919f264f53cba3788e2c4cffd2.zip | |
Import LLVM 4.0.0 rc1 including clang and lld to help the current
development effort on OpenBSD/arm64.
Diffstat (limited to 'gnu/llvm/unittests/Support/MemoryBufferTest.cpp')
| -rw-r--r-- | gnu/llvm/unittests/Support/MemoryBufferTest.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gnu/llvm/unittests/Support/MemoryBufferTest.cpp b/gnu/llvm/unittests/Support/MemoryBufferTest.cpp index 963dcd91c8b..0efa22c157d 100644 --- a/gnu/llvm/unittests/Support/MemoryBufferTest.cpp +++ b/gnu/llvm/unittests/Support/MemoryBufferTest.cpp @@ -12,6 +12,7 @@ //===----------------------------------------------------------------------===// #include "llvm/Support/FileSystem.h" +#include "llvm/Support/FileUtilities.h" #include "llvm/Support/MemoryBuffer.h" #include "llvm/Support/raw_ostream.h" #include "gtest/gtest.h" @@ -71,6 +72,7 @@ TEST_F(MemoryBufferTest, NullTerminator4K) { SmallString<64> TestPath; sys::fs::createTemporaryFile("MemoryBufferTest_NullTerminator4K", "temp", TestFD, TestPath); + FileRemover Cleanup(TestPath); raw_fd_ostream OF(TestFD, true, /*unbuffered=*/true); for (unsigned i = 0; i < 4096 / 16; ++i) { OF << "0123456789abcdef"; @@ -133,6 +135,7 @@ void MemoryBufferTest::testGetOpenFileSlice(bool Reopen) { SmallString<64> TestPath; // Create a temporary file and write data into it. sys::fs::createTemporaryFile("prefix", "temp", TestFD, TestPath); + FileRemover Cleanup(TestPath); // OF is responsible for closing the file; If the file is not // reopened, it will be unbuffered so that the results are // immediately visible through the fd. @@ -182,6 +185,7 @@ TEST_F(MemoryBufferTest, slice) { int FD; SmallString<64> TestPath; sys::fs::createTemporaryFile("MemoryBufferTest_Slice", "temp", FD, TestPath); + FileRemover Cleanup(TestPath); raw_fd_ostream OF(FD, true, /*unbuffered=*/true); for (unsigned i = 0; i < 0x2000 / 8; ++i) { OF << "12345678"; |
