summaryrefslogtreecommitdiff
path: root/src/mongo/platform
diff options
context:
space:
mode:
authorAdam Midvidy <amidvidy@gmail.com>2015-05-15 12:05:32 -0400
committerAdam Midvidy <amidvidy@gmail.com>2015-05-15 15:50:19 -0400
commitf3c262d1ab45e6fa59cd84ea90a150bde3372dd0 (patch)
tree745ca397810f7cccd67508037176fd5290023462 /src/mongo/platform
parent20e130aceda766c646d123d8a853ea5aabbeab26 (diff)
downloadmongo-f3c262d1ab45e6fa59cd84ea90a150bde3372dd0.tar.gz
SERVER-18373 implement UNREACHABLE using invariantFailed so we know how it fails
Diffstat (limited to 'src/mongo/platform')
-rw-r--r--src/mongo/platform/compiler.h13
-rw-r--r--src/mongo/platform/compiler_gcc.h2
-rw-r--r--src/mongo/platform/compiler_msvc.h1
3 files changed, 0 insertions, 16 deletions
diff --git a/src/mongo/platform/compiler.h b/src/mongo/platform/compiler.h
index d261a1781e3..5ce6ed82ee7 100644
--- a/src/mongo/platform/compiler.h
+++ b/src/mongo/platform/compiler.h
@@ -119,19 +119,6 @@
*
* Same correct/incorrect usage as for MONGO_COMPILER_API_EXPORT.
*
- * MONGO_COMPILER_UNREACHABLE
- *
- * Instructs the compiler that a line of code will never be reached.
- *
- *
- * Example:
- * // code above checks that expr can only be FOO or BAR
- * switch (expr) {
- * case FOO: { ... }
- * case BAR: { ... }
- * default:
- * MONGO_COMPILER_UNREACHABLE;
- *
*/
#if defined(_MSC_VER)
diff --git a/src/mongo/platform/compiler_gcc.h b/src/mongo/platform/compiler_gcc.h
index 553f599b335..431465893c9 100644
--- a/src/mongo/platform/compiler_gcc.h
+++ b/src/mongo/platform/compiler_gcc.h
@@ -64,5 +64,3 @@
#define MONGO_likely(x) static_cast<bool>(__builtin_expect(static_cast<bool>(x), 1))
#define MONGO_unlikely(x) static_cast<bool>(__builtin_expect(static_cast<bool>(x), 0))
-
-#define MONGO_COMPILER_UNREACHABLE __builtin_unreachable()
diff --git a/src/mongo/platform/compiler_msvc.h b/src/mongo/platform/compiler_msvc.h
index 4a029fe40ed..50ceb8851d2 100644
--- a/src/mongo/platform/compiler_msvc.h
+++ b/src/mongo/platform/compiler_msvc.h
@@ -57,4 +57,3 @@
#define MONGO_likely(x) bool(x)
#define MONGO_unlikely(x) bool(x)
-#define MONGO_COMPILER_UNREACHABLE __assume(0)