llvm.org GIT mirror llvm / 66b8566
Make it easier to use the llvm_unreachable and DEBUG macros without "using namespace llvm" by qualifying their implementations with ::llvm::. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91206 91177308-0d34-0410-b5e6-96231b3b80d8 Jeffrey Yasskin 10 years ago
2 changed file(s) with 5 addition(s) and 3 deletion(s). Raw diff Collapse all Expand all
6262 /// This will emit the debug information if -debug is present, and -debug-only
6363 /// is not specified, or is specified as "bitset".
6464 #define DEBUG_WITH_TYPE(TYPE, X) \
65 do { if (DebugFlag && isCurrentDebugType(TYPE)) { X; } } while (0)
65 do { if (::llvm::DebugFlag && ::llvm::isCurrentDebugType(TYPE)) { X; } \
66 } while (0)
6667
6768 #else
6869 #define isCurrentDebugType(X) (false)
7878 /// Use this instead of assert(0), so that the compiler knows this path
7979 /// is not reachable even for NDEBUG builds.
8080 #ifndef NDEBUG
81 #define llvm_unreachable(msg) llvm_unreachable_internal(msg, __FILE__, __LINE__)
81 #define llvm_unreachable(msg) \
82 ::llvm::llvm_unreachable_internal(msg, __FILE__, __LINE__)
8283 #else
83 #define llvm_unreachable(msg) llvm_unreachable_internal()
84 #define llvm_unreachable(msg) ::llvm::llvm_unreachable_internal()
8485 #endif
8586
8687 #endif