mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-01 00:33:09 +00:00
'static const void *X = &&y' can only be put in the
readonly section if a reference to the containing function is valid in the readonly section. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85370 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
6688d61797
commit
5d81befc21
@ -182,6 +182,9 @@ Constant::PossibleRelocationsTy Constant::getRelocationInfo() const {
|
||||
return GlobalRelocations; // Global reference.
|
||||
}
|
||||
|
||||
if (const BlockAddress *BA = dyn_cast<BlockAddress>(this))
|
||||
return BA->getFunction()->getRelocationInfo();
|
||||
|
||||
PossibleRelocationsTy Result = NoRelocation;
|
||||
for (unsigned i = 0, e = getNumOperands(); i != e; ++i)
|
||||
Result = std::max(Result, getOperand(i)->getRelocationInfo());
|
||||
|
Loading…
Reference in New Issue
Block a user