aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Support/Process.cpp
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2012-12-31 11:39:02 +0000
committerChandler Carruth <chandlerc@gmail.com>2012-12-31 11:39:02 +0000
commitc9bdcac41213f3994709fd06de8d85dbc1b2daa1 (patch)
treef3a3e3e70b958e3a301c8625e4d1e5173a11df57 /lib/Support/Process.cpp
parent0184a841d3914bb78c7c6fa87ce9da86a2d5992a (diff)
downloadexternal_llvm-c9bdcac41213f3994709fd06de8d85dbc1b2daa1.zip
external_llvm-c9bdcac41213f3994709fd06de8d85dbc1b2daa1.tar.gz
external_llvm-c9bdcac41213f3994709fd06de8d85dbc1b2daa1.tar.bz2
Suppress a MSVC warning complaining about the code working as intended.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171290 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Support/Process.cpp')
-rw-r--r--lib/Support/Process.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/Support/Process.cpp b/lib/Support/Process.cpp
index 8d1b648..5f8655e 100644
--- a/lib/Support/Process.cpp
+++ b/lib/Support/Process.cpp
@@ -34,14 +34,27 @@ self_process *process::get_self() {
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.