mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-25 04:02:41 +01:00
Make it easier to use the llvm_unreachable and DEBUG macros without "using
namespace llvm" by qualifying their implementations with ::llvm::. llvm-svn: 91206
This commit is contained in:
parent
187ad02a4f
commit
9cba192e78
@ -63,7 +63,8 @@ void SetCurrentDebugType(const char *Type);
|
||||
/// This will emit the debug information if -debug is present, and -debug-only
|
||||
/// is not specified, or is specified as "bitset".
|
||||
#define DEBUG_WITH_TYPE(TYPE, X) \
|
||||
do { if (DebugFlag && isCurrentDebugType(TYPE)) { X; } } while (0)
|
||||
do { if (::llvm::DebugFlag && ::llvm::isCurrentDebugType(TYPE)) { X; } \
|
||||
} while (0)
|
||||
|
||||
#else
|
||||
#define isCurrentDebugType(X) (false)
|
||||
|
@ -79,9 +79,10 @@ namespace llvm {
|
||||
/// Use this instead of assert(0), so that the compiler knows this path
|
||||
/// is not reachable even for NDEBUG builds.
|
||||
#ifndef NDEBUG
|
||||
#define llvm_unreachable(msg) llvm_unreachable_internal(msg, __FILE__, __LINE__)
|
||||
#define llvm_unreachable(msg) \
|
||||
::llvm::llvm_unreachable_internal(msg, __FILE__, __LINE__)
|
||||
#else
|
||||
#define llvm_unreachable(msg) llvm_unreachable_internal()
|
||||
#define llvm_unreachable(msg) ::llvm::llvm_unreachable_internal()
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user