Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(318)

Unified Diff: test/NaCl/Bitcode/struct-types.ll

Issue 14495008: Create type IDs based on reference counts. (Closed) Base URL: http://git.chromium.org/native_client/pnacl-llvm.git@master
Patch Set: Fix typo in comment. Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: test/NaCl/Bitcode/struct-types.ll
diff --git a/test/NaCl/Bitcode/struct-types.ll b/test/NaCl/Bitcode/struct-types.ll
new file mode 100644
index 0000000000000000000000000000000000000000..39b095f010afaf0ac27956fc9ef877b5219a4751
--- /dev/null
+++ b/test/NaCl/Bitcode/struct-types.ll
@@ -0,0 +1,27 @@
+; Checks if llvm bitcode defines a struct type before the pointer type,
+; even if the struct definintion appears after the pointer type, while
+; pnacl bitcode moves the pointer before the struct.
+; RUN: llvm-as < %s | llvm-bcanalyzer -dump | FileCheck %s -check-prefix=LLVM
+; RUN: llvm-as < %s | pnacl-freeze | pnacl-bcanalyzer -dump | FileCheck %s -check-prefix=PNACL
+
+%1 = type %0*
+%0 = type {i8}
jvoung (off chromium) 2013/05/15 21:01:36 How come %0 isn't on line 7 and %1 on line 8? I g
Karl 2013/05/20 21:48:51 I created a more complicated example. Hope this is
+; LLVM: <TYPE_BLOCK_ID {{.*}}>
+; LLVM: <STRUCT_NAMED {{.*}}/>
+; LLVM: <POINTER {{.*}}/>
+; LLVM: </TYPE_BLOCK_ID>
+
+; PNACL: <TYPE_BLOCK_ID {{.*}}>
+; PNACL: <POINTER {{.*}}/>
+; PNACL: <STRUCT_NAMED {{.*}}/>
+; PNACL: </TYPE_BLOCK_ID>
+
+define %1 @foo(%1 %a)
+{
+ ret %1 %a;
+}
+
+define %1 @bar(%1 %b)
+{
+ ret %1 %b;
+}

Powered by Google App Engine
This is Rietveld 408576698