[llvm-commits] [llvm] r171290 - /llvm/trunk/lib/Support/Process.cpp

Chandler Carruth chandlerc at gmail.com
Mon Dec 31 03:39:02 PST 2012


Author: chandlerc
Date: Mon Dec 31 05:39:02 2012
New Revision: 171290

URL: http://llvm.org/viewvc/llvm-project?rev=171290&view=rev
Log:
Suppress a MSVC warning complaining about the code working as intended.

Modified:
    llvm/trunk/lib/Support/Process.cpp

Modified: llvm/trunk/lib/Support/Process.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/Process.cpp?rev=171290&r1=171289&r2=171290&view=diff
==============================================================================
--- llvm/trunk/lib/Support/Process.cpp (original)
+++ llvm/trunk/lib/Support/Process.cpp Mon Dec 31 05:39:02 2012
@@ -34,14 +34,27 @@
   return SP;
 }
 
+#if defined(_MSC_VER)
+// Visual Studio complains that the self_process destructor never exits. This
+// doesn't make much sense, as that's the whole point of calling abort... Just
+// silence this warning.
+#pragma warning(push)
+#pragma warning(disable:4722)
+#endif
+
 // The destructor for the self_process subclass must never actually be
 // executed. There should be at most one instance of this class, and that
 // instance should live until the process terminates to avoid the potential for
 // racy accesses during shutdown.
 self_process::~self_process() {
+    assert(TempDirectory->exists() && "Who has removed TempDirectory?");
   llvm_unreachable("This destructor must never be executed!");
 }
 
+#if defined(_MSC_VER)
+#pragma warning(pop)
+#endif
+
 }
 
 // Include the platform-specific parts of this class.





More information about the llvm-commits mailing list