Remove dead code in condition
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>
Tue, 5 Aug 2014 18:22:58 +0000 (18:22 +0000)
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>
Tue, 5 Aug 2014 18:22:58 +0000 (18:22 +0000)
Whether or not it's appropriate, labels have been first-class types
since r51511.

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

lib/AsmParser/LLParser.cpp

index d6de07a951ca6fd46ede9d6b9423cfe64b54bd76..0fa53019df1726841f14cf75b8c1f6f942d02cb2 100644 (file)
@@ -2249,7 +2249,7 @@ Value *LLParser::PerFunctionState::GetVal(const std::string &Name,
   }
 
   // Don't make placeholders with invalid type.
-  if (!Ty->isFirstClassType() && !Ty->isLabelTy()) {
+  if (!Ty->isFirstClassType()) {
     P.Error(Loc, "invalid use of a non-first-class type");
     return nullptr;
   }
@@ -2290,7 +2290,7 @@ Value *LLParser::PerFunctionState::GetVal(unsigned ID, Type *Ty,
     return nullptr;
   }
 
-  if (!Ty->isFirstClassType() && !Ty->isLabelTy()) {
+  if (!Ty->isFirstClassType()) {
     P.Error(Loc, "invalid use of a non-first-class type");
     return nullptr;
   }