mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-24 22:24:54 +00:00
Simplify another function that doesn't fail.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238703 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -387,8 +387,7 @@ void RuntimeDyldImpl::computeTotalAllocSize(const ObjectFile &Obj,
|
||||
uint32_t Flags = I->getFlags();
|
||||
if (Flags & SymbolRef::SF_Common) {
|
||||
// Add the common symbols to a list. We'll allocate them all below.
|
||||
uint64_t Size = 0;
|
||||
Check(I->getSize(Size));
|
||||
uint64_t Size = I->getSize();
|
||||
CommonSize += Size;
|
||||
}
|
||||
}
|
||||
@@ -495,8 +494,7 @@ void RuntimeDyldImpl::emitCommonSymbols(const ObjectFile &Obj,
|
||||
}
|
||||
|
||||
uint32_t Align = Sym.getAlignment();
|
||||
uint64_t Size = 0;
|
||||
Check(Sym.getSize(Size));
|
||||
uint64_t Size = Sym.getSize();
|
||||
|
||||
CommonSize += Align + Size;
|
||||
SymbolsToAllocate.push_back(Sym);
|
||||
@@ -518,9 +516,8 @@ void RuntimeDyldImpl::emitCommonSymbols(const ObjectFile &Obj,
|
||||
// Assign the address of each symbol
|
||||
for (auto &Sym : SymbolsToAllocate) {
|
||||
uint32_t Align = Sym.getAlignment();
|
||||
uint64_t Size;
|
||||
StringRef Name;
|
||||
Check(Sym.getSize(Size));
|
||||
uint64_t Size = Sym.getSize();
|
||||
Check(Sym.getName(Name));
|
||||
if (Align) {
|
||||
// This symbol has an alignment requirement.
|
||||
|
Reference in New Issue
Block a user