diff --git a/llvm/examples/Kaleidoscope/BuildingAJIT/Chapter5/RemoteJITUtils.h b/llvm/examples/Kaleidoscope/BuildingAJIT/Chapter5/RemoteJITUtils.h --- a/llvm/examples/Kaleidoscope/BuildingAJIT/Chapter5/RemoteJITUtils.h +++ b/llvm/examples/Kaleidoscope/BuildingAJIT/Chapter5/RemoteJITUtils.h @@ -13,7 +13,7 @@ #ifndef LLVM_TOOLS_LLI_REMOTEJITUTILS_H #define LLVM_TOOLS_LLI_REMOTEJITUTILS_H -#include "llvm/ExecutionEngine/Orc/RawByteChannel.h" +#include "llvm/ExecutionEngine/Orc/RPC/RawByteChannel.h" #include "llvm/Support/Error.h" #include #include diff --git a/llvm/include/llvm/ExecutionEngine/Orc/OrcRemoteTargetRPCAPI.h b/llvm/include/llvm/ExecutionEngine/Orc/OrcRemoteTargetRPCAPI.h --- a/llvm/include/llvm/ExecutionEngine/Orc/OrcRemoteTargetRPCAPI.h +++ b/llvm/include/llvm/ExecutionEngine/Orc/OrcRemoteTargetRPCAPI.h @@ -16,8 +16,8 @@ #define LLVM_EXECUTIONENGINE_ORC_ORCREMOTETARGETRPCAPI_H #include "llvm/ExecutionEngine/JITSymbol.h" -#include "llvm/ExecutionEngine/Orc/RPCUtils.h" -#include "llvm/ExecutionEngine/Orc/RawByteChannel.h" +#include "llvm/ExecutionEngine/Orc/RPC/RPCUtils.h" +#include "llvm/ExecutionEngine/Orc/RPC/RawByteChannel.h" namespace llvm { namespace orc { diff --git a/llvm/include/llvm/ExecutionEngine/Orc/RPCSerialization.h b/llvm/include/llvm/ExecutionEngine/Orc/RPC/RPCSerialization.h rename from llvm/include/llvm/ExecutionEngine/Orc/RPCSerialization.h rename to llvm/include/llvm/ExecutionEngine/Orc/RPC/RPCSerialization.h --- a/llvm/include/llvm/ExecutionEngine/Orc/RPCSerialization.h +++ b/llvm/include/llvm/ExecutionEngine/Orc/RPC/RPCSerialization.h @@ -1,4 +1,4 @@ -//===- llvm/ExecutionEngine/Orc/RPCSerialization.h --------------*- C++ -*-===// +//===- llvm/ExecutionEngine/Orc/RPC/RPCSerialization.h --------------*- 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,7 +9,7 @@ #ifndef LLVM_EXECUTIONENGINE_ORC_RPCSERIALIZATION_H #define LLVM_EXECUTIONENGINE_ORC_RPCSERIALIZATION_H -#include "OrcError.h" +#include "llvm/ExecutionEngine/Orc/OrcError.h" #include "llvm/Support/thread.h" #include #include diff --git a/llvm/include/llvm/ExecutionEngine/Orc/RPCUtils.h b/llvm/include/llvm/ExecutionEngine/Orc/RPC/RPCUtils.h rename from llvm/include/llvm/ExecutionEngine/Orc/RPCUtils.h rename to llvm/include/llvm/ExecutionEngine/Orc/RPC/RPCUtils.h --- a/llvm/include/llvm/ExecutionEngine/Orc/RPCUtils.h +++ b/llvm/include/llvm/ExecutionEngine/Orc/RPC/RPCUtils.h @@ -23,7 +23,7 @@ #include "llvm/ADT/STLExtras.h" #include "llvm/ExecutionEngine/Orc/OrcError.h" -#include "llvm/ExecutionEngine/Orc/RPCSerialization.h" +#include "llvm/ExecutionEngine/Orc/RPC/RPCSerialization.h" #include "llvm/Support/MSVCErrorWorkarounds.h" #include diff --git a/llvm/include/llvm/ExecutionEngine/Orc/RawByteChannel.h b/llvm/include/llvm/ExecutionEngine/Orc/RPC/RawByteChannel.h rename from llvm/include/llvm/ExecutionEngine/Orc/RawByteChannel.h rename to llvm/include/llvm/ExecutionEngine/Orc/RPC/RawByteChannel.h --- a/llvm/include/llvm/ExecutionEngine/Orc/RawByteChannel.h +++ b/llvm/include/llvm/ExecutionEngine/Orc/RPC/RawByteChannel.h @@ -1,4 +1,4 @@ -//===- llvm/ExecutionEngine/Orc/RawByteChannel.h ----------------*- C++ -*-===// +//===- llvm/ExecutionEngine/Orc/RPC/RawByteChannel.h ----------------*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. @@ -10,7 +10,7 @@ #define LLVM_EXECUTIONENGINE_ORC_RAWBYTECHANNEL_H #include "llvm/ADT/StringRef.h" -#include "llvm/ExecutionEngine/Orc/RPCSerialization.h" +#include "llvm/ExecutionEngine/Orc/RPC/RPCSerialization.h" #include "llvm/Support/Endian.h" #include "llvm/Support/Error.h" #include diff --git a/llvm/lib/ExecutionEngine/CMakeLists.txt b/llvm/lib/ExecutionEngine/CMakeLists.txt --- a/llvm/lib/ExecutionEngine/CMakeLists.txt +++ b/llvm/lib/ExecutionEngine/CMakeLists.txt @@ -21,6 +21,7 @@ add_subdirectory(Interpreter) add_subdirectory(JITLink) add_subdirectory(MCJIT) +add_subdirectory(OrcError) add_subdirectory(Orc) add_subdirectory(RuntimeDyld) diff --git a/llvm/lib/ExecutionEngine/LLVMBuild.txt b/llvm/lib/ExecutionEngine/LLVMBuild.txt --- a/llvm/lib/ExecutionEngine/LLVMBuild.txt +++ b/llvm/lib/ExecutionEngine/LLVMBuild.txt @@ -16,7 +16,7 @@ [common] subdirectories = Interpreter MCJIT JITLink RuntimeDyld IntelJITEvents - OProfileJIT Orc PerfJITEvents + OProfileJIT Orc OrcError PerfJITEvents [component_0] type = Library diff --git a/llvm/lib/ExecutionEngine/Orc/CMakeLists.txt b/llvm/lib/ExecutionEngine/Orc/CMakeLists.txt --- a/llvm/lib/ExecutionEngine/Orc/CMakeLists.txt +++ b/llvm/lib/ExecutionEngine/Orc/CMakeLists.txt @@ -16,9 +16,7 @@ ObjectTransformLayer.cpp OrcABISupport.cpp OrcCBindings.cpp - OrcError.cpp OrcMCJITReplacement.cpp - RPCUtils.cpp RTDyldObjectLinkingLayer.cpp ThreadSafeModule.cpp Speculation.cpp diff --git a/llvm/lib/ExecutionEngine/Orc/LLVMBuild.txt b/llvm/lib/ExecutionEngine/Orc/LLVMBuild.txt --- a/llvm/lib/ExecutionEngine/Orc/LLVMBuild.txt +++ b/llvm/lib/ExecutionEngine/Orc/LLVMBuild.txt @@ -18,5 +18,5 @@ type = Library name = OrcJIT parent = ExecutionEngine -required_libraries = Core ExecutionEngine JITLink Object MC Passes RuntimeDyld - Support Target TransformUtils +required_libraries = Core ExecutionEngine JITLink Object OrcError MC Passes + RuntimeDyld Support Target TransformUtils diff --git a/llvm/lib/ExecutionEngine/OrcError/CMakeLists.txt b/llvm/lib/ExecutionEngine/OrcError/CMakeLists.txt new file mode 100644 --- /dev/null +++ b/llvm/lib/ExecutionEngine/OrcError/CMakeLists.txt @@ -0,0 +1,6 @@ +add_llvm_library(LLVMOrcError + OrcError.cpp + RPCError.cpp + ADDITIONAL_HEADER_DIRS + ${LLVM_MAIN_INCLUDE_DIR}/llvm/ExecutionEngine/Orc + ) diff --git a/llvm/lib/ExecutionEngine/Orc/LLVMBuild.txt b/llvm/lib/ExecutionEngine/OrcError/LLVMBuild.txt copy from llvm/lib/ExecutionEngine/Orc/LLVMBuild.txt copy to llvm/lib/ExecutionEngine/OrcError/LLVMBuild.txt --- a/llvm/lib/ExecutionEngine/Orc/LLVMBuild.txt +++ b/llvm/lib/ExecutionEngine/OrcError/LLVMBuild.txt @@ -1,4 +1,4 @@ -;===- ./lib/ExecutionEngine/Orc/LLVMBuild.txt ----------------*- Conf -*--===; +;===- ./lib/ExecutionEngine/OrcError/LLVMBuild.txt -------------*- Conf -*--===; ; ; Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. ; See https://llvm.org/LICENSE.txt for license information. @@ -16,7 +16,6 @@ [component_0] type = Library -name = OrcJIT +name = OrcError parent = ExecutionEngine -required_libraries = Core ExecutionEngine JITLink Object MC Passes RuntimeDyld - Support Target TransformUtils +required_libraries = Support diff --git a/llvm/lib/ExecutionEngine/Orc/OrcError.cpp b/llvm/lib/ExecutionEngine/OrcError/OrcError.cpp rename from llvm/lib/ExecutionEngine/Orc/OrcError.cpp rename to llvm/lib/ExecutionEngine/OrcError/OrcError.cpp diff --git a/llvm/lib/ExecutionEngine/Orc/RPCUtils.cpp b/llvm/lib/ExecutionEngine/OrcError/RPCError.cpp rename from llvm/lib/ExecutionEngine/Orc/RPCUtils.cpp rename to llvm/lib/ExecutionEngine/OrcError/RPCError.cpp --- a/llvm/lib/ExecutionEngine/Orc/RPCUtils.cpp +++ b/llvm/lib/ExecutionEngine/OrcError/RPCError.cpp @@ -1,4 +1,4 @@ -//===--------------- RPCUtils.cpp - RPCUtils implementation ---------------===// +//===--------------- RPCError.cpp - RPCERror implementation ---------------===// // // 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 @@ // //===----------------------------------------------------------------------===// // -// RPCUtils implementation. +// RPC Error type implmentations. // //===----------------------------------------------------------------------===// -#include "llvm/ExecutionEngine/Orc/RPCUtils.h" +#include "llvm/ExecutionEngine/Orc/RPC/RPCUtils.h" char llvm::orc::rpc::RPCFatalError::ID = 0; char llvm::orc::rpc::ConnectionClosed::ID = 0; diff --git a/llvm/tools/lli/RemoteJITUtils.h b/llvm/tools/lli/RemoteJITUtils.h --- a/llvm/tools/lli/RemoteJITUtils.h +++ b/llvm/tools/lli/RemoteJITUtils.h @@ -13,7 +13,7 @@ #ifndef LLVM_TOOLS_LLI_REMOTEJITUTILS_H #define LLVM_TOOLS_LLI_REMOTEJITUTILS_H -#include "llvm/ExecutionEngine/Orc/RawByteChannel.h" +#include "llvm/ExecutionEngine/Orc/RPC/RawByteChannel.h" #include "llvm/ExecutionEngine/RTDyldMemoryManager.h" #include diff --git a/llvm/unittests/ExecutionEngine/Orc/QueueChannel.h b/llvm/unittests/ExecutionEngine/Orc/QueueChannel.h --- a/llvm/unittests/ExecutionEngine/Orc/QueueChannel.h +++ b/llvm/unittests/ExecutionEngine/Orc/QueueChannel.h @@ -9,7 +9,7 @@ #ifndef LLVM_UNITTESTS_EXECUTIONENGINE_ORC_QUEUECHANNEL_H #define LLVM_UNITTESTS_EXECUTIONENGINE_ORC_QUEUECHANNEL_H -#include "llvm/ExecutionEngine/Orc/RawByteChannel.h" +#include "llvm/ExecutionEngine/Orc/RPC/RawByteChannel.h" #include "llvm/Support/Error.h" #include diff --git a/llvm/unittests/ExecutionEngine/Orc/RPCUtilsTest.cpp b/llvm/unittests/ExecutionEngine/Orc/RPCUtilsTest.cpp --- a/llvm/unittests/ExecutionEngine/Orc/RPCUtilsTest.cpp +++ b/llvm/unittests/ExecutionEngine/Orc/RPCUtilsTest.cpp @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -#include "llvm/ExecutionEngine/Orc/RPCUtils.h" +#include "llvm/ExecutionEngine/Orc/RPC/RPCUtils.h" #include "QueueChannel.h" #include "gtest/gtest.h"