@@ -109,23 +109,22 @@ ByteCodeEmitter::compileFunc(const FunctionDecl *FuncDecl) {
109
109
// Return a dummy function if compilation failed.
110
110
if (BailLocation)
111
111
return llvm::make_error<ByteCodeGenError>(*BailLocation);
112
- else {
113
- Func->setIsFullyCompiled (true );
114
- return Func;
115
- }
116
- } else {
117
- // Create scopes from descriptors.
118
- llvm::SmallVector<Scope, 2 > Scopes;
119
- for (auto &DS : Descriptors) {
120
- Scopes.emplace_back (std::move (DS));
121
- }
122
112
123
- // Set the function's code.
124
- Func->setCode (NextLocalOffset, std::move (Code), std::move (SrcMap),
125
- std::move (Scopes), FuncDecl->hasBody ());
126
113
Func->setIsFullyCompiled (true );
127
114
return Func;
128
115
}
116
+
117
+ // Create scopes from descriptors.
118
+ llvm::SmallVector<Scope, 2 > Scopes;
119
+ for (auto &DS : Descriptors) {
120
+ Scopes.emplace_back (std::move (DS));
121
+ }
122
+
123
+ // Set the function's code.
124
+ Func->setCode (NextLocalOffset, std::move (Code), std::move (SrcMap),
125
+ std::move (Scopes), FuncDecl->hasBody ());
126
+ Func->setIsFullyCompiled (true );
127
+ return Func;
129
128
}
130
129
131
130
Scope::Local ByteCodeEmitter::createLocal (Descriptor *D) {
0 commit comments