Remove unused feature. NFC.
[oota-llvm.git] / lib / Support / FileOutputBuffer.cpp
index 57a0f60d27747ef8c31470c6aeb7d768d2ace846..e6e4da346520cfb53e585fb7118d6bd58dbfd7b1 100644 (file)
@@ -91,16 +91,10 @@ FileOutputBuffer::create(StringRef FilePath, size_t Size,
   return std::error_code();
 }
 
-std::error_code FileOutputBuffer::commit(int64_t NewSmallerSize) {
+std::error_code FileOutputBuffer::commit() {
   // Unmap buffer, letting OS flush dirty pages to file on disk.
   Region.reset();
 
-  // If requested, resize file as part of commit.
-  if ( NewSmallerSize != -1 ) {
-    std::error_code EC = sys::fs::resize_file(Twine(TempPath), NewSmallerSize);
-    if (EC)
-      return EC;
-  }
 
   // Rename file to final name.
   return sys::fs::rename(Twine(TempPath), Twine(FinalPath));