mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-21 18:22:53 +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())
|
||||
return false;
|
||||
}
|
||||
if (!Obj.Symbols.empty()) {
|
||||
if (!writeSymbols())
|
||||
return false;
|
||||
// Write the string table.
|
||||
if (!Obj.Symbols.empty() && !writeSymbols())
|
||||
return false;
|
||||
// Write the string table.
|
||||
if (Strings.getSize() > 4)
|
||||
Strings.write(W.OS);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user