aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorKarl Schimpf <kschimpf@google.com>2013-07-03 09:56:04 -0700
committerKarl Schimpf <kschimpf@google.com>2013-07-03 09:56:04 -0700
commitc5f0da9f2a5ffb5d9e8803839655f2f3d6972d83 (patch)
tree3e5e46f1a12c2742750cae6acba0ae8f9152e9ad /test
parenta6817fbfe9248e8992132206448eb5eda1745c92 (diff)
Cleanup output of pnacl-bcanalyzer.
(1) Fix spacing in header of record histogram so that columns line up. (2) Only print 8 operands per line in the dump. Keeps lines from getting too long. BUG=None R=jvoung@chromium.org, mseaborn@chromium.org Review URL: https://codereview.chromium.org/18147006
Diffstat (limited to 'test')
-rw-r--r--test/NaCl/Bitcode/bcanalyzer-width.ll21
1 files changed, 21 insertions, 0 deletions
diff --git a/test/NaCl/Bitcode/bcanalyzer-width.ll b/test/NaCl/Bitcode/bcanalyzer-width.ll
new file mode 100644
index 0000000000..57899120ef
--- /dev/null
+++ b/test/NaCl/Bitcode/bcanalyzer-width.ll
@@ -0,0 +1,21 @@
+; RUN: llvm-as < %s | pnacl-freeze | pnacl-bcanalyzer -dump \
+; RUN: | FileCheck %s -check-prefix=BC
+; RUN: llvm-as < %s | pnacl-freeze | pnacl-bcanalyzer -dump -operands-per-line=2 \
+; RUN: | FileCheck %s -check-prefix=BC2
+; RUN: llvm-as < %s | pnacl-freeze | pnacl-bcanalyzer -dump -operands-per-line=8 \
+; RUN: | FileCheck %s -check-prefix=BC8
+
+; Test that the command-line option -operands-per-line works as expected.
+
+@bytes = internal global [10 x i8] c"abcdefghij"
+
+; BC: <DATA abbrevid=7 op0=97 op1=98 op2=99 op3=100 op4=101 op5=102 op6=103 op7=104 op8=105 op9=106/>
+
+; BC2: <DATA abbrevid=7 op0=97 op1=98
+; BC2: op2=99 op3=100
+; BC2: op4=101 op5=102
+; BC2: op6=103 op7=104
+; BC2: op8=105 op9=106/>
+
+; BC8: <DATA abbrevid=7 op0=97 op1=98 op2=99 op3=100 op4=101 op5=102 op6=103 op7=104
+; BC8: op8=105 op9=106/>