[llvm-commits] [llvm] r92144 - /llvm/trunk/unittests/ADT/DeltaAlgorithmTest.cpp

Douglas Gregor dgregor at apple.com
Thu Dec 24 13:11:45 PST 2009


Author: dgregor
Date: Thu Dec 24 15:11:45 2009
New Revision: 92144

URL: http://llvm.org/viewvc/llvm-project?rev=92144&view=rev
Log:
Define the new operator<< for sets into namespace std, so that
argument-dependent lookup can find it. This is another case where an
LLVM bug (not making operator<< visible) was masked by a GCC bug
(looking in the global namespace when it shouldn't).

Modified:
    llvm/trunk/unittests/ADT/DeltaAlgorithmTest.cpp

Modified: llvm/trunk/unittests/ADT/DeltaAlgorithmTest.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/ADT/DeltaAlgorithmTest.cpp?rev=92144&r1=92143&r2=92144&view=diff

==============================================================================
--- llvm/trunk/unittests/ADT/DeltaAlgorithmTest.cpp (original)
+++ llvm/trunk/unittests/ADT/DeltaAlgorithmTest.cpp Thu Dec 24 15:11:45 2009
@@ -13,6 +13,8 @@
 #include <cstdarg>
 using namespace llvm;
 
+namespace std {
+
 std::ostream &operator<<(std::ostream &OS,
                          const std::set<unsigned> &S) {
   OS << "{";
@@ -26,6 +28,8 @@
   return OS;
 }
 
+}
+
 namespace {
 
 class FixedDeltaAlgorithm : public DeltaAlgorithm {





More information about the llvm-commits mailing list