Skip to content

Commit c30286a

Browse files
committed
Remove an overzealous assertion and update an explanatory comment.
rdar://problem/27086637
1 parent 8f3d26d commit c30286a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lib/IRGen/GenDecl.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -537,10 +537,10 @@ void IRGenModule::emitRuntimeRegistration() {
537537
SILFunction *EntryPoint =
538538
getSILModule().lookUpFunction(SWIFT_ENTRY_POINT_FUNCTION);
539539

540-
// If we're debugging, we probably don't have a main. Find a
541-
// function marked with the LLDBDebuggerFunction attribute instead.
542-
if (Context.LangOpts.DebuggerSupport) {
543-
assert(!EntryPoint && "unexpected main");
540+
// If we're debugging (and not in the REPL), we don't have a
541+
// main. Find a function marked with the LLDBDebuggerFunction
542+
// attribute instead.
543+
if (!EntryPoint && Context.LangOpts.DebuggerSupport) {
544544
for (SILFunction &SF : getSILModule()) {
545545
if (SF.hasLocation()) {
546546
if (Decl* D = SF.getLocation().getAsASTNode<Decl>()) {

0 commit comments

Comments
 (0)