[clang] [clang] Lower _BitInt(129+) to a different type in LLVM IR (PR #91364)
Mariya Podchishchaeva via cfe-commits
cfe-commits at lists.llvm.org
Tue Jun 18 02:18:40 PDT 2024
================
@@ -610,8 +610,26 @@ bool ConstStructBuilder::AppendBytes(CharUnits FieldOffsetInChars,
}
bool ConstStructBuilder::AppendBitField(
- const FieldDecl *Field, uint64_t FieldOffset, llvm::ConstantInt *CI,
+ const FieldDecl *Field, uint64_t FieldOffset, llvm::Constant *C,
bool AllowOverwrite) {
+
+ llvm::ConstantInt *CI = nullptr;
+ if (!isa<llvm::ConstantInt>(C)) {
+ // Constants for long _BitInt types are split into individual bytes.
+ // Try to fold these back into an integer constant. If that doesn't work
+ // out, we We are trying to initialize a bitfield with a non-trivial
----------------
Fznamznon wrote:
```suggestion
// out, then we are trying to initialize a bitfield with a non-trivial
```
https://github.com/llvm/llvm-project/pull/91364
More information about the cfe-commits
mailing list