diff options
author | Karl Schimpf <kschimpf@google.com> | 2013-08-30 09:10:39 -0700 |
---|---|---|
committer | Karl Schimpf <kschimpf@google.com> | 2013-08-30 09:10:39 -0700 |
commit | 06bf94d7c3fd693b3c6e3b71178514e5ed59489a (patch) | |
tree | 71cfcd99369833fc7635ffaa1865398a1963bd87 /test | |
parent | 2302e5d39e2302962d1a0e45d60e00ed47b9b061 (diff) |
Revert "Remove generating STRUCT_ANON records in PNaCl bitcode files."
This reverts commit 2302e5d39e2302962d1a0e45d60e00ed47b9b061.
BUG=
R=eliben@chromium.org
Review URL: https://codereview.chromium.org/23827002
Diffstat (limited to 'test')
-rw-r--r-- | test/NaCl/Bitcode/no-structs.ll | 38 | ||||
-rw-r--r-- | test/NaCl/Bitcode/ptrtoint-elide.ll | 32 |
2 files changed, 16 insertions, 54 deletions
diff --git a/test/NaCl/Bitcode/no-structs.ll b/test/NaCl/Bitcode/no-structs.ll deleted file mode 100644 index 1f9b1279fe..0000000000 --- a/test/NaCl/Bitcode/no-structs.ll +++ /dev/null @@ -1,38 +0,0 @@ -; Tests that even though global variables can define structured types, -; they types are not put into the bitcode file. - -; RUN: llvm-as < %s | pnacl-freeze --pnacl-version=1 \ -; RUN: | pnacl-bcanalyzer -dump-records \ -; RUN: | FileCheck %s - -; RUN: llvm-as < %s | pnacl-freeze --pnacl-version=2 \ -; RUN: | pnacl-bcanalyzer -dump-records \ -; RUN: | FileCheck %s - -declare void @func() - -@compound = internal global <{ [4 x i8], i32 }> - <{ [4 x i8] c"home", i32 ptrtoint (void ()* @func to i32) }> - -define void @CheckBitcastGlobal() { - %1 = bitcast <{ [4 x i8], i32}>* @compound to i32* - %2 = load i32* %1, align 4 - ret void -} - -define void @CheckPtrToIntGlobal() { - %1 = ptrtoint <{ [4 x i8], i32 }>* @compound to i32 - %2 = add i32 %1, 0 - ret void -} - -; Note that neither pnacl-version defines a struct type. - -; CHECK: <TYPE_BLOCK_ID> -; CHECK-NEXT: <NUMENTRY op0=5/> -; CHECK-NEXT: <INTEGER op0=32/> -; CHECK-NEXT: <VOID/> -; CHECK-NEXT: <FUNCTION op0=0 op1=1/> -; CHECK-NEXT: <POINTER op0=2 op1=0/> -; CHECK-NEXT: <POINTER op0=0 op1=0/> -; CHECK-NEXT: </TYPE_BLOCK_ID> diff --git a/test/NaCl/Bitcode/ptrtoint-elide.ll b/test/NaCl/Bitcode/ptrtoint-elide.ll index 3ef7909fe7..eba451c289 100644 --- a/test/NaCl/Bitcode/ptrtoint-elide.ll +++ b/test/NaCl/Bitcode/ptrtoint-elide.ll @@ -638,14 +638,14 @@ define void @TestCasts() { ; PF1-NEXT: <INST_CAST op0=1 op1=0 op2=9/> ; PF1-NEXT: <INST_CAST op0=6 op1=2 op2=0/> ; PF1-NEXT: <INST_CAST op0=2 op1=2 op2=0/> -; PF1-NEXT: <INST_CAST op0=8 op1=11 op2=1/> -; PF1-NEXT: <INST_CAST op0=4 op1=11 op2=1/> -; PF1-NEXT: <INST_CAST op0=9 op1=11 op2=2/> -; PF1-NEXT: <INST_CAST op0=6 op1=11 op2=2/> -; PF1-NEXT: <INST_CAST op0=9 op1=12 op2=5/> -; PF1-NEXT: <INST_CAST op0=8 op1=12 op2=5/> -; PF1-NEXT: <INST_CAST op0=13 op1=12 op2=6/> -; PF1-NEXT: <INST_CAST op0=10 op1=12 op2=6/> +; PF1-NEXT: <INST_CAST op0=8 op1=13 op2=1/> +; PF1-NEXT: <INST_CAST op0=4 op1=13 op2=1/> +; PF1-NEXT: <INST_CAST op0=9 op1=13 op2=2/> +; PF1-NEXT: <INST_CAST op0=6 op1=13 op2=2/> +; PF1-NEXT: <INST_CAST op0=9 op1=14 op2=5/> +; PF1-NEXT: <INST_CAST op0=8 op1=14 op2=5/> +; PF1-NEXT: <INST_CAST op0=13 op1=14 op2=6/> +; PF1-NEXT: <INST_CAST op0=10 op1=14 op2=6/> ; PF1-NEXT: <INST_RET/> ; PF1-NEXT: </FUNCTION_BLOCK> @@ -670,14 +670,14 @@ define void @TestCasts() { ; PF2-NEXT: <INST_ALLOCA op0=2 op1=4/> ; PF2-NEXT: <INST_CAST op0=5 op1=2 op2=0/> ; PF2-NEXT: <INST_CAST op0=2 op1=2 op2=0/> -; PF2-NEXT: <INST_CAST op0=7 op1=11 op2=1/> -; PF2-NEXT: <INST_CAST op0=4 op1=11 op2=1/> -; PF2-NEXT: <INST_CAST op0=8 op1=11 op2=2/> -; PF2-NEXT: <INST_CAST op0=6 op1=11 op2=2/> -; PF2-NEXT: <INST_CAST op0=8 op1=12 op2=5/> -; PF2-NEXT: <INST_CAST op0=8 op1=12 op2=5/> -; PF2-NEXT: <INST_CAST op0=12 op1=12 op2=6/> -; PF2-NEXT: <INST_CAST op0=10 op1=12 op2=6/> +; PF2-NEXT: <INST_CAST op0=7 op1=13 op2=1/> +; PF2-NEXT: <INST_CAST op0=4 op1=13 op2=1/> +; PF2-NEXT: <INST_CAST op0=8 op1=13 op2=2/> +; PF2-NEXT: <INST_CAST op0=6 op1=13 op2=2/> +; PF2-NEXT: <INST_CAST op0=8 op1=14 op2=5/> +; PF2-NEXT: <INST_CAST op0=8 op1=14 op2=5/> +; PF2-NEXT: <INST_CAST op0=12 op1=14 op2=6/> +; PF2-NEXT: <INST_CAST op0=10 op1=14 op2=6/> ; PF2-NEXT: <INST_RET/> ; PF2-NEXT: </FUNCTION_BLOCK> |