aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/llvm/System/MappedFile.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/llvm/System/MappedFile.h b/include/llvm/System/MappedFile.h
index f73618aeb4..83c63d2636 100644
--- a/include/llvm/System/MappedFile.h
+++ b/include/llvm/System/MappedFile.h
@@ -52,7 +52,7 @@ namespace sys {
/// Destruct a MappedFile and release all memory associated with it.
/// @throws std::string if an error occurs
- ~MappedFile() { terminate(); }
+ ~MappedFile() { if (info_) terminate(); }
/// @}
/// @name Accessors