[llvm] [orc-rt] Use LLVM-style header naming scheme. (PR #154881)
Lang Hames via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 21 21:14:17 PDT 2025
https://github.com/lhames created https://github.com/llvm/llvm-project/pull/154881
This is more consistent with the rest of the LLVM project, and the resulting names are closer to the types defined in each of the headers.
>From 93547809cbb0dcc0b0d89280f66b809f7caf6844 Mon Sep 17 00:00:00 2001
From: Lang Hames <lhames at gmail.com>
Date: Fri, 22 Aug 2025 14:00:53 +1000
Subject: [PATCH] [orc-rt] Use LLVM-style header naming scheme.
This is more consistent with the rest of the LLVM project, and the resulting
names are closer to the types defined in each of the headers.
---
orc-rt/include/CMakeLists.txt | 10 +++++-----
.../include/orc-rt/{bitmask-enum.h => BitmaskEnum.h} | 10 +++++-----
orc-rt/include/orc-rt/{compiler.h => Compiler.h} | 2 +-
orc-rt/include/orc-rt/{error.h => Error.h} | 6 +++---
orc-rt/include/orc-rt/{math.h => Math.h} | 2 +-
orc-rt/include/orc-rt/{rtti.h => RTTI.h} | 2 +-
orc-rt/lib/executor/CMakeLists.txt | 2 +-
orc-rt/lib/executor/{rtti.cpp => RTTI.cpp} | 4 ++--
.../{bitmask-enum-test.cpp => BitmaskEnumTest.cpp} | 6 +++---
orc-rt/unittests/CMakeLists.txt | 8 ++++----
orc-rt/unittests/{error-test.cpp => ErrorTest.cpp} | 4 ++--
orc-rt/unittests/{math-test.cpp => MathTest.cpp} | 6 +++---
orc-rt/unittests/{rtti-test.cpp => RTTITest.cpp} | 2 +-
13 files changed, 32 insertions(+), 32 deletions(-)
rename orc-rt/include/orc-rt/{bitmask-enum.h => BitmaskEnum.h} (97%)
rename orc-rt/include/orc-rt/{compiler.h => Compiler.h} (97%)
rename orc-rt/include/orc-rt/{error.h => Error.h} (99%)
rename orc-rt/include/orc-rt/{math.h => Math.h} (93%)
rename orc-rt/include/orc-rt/{rtti.h => RTTI.h} (98%)
rename orc-rt/lib/executor/{rtti.cpp => RTTI.cpp} (88%)
rename orc-rt/unittests/{bitmask-enum-test.cpp => BitmaskEnumTest.cpp} (95%)
rename orc-rt/unittests/{error-test.cpp => ErrorTest.cpp} (99%)
rename orc-rt/unittests/{math-test.cpp => MathTest.cpp} (95%)
rename orc-rt/unittests/{rtti-test.cpp => RTTITest.cpp} (98%)
diff --git a/orc-rt/include/CMakeLists.txt b/orc-rt/include/CMakeLists.txt
index 29df81297d05c..33545547e17d7 100644
--- a/orc-rt/include/CMakeLists.txt
+++ b/orc-rt/include/CMakeLists.txt
@@ -1,10 +1,10 @@
set(ORC_RT_HEADERS
orc-rt-c/orc-rt.h
- orc-rt/bitmask-enum.h
- orc-rt/error.h
- orc-rt/compiler.h
- orc-rt/math.h
- orc-rt/rtti.h
+ orc-rt/BitmaskEnum.h
+ orc-rt/Compiler.h
+ orc-rt/Error.h
+ orc-rt/Math.h
+ orc-rt/RTTI.h
orc-rt/span.h
orc-rt/unique-function.h
)
diff --git a/orc-rt/include/orc-rt/bitmask-enum.h b/orc-rt/include/orc-rt/BitmaskEnum.h
similarity index 97%
rename from orc-rt/include/orc-rt/bitmask-enum.h
rename to orc-rt/include/orc-rt/BitmaskEnum.h
index adc95424b83a8..f3aff3287a2ff 100644
--- a/orc-rt/include/orc-rt/bitmask-enum.h
+++ b/orc-rt/include/orc-rt/BitmaskEnum.h
@@ -1,4 +1,4 @@
-//===---- bitmask-enum.h - Enable bitmask operations on enums ---*- C++ -*-===//
+//===---- BitmaskEnum.h - Enable bitmask operations on enums ----*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
@@ -13,10 +13,10 @@
//
//===----------------------------------------------------------------------===//
-#ifndef ORC_RT_BITMASK_ENUM_H
-#define ORC_RT_BITMASK_ENUM_H
+#ifndef ORC_RT_BITMASKENUM_H
+#define ORC_RT_BITMASKENUM_H
-#include "math.h"
+#include "Math.h"
#include <cassert>
#include <type_traits>
@@ -158,4 +158,4 @@ constexpr E &operator^=(E &LHS, E RHS) noexcept {
} // namespace orc_rt
-#endif // ORC_RT_BITMASK_ENUM_H
+#endif // ORC_RT_BITMASKENUM_H
diff --git a/orc-rt/include/orc-rt/compiler.h b/orc-rt/include/orc-rt/Compiler.h
similarity index 97%
rename from orc-rt/include/orc-rt/compiler.h
rename to orc-rt/include/orc-rt/Compiler.h
index 1a176726d26f7..e0c0c0989a1c7 100644
--- a/orc-rt/include/orc-rt/compiler.h
+++ b/orc-rt/include/orc-rt/Compiler.h
@@ -1,4 +1,4 @@
-//===--------- compiler.h - Compiler abstraction support --------*- C++ -*-===//
+//===--------- Compiler.h - Compiler abstraction support --------*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
diff --git a/orc-rt/include/orc-rt/error.h b/orc-rt/include/orc-rt/Error.h
similarity index 99%
rename from orc-rt/include/orc-rt/error.h
rename to orc-rt/include/orc-rt/Error.h
index 478ba5b865e12..a25c7831644ee 100644
--- a/orc-rt/include/orc-rt/error.h
+++ b/orc-rt/include/orc-rt/Error.h
@@ -1,4 +1,4 @@
-//===-------- error.h - Enforced error checking for ORC RT ------*- C++ -*-===//
+//===-------- Error.h - Enforced error checking for ORC RT ------*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
@@ -9,8 +9,8 @@
#ifndef ORC_RT_ERROR_H
#define ORC_RT_ERROR_H
-#include "orc-rt/compiler.h"
-#include "orc-rt/rtti.h"
+#include "orc-rt/Compiler.h"
+#include "orc-rt/RTTI.h"
#include <cassert>
#include <cstdlib>
diff --git a/orc-rt/include/orc-rt/math.h b/orc-rt/include/orc-rt/Math.h
similarity index 93%
rename from orc-rt/include/orc-rt/math.h
rename to orc-rt/include/orc-rt/Math.h
index 4dd6ddd9e506c..59a21615f2614 100644
--- a/orc-rt/include/orc-rt/math.h
+++ b/orc-rt/include/orc-rt/Math.h
@@ -1,4 +1,4 @@
-//===--------- math.h - Math helpers for the ORC runtime --------*- C++ -*-===//
+//===--------- Math.h - Math helpers for the ORC runtime --------*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
diff --git a/orc-rt/include/orc-rt/rtti.h b/orc-rt/include/orc-rt/RTTI.h
similarity index 98%
rename from orc-rt/include/orc-rt/rtti.h
rename to orc-rt/include/orc-rt/RTTI.h
index 3097edf68d7b2..734205200cc6e 100644
--- a/orc-rt/include/orc-rt/rtti.h
+++ b/orc-rt/include/orc-rt/RTTI.h
@@ -1,4 +1,4 @@
-//===------------- rtti.h - RTTI support for ORC RT -------------*- C++ -*-===//
+//===------------- RTTI.h - RTTI support for ORC RT -------------*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
diff --git a/orc-rt/lib/executor/CMakeLists.txt b/orc-rt/lib/executor/CMakeLists.txt
index 40035bb4dcffb..331954c2c556f 100644
--- a/orc-rt/lib/executor/CMakeLists.txt
+++ b/orc-rt/lib/executor/CMakeLists.txt
@@ -1,6 +1,6 @@
set(files
orc-rt-executor.cpp
- rtti.cpp
+ RTTI.cpp
)
add_library(orc-rt-executor STATIC ${files})
diff --git a/orc-rt/lib/executor/rtti.cpp b/orc-rt/lib/executor/RTTI.cpp
similarity index 88%
rename from orc-rt/lib/executor/rtti.cpp
rename to orc-rt/lib/executor/RTTI.cpp
index 8c6d27fb25c73..89e3a07a449c0 100644
--- a/orc-rt/lib/executor/rtti.cpp
+++ b/orc-rt/lib/executor/RTTI.cpp
@@ -1,4 +1,4 @@
-//===- rtti.cpp -----------------------------------------------------------===//
+//===- RTTI.cpp -----------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
@@ -14,7 +14,7 @@
//
//===----------------------------------------------------------------------===//
-#include "orc-rt/rtti.h"
+#include "orc-rt/RTTI.h"
namespace orc_rt {
diff --git a/orc-rt/unittests/bitmask-enum-test.cpp b/orc-rt/unittests/BitmaskEnumTest.cpp
similarity index 95%
rename from orc-rt/unittests/bitmask-enum-test.cpp
rename to orc-rt/unittests/BitmaskEnumTest.cpp
index 3367a8d4b040e..f3e791de06c2d 100644
--- a/orc-rt/unittests/bitmask-enum-test.cpp
+++ b/orc-rt/unittests/BitmaskEnumTest.cpp
@@ -1,4 +1,4 @@
-//===-- bitmask-enum-test.cpp ---------------------------------------------===//
+//===- BitmaskEnumTest.cpp ------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
@@ -6,11 +6,11 @@
//
//===----------------------------------------------------------------------===//
//
-// This file is a part of the ORC runtime.
+// Test bitmask-enum support APIs.
//
//===----------------------------------------------------------------------===//
-#include "orc-rt/bitmask-enum.h"
+#include "orc-rt/BitmaskEnum.h"
#include "gtest/gtest.h"
#include <sstream>
diff --git a/orc-rt/unittests/CMakeLists.txt b/orc-rt/unittests/CMakeLists.txt
index 3f33cb1952329..09696da982ed2 100644
--- a/orc-rt/unittests/CMakeLists.txt
+++ b/orc-rt/unittests/CMakeLists.txt
@@ -12,10 +12,10 @@ function(add_orc_rt_unittest test_dirname)
endfunction()
add_orc_rt_unittest(CoreTests
- bitmask-enum-test.cpp
- error-test.cpp
- math-test.cpp
- rtti-test.cpp
+ BitmaskEnumTest.cpp
+ ErrorTest.cpp
+ MathTest.cpp
+ RTTITest.cpp
span-test.cpp
unique-function-test.cpp
DISABLE_LLVM_LINK_LLVM_DYLIB
diff --git a/orc-rt/unittests/error-test.cpp b/orc-rt/unittests/ErrorTest.cpp
similarity index 99%
rename from orc-rt/unittests/error-test.cpp
rename to orc-rt/unittests/ErrorTest.cpp
index 32651c1431ea0..47c67b8a1d551 100644
--- a/orc-rt/unittests/error-test.cpp
+++ b/orc-rt/unittests/ErrorTest.cpp
@@ -1,4 +1,4 @@
-//===-- error_test.cpp ----------------------------------------------------===//
+//===- ErrorTest.cpp ------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
@@ -14,7 +14,7 @@
//
//===----------------------------------------------------------------------===//
-#include "orc-rt/error.h"
+#include "orc-rt/Error.h"
#include "gtest/gtest.h"
using namespace orc_rt;
diff --git a/orc-rt/unittests/math-test.cpp b/orc-rt/unittests/MathTest.cpp
similarity index 95%
rename from orc-rt/unittests/math-test.cpp
rename to orc-rt/unittests/MathTest.cpp
index 491bbd8baa6ee..c55e4f5edf805 100644
--- a/orc-rt/unittests/math-test.cpp
+++ b/orc-rt/unittests/MathTest.cpp
@@ -1,4 +1,4 @@
-//===- math-test.cpp ------------------------------------------------------===//
+//===- MathTest.cpp -------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
@@ -6,11 +6,11 @@
//
//===----------------------------------------------------------------------===//
//
-// Tests for orc-rt's math.h APIs.
+// Tests for orc-rt's Math.h APIs.
//
//===----------------------------------------------------------------------===//
-#include "orc-rt/math.h"
+#include "orc-rt/Math.h"
#include "gtest/gtest.h"
using namespace orc_rt;
diff --git a/orc-rt/unittests/rtti-test.cpp b/orc-rt/unittests/RTTITest.cpp
similarity index 98%
rename from orc-rt/unittests/rtti-test.cpp
rename to orc-rt/unittests/RTTITest.cpp
index bb9fac6447010..445efee887268 100644
--- a/orc-rt/unittests/rtti-test.cpp
+++ b/orc-rt/unittests/RTTITest.cpp
@@ -12,7 +12,7 @@
//
//===----------------------------------------------------------------------===//
-#include "orc-rt/rtti.h"
+#include "orc-rt/RTTI.h"
#include "gtest/gtest.h"
using namespace orc_rt;
More information about the llvm-commits
mailing list