Skip to content

[DebugInfo] Don't record that the standard library imports itself #17226

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 15, 2018

Conversation

jrose-apple
Copy link
Contributor

This causes problems for cross-compilation -parse-stdlib tests that emit debug info. At the moment we have zero of those, but we're trying to add one (#17087).

Also, don't try to load new modules when recording imports. (This isn't harmful, just inefficient.)

@jrose-apple
Copy link
Contributor Author

@swift-ci Please test

@adrian-prantl
Copy link
Contributor

Can you add a testcase (presumably with a CHECK-NOT: line)?
Having the import for the Swift module used to be crucial but I don't thing LLDB depends on it any more. I'd say if this survives the LLDB testsuite this should be fine.

This causes problems for cross-compilation -parse-stdlib tests that
emit debug info. At the moment we have zero of those, but we're
trying to add one.

Also, don't try to load new modules when recording imports. (This
isn't harmful, just inefficient.)
@jrose-apple
Copy link
Contributor Author

Passed full testing already, so just smoke testing now for the new test Adrian asked for.

@swift-ci Please smoke test

// RUN: %FileCheck -check-prefix=NEGATIVE %s < %t.ll

// RUN: %target-swift-frontend -c -parse-stdlib -module-name NotTheStdlib %s -I %t -g -o %t.o
// RUN: %llvm-dwarfdump -a %t.o > %t.dump
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just checking the IR would have been sufficient — we already check that a DIImportedEntity(DIModule) gets lowered correctly elsewhere, but this is fine, too.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, right. I copied from the other test and just updated everything.

@jrose-apple jrose-apple merged commit 7938272 into swiftlang:master Jun 15, 2018
@jrose-apple jrose-apple deleted the tariffs branch June 15, 2018 15:23
@dcci
Copy link
Member

dcci commented Jun 15, 2018

lgtm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants