[PATCH] D81605: IR: Add missing GlobalAlias copying of ThreadLocalMode attribute
Teresa Johnson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 10 12:15:04 PDT 2020
tejohnson added a comment.
It looks like this is on an old version of clang, as this method is now in GlobalIndirectSymbol. You'll want to check this behavior and submit a patch for the latest clang. For the test, you could probably add an llvm-link based test in llvm/test/Linker/.
================
Comment at: llvm/include/llvm/IR/GlobalAlias.h:63
GlobalValue::copyAttributesFrom(Src);
+ setThreadLocalMode(Src->getThreadLocalMode());
}
----------------
It seems like this belongs in GlobalValue::copyAttributesFrom, since it is a property of the GlobalValue.
Interestingly I do see code in the IRMover (used when linking IR in LTO) that copies it over (in llvm/lib/Linker/IRMover.cpp). Are we missing places there? In any case, it seems reasonable to add this into GlobalValue::copyAttributesFrom.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D81605/new/
https://reviews.llvm.org/D81605
More information about the llvm-commits
mailing list