Do not clean up if the MappedFile was never used or if the client already
authorChris Lattner <sabre@nondot.org>
Fri, 28 Jan 2005 16:08:23 +0000 (16:08 +0000)
committerChris Lattner <sabre@nondot.org>
Fri, 28 Jan 2005 16:08:23 +0000 (16:08 +0000)
closed the file.  This unbreaks the build.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19871 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/System/MappedFile.h

index f73618aeb4095333a370c5221045f609f938d6eb..83c63d26364328edc06c449462e51d49b10000ff 100644 (file)
@@ -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