[llvm] r239829 - Add a test for padded bitcode files.

Rafael Espindola rafael.espindola at gmail.com
Tue Jun 16 09:36:16 PDT 2015


Author: rafael
Date: Tue Jun 16 11:36:15 2015
New Revision: 239829

URL: http://llvm.org/viewvc/llvm-project?rev=239829&view=rev
Log:
Add a test for padded bitcode files.

Added:
    llvm/trunk/test/Bitcode/Inputs/padding.bc
    llvm/trunk/test/Bitcode/padding.test

Added: llvm/trunk/test/Bitcode/Inputs/padding.bc
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Bitcode/Inputs/padding.bc?rev=239829&view=auto
==============================================================================
Binary files llvm/trunk/test/Bitcode/Inputs/padding.bc (added) and llvm/trunk/test/Bitcode/Inputs/padding.bc Tue Jun 16 11:36:15 2015 differ

Added: llvm/trunk/test/Bitcode/padding.test
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Bitcode/padding.test?rev=239829&view=auto
==============================================================================
--- llvm/trunk/test/Bitcode/padding.test (added)
+++ llvm/trunk/test/Bitcode/padding.test Tue Jun 16 11:36:15 2015
@@ -0,0 +1,13 @@
+Test that both llvm-dis (uses a data streamer) and opt (no data streamer)
+handle a .bc file padded with '\n' at the end.
+
+This files can be produced under a peculiar situation:
+
+* A .bc is produced os OS X, but without a darwin triple, so it has no
+  wrapper.
+* It is included in a .a archive
+* ranlib is ran on that archive. It will pad the members to make them multiple
+  of 8 bytes.
+
+RUN: llvm-dis -disable-output %p/Inputs/padding.bc
+RUN: opt -disable-output %p/Inputs/padding.bc





More information about the llvm-commits mailing list