Skip to content

Commit d822d4b

Browse files
committed
upd
Created using spr 1.3.4
1 parent fb87349 commit d822d4b

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

llvm/include/llvm/IR/GlobalValue.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,9 @@ class GlobalValue : public Constant {
303303
void setDSOLocal(bool Local) { IsDSOLocal = Local; }
304304

305305
bool isDSOLocal() const {
306-
return IsDSOLocal;
306+
// Tagged globals cannot be DSO local, because the linker will put the
307+
// tagged pointers into the GOT.
308+
return IsDSOLocal && !isTagged();
307309
}
308310

309311
bool hasPartition() const {

llvm/lib/IR/Globals.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -110,10 +110,6 @@ bool GlobalValue::isInterposable() const {
110110
}
111111

112112
bool GlobalValue::canBenefitFromLocalAlias() const {
113-
if (isTagged()) {
114-
// Cannot create local aliases to MTE tagged globals.
115-
return false;
116-
}
117113
// See AsmPrinter::getSymbolPreferLocal(). For a deduplicate comdat kind,
118114
// references to a discarded local symbol from outside the group are not
119115
// allowed, so avoid the local alias.

0 commit comments

Comments
 (0)