mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-20 00:51:42 +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:
@@ -151,7 +151,7 @@ void Notifier::RemoveListener(int uid) {
|
||||
thr->m_listeners.erase(uid);
|
||||
}
|
||||
|
||||
void Notifier::NotifySource(llvm::StringRef name, CS_Source source,
|
||||
void Notifier::NotifySource(wpi::StringRef name, CS_Source source,
|
||||
CS_EventKind kind) {
|
||||
auto thr = m_owner.GetThread();
|
||||
if (!thr) return;
|
||||
@@ -176,9 +176,9 @@ void Notifier::NotifySourceVideoMode(const SourceImpl& source,
|
||||
}
|
||||
|
||||
void Notifier::NotifySourceProperty(const SourceImpl& source, CS_EventKind kind,
|
||||
llvm::StringRef propertyName, int property,
|
||||
wpi::StringRef propertyName, int property,
|
||||
CS_PropertyKind propertyKind, int value,
|
||||
llvm::StringRef valueStr) {
|
||||
wpi::StringRef valueStr) {
|
||||
auto thr = m_owner.GetThread();
|
||||
if (!thr) return;
|
||||
|
||||
@@ -191,7 +191,7 @@ void Notifier::NotifySourceProperty(const SourceImpl& source, CS_EventKind kind,
|
||||
thr->m_cond.notify_one();
|
||||
}
|
||||
|
||||
void Notifier::NotifySink(llvm::StringRef name, CS_Sink sink,
|
||||
void Notifier::NotifySink(wpi::StringRef name, CS_Sink sink,
|
||||
CS_EventKind kind) {
|
||||
auto thr = m_owner.GetThread();
|
||||
if (!thr) return;
|
||||
@@ -205,7 +205,7 @@ void Notifier::NotifySink(const SinkImpl& sink, CS_EventKind kind) {
|
||||
NotifySink(sink.GetName(), handleData.first, kind);
|
||||
}
|
||||
|
||||
void Notifier::NotifySinkSourceChanged(llvm::StringRef name, CS_Sink sink,
|
||||
void Notifier::NotifySinkSourceChanged(wpi::StringRef name, CS_Sink sink,
|
||||
CS_Source source) {
|
||||
auto thr = m_owner.GetThread();
|
||||
if (!thr) return;
|
||||
|
||||
Reference in New Issue
Block a user