do not assert on output of numeric 0 from a js handler

This commit is contained in:
Alon Zakai 2013-10-10 13:11:23 -04:00
Родитель 3ed0d95350
Коммит da9b1401a8
2 изменённых файлов: 16 добавлений и 1 удалений

Просмотреть файл

@ -536,7 +536,6 @@ function JSify(data, functionsOnly, givenFunctions) {
case 'unreachable': line.JS = unreachableHandler(line); break;
default: throw 'what is this line? ' + dump(line);
}
assert(line.JS);
//if (ASM_JS) assert(line.JS.indexOf('var ') < 0, dump(line));
if (line.assignTo) makeAssign(line);
Framework.currItem = null;

16
tests/cases/sub_11_0.ll Normal file
Просмотреть файл

@ -0,0 +1,16 @@
; ModuleID = 'tests/hello_world.bc'
@.str = private unnamed_addr constant [15 x i8] c"hello, world!\0A\00", align 1 ; [#uses=1 type=[15 x i8]*]
; [#uses=0]
define i32 @main() {
entry:
%retval = alloca i32, align 4 ; [#uses=1 type=i32*]
%0 = sub nsw i32 1, 1
store i32 %0, i32* %retval
%call = call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([15 x i8]* @.str, i32 0, i32 0)) ; [#uses=0 type=i32]
ret i32 1
}
; [#uses=1]
declare i32 @printf(i8*, ...)