http://llvm.org/bugs/show_bug.cgi?id=10469

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@135897 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/include/ext/hash_set b/include/ext/hash_set
index e205db8..e20fd41 100644
--- a/include/ext/hash_set
+++ b/include/ext/hash_set
@@ -197,7 +197,9 @@
 #include <__hash_table>
 #include <functional>
 
+#if __DEPRECATED
 #warning Use of the header <ext/hash_set> is deprecated.  Migrate to <unordered_set>
+#endif
 
 namespace __gnu_cxx {