diff --git a/include/llvm/System/MappedFile.h b/include/llvm/System/MappedFile.h index f73618aeb40..83c63d26364 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