Skip to content
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

Supplement to fix failures for imports with LLVM-17 #1415

Conversation

Liuyunlong0336
Copy link

LLVM-17 expects imports list in retainedNode field of DISubprogram, and flang has completed this step but it's still generating imports list as imports field of DICompilationUnit.

Flang is now updated to new IR as expected by LLVM-17.

LLVM-17 expects imports list in retainedNode field of DISubprogram,
and flang has completed this step but it's still generating imports
list as imports field of DICompilationUnit.

Flang is now updated to new IR as expected by LLVM-17.
@bryanpkc
Copy link
Collaborator

@Liuyunlong0336 In your commit message you should probably mention that this is an update of the fix initially introduced in 08b46d7, and explain why that commit couldn't catch the case you are fixing.

@bryanpkc
Copy link
Collaborator

@alokkrsharma Does this look okay to you?

@@ -935,7 +935,6 @@ static const MDTemplate Tmpl_DICompileUnit_ver39[] = {
{ "retainedTypes", NodeField, 0 },
{ "globals", NodeField, 0 },
{ "emissionKind", DWEmissionField, 0 },
Copy link
Collaborator

Choose a reason for hiding this comment

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

Shouldn't a new array Tmpl_DICompileUnit_ver170 and Tmpl_DICompileUnit_ver39 kept intact for backward compatibility? Although our inner policy is kind of 'no going back', others may not be so happy about it.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm pretty sure that LLVM 17 still accepts imports as an optional field. There should be no need to delete this. It should be feasible for Classic Flang to generate this field as imports: null or imports: !2 where !2 is empty.

@bryanpkc
Copy link
Collaborator

bryanpkc commented Oct 4, 2023

Upon further review, I don't think this PR is necessary. #1414 had fixed the problem properly.

@bryanpkc bryanpkc closed this Oct 4, 2023
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.

4 participants