]> granicus.if.org Git - clang/commitdiff
Replacing r210333 with an improved solution; we should never reach this code with...
authorAaron Ballman <aaron@aaronballman.com>
Fri, 6 Jun 2014 15:01:47 +0000 (15:01 +0000)
committerAaron Ballman <aaron@aaronballman.com>
Fri, 6 Jun 2014 15:01:47 +0000 (15:01 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@210338 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Sema/SemaStmtAttr.cpp

index 5f73bc1da11c932596e218ad9b98a84f569aa4a9..5b1766a0b26f99a7d0dc7424fc0f1ce5e01fc0b9 100644 (file)
@@ -69,7 +69,7 @@ static Attr *handleLoopHintAttr(Sema &S, Stmt *St, const AttributeList &A,
           .Case("interleave_count", LoopHintAttr::InterleaveCount)\r
           .Default(LoopHintAttr::Vectorize);\r
 \r
-  int ValueInt = 0;\r
+  int ValueInt;\r
   if (Option == LoopHintAttr::Vectorize || Option == LoopHintAttr::Interleave) {\r
     if (!ValueInfo) {\r
       S.Diag(ValueLoc->Loc, diag::err_pragma_loop_invalid_keyword)\r
@@ -102,7 +102,8 @@ static Attr *handleLoopHintAttr(Sema &S, Stmt *St, const AttributeList &A,
           << /*MissingValue=*/false << ValueInt;\r
       return nullptr;\r
     }\r
-  }\r
+  } else\r
+    llvm_unreachable("Unknown loop hint option");\r
 \r
   return LoopHintAttr::CreateImplicit(S.Context, Option, ValueInt,\r
                                       A.getRange());\r