Skip to content

Commit 768b12e

Browse files
authored
[llvm-ir] Add align to the returnAttribute rule (#3657)
1 parent 3ecefc5 commit 768b12e

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

llvm-ir/LLVMIR.g4

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,10 @@ gc: 'gc' StringLit;
114114
prefix: 'prefix' typeConst;
115115
prologue: 'prologue' typeConst;
116116
personality: 'personality' typeConst;
117-
returnAttribute: returnAttr | dereferenceable;
117+
returnAttribute:
118+
returnAttr
119+
| dereferenceable
120+
| align;
118121
funcBody: '{' basicBlock+ useListOrder* '}';
119122
basicBlock: LabelIdent? instruction* terminator;
120123
instruction: // Instructions producing values.
@@ -1433,4 +1436,4 @@ ChecksumKind: 'CSK_' (AsciiLetter | DecimalDigit | '_')*;
14331436
DwarfVirtuality:
14341437
'DW_VIRTUALITY_' (AsciiLetter | DecimalDigit | '_')*;
14351438
DwarfMacinfo: 'DW_MACINFO_' (AsciiLetter | DecimalDigit | '_')*;
1436-
DwarfOp: 'DW_OP_' (AsciiLetter | DecimalDigit | '_')*;
1439+
DwarfOp: 'DW_OP_' (AsciiLetter | DecimalDigit | '_')*;
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
define void @main() {
2+
%0 = call nonnull align 8 i32 @f()
3+
ret void
4+
}

0 commit comments

Comments
 (0)