mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-07-04 03:11:43 +00:00
Replaced STL streams with LLVM's raw_ostream (#344)
std::cout and std::printf were replaced with llvm::outs() and std::cerr was replaced with llvm::errs().
This commit is contained in:
committed by
Peter Johnson
parent
c57a7f0a41
commit
9d93820717
@@ -7,7 +7,6 @@
|
||||
|
||||
#include <atomic>
|
||||
#include <chrono>
|
||||
#include <cstdio>
|
||||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
#include <limits>
|
||||
@@ -16,6 +15,7 @@
|
||||
#include "HAL/DriverStation.h"
|
||||
#include "HAL/cpp/priority_condition_variable.h"
|
||||
#include "HAL/cpp/priority_mutex.h"
|
||||
#include "llvm/raw_ostream.h"
|
||||
|
||||
static_assert(sizeof(int32_t) >= sizeof(int),
|
||||
"FRC_NetworkComm status variable is larger than 32 bits");
|
||||
@@ -66,12 +66,12 @@ int32_t HAL_SendError(HAL_Bool isError, int32_t errorCode, HAL_Bool isLVCode,
|
||||
details, location, callStack);
|
||||
if (printMsg) {
|
||||
if (location && location[0] != '\0') {
|
||||
std::fprintf(stderr, "%s at %s: ", isError ? "Error" : "Warning",
|
||||
location);
|
||||
llvm::errs() << (isError ? "Error" : "Warning") << " at " << location
|
||||
<< ": ";
|
||||
}
|
||||
std::fprintf(stderr, "%s\n", details);
|
||||
llvm::errs() << details << "\n";
|
||||
if (callStack && callStack[0] != '\0') {
|
||||
std::fprintf(stderr, "%s\n", callStack);
|
||||
llvm::errs() << callStack << "\n";
|
||||
}
|
||||
}
|
||||
if (i == KEEP_MSGS) {
|
||||
|
||||
Reference in New Issue
Block a user