[ORC] Remove some stale debugging output.

This commit is contained in:
Lang Hames 2020-12-30 15:34:44 +11:00
parent 7e5508e6a8
commit a14c955af8
1 changed files with 0 additions and 13 deletions

View File

@ -15,9 +15,6 @@
#include "llvm/ExecutionEngine/Orc/Shared/RawByteChannel.h"
#include "llvm/Support/FormatVariadic.h"
#include "llvm/Support/raw_ostream.h"
#if !defined(_MSC_VER) && !defined(__MINGW32__)
#include <unistd.h>
#else
@ -34,13 +31,11 @@ public:
FDRawByteChannel(int InFD, int OutFD) : InFD(InFD), OutFD(OutFD) {}
llvm::Error readBytes(char *Dst, unsigned Size) override {
// dbgs() << "Reading " << Size << " bytes: [";
assert(Dst && "Attempt to read into null.");
ssize_t Completed = 0;
while (Completed < static_cast<ssize_t>(Size)) {
ssize_t Read = ::read(InFD, Dst + Completed, Size - Completed);
if (Read <= 0) {
// dbgs() << " <<<\n";
auto ErrNo = errno;
if (ErrNo == EAGAIN || ErrNo == EINTR)
continue;
@ -48,22 +43,17 @@ public:
return llvm::errorCodeToError(
std::error_code(errno, std::generic_category()));
}
// for (size_t I = 0; I != Read; ++I)
// dbgs() << " " << formatv("{0:x2}", Dst[Completed + I]);
Completed += Read;
}
// dbgs() << " ]\n";
return llvm::Error::success();
}
llvm::Error appendBytes(const char *Src, unsigned Size) override {
// dbgs() << "Appending " << Size << " bytes: [";
assert(Src && "Attempt to append from null.");
ssize_t Completed = 0;
while (Completed < static_cast<ssize_t>(Size)) {
ssize_t Written = ::write(OutFD, Src + Completed, Size - Completed);
if (Written < 0) {
// dbgs() << " <<<\n";
auto ErrNo = errno;
if (ErrNo == EAGAIN || ErrNo == EINTR)
continue;
@ -71,11 +61,8 @@ public:
return llvm::errorCodeToError(
std::error_code(errno, std::generic_category()));
}
// for (size_t I = 0; I != Written; ++I)
// dbgs() << " " << formatv("{0:x2}", Src[Completed + I]);
Completed += Written;
}
// dbgs() << " ]\n";
return llvm::Error::success();
}