-
Notifications
You must be signed in to change notification settings - Fork 14.3k
[CIR] Fix NYI AAPCS bit-fields by skipping unsupported case #145560
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
@llvm/pr-subscribers-clang Author: None (Andres-Salamanca) ChangesThis PR addresses the error mentioned in #145067 (comment), which occurs on ARM when handling an unsupported bit-field case. The patch removes the error and replaces it with an assert, marking the missing feature. Full diff: https://github.com/llvm/llvm-project/pull/145560.diff 1 Files Affected:
diff --git a/clang/lib/CIR/CodeGen/CIRGenRecordLayoutBuilder.cpp b/clang/lib/CIR/CodeGen/CIRGenRecordLayoutBuilder.cpp
index 349c6e75ce36c..4643f6c1a9cef 100644
--- a/clang/lib/CIR/CodeGen/CIRGenRecordLayoutBuilder.cpp
+++ b/clang/lib/CIR/CodeGen/CIRGenRecordLayoutBuilder.cpp
@@ -778,10 +778,8 @@ void CIRRecordLowering::computeVolatileBitfields() {
!cirGenTypes.getCGModule().getCodeGenOpts().AAPCSBitfieldWidth)
return;
- for ([[maybe_unused]] auto &I : bitFields) {
+ for ([[maybe_unused]] auto &I : bitFields)
assert(!cir::MissingFeatures::armComputeVolatileBitfields());
- cirGenTypes.getCGModule().errorNYI("NYI AAPCS bit-fields");
- }
}
void CIRRecordLowering::accumulateBases(const CXXRecordDecl *cxxRecordDecl) {
|
@llvm/pr-subscribers-clangir Author: None (Andres-Salamanca) ChangesThis PR addresses the error mentioned in #145067 (comment), which occurs on ARM when handling an unsupported bit-field case. The patch removes the error and replaces it with an assert, marking the missing feature. Full diff: https://github.com/llvm/llvm-project/pull/145560.diff 1 Files Affected:
diff --git a/clang/lib/CIR/CodeGen/CIRGenRecordLayoutBuilder.cpp b/clang/lib/CIR/CodeGen/CIRGenRecordLayoutBuilder.cpp
index 349c6e75ce36c..4643f6c1a9cef 100644
--- a/clang/lib/CIR/CodeGen/CIRGenRecordLayoutBuilder.cpp
+++ b/clang/lib/CIR/CodeGen/CIRGenRecordLayoutBuilder.cpp
@@ -778,10 +778,8 @@ void CIRRecordLowering::computeVolatileBitfields() {
!cirGenTypes.getCGModule().getCodeGenOpts().AAPCSBitfieldWidth)
return;
- for ([[maybe_unused]] auto &I : bitFields) {
+ for ([[maybe_unused]] auto &I : bitFields)
assert(!cir::MissingFeatures::armComputeVolatileBitfields());
- cirGenTypes.getCGModule().errorNYI("NYI AAPCS bit-fields");
- }
}
void CIRRecordLowering::accumulateBases(const CXXRecordDecl *cxxRecordDecl) {
|
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 handling this!
I have a minor comment, but let's just merge this as is to get the tests passing.
@@ -778,10 +778,8 @@ void CIRRecordLowering::computeVolatileBitfields() { | |||
!cirGenTypes.getCGModule().getCodeGenOpts().AAPCSBitfieldWidth) | |||
return; | |||
|
|||
for ([[maybe_unused]] auto &I : bitFields) { | |||
for ([[maybe_unused]] auto &I : bitFields) |
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 for loop isn't really needed here.
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.
Done
) This PR addresses the error mentioned in llvm#145067 (comment), which occurs on ARM when handling an unsupported bit-field case. The patch removes the error and replaces it with an assert, marking the missing feature.
This PR addresses the error mentioned in #145067 (comment), which occurs on ARM when handling an unsupported bit-field case. The patch removes the error and replaces it with an assert, marking the missing feature.