[lld] r333084 - Replace last DEBUG occurrence with LLVM_DEBUG in lld.

Nicola Zaghen via llvm-commits llvm-commits at lists.llvm.org
Wed May 23 07:03:01 PDT 2018


Author: nzaghen
Date: Wed May 23 07:03:01 2018
New Revision: 333084

URL: http://llvm.org/viewvc/llvm-project?rev=333084&view=rev
Log:
Replace last DEBUG occurrence with LLVM_DEBUG in lld.


Modified:
    lld/trunk/wasm/InputChunks.cpp

Modified: lld/trunk/wasm/InputChunks.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/wasm/InputChunks.cpp?rev=333084&r1=333083&r2=333084&view=diff
==============================================================================
--- lld/trunk/wasm/InputChunks.cpp (original)
+++ lld/trunk/wasm/InputChunks.cpp Wed May 23 07:03:01 2018
@@ -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
   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
   }
 
   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");
 }




More information about the llvm-commits mailing list