summaryrefslogtreecommitdiff
path: root/include/llvm/Support/FileOutputBuffer.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/Support/FileOutputBuffer.h')
-rw-r--r--include/llvm/Support/FileOutputBuffer.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/llvm/Support/FileOutputBuffer.h b/include/llvm/Support/FileOutputBuffer.h
index ee8cbb730878..68226ca55502 100644
--- a/include/llvm/Support/FileOutputBuffer.h
+++ b/include/llvm/Support/FileOutputBuffer.h
@@ -76,6 +76,10 @@ public:
/// deallocates the buffer and the target file is never written.
virtual ~FileOutputBuffer() {}
+ /// This removes the temporary file (unless it already was committed)
+ /// but keeps the memory mapping alive.
+ virtual void discard() {}
+
protected:
FileOutputBuffer(StringRef Path) : FinalPath(Path) {}