mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41: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:
@@ -10,7 +10,7 @@
|
||||
#include <cstdio>
|
||||
|
||||
#include <HAL/HAL.h>
|
||||
#include <llvm/raw_ostream.h>
|
||||
#include <wpi/raw_ostream.h>
|
||||
|
||||
#include "Commands/Scheduler.h"
|
||||
#include "LiveWindow/LiveWindow.h"
|
||||
@@ -31,7 +31,7 @@ using namespace frc;
|
||||
* ready, causing the robot to be bypassed in a match.
|
||||
*/
|
||||
void IterativeRobotBase::RobotInit() {
|
||||
llvm::outs() << "Default " << __FUNCTION__ << "() method... Overload me!\n";
|
||||
wpi::outs() << "Default " << __FUNCTION__ << "() method... Overload me!\n";
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -42,7 +42,7 @@ void IterativeRobotBase::RobotInit() {
|
||||
* the robot enters disabled mode.
|
||||
*/
|
||||
void IterativeRobotBase::DisabledInit() {
|
||||
llvm::outs() << "Default " << __FUNCTION__ << "() method... Overload me!\n";
|
||||
wpi::outs() << "Default " << __FUNCTION__ << "() method... Overload me!\n";
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -52,7 +52,7 @@ void IterativeRobotBase::DisabledInit() {
|
||||
* called each time the robot enters autonomous mode.
|
||||
*/
|
||||
void IterativeRobotBase::AutonomousInit() {
|
||||
llvm::outs() << "Default " << __FUNCTION__ << "() method... Overload me!\n";
|
||||
wpi::outs() << "Default " << __FUNCTION__ << "() method... Overload me!\n";
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -62,7 +62,7 @@ void IterativeRobotBase::AutonomousInit() {
|
||||
* called each time the robot enters teleop mode.
|
||||
*/
|
||||
void IterativeRobotBase::TeleopInit() {
|
||||
llvm::outs() << "Default " << __FUNCTION__ << "() method... Overload me!\n";
|
||||
wpi::outs() << "Default " << __FUNCTION__ << "() method... Overload me!\n";
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -72,7 +72,7 @@ void IterativeRobotBase::TeleopInit() {
|
||||
* called each time the robot enters test mode.
|
||||
*/
|
||||
void IterativeRobotBase::TestInit() {
|
||||
llvm::outs() << "Default " << __FUNCTION__ << "() method... Overload me!\n";
|
||||
wpi::outs() << "Default " << __FUNCTION__ << "() method... Overload me!\n";
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -84,7 +84,7 @@ void IterativeRobotBase::TestInit() {
|
||||
void IterativeRobotBase::RobotPeriodic() {
|
||||
static bool firstRun = true;
|
||||
if (firstRun) {
|
||||
llvm::outs() << "Default " << __FUNCTION__ << "() method... Overload me!\n";
|
||||
wpi::outs() << "Default " << __FUNCTION__ << "() method... Overload me!\n";
|
||||
firstRun = false;
|
||||
}
|
||||
}
|
||||
@@ -99,7 +99,7 @@ void IterativeRobotBase::RobotPeriodic() {
|
||||
void IterativeRobotBase::DisabledPeriodic() {
|
||||
static bool firstRun = true;
|
||||
if (firstRun) {
|
||||
llvm::outs() << "Default " << __FUNCTION__ << "() method... Overload me!\n";
|
||||
wpi::outs() << "Default " << __FUNCTION__ << "() method... Overload me!\n";
|
||||
firstRun = false;
|
||||
}
|
||||
}
|
||||
@@ -114,7 +114,7 @@ void IterativeRobotBase::DisabledPeriodic() {
|
||||
void IterativeRobotBase::AutonomousPeriodic() {
|
||||
static bool firstRun = true;
|
||||
if (firstRun) {
|
||||
llvm::outs() << "Default " << __FUNCTION__ << "() method... Overload me!\n";
|
||||
wpi::outs() << "Default " << __FUNCTION__ << "() method... Overload me!\n";
|
||||
firstRun = false;
|
||||
}
|
||||
}
|
||||
@@ -129,7 +129,7 @@ void IterativeRobotBase::AutonomousPeriodic() {
|
||||
void IterativeRobotBase::TeleopPeriodic() {
|
||||
static bool firstRun = true;
|
||||
if (firstRun) {
|
||||
llvm::outs() << "Default " << __FUNCTION__ << "() method... Overload me!\n";
|
||||
wpi::outs() << "Default " << __FUNCTION__ << "() method... Overload me!\n";
|
||||
firstRun = false;
|
||||
}
|
||||
}
|
||||
@@ -143,7 +143,7 @@ void IterativeRobotBase::TeleopPeriodic() {
|
||||
void IterativeRobotBase::TestPeriodic() {
|
||||
static bool firstRun = true;
|
||||
if (firstRun) {
|
||||
llvm::outs() << "Default " << __FUNCTION__ << "() method... Overload me!\n";
|
||||
wpi::outs() << "Default " << __FUNCTION__ << "() method... Overload me!\n";
|
||||
firstRun = false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user