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(
29182918
29192919 const LifetimeExtendedTemporaryDecl *TempDecl =
29202920 E->getLifetimeExtendedTemporaryDecl ();
2921- if (IsStatic)
2922- assert (TempDecl);
2921+ assert (TempDecl);
29232922
29242923 if (SubExprT) {
29252924 if (!this ->visit (SubExpr))
29262925 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 ;
29342928 return this ->emitGetPtrGlobal (*GlobalIndex, E);
29352929 }
29362930
@@ -2941,9 +2935,7 @@ bool Compiler<Emitter>::VisitMaterializeTemporaryExpr(
29412935 return false ;
29422936 if (!this ->visitInitializer (SubExpr))
29432937 return false ;
2944- if (IsStatic)
2945- return this ->emitInitGlobalTempComp (TempDecl, E);
2946- return true ;
2938+ return this ->emitInitGlobalTempComp (TempDecl, E);
29472939 }
29482940
29492941 // For everyhing else, use local variables.
You can’t perform that action at this time.
0 commit comments