[llvm] r201295 - Copy dll storage in copyAttributes.

Rafael Espindola rafael.espindola at gmail.com
Wed Feb 12 21:11:35 PST 2014


Author: rafael
Date: Wed Feb 12 23:11:35 2014
New Revision: 201295

URL: http://llvm.org/viewvc/llvm-project?rev=201295&view=rev
Log:
Copy dll storage in copyAttributes.

Added:
    llvm/trunk/test/Linker/dllstorage-a.ll
    llvm/trunk/test/Linker/dllstorage-b.ll
Modified:
    llvm/trunk/lib/IR/Globals.cpp

Modified: llvm/trunk/lib/IR/Globals.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/Globals.cpp?rev=201295&r1=201294&r2=201295&view=diff
==============================================================================
--- llvm/trunk/lib/IR/Globals.cpp (original)
+++ llvm/trunk/lib/IR/Globals.cpp Wed Feb 12 23:11:35 2014
@@ -53,6 +53,7 @@ void GlobalValue::copyAttributesFrom(con
   setSection(Src->getSection());
   setVisibility(Src->getVisibility());
   setUnnamedAddr(Src->hasUnnamedAddr());
+  setDLLStorageClass(Src->getDLLStorageClass());
 }
 
 void GlobalValue::setAlignment(unsigned Align) {

Added: llvm/trunk/test/Linker/dllstorage-a.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Linker/dllstorage-a.ll?rev=201295&view=auto
==============================================================================
--- llvm/trunk/test/Linker/dllstorage-a.ll (added)
+++ llvm/trunk/test/Linker/dllstorage-a.ll Wed Feb 12 23:11:35 2014
@@ -0,0 +1,4 @@
+; RUN: llvm-link %s %p/dllstorage-b.ll -S -o - | FileCheck %s
+ at foo = external global i32
+
+; CHECK: @foo = dllexport global i32 42

Added: llvm/trunk/test/Linker/dllstorage-b.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Linker/dllstorage-b.ll?rev=201295&view=auto
==============================================================================
--- llvm/trunk/test/Linker/dllstorage-b.ll (added)
+++ llvm/trunk/test/Linker/dllstorage-b.ll Wed Feb 12 23:11:35 2014
@@ -0,0 +1,3 @@
+; RUN: true
+
+ at foo = dllexport global i32 42





More information about the llvm-commits mailing list