1*3ac0a46fSAndroid Build Coastguard Worker // Copyright 2020 The Chromium Authors. All rights reserved. 2*3ac0a46fSAndroid Build Coastguard Worker // Use of this source code is governed by a BSD-style license that can be 3*3ac0a46fSAndroid Build Coastguard Worker // found in the LICENSE file. 4*3ac0a46fSAndroid Build Coastguard Worker 5*3ac0a46fSAndroid Build Coastguard Worker #ifndef THIRD_PARTY_BASE_NOTREACHED_H_ 6*3ac0a46fSAndroid Build Coastguard Worker #define THIRD_PARTY_BASE_NOTREACHED_H_ 7*3ac0a46fSAndroid Build Coastguard Worker 8*3ac0a46fSAndroid Build Coastguard Worker #include <assert.h> 9*3ac0a46fSAndroid Build Coastguard Worker 10*3ac0a46fSAndroid Build Coastguard Worker #include "third_party/base/check.h" 11*3ac0a46fSAndroid Build Coastguard Worker 12*3ac0a46fSAndroid Build Coastguard Worker // TODO(crbug.com/pdfium/2008): Migrate NOTREACHED() callers to 13*3ac0a46fSAndroid Build Coastguard Worker // NOTREACHED_NORETURN() which is [[noreturn]] and always FATAL. Once that's 14*3ac0a46fSAndroid Build Coastguard Worker // done, rename NOTREACHED_NORETURN() back to NOTREACHED() and remove the 15*3ac0a46fSAndroid Build Coastguard Worker // non-FATAL version. 16*3ac0a46fSAndroid Build Coastguard Worker #define NOTREACHED() DCHECK(false) 17*3ac0a46fSAndroid Build Coastguard Worker 18*3ac0a46fSAndroid Build Coastguard Worker // NOTREACHED_NORETURN() annotates paths that are supposed to be unreachable. 19*3ac0a46fSAndroid Build Coastguard Worker // They crash if they are ever hit. 20*3ac0a46fSAndroid Build Coastguard Worker // TODO(crbug.com/pdfium/2008): Rename back to NOTREACHED() once there are no 21*3ac0a46fSAndroid Build Coastguard Worker // callers of the old non-CHECK-fatal macro. 22*3ac0a46fSAndroid Build Coastguard Worker #define NOTREACHED_NORETURN() CHECK(false) 23*3ac0a46fSAndroid Build Coastguard Worker 24*3ac0a46fSAndroid Build Coastguard Worker #endif // THIRD_PARTY_BASE_NOTREACHED_H_ 25