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

Unified Diff: test/Transforms/NaCl/expand-ctors-emptylist.ll

Issue 15659005: PNaCl: Fix ExpandCtors to handle an empty list case (Closed) Base URL: http://git.chromium.org/native_client/pnacl-llvm.git@master
Patch Set: 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
« no previous file with comments | « lib/Transforms/NaCl/ExpandCtors.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/Transforms/NaCl/expand-ctors-emptylist.ll
diff --git a/test/Transforms/NaCl/expand-ctors-emptylist.ll b/test/Transforms/NaCl/expand-ctors-emptylist.ll
new file mode 100644
index 0000000000000000000000000000000000000000..6ab68852b9d342b706e318b9b2187abc6e2a2af2
--- /dev/null
+++ b/test/Transforms/NaCl/expand-ctors-emptylist.ll
@@ -0,0 +1,13 @@
+; RUN: opt %s -nacl-expand-ctors -S | FileCheck %s -check-prefix=NO_CTORS
jvoung (off chromium) 2013/05/22 15:47:21 Why two separate RUN invocations? Can't you just
Mark Seaborn 2013/05/22 16:30:38 It makes the test stricter. Many other tests do t
jvoung (off chromium) 2013/05/22 16:50:40 Ah, right...
+; NO_CTORS-NOT: __init_array_end
+; NO_CTORS-NOT: __fini_array_end
+; NO_CTORS-NOT: llvm.global_ctors
+
+; RUN: opt %s -nacl-expand-ctors -S | FileCheck %s
+
+; Check that the pass works when the initializer is "[]", which gets
+; converted into "undef" by the reader.
+@llvm.global_ctors = appending global [0 x { i32, void ()* }] []
+
+; CHECK: @__init_array_start = internal constant [0 x void ()*] zeroinitializer
+; CHECK: @__fini_array_start = internal constant [0 x void ()*] zeroinitializer
« no previous file with comments | « lib/Transforms/NaCl/ExpandCtors.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698