This way it's easier to test: if the call to external exit(0) succeeded,
program exits with code 0, no error. If the call does not work/succeed, main returns 1, so we notice it. The other way around doesn't work. :) llvm-svn: 4984
This commit is contained in:
parent
82f1580ee8
commit
2a0baf1a2b
|
|
@ -1,7 +1,7 @@
|
||||||
|
|
||||||
declare void %exit(int)
|
declare void %exit(int)
|
||||||
|
|
||||||
void %main() {
|
int %main() {
|
||||||
call void %exit(int 1)
|
call void %exit(int 0)
|
||||||
ret void
|
ret int 1
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue