-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Bring the Swift frontend's handling of DIFiles in synch with CFE. #22392
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
Conversation
@swift-ci test and merge |
test/DebugInfo/basic.swift
Outdated
@@ -3,6 +3,7 @@ | |||
// Verify that we don't emit any debug info by default. | |||
// RUN: %target-swift-frontend %s -emit-ir -o - \ | |||
// RUN: | %FileCheck %s --check-prefix NDEBUG | |||
// NDEBUG: foo |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This breaks the NDEBUG-NOT
checks below.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure I follow. Why?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The FileCheck interpretation of
CHECK: a
CHECK-NOT: b
CHECK-NOT: c
is "find 'a', then make sure that I don't find 'b' or 'c' after it". It doesn't stop 'b' and 'c' from appearing before 'a'.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for clarifying! That's actually what I intended effect here: I just wanted to add a positive check to ensure that we emit LLVM IR at all, in this case the function definition and then make sure no !dbg attachment appears in the function body after that. Since foo
is a terrible string to search for I changed it to source_filename now, which is guaranteed to appear at the very top of the output.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, okay! Sorry, seen too many cases where I add a CHECK line and miss that I just allowed a negative pattern to slip in before it.
d72f752
to
7e68a78
Compare
@swift-ci test and merge |
1 similar comment
@swift-ci test and merge |
This applies the same changes from Clang CFE r349065 to the Swift frontend to unify how filenames, cmpilation directories and absolute paths in filenames and path remappings are handled.
7e68a78
to
21f2c3d
Compare
@swift-ci test and merge |
1 similar comment
@swift-ci test and merge |
(Fixed and edge case that required the SDK path to have zero common components with the compilation directory, such as Xcode installed in /Application to reproduce) |
@swift-ci test |
This applies the same changes from Clang CFE r349065 to the Swift
frontend to unify how filenames, cmpilation directories and absolute
paths in filenames and path remappings are handled.