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

Unified Diff: test/Transforms/NaCl/allocate-data-segment-size.ll

Issue 29743003: Add passes for applying SFI sandboxing at the LLVM IR level Base URL: http://git.chromium.org/native_client/pnacl-llvm.git@master
Patch Set: Retry upload Created 6 years, 6 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 | « test/Transforms/NaCl/allocate-data-segment.ll ('k') | test/Transforms/NaCl/expand-alloca.ll » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/Transforms/NaCl/allocate-data-segment-size.ll
diff --git a/test/Transforms/NaCl/allocate-data-segment-size.ll b/test/Transforms/NaCl/allocate-data-segment-size.ll
new file mode 100644
index 0000000000000000000000000000000000000000..df8f67a52aaefcc6934bf198a5f7df716bce9178
--- /dev/null
+++ b/test/Transforms/NaCl/allocate-data-segment-size.ll
@@ -0,0 +1,10 @@
+; RUN: opt %s -allocate-data-segment -S | FileCheck %s
+
+@var1 = global i32 11
+@var2 = global i32 22
+
+; Check for a bug in which we got the following, which FlattenGlobals
+; doesn't handle:
+; @__sfi_data_segment_size = constant i64 mul nuw (i64 ptrtoint (i32* getelementptr (i32* null, i32 1) to i64), i64 2)
+
+; CHECK: @__sfi_data_segment_size = constant i32 8
« no previous file with comments | « test/Transforms/NaCl/allocate-data-segment.ll ('k') | test/Transforms/NaCl/expand-alloca.ll » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698