Implement backtracking into subtype search
[hiphop-php.git] / hphp / util / compilation-flags.h
blob401bdbf467c2b4238d08c77da6780de7c3970ccc
1 /*
2 +----------------------------------------------------------------------+
3 | HipHop for PHP |
4 +----------------------------------------------------------------------+
5 | Copyright (c) 2010-present Facebook, Inc. (http://www.facebook.com) |
6 +----------------------------------------------------------------------+
7 | This source file is subject to version 3.01 of the PHP license, |
8 | that is bundled with this package in the file LICENSE, and is |
9 | available through the world-wide-web at the following url: |
10 | http://www.php.net/license/3_01.txt |
11 | If you did not receive a copy of the PHP license and are unable to |
12 | obtain it through the world-wide-web, please send a note to |
13 | license@php.net so we can mail you a copy immediately. |
14 +----------------------------------------------------------------------+
16 #pragma once
18 namespace HPHP {
20 //////////////////////////////////////////////////////////////////////
23 * This header converts some common preprocessor symbols into
24 * compile-time constant booleans.
26 * This allows writing code that is checked for being able to compile
27 * regardless of whether the preprocessor flag is on. (Then we rely
28 * on DCE to remove the cases that can't happen.)
31 //////////////////////////////////////////////////////////////////////
33 constexpr bool debug =
34 #ifndef NDEBUG
35 true
36 #else
37 false
38 #endif
41 constexpr bool hhvm_reuse_tc =
42 #ifdef HHVM_REUSE_TC
43 true
44 #else
45 false
46 #endif
49 constexpr bool use_tsan =
50 #ifdef FOLLY_SANITIZE_THREAD
51 true
52 #else
53 false
54 #endif
57 constexpr bool facebook =
58 #ifdef HHVM_FACEBOOK
59 true
60 #else
61 false
62 #endif
65 //////////////////////////////////////////////////////////////////////