File tree Expand file tree Collapse file tree 2 files changed +25
-2
lines changed Expand file tree Collapse file tree 2 files changed +25
-2
lines changed Original file line number Diff line number Diff line change @@ -2660,9 +2660,10 @@ def Calloc : LibBuiltin<"stdlib.h"> {
26602660}
26612661
26622662def Exit : LibBuiltin<" stdlib.h" > {
2663- let Spellings = [" exit" , " _Exit " ];
2663+ let Spellings = [" exit" ];
26642664 let Attributes = [NoReturn];
26652665 let Prototype = " void(int)" ;
2666+ let AddBuiltinPrefixedAlias = 1 ;
26662667}
26672668
26682669def Malloc : LibBuiltin<" stdlib.h" > {
@@ -3266,9 +3267,10 @@ def StrnCaseCmp : GNULibBuiltin<"strings.h"> {
32663267}
32673268
32683269def GNU_Exit : GNULibBuiltin<" unistd.h" > {
3269- let Spellings = [" _exit" ];
3270+ let Spellings = [" _exit" , " _Exit " ];
32703271 let Attributes = [NoReturn];
32713272 let Prototype = " void(int)" ;
3273+ let AddBuiltinPrefixedAlias = 1 ;
32723274}
32733275
32743276def VFork : LibBuiltin<" unistd.h" > {
Original file line number Diff line number Diff line change @@ -113,6 +113,27 @@ void t24(f_t f1) {
113113 (* p )();
114114}
115115
116+ // CHECK:define{{.*}} void @t25() [[NUW]] {
117+ // CHECK: call void @exit(i32 noundef 1)
118+ // CHECK-NEXT: unreachable
119+ void t25 (void ) {
120+ __builtin_exit (1 );
121+ }
122+
123+ // CHECK:define{{.*}} void @t26() [[NUW]] {
124+ // CHECK: call void @_exit(i32 noundef 2)
125+ // CHECK-NEXT: unreachable
126+ void t26 (void ) {
127+ __builtin__exit (2 );
128+ }
129+
130+ // CHECK:define{{.*}} void @t27() [[NUW]] {
131+ // CHECK: call void @_Exit(i32 noundef 3)
132+ // CHECK-NEXT: unreachable
133+ void t27 (void ) {
134+ __builtin__Exit (3 );
135+ }
136+
116137// CHECK: attributes [[NUW]] = { noinline nounwind{{.*}} }
117138// CHECK: attributes [[NR]] = { noinline noreturn nounwind{{.*}} }
118139// CHECK: attributes [[COLDDEF]] = { cold {{.*}}}
You can’t perform that action at this time.
0 commit comments