mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
SILOptimizer: Always create SILFunctions with a generic environment
This commit is contained in:
@@ -488,10 +488,11 @@ void FunctionSignatureTransform::createFunctionSignatureOptimizedFunction() {
|
||||
DEBUG(llvm::dbgs() << " -> create specialized function " << Name << "\n");
|
||||
|
||||
NewF = M.createFunction(linkage, Name, createOptimizedSILFunctionType(),
|
||||
nullptr, F->getLocation(), F->isBare(),
|
||||
F->isTransparent(), F->isFragile(), F->isThunk(),
|
||||
F->getClassVisibility(), F->getInlineStrategy(),
|
||||
F->getEffectsKind(), nullptr, F->getDebugScope());
|
||||
F->getGenericEnvironment(), F->getLocation(),
|
||||
F->isBare(), F->isTransparent(), F->isFragile(),
|
||||
F->isThunk(), F->getClassVisibility(),
|
||||
F->getInlineStrategy(), F->getEffectsKind(), nullptr,
|
||||
F->getDebugScope());
|
||||
if (F->hasUnqualifiedOwnership()) {
|
||||
NewF->setUnqualifiedOwnership();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user