summaryrefslogtreecommitdiffstats
path: root/llvm/lib/IR/Globals.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/IR/Globals.cpp')
-rw-r--r--llvm/lib/IR/Globals.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/lib/IR/Globals.cpp b/llvm/lib/IR/Globals.cpp
index 5f338f58d94..5fbf51e0089 100644
--- a/llvm/lib/IR/Globals.cpp
+++ b/llvm/lib/IR/Globals.cpp
@@ -338,6 +338,7 @@ void GlobalVariable::copyAttributesFrom(const GlobalValue *Src) {
if (const GlobalVariable *SrcVar = dyn_cast<GlobalVariable>(Src)) {
setThreadLocalMode(SrcVar->getThreadLocalMode());
setExternallyInitialized(SrcVar->isExternallyInitialized());
+ setAttributes(SrcVar->getAttributes());
}
}
OpenPOWER on IntegriCloud