From: Chris Lattner Date: Fri, 28 Jan 2005 16:08:23 +0000 (+0000) Subject: Do not clean up if the MappedFile was never used or if the client already X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=e6585ab6017a6eb65f8fc054195100e89268cc11;p=oota-llvm.git Do not clean up if the MappedFile was never used or if the client already closed the file. This unbreaks the build. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19871 91177308-0d34-0410-b5e6-96231b3b80d8 --- 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