Add ATTRIBUTE_UNUSED for -Asserts.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116909 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/System/RWMutex.cpp b/lib/System/RWMutex.cpp
index deb0470..be41ee6 100644
--- a/lib/System/RWMutex.cpp
+++ b/lib/System/RWMutex.cpp
@@ -12,6 +12,7 @@
 //===----------------------------------------------------------------------===//
 
 #include "llvm/Config/config.h"
+#include "llvm/Support/Compiler.h"
 #include "llvm/System/RWMutex.h"
 #include <cstring>
 
@@ -72,8 +73,7 @@
 #endif
 
     // Initialize the rwlock
-    int errorcode = pthread_rwlock_init(rwlock, NULL);
-    (void)errorcode;
+    int ATTRIBUTE_UNUSED errorcode = pthread_rwlock_init(rwlock, NULL);
     assert(errorcode == 0);
 
     // Assign the data member