Skip to content

Commit f7c8008

Browse files
committed
Revert LLVM_DEBUG as gives error: use of undeclared identifier 'DEBUG_TYPE'.
1 parent 4cab9be commit f7c8008

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

lld/MachO/Driver.cpp

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,9 @@ void multiThreadedPageInBackground(DeferredFiles &deferred) {
350350
static const size_t largeArchive = 10 * 1024 * 1024;
351351
static std::atomic_uint64_t totalBytes = 0;
352352
std::atomic_int index = 0, included = 0;
353+
#ifndef NDEBUG
353354
auto t0 = high_resolution_clock::now();
355+
#endif
354356

355357
parallelFor(0, config->readThreads, [&](size_t I) {
356358
while (true) {
@@ -371,11 +373,13 @@ void multiThreadedPageInBackground(DeferredFiles &deferred) {
371373
}
372374
});
373375

374-
LLVM_ATTRIBUTE_UNUSED auto dt = high_resolution_clock::now() - t0;
375-
LLVM_DEBUG(if (Process::GetEnv("LLD_MULTI_THREAD_PAGE")) std::cerr
376-
<< "multiThreadedPageIn " << totalBytes << "/" << included << "/"
377-
<< deferred.size() << "/" << std::setprecision(4)
378-
<< duration_cast<milliseconds>(dt).count() / 1000. << "\n");
376+
#ifndef NDEBUG
377+
auto dt = high_resolution_clock::now() - t0;
378+
if (Process::GetEnv("LLD_MULTI_THREAD_PAGE"))
379+
std::cerr << "multiThreadedPageIn " << totalBytes << "/" << included << "/"
380+
<< deferred.size() << "/" << std::setprecision(4)
381+
<< duration_cast<milliseconds>(dt).count() / 1000. << "\n";
382+
#endif
379383
}
380384

381385
static void multiThreadedPageIn(const DeferredFiles &deferred,

0 commit comments

Comments
 (0)