mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-22 02:33:06 +01:00
[yaml2obj] Do not write the string table if there is no string entry.
Summary: yaml2obj shouldn't create the string table that isn't needed - doing so wastes time and disk space. Reviewed By: jhenderson Differential Revision: https://reviews.llvm.org/D106420
This commit is contained in:
parent
a60a1f2f04
commit
d0cd0162ac
@ -317,12 +317,11 @@ bool XCOFFWriter::writeXCOFF() {
|
|||||||
if (!writeRelocations())
|
if (!writeRelocations())
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (!Obj.Symbols.empty()) {
|
if (!Obj.Symbols.empty() && !writeSymbols())
|
||||||
if (!writeSymbols())
|
return false;
|
||||||
return false;
|
// Write the string table.
|
||||||
// Write the string table.
|
if (Strings.getSize() > 4)
|
||||||
Strings.write(W.OS);
|
Strings.write(W.OS);
|
||||||
}
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user