Fix a -Asserts warning.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80606 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/AST/DeclCXX.cpp b/lib/AST/DeclCXX.cpp
index 1da4c4e..b6072d8 100644
--- a/lib/AST/DeclCXX.cpp
+++ b/lib/AST/DeclCXX.cpp
@@ -799,6 +799,7 @@
                                SourceLocation L,
                                FriendUnion Friend,
                                SourceLocation FriendL) {
+#ifndef NDEBUG
   if (Friend.is<NamedDecl*>()) {
     NamedDecl *D = Friend.get<NamedDecl*>();
     assert(isa<FunctionDecl>(D) ||
@@ -807,6 +808,7 @@
            isa<ClassTemplateDecl>(D));
     assert(D->getFriendObjectKind());
   }
+#endif
 
   return new (C) FriendDecl(DC, L, Friend, FriendL);
 }