Make it easier to use the llvm_unreachable and DEBUG macros without "using
authorJeffrey Yasskin <jyasskin@google.com>
Sat, 12 Dec 2009 04:08:32 +0000 (04:08 +0000)
committerJeffrey Yasskin <jyasskin@google.com>
Sat, 12 Dec 2009 04:08:32 +0000 (04:08 +0000)
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

include/llvm/Support/Debug.h
include/llvm/Support/ErrorHandling.h

index afa828c36930539c8d7d01f4d11c65d32aa6c09c..e8bc0ce0a26c9c4e63e41ea4b14ddd2b1d146542 100644 (file)
@@ -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)
index 60677951a25da46a500185055443b9b710892a92..4d24ada48ebdcdcbb7fe42f2a3f56e3dfb9bbc2c 100644 (file)
@@ -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