[llvm-commits] [llvm] r91206 - in /llvm/trunk/include/llvm/Support: Debug.h ErrorHandling.h

Jeffrey Yasskin jyasskin at google.com
Fri Dec 11 20:08:33 PST 2009


Author: jyasskin
Date: Fri Dec 11 22:08:32 2009
New Revision: 91206

URL: http://llvm.org/viewvc/llvm-project?rev=91206&view=rev
Log:
Make it easier to use the llvm_unreachable and DEBUG macros without "using
namespace llvm" by qualifying their implementations with ::llvm::.

Modified:
    llvm/trunk/include/llvm/Support/Debug.h
    llvm/trunk/include/llvm/Support/ErrorHandling.h

Modified: llvm/trunk/include/llvm/Support/Debug.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/Debug.h?rev=91206&r1=91205&r2=91206&view=diff

==============================================================================
--- llvm/trunk/include/llvm/Support/Debug.h (original)
+++ llvm/trunk/include/llvm/Support/Debug.h Fri Dec 11 22:08:32 2009
@@ -63,7 +63,8 @@
 /// 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)

Modified: llvm/trunk/include/llvm/Support/ErrorHandling.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/ErrorHandling.h?rev=91206&r1=91205&r2=91206&view=diff

==============================================================================
--- llvm/trunk/include/llvm/Support/ErrorHandling.h (original)
+++ llvm/trunk/include/llvm/Support/ErrorHandling.h Fri Dec 11 22:08:32 2009
@@ -79,9 +79,10 @@
 /// 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





More information about the llvm-commits mailing list