[llvm] r197340 - Ensure bitcode encoding of global variable attributes stays stable. Patch by Boaz Ouriel.

Michael Kuperstein michael.m.kuperstein at intel.com
Sun Dec 15 03:50:45 PST 2013


Author: mkuper
Date: Sun Dec 15 05:50:45 2013
New Revision: 197340

URL: http://llvm.org/viewvc/llvm-project?rev=197340&view=rev
Log:
Ensure bitcode encoding of global variable attributes stays stable. Patch by Boaz Ouriel.

Added:
    llvm/trunk/test/Bitcode/global-variables.3.2.ll
    llvm/trunk/test/Bitcode/global-variables.3.2.ll.bc   (with props)

Added: llvm/trunk/test/Bitcode/global-variables.3.2.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Bitcode/global-variables.3.2.ll?rev=197340&view=auto
==============================================================================
--- llvm/trunk/test/Bitcode/global-variables.3.2.ll (added)
+++ llvm/trunk/test/Bitcode/global-variables.3.2.ll Sun Dec 15 05:50:45 2013
@@ -0,0 +1,41 @@
+; RUN:  llvm-dis < %s.bc| FileCheck %s
+
+; global-variables.3.2.ll.bc was generated by passing this file to llvm-as-3.2.
+; The test checks that LLVM does not silently misread global variables attributes of
+; older bitcode files.
+
+ at global.var = global i32 1
+; CHECK: @global.var = global i32 1
+
+ at constant.var = constant i32 1
+; CHECK: @constant.var = constant i32 1
+
+ at noinit.var = global float undef
+; CHECK: @noinit.var = global float undef
+
+ at section.var = global i32 1, section "foo"
+; CHECK: @section.var = global i32 1, section "foo"
+
+ at align.var = global i64 undef, align 8
+; CHECK: @align.var = global i64 undef, align 8
+
+ at unnamed_addr.var = unnamed_addr global i8 1
+; CHECK: @unnamed_addr.var = unnamed_addr global i8 1
+
+ at default_addrspace.var = addrspace(0) global i8 1 
+; CHECK: @default_addrspace.var = global i8 1 
+
+ at non_default_addrspace.var = addrspace(1) global i8* undef 
+; CHECK: @non_default_addrspace.var = addrspace(1) global i8* undef 
+
+ at initialexec.var = thread_local(initialexec) global i32 0, align 4
+; CHECK: @initialexec.var = thread_local(initialexec) global i32 0, align 4
+
+ at localdynamic.var = thread_local(localdynamic) constant i32 0, align 4
+; CHECK: @localdynamic.var = thread_local(localdynamic) constant i32 0, align 4
+
+ at localexec.var = thread_local(localexec) constant i32 0, align 4
+; CHECK: @localexec.var = thread_local(localexec) constant i32 0, align 4
+
+ at string.var = private unnamed_addr constant [13 x i8] c"hello world\0A\00"
+; CHECK: @string.var = private unnamed_addr constant [13 x i8] c"hello world\0A\00"

Added: llvm/trunk/test/Bitcode/global-variables.3.2.ll.bc
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Bitcode/global-variables.3.2.ll.bc?rev=197340&view=auto
==============================================================================
Binary file - no diff available.

Propchange: llvm/trunk/test/Bitcode/global-variables.3.2.ll.bc
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream





More information about the llvm-commits mailing list