r210338 - Replacing r210333 with an improved solution; we should never reach this code with any other loop hint options.
Aaron Ballman
aaron at aaronballman.com
Fri Jun 6 08:01:47 PDT 2014
Author: aaronballman
Date: Fri Jun 6 10:01:47 2014
New Revision: 210338
URL: http://llvm.org/viewvc/llvm-project?rev=210338&view=rev
Log:
Replacing r210333 with an improved solution; we should never reach this code with any other loop hint options.
Modified:
cfe/trunk/lib/Sema/SemaStmtAttr.cpp
Modified: cfe/trunk/lib/Sema/SemaStmtAttr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaStmtAttr.cpp?rev=210338&r1=210337&r2=210338&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaStmtAttr.cpp (original)
+++ cfe/trunk/lib/Sema/SemaStmtAttr.cpp Fri Jun 6 10:01:47 2014
@@ -69,7 +69,7 @@ static Attr *handleLoopHintAttr(Sema &S,
.Case("interleave_count", LoopHintAttr::InterleaveCount)
.Default(LoopHintAttr::Vectorize);
- int ValueInt = 0;
+ int ValueInt;
if (Option == LoopHintAttr::Vectorize || Option == LoopHintAttr::Interleave) {
if (!ValueInfo) {
S.Diag(ValueLoc->Loc, diag::err_pragma_loop_invalid_keyword)
@@ -102,7 +102,8 @@ static Attr *handleLoopHintAttr(Sema &S,
<< /*MissingValue=*/false << ValueInt;
return nullptr;
}
- }
+ } else
+ llvm_unreachable("Unknown loop hint option");
return LoopHintAttr::CreateImplicit(S.Context, Option, ValueInt,
A.getRange());
More information about the cfe-commits
mailing list