mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-28 19:25:00 +00:00
Some optimizations done by globalopt are safe only for internal linkage, not
linkonce linkage. For example, it is not valid to add unnamed_addr. This also fixes a crash in g++.dg/opt/static5.C. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158528 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -1729,6 +1729,9 @@ bool GlobalOpt::ProcessGlobal(GlobalVariable *GV,
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!GV->hasLocalLinkage())
|
||||
return false;
|
||||
|
||||
SmallPtrSet<const PHINode*, 16> PHIUsers;
|
||||
GlobalStatus GS;
|
||||
|
||||
|
Reference in New Issue
Block a user