[PATCH] D12618: Reserve a vendor reserved block ID for bitcode

Mehdi AMINI via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 4 07:57:22 PDT 2015


joker.eph updated this revision to Diff 34030.
joker.eph added a comment.

Add a test


http://reviews.llvm.org/D12618

Files:
  include/llvm/Bitcode/LLVMBitCodes.h
  test/Bitcode/Inputs/vendor_block.bc
  test/Bitcode/vendor_block.test

Index: test/Bitcode/vendor_block.test
===================================================================
--- /dev/null
+++ test/Bitcode/vendor_block.test
@@ -0,0 +1,6 @@
+# Check that a global vendor block is correctly ignored 
+# and skipped by the vanilla bitcode reader
+
+; RUN: opt -S %p/Inputs/vendor_block.bc | FileCheck %s
+; CHECK: target triple = "x86_64-apple-macosx10.9"
+
Index: include/llvm/Bitcode/LLVMBitCodes.h
===================================================================
--- include/llvm/Bitcode/LLVMBitCodes.h
+++ include/llvm/Bitcode/LLVMBitCodes.h
@@ -34,7 +34,8 @@
     CONSTANTS_BLOCK_ID,
     FUNCTION_BLOCK_ID,
 
-    UNUSED_ID1,
+    // Valid inside vendor specific toolchains only, discarded by open-source
+    VENDOR_RESERVED_ID,
 
     VALUE_SYMTAB_BLOCK_ID,
     METADATA_BLOCK_ID,


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D12618.34030.patch
Type: text/x-patch
Size: 821 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150904/a7bed370/attachment.bin>


More information about the llvm-commits mailing list