From ebbf503a6a03a210b002e5d7b51b2bcb81720e5c Mon Sep 17 00:00:00 2001 From: Sean Callanan Date: Mon, 28 Jul 2014 23:15:27 +0000 Subject: [PATCH] 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 --- lib/IRGen/IRGen.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/IRGen/IRGen.cpp b/lib/IRGen/IRGen.cpp index e827ff582c6..c166bf1cd27 100644 --- a/lib/IRGen/IRGen.cpp +++ b/lib/IRGen/IRGen.cpp @@ -160,7 +160,7 @@ static std::unique_ptr 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(); }