diff options
Diffstat (limited to 'clang/lib/CodeGen/CGStmt.cpp')
| -rw-r--r-- | clang/lib/CodeGen/CGStmt.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/clang/lib/CodeGen/CGStmt.cpp b/clang/lib/CodeGen/CGStmt.cpp index 86c0964a857..b1d1bf874dd 100644 --- a/clang/lib/CodeGen/CGStmt.cpp +++ b/clang/lib/CodeGen/CGStmt.cpp @@ -608,7 +608,7 @@ void CodeGenFunction::EmitIfStmt(const IfStmt &S) { EmitStmt(S.getInit()); if (S.getConditionVariable()) - EmitAutoVarDecl(*S.getConditionVariable()); + EmitDecl(*S.getConditionVariable()); // If the condition constant folds and can be elided, try to avoid emitting // the condition and the dead arm of the if/else. @@ -705,7 +705,7 @@ void CodeGenFunction::EmitWhileStmt(const WhileStmt &S, RunCleanupsScope ConditionScope(*this); if (S.getConditionVariable()) - EmitAutoVarDecl(*S.getConditionVariable()); + EmitDecl(*S.getConditionVariable()); // Evaluate the conditional in the while header. C99 6.8.5.1: The // evaluation of the controlling expression takes place before each @@ -865,7 +865,7 @@ void CodeGenFunction::EmitForStmt(const ForStmt &S, // If the for statement has a condition scope, emit the local variable // declaration. if (S.getConditionVariable()) { - EmitAutoVarDecl(*S.getConditionVariable()); + EmitDecl(*S.getConditionVariable()); } llvm::BasicBlock *ExitBlock = LoopExit.getBlock(); @@ -1574,7 +1574,7 @@ void CodeGenFunction::EmitSwitchStmt(const SwitchStmt &S) { // Emit the condition variable if needed inside the entire cleanup scope // used by this special case for constant folded switches. if (S.getConditionVariable()) - EmitAutoVarDecl(*S.getConditionVariable()); + EmitDecl(*S.getConditionVariable()); // At this point, we are no longer "within" a switch instance, so // we can temporarily enforce this to ensure that any embedded case @@ -1603,7 +1603,7 @@ void CodeGenFunction::EmitSwitchStmt(const SwitchStmt &S) { EmitStmt(S.getInit()); if (S.getConditionVariable()) - EmitAutoVarDecl(*S.getConditionVariable()); + EmitDecl(*S.getConditionVariable()); llvm::Value *CondV = EmitScalarExpr(S.getCond()); // Create basic block to hold stuff that comes after switch |

