Copy dll storage in copyAttributes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201295 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Rafael Espindola 2014-02-13 05:11:35 +00:00
parent 525637575c
commit 17c9169bbd
3 changed files with 8 additions and 0 deletions

View File

@ -53,6 +53,7 @@ void GlobalValue::copyAttributesFrom(const GlobalValue *Src) {
setSection(Src->getSection());
setVisibility(Src->getVisibility());
setUnnamedAddr(Src->hasUnnamedAddr());
setDLLStorageClass(Src->getDLLStorageClass());
}
void GlobalValue::setAlignment(unsigned Align) {

View File

@ -0,0 +1,4 @@
; RUN: llvm-link %s %p/dllstorage-b.ll -S -o - | FileCheck %s
@foo = external global i32
; CHECK: @foo = dllexport global i32 42

View File

@ -0,0 +1,3 @@
; RUN: true
@foo = dllexport global i32 42