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:
Sean Callanan
2014-07-28 23:15:27 +00:00
parent 2010702687
commit ebbf503a6a

View File

@@ -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();
}