Files
allwpilib/upstream_utils/llvm_patches/0019-Prefer-wpi-s-fs.h.patch
PJ Reiniger 32cd2ddf8e [upstream_utils] Remove patch that results in building with NDEBUG causing ODR issues (#8539)
Semiwrap / meson / robotpy define `NDEBUG` when building their software
in all modes, while `allwplib` only does it when building debug. This
causes the size of `DenseMap` to differ between the shared libraries
built here, and the extension modules built in `mostrobotpy`, causing
segfaults when you try to execute code that uses `DenseMap`. This is not
a problem with the robotpy code in `allwpilib`, because bazel uses the
exact same compiler flags when building the shared libraries and
pybind11 extensions.
2026-01-03 13:32:16 -08:00

35 lines
1.1 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: PJ Reiniger <pj.reiniger@gmail.com>
Date: Sun, 8 May 2022 16:49:36 -0400
Subject: [PATCH 19/35] Prefer wpi's fs.h
---
llvm/include/llvm/Support/raw_ostream.h | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/llvm/include/llvm/Support/raw_ostream.h b/llvm/include/llvm/Support/raw_ostream.h
index 2c37ff9c0966506c53d15d7cb84abc82335b9913..990d3e4cfe53e025df6ce797f46f9de5af8ca6dc 100644
--- a/llvm/include/llvm/Support/raw_ostream.h
+++ b/llvm/include/llvm/Support/raw_ostream.h
@@ -26,18 +26,15 @@
#include <type_traits>
#include <vector>
-namespace llvm {
-
-template <class T> class [[nodiscard]] Expected;
-namespace sys {
namespace fs {
enum FileAccess : unsigned;
enum OpenFlags : unsigned;
enum CreationDisposition : unsigned;
class FileLocker;
} // end namespace fs
-} // end namespace sys
+
+namespace llvm {
/// This class implements an extremely fast bulk output stream that can *only*
/// output to a stream. It does not support seeking, reopening, rewinding, line