mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
In all cases where playgrounds need to register
classes, UseJIT will also be set, so we don't need to check. And there's an important case where we *don't* need to register classes: testcases, which break if we do try to register classes, with the following assertion: Assertion failed: (registered == c && "objc_readClassPair failed to instantiate the class in-place"), function swift_instantiateObjCClass, file /Volumes/Excelion/swift/lldb-work/llvm/tools/swift/stdlib/runtime/SwiftObject.mm, line 594. So only register classes if UseJIT is enabled, and ignore the playground flag. Swift SVN r20655
This commit is contained in:
@@ -160,7 +160,7 @@ static std::unique_ptr<llvm::Module> performIRGeneration(IRGenOptions &Opts,
|
||||
IGM.emitLazyDefinitions();
|
||||
|
||||
// Emit intializers for debugger functions if needed
|
||||
if (IGM.ObjCInterop && (Opts.UseJIT || Opts.Playground)) {
|
||||
if (IGM.ObjCInterop && Opts.UseJIT) {
|
||||
IGM.emitDebuggerInitializers();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user