File tree Expand file tree Collapse file tree 1 file changed +4
-12
lines changed Expand file tree Collapse file tree 1 file changed +4
-12
lines changed Original file line number Diff line number Diff line change @@ -2918,19 +2918,13 @@ bool Compiler<Emitter>::VisitMaterializeTemporaryExpr(
2918
2918
2919
2919
const LifetimeExtendedTemporaryDecl *TempDecl =
2920
2920
E->getLifetimeExtendedTemporaryDecl ();
2921
- if (IsStatic)
2922
- assert (TempDecl);
2921
+ assert (TempDecl);
2923
2922
2924
2923
if (SubExprT) {
2925
2924
if (!this ->visit (SubExpr))
2926
2925
return false ;
2927
- if (IsStatic) {
2928
- if (!this ->emitInitGlobalTemp (*SubExprT, *GlobalIndex, TempDecl, E))
2929
- return false ;
2930
- } else {
2931
- if (!this ->emitInitGlobal (*SubExprT, *GlobalIndex, E))
2932
- return false ;
2933
- }
2926
+ if (!this ->emitInitGlobalTemp (*SubExprT, *GlobalIndex, TempDecl, E))
2927
+ return false ;
2934
2928
return this ->emitGetPtrGlobal (*GlobalIndex, E);
2935
2929
}
2936
2930
@@ -2941,9 +2935,7 @@ bool Compiler<Emitter>::VisitMaterializeTemporaryExpr(
2941
2935
return false ;
2942
2936
if (!this ->visitInitializer (SubExpr))
2943
2937
return false ;
2944
- if (IsStatic)
2945
- return this ->emitInitGlobalTempComp (TempDecl, E);
2946
- return true ;
2938
+ return this ->emitInitGlobalTempComp (TempDecl, E);
2947
2939
}
2948
2940
2949
2941
// For everyhing else, use local variables.
You can’t perform that action at this time.
0 commit comments