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

[CIR]Use unique ID to distinguish same name structure. #740

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

566hub
Copy link
Contributor

@566hub 566hub commented Jul 15, 2024

No description provided.

Copy link
Member

@bcardosolopes bcardosolopes left a comment

Choose a reason for hiding this comment

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

Thanks @Lancern for the initial review!

Nits: I see #740 is the update on #739 comments, you shoudn't need to create another PR, just update and push your branch and github should update the PR. Closing #739, next time please try to do the suggested workflow.

demo two = {1, 2};
}

// CHECK: !ty_22demo22 = !cir.struct<struct "demo" {!cir.int<s, 32>}>
Copy link
Member

Choose a reason for hiding this comment

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

Testcases should use regex for FileCheck, see example here: clang/test/CIR/CodeGen/abstract-cond.c

// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -emit-cir %s -o %t.cir
// RUN: FileCheck --input-file=%t.cir %s

typedef struct demo{
Copy link
Member

Choose a reason for hiding this comment

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

When I try to build the testcase without your PR, the crash doesn't seem much related with fixing the unique names, what am I missing?

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.

2 participants