Replace last DEBUG occurrence with LLVM_DEBUG in lld.
llvm-svn: 333084
This commit is contained in:
parent
c9fed1353a
commit
5c4fb4566d
|
@ -231,7 +231,7 @@ void InputFunction::calculateSize() {
|
|||
if (!File || !Config->CompressRelocTargets)
|
||||
return;
|
||||
|
||||
DEBUG(dbgs() << "calculateSize: " << getName() << "\n");
|
||||
LLVM_DEBUG(dbgs() << "calculateSize: " << getName() << "\n");
|
||||
|
||||
const uint8_t *SecStart = File->CodeSection->Content.data();
|
||||
const uint8_t *FuncStart = SecStart + getInputSectionOffset();
|
||||
|
@ -243,12 +243,12 @@ void InputFunction::calculateSize() {
|
|||
|
||||
uint32_t LastRelocEnd = Start + FunctionSizeLength;
|
||||
for (WasmRelocation &Rel : Relocations) {
|
||||
DEBUG(dbgs() << " region: " << (Rel.Offset - LastRelocEnd) << "\n");
|
||||
LLVM_DEBUG(dbgs() << " region: " << (Rel.Offset - LastRelocEnd) << "\n");
|
||||
CompressedFuncSize += Rel.Offset - LastRelocEnd;
|
||||
CompressedFuncSize += getRelocWidth(Rel, File->calcNewValue(Rel));
|
||||
LastRelocEnd = Rel.Offset + getRelocWidthPadded(Rel);
|
||||
}
|
||||
DEBUG(dbgs() << " final region: " << (End - LastRelocEnd) << "\n");
|
||||
LLVM_DEBUG(dbgs() << " final region: " << (End - LastRelocEnd) << "\n");
|
||||
CompressedFuncSize += End - LastRelocEnd;
|
||||
|
||||
// Now we know how long the resulting function is we can add the encoding
|
||||
|
@ -256,8 +256,8 @@ void InputFunction::calculateSize() {
|
|||
uint8_t Buf[5];
|
||||
CompressedSize = CompressedFuncSize + encodeULEB128(CompressedFuncSize, Buf);
|
||||
|
||||
DEBUG(dbgs() << " calculateSize orig: " << Function->Size << "\n");
|
||||
DEBUG(dbgs() << " calculateSize new: " << CompressedSize << "\n");
|
||||
LLVM_DEBUG(dbgs() << " calculateSize orig: " << Function->Size << "\n");
|
||||
LLVM_DEBUG(dbgs() << " calculateSize new: " << CompressedSize << "\n");
|
||||
}
|
||||
|
||||
// Override the default writeTo method so that we can (optionally) write the
|
||||
|
@ -276,12 +276,12 @@ void InputFunction::writeTo(uint8_t *Buf) const {
|
|||
decodeULEB128(FuncStart, &Count);
|
||||
FuncStart += Count;
|
||||
|
||||
DEBUG(dbgs() << "write func: " << getName() << "\n");
|
||||
LLVM_DEBUG(dbgs() << "write func: " << getName() << "\n");
|
||||
Buf += encodeULEB128(CompressedFuncSize, Buf);
|
||||
const uint8_t *LastRelocEnd = FuncStart;
|
||||
for (const WasmRelocation &Rel : Relocations) {
|
||||
unsigned ChunkSize = (SecStart + Rel.Offset) - LastRelocEnd;
|
||||
DEBUG(dbgs() << " write chunk: " << ChunkSize << "\n");
|
||||
LLVM_DEBUG(dbgs() << " write chunk: " << ChunkSize << "\n");
|
||||
memcpy(Buf, LastRelocEnd, ChunkSize);
|
||||
Buf += ChunkSize;
|
||||
Buf += writeCompressedReloc(Buf, Rel, File->calcNewValue(Rel));
|
||||
|
@ -289,7 +289,7 @@ void InputFunction::writeTo(uint8_t *Buf) const {
|
|||
}
|
||||
|
||||
unsigned ChunkSize = End - LastRelocEnd;
|
||||
DEBUG(dbgs() << " write final chunk: " << ChunkSize << "\n");
|
||||
LLVM_DEBUG(dbgs() << " write final chunk: " << ChunkSize << "\n");
|
||||
memcpy(Buf, LastRelocEnd, ChunkSize);
|
||||
DEBUG(dbgs() << " total: " << (Buf + ChunkSize - Orig) << "\n");
|
||||
LLVM_DEBUG(dbgs() << " total: " << (Buf + ChunkSize - Orig) << "\n");
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue