]> granicus.if.org Git - clang/commitdiff
revert r338831 - Fix unused variable warning in tablegen generated code
authorErich Keane <erich.keane@intel.com>
Fri, 3 Aug 2018 14:24:34 +0000 (14:24 +0000)
committerErich Keane <erich.keane@intel.com>
Fri, 3 Aug 2018 14:24:34 +0000 (14:24 +0000)
No longer necessary thanks to r338889 (and friends).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@338893 91177308-0d34-0410-b5e6-96231b3b80d8

utils/TableGen/ClangAttrEmitter.cpp

index 0426ecb34c87011b4886e6d07ab66bd5632e0dc6..6b3df825808f67ed7ca5d9b8641480a2f34b8d24 100644 (file)
@@ -3274,15 +3274,11 @@ static std::string GenerateCustomAppertainsTo(const Record &Subject,
     return "";
   }
 
-  const StringRef CheckCodeValue = Subject.getValueAsString("CheckCode");
-
   OS << "static bool " << FnName << "(const Decl *D) {\n";
-  if (CheckCodeValue != "false") {
-    OS << "  if (const auto *S = dyn_cast<";
-    OS << GetSubjectWithSuffix(Base);
-    OS << ">(D))\n";
-    OS << "    return " << Subject.getValueAsString("CheckCode") << ";\n";
-  }
+  OS << "  if (const auto *S = dyn_cast<";
+  OS << GetSubjectWithSuffix(Base);
+  OS << ">(D))\n";
+  OS << "    return " << Subject.getValueAsString("CheckCode") << ";\n";
   OS << "  return false;\n";
   OS << "}\n\n";