]> granicus.if.org Git - clang/commitdiff
Silence unused variable warning in a build without assertions.
authorChandler Carruth <chandlerc@gmail.com>
Sat, 13 Feb 2010 10:38:52 +0000 (10:38 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Sat, 13 Feb 2010 10:38:52 +0000 (10:38 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96098 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CGVtable.cpp

index c0291486f7bd983376987175558f6fbb3e875335..163088e91a295a92a47cebd2ab907f58c276b99a 100644 (file)
@@ -16,6 +16,7 @@
 #include "clang/AST/CXXInheritance.h"
 #include "clang/AST/RecordLayout.h"
 #include "llvm/ADT/DenseSet.h"
+#include "llvm/Support/Compiler.h"
 #include "llvm/Support/Format.h"
 #include <cstdio>
 
@@ -745,7 +746,7 @@ VtableBuilder::layoutVirtualMemberFunctions(BaseSubobject Base,
     // Check if this virtual member function overrides a method in a primary
     // base. If this is the case, and the return type doesn't require adjustment
     // then we can just use the member function from the primary base.
-    if (const CXXMethodDecl *OverriddenMD = 
+    if (const CXXMethodDecl ATTRIBUTE_UNUSED *OverriddenMD = 
           OverridesMethodInPrimaryBase(MD, PrimaryBases)) {
       assert(!ReturnTypeConversionRequiresAdjustment(MD, OverriddenMD)
              && "FIXME: Handle covariant thunks!");