mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-28 02:11:43 +00:00
Move entirety of llvm namespace to wpi namespace.
During shared library loading, a different libLLVM can be pulled in, causing llvm symbols from dependent libraries to resolve to that library instead of this one. This has been seen in the wild with the Mesa OpenGL implementation in JavaFX applications (see wpilibsuite/shuffleboard#361). This is clearly a very breaking change. For some level of backwards compatibility, a namespace alias from llvm to wpi is performed in the "llvm" headers. Unfortunately, forward declarations of llvm classes will still break, but compilers seem to generate clear error messages in those cases ("namespace alias 'llvm' not allowed here, assuming 'wpi'"). This change also moves all the wpiutil headers to a single "wpi" subdirectory from the previously split "llvm", "support", "tcpsockets", and "udpsockets". Shim headers will be added for backwards compatibility in a later commit.
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
#include "HAL/AnalogInput.h"
|
||||
|
||||
#include <FRC_NetworkCommunication/AICalibration.h>
|
||||
#include <support/mutex.h>
|
||||
#include <wpi/mutex.h>
|
||||
|
||||
#include "AnalogInternal.h"
|
||||
#include "HAL/AnalogAccumulator.h"
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
#include <atomic>
|
||||
|
||||
#include <support/mutex.h>
|
||||
#include <wpi/mutex.h>
|
||||
|
||||
#include "HAL/AnalogInput.h"
|
||||
#include "HAL/ChipObject.h"
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include <support/mutex.h>
|
||||
#include <wpi/mutex.h>
|
||||
|
||||
#include "HAL/ChipObject.h"
|
||||
#include "HAL/Ports.h"
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
#include <thread>
|
||||
|
||||
#include <FRC_NetworkCommunication/LoadOut.h>
|
||||
#include <support/mutex.h>
|
||||
#include <wpi/mutex.h>
|
||||
|
||||
#include "ConstantsInternal.h"
|
||||
#include "HAL/AnalogTrigger.h"
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include <support/mutex.h>
|
||||
#include <wpi/mutex.h>
|
||||
|
||||
#include "HAL/AnalogTrigger.h"
|
||||
#include "HAL/ChipObject.h"
|
||||
|
||||
@@ -13,9 +13,9 @@
|
||||
|
||||
#include <FRC_NetworkCommunication/FRCComm.h>
|
||||
#include <FRC_NetworkCommunication/NetCommRPCProxy_Occur.h>
|
||||
#include <llvm/raw_ostream.h>
|
||||
#include <support/condition_variable.h>
|
||||
#include <support/mutex.h>
|
||||
#include <wpi/condition_variable.h>
|
||||
#include <wpi/mutex.h>
|
||||
#include <wpi/raw_ostream.h>
|
||||
|
||||
#include "HAL/DriverStation.h"
|
||||
|
||||
@@ -73,12 +73,12 @@ int32_t HAL_SendError(HAL_Bool isError, int32_t errorCode, HAL_Bool isLVCode,
|
||||
details, location, callStack);
|
||||
if (printMsg) {
|
||||
if (location && location[0] != '\0') {
|
||||
llvm::errs() << (isError ? "Error" : "Warning") << " at " << location
|
||||
<< ": ";
|
||||
wpi::errs() << (isError ? "Error" : "Warning") << " at " << location
|
||||
<< ": ";
|
||||
}
|
||||
llvm::errs() << details << "\n";
|
||||
wpi::errs() << details << "\n";
|
||||
if (callStack && callStack[0] != '\0') {
|
||||
llvm::errs() << callStack << "\n";
|
||||
wpi::errs() << callStack << "\n";
|
||||
}
|
||||
}
|
||||
if (i == KEEP_MSGS) {
|
||||
|
||||
@@ -18,9 +18,9 @@
|
||||
|
||||
#include <FRC_NetworkCommunication/FRCComm.h>
|
||||
#include <FRC_NetworkCommunication/LoadOut.h>
|
||||
#include <llvm/raw_ostream.h>
|
||||
#include <support/mutex.h>
|
||||
#include <support/timestamp.h>
|
||||
#include <wpi/mutex.h>
|
||||
#include <wpi/raw_ostream.h>
|
||||
#include <wpi/timestamp.h>
|
||||
|
||||
#include "HAL/ChipObject.h"
|
||||
#include "HAL/DriverStation.h"
|
||||
@@ -329,20 +329,20 @@ static bool killExistingProgram(int timeout, int mode) {
|
||||
// see if the pid is around, but we don't want to mess with init id=1, or
|
||||
// ourselves
|
||||
if (pid >= 2 && kill(pid, 0) == 0 && pid != getpid()) {
|
||||
llvm::outs() << "Killing previously running FRC program...\n";
|
||||
wpi::outs() << "Killing previously running FRC program...\n";
|
||||
kill(pid, SIGTERM); // try to kill it
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(timeout));
|
||||
if (kill(pid, 0) == 0) {
|
||||
// still not successfull
|
||||
if (mode == 0) {
|
||||
llvm::outs() << "FRC pid " << pid << " did not die within " << timeout
|
||||
<< "ms. Aborting\n";
|
||||
wpi::outs() << "FRC pid " << pid << " did not die within " << timeout
|
||||
<< "ms. Aborting\n";
|
||||
return 0; // just fail
|
||||
} else if (mode == 1) { // kill -9 it
|
||||
kill(pid, SIGKILL);
|
||||
} else {
|
||||
llvm::outs() << "WARNING: FRC pid " << pid << " did not die within "
|
||||
<< timeout << "ms.\n";
|
||||
wpi::outs() << "WARNING: FRC pid " << pid << " did not die within "
|
||||
<< timeout << "ms.\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -374,7 +374,7 @@ HAL_Bool HAL_Initialize(int32_t timeout, int32_t mode) {
|
||||
|
||||
setlinebuf(stdin);
|
||||
setlinebuf(stdout);
|
||||
llvm::outs().SetUnbuffered();
|
||||
wpi::outs().SetUnbuffered();
|
||||
|
||||
prctl(PR_SET_PDEATHSIG, SIGTERM);
|
||||
|
||||
@@ -401,10 +401,10 @@ HAL_Bool HAL_Initialize(int32_t timeout, int32_t mode) {
|
||||
int32_t status = 0;
|
||||
uint64_t rv = HAL_GetFPGATime(&status);
|
||||
if (status != 0) {
|
||||
llvm::errs()
|
||||
wpi::errs()
|
||||
<< "Call to HAL_GetFPGATime failed."
|
||||
<< "Initialization might have failed. Time will not be correct\n";
|
||||
llvm::errs().flush();
|
||||
wpi::errs().flush();
|
||||
return 0u;
|
||||
}
|
||||
return rv;
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include <support/SafeThread.h>
|
||||
#include <wpi/SafeThread.h>
|
||||
|
||||
#include "DigitalInternal.h"
|
||||
#include "HAL/ChipObject.h"
|
||||
|
||||
@@ -11,8 +11,8 @@
|
||||
#include <cstdlib> // For std::atexit()
|
||||
#include <memory>
|
||||
|
||||
#include <support/condition_variable.h>
|
||||
#include <support/mutex.h>
|
||||
#include <wpi/condition_variable.h>
|
||||
#include <wpi/mutex.h>
|
||||
|
||||
#include "HAL/ChipObject.h"
|
||||
#include "HAL/Errors.h"
|
||||
|
||||
@@ -217,9 +217,9 @@ int32_t HAL_ReadOSSerial(HAL_SerialPort port, char* buffer, int32_t count,
|
||||
std::memcpy(&buffer[bytesRead], buf, rx);
|
||||
bytesRead += rx;
|
||||
if (bytesRead >= count) break;
|
||||
llvm::StringRef tmp(buffer, bytesRead);
|
||||
wpi::StringRef tmp(buffer, bytesRead);
|
||||
auto loc = tmp.find('\n');
|
||||
if (loc != llvm::StringRef::npos) {
|
||||
if (loc != wpi::StringRef::npos) {
|
||||
bytesRead = loc;
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -16,8 +16,8 @@
|
||||
#include <atomic>
|
||||
#include <cstring>
|
||||
|
||||
#include <llvm/raw_ostream.h>
|
||||
#include <support/mutex.h>
|
||||
#include <wpi/raw_ostream.h>
|
||||
#include <wpi/mutex.h>
|
||||
|
||||
#include "DigitalInternal.h"
|
||||
#include "HAL/DIO.h"
|
||||
@@ -196,20 +196,20 @@ void HAL_InitializeSPI(HAL_SPIPort port, int32_t* status) {
|
||||
if ((digitalHandles[5] = HAL_InitializeDIOPort(createPortHandleForSPI(14),
|
||||
false, status)) ==
|
||||
HAL_kInvalidHandle) {
|
||||
llvm::outs() << "Failed to allocate DIO 14\n";
|
||||
wpi::outs() << "Failed to allocate DIO 14\n";
|
||||
return;
|
||||
}
|
||||
if ((digitalHandles[6] = HAL_InitializeDIOPort(createPortHandleForSPI(15),
|
||||
false, status)) ==
|
||||
HAL_kInvalidHandle) {
|
||||
llvm::outs() << "Failed to allocate DIO 15\n";
|
||||
wpi::outs() << "Failed to allocate DIO 15\n";
|
||||
HAL_FreeDIOPort(digitalHandles[5]); // free the first port allocated
|
||||
return;
|
||||
}
|
||||
if ((digitalHandles[7] = HAL_InitializeDIOPort(createPortHandleForSPI(16),
|
||||
false, status)) ==
|
||||
HAL_kInvalidHandle) {
|
||||
llvm::outs() << "Failed to allocate DIO 16\n";
|
||||
wpi::outs() << "Failed to allocate DIO 16\n";
|
||||
HAL_FreeDIOPort(digitalHandles[5]); // free the first port allocated
|
||||
HAL_FreeDIOPort(digitalHandles[6]); // free the second port allocated
|
||||
return;
|
||||
@@ -217,7 +217,7 @@ void HAL_InitializeSPI(HAL_SPIPort port, int32_t* status) {
|
||||
if ((digitalHandles[8] = HAL_InitializeDIOPort(createPortHandleForSPI(17),
|
||||
false, status)) ==
|
||||
HAL_kInvalidHandle) {
|
||||
llvm::outs() << "Failed to allocate DIO 17\n";
|
||||
wpi::outs() << "Failed to allocate DIO 17\n";
|
||||
HAL_FreeDIOPort(digitalHandles[5]); // free the first port allocated
|
||||
HAL_FreeDIOPort(digitalHandles[6]); // free the second port allocated
|
||||
HAL_FreeDIOPort(digitalHandles[7]); // free the third port allocated
|
||||
|
||||
@@ -11,8 +11,8 @@
|
||||
#include <cstdio>
|
||||
#include <cstring>
|
||||
|
||||
#include <llvm/FileSystem.h>
|
||||
#include <llvm/StringRef.h>
|
||||
#include <wpi/FileSystem.h>
|
||||
#include <wpi/StringRef.h>
|
||||
|
||||
#include "../visa/visa.h"
|
||||
#include "HAL/Errors.h"
|
||||
@@ -137,22 +137,22 @@ void SerialHelper::SortHubPathVector() {
|
||||
m_sortedHubPath.clear();
|
||||
m_sortedHubPath = m_unsortedHubPath;
|
||||
std::sort(m_sortedHubPath.begin(), m_sortedHubPath.end(),
|
||||
[](const llvm::SmallVectorImpl<char>& lhs,
|
||||
const llvm::SmallVectorImpl<char>& rhs) -> int {
|
||||
llvm::StringRef lhsRef(lhs.begin(), lhs.size());
|
||||
llvm::StringRef rhsRef(rhs.begin(), rhs.size());
|
||||
[](const wpi::SmallVectorImpl<char>& lhs,
|
||||
const wpi::SmallVectorImpl<char>& rhs) -> int {
|
||||
wpi::StringRef lhsRef(lhs.begin(), lhs.size());
|
||||
wpi::StringRef rhsRef(rhs.begin(), rhs.size());
|
||||
return lhsRef.compare(rhsRef);
|
||||
});
|
||||
}
|
||||
|
||||
void SerialHelper::CoiteratedSort(
|
||||
llvm::SmallVectorImpl<llvm::SmallString<16>>& vec) {
|
||||
llvm::SmallVector<llvm::SmallString<16>, 4> sortedVec;
|
||||
wpi::SmallVectorImpl<wpi::SmallString<16>>& vec) {
|
||||
wpi::SmallVector<wpi::SmallString<16>, 4> sortedVec;
|
||||
for (auto& str : m_sortedHubPath) {
|
||||
for (size_t i = 0; i < m_unsortedHubPath.size(); i++) {
|
||||
if (llvm::StringRef{m_unsortedHubPath[i].begin(),
|
||||
if (wpi::StringRef{m_unsortedHubPath[i].begin(),
|
||||
m_unsortedHubPath[i].size()}
|
||||
.equals(llvm::StringRef{str.begin(), str.size()})) {
|
||||
.equals(wpi::StringRef{str.begin(), str.size()})) {
|
||||
sortedVec.push_back(vec[i]);
|
||||
break;
|
||||
}
|
||||
@@ -206,26 +206,26 @@ void SerialHelper::QueryHubPaths(int32_t* status) {
|
||||
*status = 0;
|
||||
|
||||
// split until (/dev/
|
||||
llvm::StringRef devNameRef = llvm::StringRef{osName}.split("(/dev/").second;
|
||||
wpi::StringRef devNameRef = wpi::StringRef{osName}.split("(/dev/").second;
|
||||
// String not found, continue
|
||||
if (devNameRef.equals("")) continue;
|
||||
|
||||
// Split at )
|
||||
llvm::StringRef matchString = devNameRef.split(')').first;
|
||||
wpi::StringRef matchString = devNameRef.split(')').first;
|
||||
if (matchString.equals(devNameRef)) continue;
|
||||
|
||||
// Search directories to get a list of system accessors
|
||||
std::error_code ec;
|
||||
for (auto p = llvm::sys::fs::recursive_directory_iterator(
|
||||
for (auto p = wpi::sys::fs::recursive_directory_iterator(
|
||||
"/sys/devices/soc0", ec);
|
||||
p != llvm::sys::fs::recursive_directory_iterator(); p.increment(ec)) {
|
||||
p != wpi::sys::fs::recursive_directory_iterator(); p.increment(ec)) {
|
||||
if (ec) break;
|
||||
llvm::StringRef path{p->path()};
|
||||
if (path.find("amba") == llvm::StringRef::npos) continue;
|
||||
if (path.find("usb") == llvm::StringRef::npos) continue;
|
||||
if (path.find(matchString) == llvm::StringRef::npos) continue;
|
||||
wpi::StringRef path{p->path()};
|
||||
if (path.find("amba") == wpi::StringRef::npos) continue;
|
||||
if (path.find("usb") == wpi::StringRef::npos) continue;
|
||||
if (path.find(matchString) == wpi::StringRef::npos) continue;
|
||||
|
||||
llvm::SmallVector<llvm::StringRef, 16> pathSplitVec;
|
||||
wpi::SmallVector<wpi::StringRef, 16> pathSplitVec;
|
||||
// Split path into individual directories
|
||||
path.split(pathSplitVec, '/', -1, false);
|
||||
|
||||
@@ -255,10 +255,10 @@ void SerialHelper::QueryHubPaths(int32_t* status) {
|
||||
|
||||
// Add our devices to our list
|
||||
m_unsortedHubPath.emplace_back(
|
||||
llvm::StringRef{pathSplitVec[hubIndex - 2]});
|
||||
wpi::StringRef{pathSplitVec[hubIndex - 2]});
|
||||
m_visaResource.emplace_back(desc);
|
||||
m_osResource.emplace_back(
|
||||
llvm::StringRef{osName}.split("(").second.split(")").first);
|
||||
wpi::StringRef{osName}.split("(").second.split(")").first);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -277,7 +277,7 @@ int32_t SerialHelper::GetIndexForPort(HAL_SerialPort port, int32_t* status) {
|
||||
|
||||
std::string portString = m_usbNames[port - 2];
|
||||
|
||||
llvm::SmallVector<int32_t, 4> indices;
|
||||
wpi::SmallVector<int32_t, 4> indices;
|
||||
|
||||
// If port has not been assigned, find the one to assign
|
||||
if (portString.empty()) {
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#include <map>
|
||||
#include <string.h> // memcpy
|
||||
#include <sys/time.h>
|
||||
#include <support/mutex.h>
|
||||
#include <wpi/mutex.h>
|
||||
class CtreCanNode
|
||||
{
|
||||
public:
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
#include "HAL/cpp/fpga_clock.h"
|
||||
|
||||
#include <llvm/raw_ostream.h>
|
||||
#include <wpi/raw_ostream.h>
|
||||
|
||||
#include "HAL/HAL.h"
|
||||
|
||||
@@ -20,10 +20,10 @@ fpga_clock::time_point fpga_clock::now() noexcept {
|
||||
int32_t status = 0;
|
||||
uint64_t currentTime = HAL_GetFPGATime(&status);
|
||||
if (status != 0) {
|
||||
llvm::errs()
|
||||
wpi::errs()
|
||||
<< "Call to HAL_GetFPGATime failed."
|
||||
<< "Initialization might have failed. Time will not be correct\n";
|
||||
llvm::errs().flush();
|
||||
wpi::errs().flush();
|
||||
return epoch();
|
||||
}
|
||||
return time_point(std::chrono::microseconds(currentTime));
|
||||
|
||||
@@ -9,14 +9,14 @@
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
#include <llvm/SmallVector.h>
|
||||
#include <support/mutex.h>
|
||||
#include <wpi/SmallVector.h>
|
||||
#include <wpi/mutex.h>
|
||||
|
||||
namespace hal {
|
||||
static llvm::SmallVector<HandleBase*, 32>* globalHandles = nullptr;
|
||||
static wpi::SmallVector<HandleBase*, 32>* globalHandles = nullptr;
|
||||
static wpi::mutex globalHandleMutex;
|
||||
HandleBase::HandleBase() {
|
||||
static llvm::SmallVector<HandleBase*, 32> gH;
|
||||
static wpi::SmallVector<HandleBase*, 32> gH;
|
||||
std::lock_guard<wpi::mutex> lock(globalHandleMutex);
|
||||
if (!globalHandles) {
|
||||
globalHandles = &gH;
|
||||
|
||||
@@ -12,9 +12,9 @@
|
||||
#include "HAL/CAN.h"
|
||||
#include "HALUtil.h"
|
||||
#include "edu_wpi_first_wpilibj_can_CANJNI.h"
|
||||
#include "llvm/SmallString.h"
|
||||
#include "llvm/raw_ostream.h"
|
||||
#include "support/jni_util.h"
|
||||
#include "wpi/SmallString.h"
|
||||
#include "wpi/jni_util.h"
|
||||
#include "wpi/raw_ostream.h"
|
||||
|
||||
using namespace frc;
|
||||
using namespace wpi::java;
|
||||
@@ -53,8 +53,8 @@ Java_edu_wpi_first_wpilibj_can_CANJNI_FRCNetCommCANSessionMuxSendMessage(
|
||||
|
||||
if (logDEBUG <= canJNILogLevel) {
|
||||
if (dataBuffer) {
|
||||
llvm::SmallString<128> buf;
|
||||
llvm::raw_svector_ostream str(buf);
|
||||
wpi::SmallString<128> buf;
|
||||
wpi::raw_svector_ostream str(buf);
|
||||
for (int32_t i = 0; i < dataSize; i++) {
|
||||
str.write_hex(dataBuffer[i]) << ' ';
|
||||
}
|
||||
@@ -102,8 +102,8 @@ Java_edu_wpi_first_wpilibj_can_CANJNI_FRCNetCommCANSessionMuxReceiveMessage(
|
||||
CANJNI_LOG(logDEBUG).write_hex(*messageIDPtr);
|
||||
|
||||
if (logDEBUG <= canJNILogLevel) {
|
||||
llvm::SmallString<128> buf;
|
||||
llvm::raw_svector_ostream str(buf);
|
||||
wpi::SmallString<128> buf;
|
||||
wpi::raw_svector_ostream str(buf);
|
||||
|
||||
for (int32_t i = 0; i < dataSize; i++) {
|
||||
// Pad one-digit data with a zero
|
||||
@@ -121,7 +121,7 @@ Java_edu_wpi_first_wpilibj_can_CANJNI_FRCNetCommCANSessionMuxReceiveMessage(
|
||||
CANJNI_LOG(logDEBUG) << "Status: " << status;
|
||||
|
||||
if (!CheckCANStatus(env, status, *messageIDPtr)) return nullptr;
|
||||
return MakeJByteArray(env, llvm::StringRef{reinterpret_cast<const char*>(buffer),
|
||||
return MakeJByteArray(env, wpi::StringRef{reinterpret_cast<const char*>(buffer),
|
||||
static_cast<size_t>(dataSize)});
|
||||
}
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
#include "HAL/DriverStation.h"
|
||||
#include "edu_wpi_first_wpilibj_hal_HAL.h"
|
||||
#include "HALUtil.h"
|
||||
#include "support/jni_util.h"
|
||||
#include "wpi/jni_util.h"
|
||||
|
||||
using namespace frc;
|
||||
using namespace wpi::java;
|
||||
|
||||
@@ -21,9 +21,9 @@
|
||||
#include "HAL/Errors.h"
|
||||
#include "HAL/cpp/Log.h"
|
||||
#include "edu_wpi_first_wpilibj_hal_HALUtil.h"
|
||||
#include "llvm/SmallString.h"
|
||||
#include "llvm/raw_ostream.h"
|
||||
#include "support/jni_util.h"
|
||||
#include "wpi/SmallString.h"
|
||||
#include "wpi/jni_util.h"
|
||||
#include "wpi/raw_ostream.h"
|
||||
|
||||
using namespace wpi::java;
|
||||
|
||||
@@ -64,8 +64,8 @@ namespace frc {
|
||||
void ThrowAllocationException(JNIEnv *env, int32_t minRange, int32_t maxRange,
|
||||
int32_t requestedValue, int32_t status) {
|
||||
const char *message = HAL_GetErrorMessage(status);
|
||||
llvm::SmallString<1024> buf;
|
||||
llvm::raw_svector_ostream oss(buf);
|
||||
wpi::SmallString<1024> buf;
|
||||
wpi::raw_svector_ostream oss(buf);
|
||||
oss << " Code: " << status << ". " << message << ", Minimum Value: "
|
||||
<< minRange << ", Maximum Value: " << maxRange << ", Requested Value: "
|
||||
<< requestedValue;
|
||||
@@ -75,8 +75,8 @@ void ThrowAllocationException(JNIEnv *env, int32_t minRange, int32_t maxRange,
|
||||
|
||||
void ThrowHalHandleException(JNIEnv *env, int32_t status) {
|
||||
const char *message = HAL_GetErrorMessage(status);
|
||||
llvm::SmallString<1024> buf;
|
||||
llvm::raw_svector_ostream oss(buf);
|
||||
wpi::SmallString<1024> buf;
|
||||
wpi::raw_svector_ostream oss(buf);
|
||||
oss << " Code: " << status << ". " << message;
|
||||
halHandleExCls.Throw(env, buf.c_str());
|
||||
}
|
||||
@@ -88,8 +88,8 @@ void ReportError(JNIEnv *env, int32_t status, bool doThrow) {
|
||||
}
|
||||
const char *message = HAL_GetErrorMessage(status);
|
||||
if (doThrow && status < 0) {
|
||||
llvm::SmallString<1024> buf;
|
||||
llvm::raw_svector_ostream oss(buf);
|
||||
wpi::SmallString<1024> buf;
|
||||
wpi::raw_svector_ostream oss(buf);
|
||||
oss << " Code: " << status << ". " << message;
|
||||
runtimeExCls.Throw(env, buf.c_str());
|
||||
} else {
|
||||
@@ -111,8 +111,8 @@ void ThrowError(JNIEnv *env, int32_t status, int32_t minRange, int32_t maxRange,
|
||||
ThrowHalHandleException(env, status);
|
||||
}
|
||||
const char *message = HAL_GetErrorMessage(status);
|
||||
llvm::SmallString<1024> buf;
|
||||
llvm::raw_svector_ostream oss(buf);
|
||||
wpi::SmallString<1024> buf;
|
||||
wpi::raw_svector_ostream oss(buf);
|
||||
oss << " Code: " << status << ". " << message;
|
||||
runtimeExCls.Throw(env, buf.c_str());
|
||||
}
|
||||
@@ -147,8 +147,8 @@ void ReportCANError(JNIEnv *env, int32_t status, int message_id) {
|
||||
}
|
||||
case HAL_ERR_CANSessionMux_NotAllowed:
|
||||
case kRIOStatusFeatureNotSupported: {
|
||||
llvm::SmallString<100> buf;
|
||||
llvm::raw_svector_ostream oss(buf);
|
||||
wpi::SmallString<100> buf;
|
||||
wpi::raw_svector_ostream oss(buf);
|
||||
oss << "MessageID = " << message_id;
|
||||
canMessageNotAllowedExCls.Throw(env, buf.c_str());
|
||||
break;
|
||||
@@ -165,8 +165,8 @@ void ReportCANError(JNIEnv *env, int32_t status, int message_id) {
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
llvm::SmallString<100> buf;
|
||||
llvm::raw_svector_ostream oss(buf);
|
||||
wpi::SmallString<100> buf;
|
||||
wpi::raw_svector_ostream oss(buf);
|
||||
oss << "Fatal status code detected: " << status;
|
||||
uncleanStatusExCls.Throw(env, buf.c_str());
|
||||
break;
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
|
||||
#include "HAL/I2C.h"
|
||||
#include "HALUtil.h"
|
||||
#include "support/jni_util.h"
|
||||
#include "wpi/jni_util.h"
|
||||
|
||||
using namespace frc;
|
||||
using namespace wpi::java;
|
||||
@@ -83,7 +83,7 @@ JNIEXPORT jint JNICALL Java_edu_wpi_first_wpilibj_hal_I2CJNI_i2CTransactionB(
|
||||
I2CJNI_LOG(logDEBUG) << "Port = " << port;
|
||||
I2CJNI_LOG(logDEBUG) << "Address = " << (jint)address;
|
||||
I2CJNI_LOG(logDEBUG) << "SendSize = " << (jint)sendSize;
|
||||
llvm::SmallVector<uint8_t, 128> recvBuf;
|
||||
wpi::SmallVector<uint8_t, 128> recvBuf;
|
||||
recvBuf.resize(receiveSize);
|
||||
I2CJNI_LOG(logDEBUG) << "ReceiveSize = " << (jint)receiveSize;
|
||||
jint returnValue =
|
||||
@@ -173,7 +173,7 @@ JNIEXPORT jint JNICALL Java_edu_wpi_first_wpilibj_hal_I2CJNI_i2CReadB(
|
||||
I2CJNI_LOG(logDEBUG) << "Port = " << port;
|
||||
I2CJNI_LOG(logDEBUG) << "Address = " << address;
|
||||
I2CJNI_LOG(logDEBUG) << "ReceiveSize = " << receiveSize;
|
||||
llvm::SmallVector<uint8_t, 128> recvBuf;
|
||||
wpi::SmallVector<uint8_t, 128> recvBuf;
|
||||
recvBuf.resize(receiveSize);
|
||||
jint returnValue = HAL_ReadI2C(static_cast<HAL_I2CPort>(port), address, recvBuf.data(), receiveSize);
|
||||
env->SetByteArrayRegion(dataReceived, 0, receiveSize,
|
||||
|
||||
@@ -10,14 +10,14 @@
|
||||
#include <atomic>
|
||||
#include <thread>
|
||||
|
||||
#include <support/mutex.h>
|
||||
#include <wpi/SafeThread.h>
|
||||
#include <wpi/mutex.h>
|
||||
|
||||
#include "HAL/cpp/Log.h"
|
||||
|
||||
#include "HAL/Interrupts.h"
|
||||
#include "HALUtil.h"
|
||||
#include "edu_wpi_first_wpilibj_hal_InterruptJNI.h"
|
||||
#include "support/SafeThread.h"
|
||||
|
||||
using namespace frc;
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
|
||||
#include "HAL/OSSerialPort.h"
|
||||
#include "HALUtil.h"
|
||||
#include "support/jni_util.h"
|
||||
#include "wpi/jni_util.h"
|
||||
|
||||
using namespace frc;
|
||||
using namespace wpi::java;
|
||||
@@ -244,7 +244,7 @@ Java_edu_wpi_first_wpilibj_hal_OSSerialPortJNI_serialGetBytesReceived(
|
||||
JNIEXPORT jint JNICALL Java_edu_wpi_first_wpilibj_hal_OSSerialPortJNI_serialRead(
|
||||
JNIEnv* env, jclass, jbyte port, jbyteArray dataReceived, jint size) {
|
||||
SERIALJNI_LOG(logDEBUG) << "Serial Read";
|
||||
llvm::SmallVector<char, 128> recvBuf;
|
||||
wpi::SmallVector<char, 128> recvBuf;
|
||||
recvBuf.resize(size);
|
||||
int32_t status = 0;
|
||||
jint retVal = HAL_ReadOSSerial(static_cast<HAL_SerialPort>(port), recvBuf.data(),
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
|
||||
#include "HAL/SPI.h"
|
||||
#include "HALUtil.h"
|
||||
#include "support/jni_util.h"
|
||||
#include "wpi/jni_util.h"
|
||||
|
||||
using namespace frc;
|
||||
using namespace wpi::java;
|
||||
@@ -79,7 +79,7 @@ JNIEXPORT jint JNICALL Java_edu_wpi_first_wpilibj_hal_SPIJNI_spiTransactionB(
|
||||
SPIJNI_LOG(logDEBUG) << "Calling SPIJNI spiTransactionB";
|
||||
SPIJNI_LOG(logDEBUG) << "Port = " << (jint)port;
|
||||
SPIJNI_LOG(logDEBUG) << "Size = " << (jint)size;
|
||||
llvm::SmallVector<uint8_t, 128> recvBuf;
|
||||
wpi::SmallVector<uint8_t, 128> recvBuf;
|
||||
recvBuf.resize(size);
|
||||
jint retVal =
|
||||
HAL_TransactionSPI(static_cast<HAL_SPIPort>(port),
|
||||
@@ -146,7 +146,7 @@ JNIEXPORT jint JNICALL Java_edu_wpi_first_wpilibj_hal_SPIJNI_spiRead(
|
||||
SPIJNI_LOG(logDEBUG) << "DataReceivedPtr = " << dataReceivedPtr;
|
||||
jint retVal;
|
||||
if (initiate) {
|
||||
llvm::SmallVector<uint8_t, 128> sendBuf;
|
||||
wpi::SmallVector<uint8_t, 128> sendBuf;
|
||||
sendBuf.resize(size);
|
||||
retVal = HAL_TransactionSPI(static_cast<HAL_SPIPort>(port), sendBuf.data(), dataReceivedPtr, size);
|
||||
} else {
|
||||
@@ -168,10 +168,10 @@ JNIEXPORT jint JNICALL Java_edu_wpi_first_wpilibj_hal_SPIJNI_spiReadB(
|
||||
SPIJNI_LOG(logDEBUG) << "Initiate = " << (jboolean)initiate;
|
||||
SPIJNI_LOG(logDEBUG) << "Size = " << (jint)size;
|
||||
jint retVal;
|
||||
llvm::SmallVector<uint8_t, 128> recvBuf;
|
||||
wpi::SmallVector<uint8_t, 128> recvBuf;
|
||||
recvBuf.resize(size);
|
||||
if (initiate) {
|
||||
llvm::SmallVector<uint8_t, 128> sendBuf;
|
||||
wpi::SmallVector<uint8_t, 128> sendBuf;
|
||||
sendBuf.resize(size);
|
||||
retVal = HAL_TransactionSPI(static_cast<HAL_SPIPort>(port), sendBuf.data(), recvBuf.data(), size);
|
||||
} else {
|
||||
@@ -404,7 +404,7 @@ JNIEXPORT jint JNICALL Java_edu_wpi_first_wpilibj_hal_SPIJNI_spiReadAutoReceived
|
||||
SPIJNI_LOG(logDEBUG) << "Port = " << port;
|
||||
SPIJNI_LOG(logDEBUG) << "NumToRead = " << numToRead;
|
||||
SPIJNI_LOG(logDEBUG) << "Timeout = " << timeout;
|
||||
llvm::SmallVector<uint8_t, 128> recvBuf;
|
||||
wpi::SmallVector<uint8_t, 128> recvBuf;
|
||||
recvBuf.resize(numToRead);
|
||||
int32_t status = 0;
|
||||
jint retval = HAL_ReadSPIAutoReceivedData(static_cast<HAL_SPIPort>(port), recvBuf.data(), numToRead, timeout, &status);
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
|
||||
#include "HAL/SerialPort.h"
|
||||
#include "HALUtil.h"
|
||||
#include "support/jni_util.h"
|
||||
#include "wpi/jni_util.h"
|
||||
|
||||
using namespace frc;
|
||||
using namespace wpi::java;
|
||||
@@ -263,7 +263,7 @@ Java_edu_wpi_first_wpilibj_hal_SerialPortJNI_serialGetBytesReceived(
|
||||
JNIEXPORT jint JNICALL Java_edu_wpi_first_wpilibj_hal_SerialPortJNI_serialRead(
|
||||
JNIEnv* env, jclass, jbyte port, jbyteArray dataReceived, jint size) {
|
||||
SERIALJNI_LOG(logDEBUG) << "Serial Read";
|
||||
llvm::SmallVector<char, 128> recvBuf;
|
||||
wpi::SmallVector<char, 128> recvBuf;
|
||||
recvBuf.resize(size);
|
||||
int32_t status = 0;
|
||||
jint retVal = HAL_ReadSerial(static_cast<HAL_SerialPort>(port), recvBuf.data(),
|
||||
|
||||
@@ -10,8 +10,8 @@
|
||||
#include <chrono>
|
||||
#include <string>
|
||||
|
||||
#include <llvm/SmallString.h>
|
||||
#include <llvm/raw_ostream.h>
|
||||
#include <wpi/SmallString.h>
|
||||
#include <wpi/raw_ostream.h>
|
||||
|
||||
inline std::string NowTime();
|
||||
|
||||
@@ -31,7 +31,7 @@ class Log {
|
||||
public:
|
||||
Log();
|
||||
virtual ~Log();
|
||||
llvm::raw_ostream& Get(TLogLevel level = logINFO);
|
||||
wpi::raw_ostream& Get(TLogLevel level = logINFO);
|
||||
|
||||
public:
|
||||
static TLogLevel& ReportingLevel();
|
||||
@@ -39,8 +39,8 @@ class Log {
|
||||
static TLogLevel FromString(const std::string& level);
|
||||
|
||||
protected:
|
||||
llvm::SmallString<128> buf;
|
||||
llvm::raw_svector_ostream oss{buf};
|
||||
wpi::SmallString<128> buf;
|
||||
wpi::raw_svector_ostream oss{buf};
|
||||
|
||||
private:
|
||||
Log(const Log&);
|
||||
@@ -49,7 +49,7 @@ class Log {
|
||||
|
||||
inline Log::Log() {}
|
||||
|
||||
inline llvm::raw_ostream& Log::Get(TLogLevel level) {
|
||||
inline wpi::raw_ostream& Log::Get(TLogLevel level) {
|
||||
oss << "- " << NowTime();
|
||||
oss << " " << ToString(level) << ": ";
|
||||
if (level > logDEBUG) {
|
||||
@@ -60,7 +60,7 @@ inline llvm::raw_ostream& Log::Get(TLogLevel level) {
|
||||
|
||||
inline Log::~Log() {
|
||||
oss << "\n";
|
||||
llvm::errs() << oss.str();
|
||||
wpi::errs() << oss.str();
|
||||
}
|
||||
|
||||
inline TLogLevel& Log::ReportingLevel() {
|
||||
@@ -99,8 +99,8 @@ typedef Log FILELog;
|
||||
Log().Get(level)
|
||||
|
||||
inline std::string NowTime() {
|
||||
llvm::SmallString<128> buf;
|
||||
llvm::raw_svector_ostream oss(buf);
|
||||
wpi::SmallString<128> buf;
|
||||
wpi::raw_svector_ostream oss(buf);
|
||||
|
||||
using std::chrono::duration_cast;
|
||||
|
||||
|
||||
@@ -12,9 +12,9 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include <llvm/SmallString.h>
|
||||
#include <llvm/SmallVector.h>
|
||||
#include <support/mutex.h>
|
||||
#include <wpi/SmallString.h>
|
||||
#include <wpi/SmallVector.h>
|
||||
#include <wpi/mutex.h>
|
||||
|
||||
#include "HAL/SerialPort.h"
|
||||
|
||||
@@ -31,7 +31,7 @@ class SerialHelper {
|
||||
|
||||
private:
|
||||
void SortHubPathVector();
|
||||
void CoiteratedSort(llvm::SmallVectorImpl<llvm::SmallString<16>>& vec);
|
||||
void CoiteratedSort(wpi::SmallVectorImpl<wpi::SmallString<16>>& vec);
|
||||
void QueryHubPaths(int32_t* status);
|
||||
|
||||
int32_t GetIndexForPort(HAL_SerialPort port, int32_t* status);
|
||||
@@ -39,10 +39,10 @@ class SerialHelper {
|
||||
// Vectors to hold data before sorting.
|
||||
// Note we will most likely have at max 2 instances, and the longest string
|
||||
// is around 12, so these should never touch the heap;
|
||||
llvm::SmallVector<llvm::SmallString<16>, 4> m_visaResource;
|
||||
llvm::SmallVector<llvm::SmallString<16>, 4> m_osResource;
|
||||
llvm::SmallVector<llvm::SmallString<16>, 4> m_unsortedHubPath;
|
||||
llvm::SmallVector<llvm::SmallString<16>, 4> m_sortedHubPath;
|
||||
wpi::SmallVector<wpi::SmallString<16>, 4> m_visaResource;
|
||||
wpi::SmallVector<wpi::SmallString<16>, 4> m_osResource;
|
||||
wpi::SmallVector<wpi::SmallString<16>, 4> m_unsortedHubPath;
|
||||
wpi::SmallVector<wpi::SmallString<16>, 4> m_sortedHubPath;
|
||||
|
||||
int32_t m_resourceHandle;
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <support/mutex.h>
|
||||
#include <wpi/mutex.h>
|
||||
|
||||
#include "HAL/ChipObject.h"
|
||||
#include "HAL/Types.h"
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
#include <array>
|
||||
#include <memory>
|
||||
|
||||
#include <support/mutex.h>
|
||||
#include <wpi/mutex.h>
|
||||
|
||||
#include "HAL/Errors.h"
|
||||
#include "HAL/Types.h"
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
|
||||
#include <support/mutex.h>
|
||||
#include <wpi/mutex.h>
|
||||
|
||||
#include "HAL/Errors.h"
|
||||
#include "HAL/Types.h"
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
#include <array>
|
||||
#include <memory>
|
||||
|
||||
#include <support/mutex.h>
|
||||
#include <wpi/mutex.h>
|
||||
|
||||
#include "HAL/Errors.h"
|
||||
#include "HAL/Types.h"
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
#include <array>
|
||||
#include <memory>
|
||||
|
||||
#include <support/mutex.h>
|
||||
#include <wpi/mutex.h>
|
||||
|
||||
#include "HAL/Types.h"
|
||||
#include "HAL/cpp/make_unique.h"
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
#include <array>
|
||||
#include <memory>
|
||||
|
||||
#include <support/mutex.h>
|
||||
#include <wpi/mutex.h>
|
||||
|
||||
#include "HAL/Types.h"
|
||||
#include "HAL/cpp/make_unique.h"
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
#include <support/mutex.h>
|
||||
#include <wpi/mutex.h>
|
||||
|
||||
#include "HAL/Types.h"
|
||||
#include "HAL/handles/HandlesInternal.h"
|
||||
|
||||
@@ -16,8 +16,8 @@
|
||||
#include <cstring>
|
||||
#include <string>
|
||||
|
||||
#include <support/condition_variable.h>
|
||||
#include <support/mutex.h>
|
||||
#include <wpi/condition_variable.h>
|
||||
#include <wpi/mutex.h>
|
||||
|
||||
#include "MockData/DriverStationDataInternal.h"
|
||||
#include "MockData/MockHooks.h"
|
||||
|
||||
@@ -7,8 +7,8 @@
|
||||
|
||||
#include "HAL/Extensions.h"
|
||||
|
||||
#include <llvm/SmallString.h>
|
||||
#include <llvm/StringRef.h>
|
||||
#include <wpi/SmallString.h>
|
||||
#include <wpi/StringRef.h>
|
||||
|
||||
#include "HAL/HAL.h"
|
||||
|
||||
@@ -46,7 +46,7 @@ int HAL_LoadOneExtension(const char* library) {
|
||||
HTYPE handle = DLOPEN(library);
|
||||
#if !defined(WIN32) && !defined(_WIN32)
|
||||
if (!handle) {
|
||||
llvm::SmallString<128> libraryName("lib");
|
||||
wpi::SmallString<128> libraryName("lib");
|
||||
libraryName += library;
|
||||
#if defined(__APPLE__)
|
||||
libraryName += ".dylib";
|
||||
@@ -73,13 +73,13 @@ int HAL_LoadOneExtension(const char* library) {
|
||||
*/
|
||||
int HAL_LoadExtensions(void) {
|
||||
int rc = 1;
|
||||
llvm::SmallVector<llvm::StringRef, 2> libraries;
|
||||
wpi::SmallVector<wpi::StringRef, 2> libraries;
|
||||
const char* e = std::getenv("HALSIM_EXTENSIONS");
|
||||
if (!e) return rc;
|
||||
llvm::StringRef env{e};
|
||||
wpi::StringRef env{e};
|
||||
env.split(libraries, DELIM, -1, false);
|
||||
for (auto& libref : libraries) {
|
||||
llvm::SmallString<128> library(libref);
|
||||
wpi::SmallString<128> library(libref);
|
||||
rc = HAL_LoadOneExtension(library.c_str());
|
||||
if (rc < 0) break;
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
#include "HAL/HAL.h"
|
||||
|
||||
#include <llvm/raw_ostream.h>
|
||||
#include <wpi/raw_ostream.h>
|
||||
|
||||
#include "ErrorsInternal.h"
|
||||
#include "HAL/DriverStation.h"
|
||||
@@ -263,7 +263,7 @@ HAL_Bool HAL_Initialize(int32_t timeout, int32_t mode) {
|
||||
|
||||
hal::init::InitializeHAL();
|
||||
|
||||
llvm::outs().SetUnbuffered();
|
||||
wpi::outs().SetUnbuffered();
|
||||
if (HAL_LoadExtensions() < 0) return false;
|
||||
hal::RestartTiming();
|
||||
HAL_InitializeDriverStation();
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include <support/condition_variable.h>
|
||||
#include <wpi/condition_variable.h>
|
||||
|
||||
#include "AnalogInternal.h"
|
||||
#include "DigitalInternal.h"
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
#include <atomic>
|
||||
#include <memory>
|
||||
|
||||
#include <support/mutex.h>
|
||||
#include <wpi/mutex.h>
|
||||
|
||||
#include "MockData/AccelerometerData.h"
|
||||
#include "MockData/NotifyListenerVector.h"
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
#include <atomic>
|
||||
#include <memory>
|
||||
|
||||
#include <support/mutex.h>
|
||||
#include <wpi/mutex.h>
|
||||
|
||||
#include "MockData/AnalogGyroData.h"
|
||||
#include "MockData/NotifyListenerVector.h"
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
#include <atomic>
|
||||
#include <memory>
|
||||
|
||||
#include <support/mutex.h>
|
||||
#include <wpi/mutex.h>
|
||||
|
||||
#include "MockData/AnalogInData.h"
|
||||
#include "MockData/NotifyListenerVector.h"
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
#include <atomic>
|
||||
#include <memory>
|
||||
|
||||
#include <support/mutex.h>
|
||||
#include <wpi/mutex.h>
|
||||
|
||||
#include "MockData/AnalogOutData.h"
|
||||
#include "MockData/NotifyListenerVector.h"
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
#include <atomic>
|
||||
#include <memory>
|
||||
|
||||
#include <support/mutex.h>
|
||||
#include <wpi/mutex.h>
|
||||
|
||||
#include "MockData/AnalogTriggerData.h"
|
||||
#include "MockData/NotifyListenerVector.h"
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
#include <limits>
|
||||
#include <memory>
|
||||
|
||||
#include <support/mutex.h>
|
||||
#include <wpi/mutex.h>
|
||||
|
||||
#include "MockData/CanData.h"
|
||||
#include "MockData/NotifyCallbackHelpers.h"
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
#include <atomic>
|
||||
#include <memory>
|
||||
|
||||
#include <support/mutex.h>
|
||||
#include <wpi/mutex.h>
|
||||
|
||||
#include "MockData/DIOData.h"
|
||||
#include "MockData/NotifyListenerVector.h"
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
#include <atomic>
|
||||
#include <memory>
|
||||
|
||||
#include <support/mutex.h>
|
||||
#include <wpi/mutex.h>
|
||||
|
||||
#include "MockData/DigitalPWMData.h"
|
||||
#include "MockData/NotifyListenerVector.h"
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
#include <atomic>
|
||||
#include <memory>
|
||||
|
||||
#include <support/mutex.h>
|
||||
#include <wpi/mutex.h>
|
||||
|
||||
#include "MockData/DriverStationData.h"
|
||||
#include "MockData/NotifyListenerVector.h"
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
#include <limits>
|
||||
#include <memory>
|
||||
|
||||
#include <support/mutex.h>
|
||||
#include <wpi/mutex.h>
|
||||
|
||||
#include "MockData/EncoderData.h"
|
||||
#include "MockData/NotifyListenerVector.h"
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
#include <string>
|
||||
|
||||
#include "MockData/HALValue.h"
|
||||
#include "MockData/llvm/StringRef.h"
|
||||
#include "MockData/wpi/StringRef.h"
|
||||
|
||||
namespace hal {
|
||||
|
||||
@@ -19,9 +19,9 @@ class Value;
|
||||
|
||||
void ConvertToC(const Value& in, HAL_Value* out);
|
||||
std::shared_ptr<Value> ConvertFromC(const HAL_Value& value);
|
||||
void ConvertToC(llvm::StringRef in, HALString* out);
|
||||
inline llvm::StringRef ConvertFromC(const HALString& str) {
|
||||
return llvm::StringRef(str.str, str.len);
|
||||
void ConvertToC(wpi::StringRef in, HALString* out);
|
||||
inline wpi::StringRef ConvertFromC(const HALString& str) {
|
||||
return wpi::StringRef(str.str, str.len);
|
||||
}
|
||||
|
||||
} // namespace hal
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
#include <limits>
|
||||
#include <memory>
|
||||
|
||||
#include <support/mutex.h>
|
||||
#include <wpi/mutex.h>
|
||||
|
||||
#include "MockData/I2CData.h"
|
||||
#include "MockData/NotifyListenerVector.h"
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
#include <atomic>
|
||||
#include <memory>
|
||||
|
||||
#include <support/mutex.h>
|
||||
#include <wpi/mutex.h>
|
||||
|
||||
#include "../PortsInternal.h"
|
||||
#include "MockData/NotifyListenerVector.h"
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
#include <atomic>
|
||||
#include <memory>
|
||||
|
||||
#include <support/mutex.h>
|
||||
#include <wpi/mutex.h>
|
||||
|
||||
#include "../PortsInternal.h"
|
||||
#include "MockData/NotifyListenerVector.h"
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
#include <atomic>
|
||||
#include <memory>
|
||||
|
||||
#include <support/mutex.h>
|
||||
#include <wpi/mutex.h>
|
||||
|
||||
#include "MockData/NotifyListenerVector.h"
|
||||
#include "MockData/PWMData.h"
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
#include <atomic>
|
||||
#include <memory>
|
||||
|
||||
#include <support/mutex.h>
|
||||
#include <wpi/mutex.h>
|
||||
|
||||
#include "MockData/NotifyListenerVector.h"
|
||||
#include "MockData/RelayData.h"
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
#include <atomic>
|
||||
#include <memory>
|
||||
|
||||
#include <support/mutex.h>
|
||||
#include <wpi/mutex.h>
|
||||
|
||||
#include "MockData/NotifyListenerVector.h"
|
||||
#include "MockData/RoboRioData.h"
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
#include <atomic>
|
||||
#include <memory>
|
||||
|
||||
#include <support/mutex.h>
|
||||
#include <wpi/mutex.h>
|
||||
|
||||
#include "MockData/NotifyListenerVector.h"
|
||||
#include "MockData/SPIAccelerometerData.h"
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
#include <limits>
|
||||
#include <memory>
|
||||
|
||||
#include <support/mutex.h>
|
||||
#include <wpi/mutex.h>
|
||||
|
||||
#include "MockData/NotifyListenerVector.h"
|
||||
#include "MockData/SPIData.h"
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
#include <cstdio>
|
||||
#include <thread>
|
||||
|
||||
#include <support/timestamp.h>
|
||||
#include <wpi/timestamp.h>
|
||||
|
||||
#include "MockHooksInternal.h"
|
||||
|
||||
|
||||
@@ -9,9 +9,9 @@
|
||||
|
||||
#include <chrono>
|
||||
|
||||
#include <support/condition_variable.h>
|
||||
#include <support/mutex.h>
|
||||
#include <support/timestamp.h>
|
||||
#include <wpi/condition_variable.h>
|
||||
#include <wpi/mutex.h>
|
||||
#include <wpi/timestamp.h>
|
||||
|
||||
#include "HAL/HAL.h"
|
||||
#include "HAL/cpp/fpga_clock.h"
|
||||
|
||||
Reference in New Issue
Block a user