Home | History | Annotate | Download | only in CodeGen

Lines Matching defs:Case

73   case Stmt::NoStmtClass:
74 case Stmt::CXXCatchStmtClass:
75 case Stmt::SEHExceptStmtClass:
76 case Stmt::SEHFinallyStmtClass:
77 case Stmt::MSDependentExistsStmtClass:
78 case Stmt::OMPParallelDirectiveClass:
80 case Stmt::NullStmtClass:
81 case Stmt::CompoundStmtClass:
82 case Stmt::DeclStmtClass:
83 case Stmt::LabelStmtClass:
84 case Stmt::AttributedStmtClass:
85 case Stmt::GotoStmtClass:
86 case Stmt::BreakStmtClass:
87 case Stmt::ContinueStmtClass:
88 case Stmt::DefaultStmtClass:
89 case Stmt::CaseStmtClass:
95 case Stmt::Type##Class:
111 // insertion point unreachable in the common case of a call like
126 case Stmt::IndirectGotoStmtClass:
129 case Stmt::IfStmtClass: EmitIfStmt(cast<IfStmt>(*S)); break;
130 case Stmt::WhileStmtClass: EmitWhileStmt(cast<WhileStmt>(*S)); break;
131 case Stmt::DoStmtClass: EmitDoStmt(cast<DoStmt>(*S)); break;
132 case Stmt::ForStmtClass: EmitForStmt(cast<ForStmt>(*S)); break;
134 case Stmt::ReturnStmtClass: EmitReturnStmt(cast<ReturnStmt>(*S)); break;
136 case Stmt::SwitchStmtClass: EmitSwitchStmt(cast<SwitchStmt>(*S)); break;
137 case Stmt::GCCAsmStmtClass: // Intentional fall-through.
138 case Stmt::MSAsmStmtClass: EmitAsmStmt(cast<AsmStmt>(*S)); break;
139 case Stmt::CapturedStmtClass:
142 case Stmt::ObjCAtTryStmtClass:
145 case Stmt::ObjCAtCatchStmtClass:
148 case Stmt::ObjCAtFinallyStmtClass:
151 case Stmt::ObjCAtThrowStmtClass:
154 case Stmt::ObjCAtSynchronizedStmtClass:
157 case Stmt::ObjCForCollectionStmtClass:
160 case Stmt::ObjCAutoreleasePoolStmtClass:
164 case Stmt::CXXTryStmtClass:
167 case Stmt::CXXForRangeStmtClass:
169 case Stmt::SEHTryStmtClass:
178 case Stmt::NullStmtClass: break;
179 case Stmt::CompoundStmtClass: EmitCompoundStmt(cast<CompoundStmt>(*S)); break;
180 case Stmt::DeclStmtClass: EmitDeclStmt(cast<DeclStmt>(*S)); break;
181 case Stmt::LabelStmtClass: EmitLabelStmt(cast<LabelStmt>(*S)); break;
182 case Stmt::AttributedStmtClass:
184 case Stmt::GotoStmtClass: EmitGotoStmt(cast<GotoStmt>(*S)); break;
185 case Stmt::BreakStmtClass: EmitBreakStmt(cast<BreakStmt>(*S)); break;
186 case Stmt::ContinueStmtClass: EmitContinueStmt(cast<ContinueStmt>(*S)); break;
187 case Stmt::DefaultStmtClass: EmitDefaultStmt(cast<DefaultStmt>(*S)); break;
188 case Stmt::CaseStmtClass: EmitCaseStmt(cast<CaseStmt>(*S)); break;
219 // We have to special case labels here. They are statements, but when put
683 // Create a separate cleanup scope for the body, in case it is not
749 // Create a block for the increment. In case of a 'continue', we jump there.
835 case TEK_Scalar:
838 case TEK_Complex:
843 case TEK_Aggregate: {
900 /// EmitCaseStmtRange - If case statement range is not too big then
909 // Emit the code for this case. We do this first to make sure it is
960 // case statement and its block can be elided. This situation only happens
961 // when we've constant-folded the switch, are emitting the constant case,
962 // and part of the constant case includes another case statement. For
963 // instance: switch (4) { case 4: do { case 5: } while (1); }
969 // Handle case ranges.
978 // If the body of the case is just a 'break', and if there was no fallthrough,
988 // If there was a fallthrough into this case, make sure to redirect it to
1003 // code where we have many case statements nested together, i.e.:
1004 // case 1:
1005 // case 2:
1006 // case 3: etc.
1007 // Handling this recursively will create a new block for each case statement
1008 // that falls through to the next case which is IR intensive. It also causes
1010 // sequential non-range case statements specially.
1039 /// case 5:
1048 /// the case) then return CSFC_FallThrough. If we handled it and found a break
1051 /// If Case is non-null, then we are looking for the specified case, checking
1052 /// that nothing we jump over contains labels. If Case is null, then we found
1053 /// the case and are looking for the break.
1055 /// If the recursive walk actually finds our Case, then we set FoundCase to
1060 const SwitchCase *Case,
1065 return Case ? CSFC_Success : CSFC_FallThrough;
1067 // If this is the switchcase (case 4: or default) that we're looking for, then
1070 if (S == Case) {
1076 // Otherwise, this is some other case or default statement, just ignore it.
1077 return CollectStatementsForCase(SC->getSubStmt(), Case, FoundCase,
1083 if (Case == 0 && isa<BreakStmt>(S))
1092 if (Case) {
1098 // If we're looking for the case, just see if we can skip each of the
1100 for (; Case && I != E; ++I) {
1103 switch (CollectStatementsForCase(*I, Case, FoundCase, ResultStmts)) {
1104 case CSFC_Failure: return CSFC_Failure;
1105 case CSFC_Success:
1107 // have the case and is skippable, or 2) does contain the case value
1108 // and also contains the break to exit the switch. In the later case,
1111 // If we found the case and skipped declarations, we can't do the
1122 case CSFC_FallThrough:
1124 // case started to include statements. Consider the rest of the
1126 assert(FoundCase && "Didn't find case but returned fallthrough?");
1127 // We recursively found Case, so we're not looking for it anymore.
1128 Case = 0;
1130 // If we found the case and skipped declarations, we can't do the
1143 case CSFC_Failure: return CSFC_Failure;
1144 case CSFC_FallThrough:
1148 case CSFC_Success:
1159 return Case ? CSFC_Success : CSFC_FallThrough;
1165 if (Case) {
1181 /// FindCaseStatementsForValue - Find the case statement being jumped to and
1189 // First step, find the switch case that is being branched to. We can do this
1191 const SwitchCase *Case = S.getSwitchCaseList();
1194 for (; Case; Case = Case->getNextSwitchCase()) {
1195 // It's either a default or case. Just remember the default statement in
1196 // case we're not jumping to any numbered cases.
1197 if (const DefaultStmt *DS = dyn_cast<DefaultStmt>(Case)) {
1202 // Check to see if this case is the one we're looking for.
1203 const CaseStmt *CS = cast<CaseStmt>(Case);
1204 // Don't handle case ranges yet.
1207 // If we found our case, remember it as 'case'.
1212 // If we didn't find a matching case, we use a default if it exists, or we
1214 if (Case == 0) {
1219 Case = DefaultCase;
1222 // Ok, we know which case is being jumped to, try to collect all the
1224 // check to see that the recursive walk actually found our case statement.
1229 // case 4: ...
1231 return CollectStatementsForCase(S.getBody(), Case, FoundCase,
1249 // emit the live case statement (if any) of the switch.
1258 // we can temporarily enforce this to ensure that any embedded case
1262 // Okay, we can dead code eliminate everything except this case. Emit the
1279 // explicit case ranges tests can have a place to jump to on
1301 // Update the default block in case explicit case range tests have
1339 case '*':
1340 case '?':
1341 case '!':
1342 case '=': // Will see this and the following in mult-alt constraints.
1343 case '+':
1345 case '#': // Ignore the rest of the constraint alternative.
1349 case ',':
1352 case 'g':
1355 case '[': {