diff --git a/CMakeLists.txt b/CMakeLists.txt index e73b5a5..af3716f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -212,8 +212,6 @@ set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE) include_directories(SYSTEM "${DRGN_PATH}") - - if (STATIC_LINK) # glog links against the `gflags` target, which is an alias for `gflags_shared` # For static builds, we force it to link against `gflags_static` instead @@ -223,15 +221,15 @@ endif() # FIXME: LLVM 12's source code is not compatible with C++20. # We should check with the compiler team if we could apply a fix to our LLVM. # In the meantime, we can compile OICompiler with C++17. -set_source_files_properties(src/OICompiler.cpp PROPERTIES COMPILE_FLAGS -std=c++17 SKIP_PRECOMPILE_HEADERS ON) +set_source_files_properties(oi/OICompiler.cpp PROPERTIES COMPILE_FLAGS -std=c++17 SKIP_PRECOMPILE_HEADERS ON) ## OI Dependencies (linked to by output libraries and executables) ### OI Language Parser -BISON_TARGET(Parser src/OIParser.yy ${CMAKE_CURRENT_BINARY_DIR}/OIParser.tab.cpp +BISON_TARGET(Parser oi/OIParser.yy ${CMAKE_CURRENT_BINARY_DIR}/OIParser.tab.cpp DEFINES_FILE ${CMAKE_CURRENT_BINARY_DIR}/OIParser.tab.hh) -FLEX_TARGET(Lexer src/OILexer.l ${CMAKE_CURRENT_BINARY_DIR}/OILexer.cpp) +FLEX_TARGET(Lexer oi/OILexer.l ${CMAKE_CURRENT_BINARY_DIR}/OILexer.cpp) ADD_FLEX_BISON_DEPENDENCY(Lexer Parser) @@ -239,17 +237,17 @@ add_library(oid_parser STATIC ${BISON_Parser_OUTPUTS} ${FLEX_Lexer_OUTPUTS}) target_link_libraries(oid_parser glog::glog) ### Core OI -add_subdirectory(src) -include_directories(${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/src) +include_directories(${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}) +add_subdirectory(oi) add_library(oicore - src/Descs.cpp - src/Metrics.cpp - src/OICache.cpp - src/OICompiler.cpp - src/OIUtils.cpp - src/PaddingHunter.cpp - src/Serialize.cpp + oi/Descs.cpp + oi/Metrics.cpp + oi/OICache.cpp + oi/OICompiler.cpp + oi/OIUtils.cpp + oi/PaddingHunter.cpp + oi/Serialize.cpp ) add_dependencies(oicore libdrgn) set_project_warnings(oicore) @@ -290,7 +288,7 @@ target_link_libraries(oicore ) ### TreeBuilder -add_library(treebuilder src/TreeBuilder.cpp) +add_library(treebuilder oi/TreeBuilder.cpp) add_dependencies(treebuilder librocksdb) target_link_libraries(treebuilder ${rocksdb_BINARY_DIR}/librocksdb.a @@ -302,15 +300,16 @@ target_link_libraries(treebuilder ## OI Outputs ### Object Introspection as a Library (OIL) -add_library(oil src/OILibrary.cpp src/OILibraryImpl.cpp) +add_library(oil oi/OILibrary.cpp oi/OILibraryImpl.cpp) target_include_directories(oil PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/include) target_link_libraries(oil oicore) ### Object Introspection as a Library Generator (OILGen) add_executable(oilgen tools/OILGen.cpp - src/OIGenerator.cpp + oi/OIGenerator.cpp ) + target_link_libraries(oilgen drgn_utils oicore @@ -327,7 +326,7 @@ set_project_warnings(oitb) target_link_libraries(oitb oicore treebuilder) ### Object Introspection Debugger (OID) -add_executable(oid src/OID.cpp src/OIDebugger.cpp) +add_executable(oid oi/OID.cpp oi/OIDebugger.cpp) set_project_warnings(oid) target_link_libraries(oid oicore oid_parser treebuilder) diff --git a/src/CMakeLists.txt b/oi/CMakeLists.txt similarity index 100% rename from src/CMakeLists.txt rename to oi/CMakeLists.txt diff --git a/src/Common.h b/oi/Common.h similarity index 100% rename from src/Common.h rename to oi/Common.h diff --git a/src/ContainerInfo.cpp b/oi/ContainerInfo.cpp similarity index 99% rename from src/ContainerInfo.cpp rename to oi/ContainerInfo.cpp index 673e14e..9ff2468 100644 --- a/src/ContainerInfo.cpp +++ b/oi/ContainerInfo.cpp @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -#include "ContainerInfo.h" +#include "oi/ContainerInfo.h" #include #include diff --git a/src/ContainerInfo.h b/oi/ContainerInfo.h similarity index 99% rename from src/ContainerInfo.h rename to oi/ContainerInfo.h index 33c508a..c2ed7f4 100644 --- a/src/ContainerInfo.h +++ b/oi/ContainerInfo.h @@ -21,7 +21,7 @@ #include #include -#include "Common.h" +#include "oi/Common.h" ContainerTypeEnum containerTypeEnumFromStr(std::string& str); const char* containerTypeEnumToStr(ContainerTypeEnum ty); diff --git a/src/Descs.cpp b/oi/Descs.cpp similarity index 99% rename from src/Descs.cpp rename to oi/Descs.cpp index 661991e..c750eae 100644 --- a/src/Descs.cpp +++ b/oi/Descs.cpp @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -#include "Descs.h" +#include "oi/Descs.h" #include diff --git a/src/Descs.h b/oi/Descs.h similarity index 100% rename from src/Descs.h rename to oi/Descs.h diff --git a/src/DrgnUtils.cpp b/oi/DrgnUtils.cpp similarity index 99% rename from src/DrgnUtils.cpp rename to oi/DrgnUtils.cpp index e22e30b..4d3fb53 100644 --- a/src/DrgnUtils.cpp +++ b/oi/DrgnUtils.cpp @@ -14,7 +14,7 @@ * limitations under the License. */ -#include "DrgnUtils.h" +#include "oi/DrgnUtils.h" #include diff --git a/src/DrgnUtils.h b/oi/DrgnUtils.h similarity index 100% rename from src/DrgnUtils.h rename to oi/DrgnUtils.h diff --git a/src/Features.cpp b/oi/Features.cpp similarity index 100% rename from src/Features.cpp rename to oi/Features.cpp diff --git a/src/Features.h b/oi/Features.h similarity index 100% rename from src/Features.h rename to oi/Features.h diff --git a/src/FuncGen.cpp b/oi/FuncGen.cpp similarity index 99% rename from src/FuncGen.cpp rename to oi/FuncGen.cpp index 3c0cbf4..41fcc88 100644 --- a/src/FuncGen.cpp +++ b/oi/FuncGen.cpp @@ -13,14 +13,14 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -#include "FuncGen.h" +#include "oi/FuncGen.h" #include #include #include -#include "ContainerInfo.h" +#include "oi/ContainerInfo.h" namespace { diff --git a/src/FuncGen.h b/oi/FuncGen.h similarity index 98% rename from src/FuncGen.h rename to oi/FuncGen.h index de77d46..48f0095 100644 --- a/src/FuncGen.h +++ b/oi/FuncGen.h @@ -19,7 +19,7 @@ #include #include -#include "ContainerInfo.h" +#include "oi/ContainerInfo.h" namespace fs = std::filesystem; diff --git a/src/Metrics.cpp b/oi/Metrics.cpp similarity index 99% rename from src/Metrics.cpp rename to oi/Metrics.cpp index 900d3da..358a1e3 100644 --- a/src/Metrics.cpp +++ b/oi/Metrics.cpp @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -#include "Metrics.h" +#include "oi/Metrics.h" #include diff --git a/src/Metrics.h b/oi/Metrics.h similarity index 100% rename from src/Metrics.h rename to oi/Metrics.h diff --git a/src/OICache.cpp b/oi/OICache.cpp similarity index 98% rename from src/OICache.cpp rename to oi/OICache.cpp index 6d3434a..befde8f 100644 --- a/src/OICache.cpp +++ b/oi/OICache.cpp @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -#include "OICache.h" +#include "oi/OICache.h" #include @@ -21,9 +21,9 @@ #include #include -#include "Descs.h" -#include "OICodeGen.h" -#include "Serialize.h" +#include "oi/Descs.h" +#include "oi/OICodeGen.h" +#include "oi/Serialize.h" #ifndef OSS_ENABLE #include "cea/object-introspection/internal/GobsService.h" diff --git a/src/OICache.h b/oi/OICache.h similarity index 95% rename from src/OICache.h rename to oi/OICache.h index deacce4..a41abdc 100644 --- a/src/OICache.h +++ b/oi/OICache.h @@ -20,9 +20,9 @@ #include #include -#include "OICodeGen.h" -#include "OIParser.h" -#include "SymbolService.h" +#include "oi/OICodeGen.h" +#include "oi/OIParser.h" +#include "oi/SymbolService.h" namespace fs = std::filesystem; diff --git a/src/OICodeGen.cpp b/oi/OICodeGen.cpp similarity index 99% rename from src/OICodeGen.cpp rename to oi/OICodeGen.cpp index a410365..9aa5e16 100644 --- a/src/OICodeGen.cpp +++ b/oi/OICodeGen.cpp @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -#include "OICodeGen.h" +#include "oi/OICodeGen.h" #include #include @@ -32,11 +32,11 @@ #include #include -#include "DrgnUtils.h" -#include "FuncGen.h" -#include "OIParser.h" -#include "PaddingHunter.h" -#include "SymbolService.h" +#include "oi/DrgnUtils.h" +#include "oi/FuncGen.h" +#include "oi/OIParser.h" +#include "oi/PaddingHunter.h" +#include "oi/SymbolService.h" namespace fs = std::filesystem; diff --git a/src/OICodeGen.h b/oi/OICodeGen.h similarity index 98% rename from src/OICodeGen.h rename to oi/OICodeGen.h index ae11df1..0e3a9bf 100644 --- a/src/OICodeGen.h +++ b/oi/OICodeGen.h @@ -26,11 +26,11 @@ class SymbolService; struct irequest; -#include "Common.h" -#include "ContainerInfo.h" -#include "Features.h" -#include "FuncGen.h" -#include "PaddingHunter.h" +#include "oi/Common.h" +#include "oi/ContainerInfo.h" +#include "oi/Features.h" +#include "oi/FuncGen.h" +#include "oi/PaddingHunter.h" extern "C" { #include diff --git a/src/OICompiler.cpp b/oi/OICompiler.cpp similarity index 99% rename from src/OICompiler.cpp rename to oi/OICompiler.cpp index 59b357d..6955ad1 100644 --- a/src/OICompiler.cpp +++ b/oi/OICompiler.cpp @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -#include "OICompiler.h" +#include "oi/OICompiler.h" #include #include @@ -40,7 +40,7 @@ #include #include -#include "Metrics.h" +#include "oi/Metrics.h" extern "C" { #include diff --git a/src/OICompiler.h b/oi/OICompiler.h similarity index 99% rename from src/OICompiler.h rename to oi/OICompiler.h index 9883ea0..c0b51e3 100644 --- a/src/OICompiler.h +++ b/oi/OICompiler.h @@ -25,8 +25,8 @@ #include #include -#include "SymbolService.h" -#include "X86InstDefs.h" +#include "oi/SymbolService.h" +#include "oi/X86InstDefs.h" namespace fs = std::filesystem; diff --git a/src/OID.cpp b/oi/OID.cpp similarity index 99% rename from src/OID.cpp rename to oi/OID.cpp index b10121c..bf9459f 100644 --- a/src/OID.cpp +++ b/oi/OID.cpp @@ -29,14 +29,14 @@ extern "C" { #include } -#include "Features.h" -#include "Metrics.h" -#include "OIDebugger.h" -#include "OIOpts.h" -#include "OIUtils.h" -#include "PaddingHunter.h" -#include "TimeUtils.h" -#include "TreeBuilder.h" +#include "oi/Features.h" +#include "oi/Metrics.h" +#include "oi/OIDebugger.h" +#include "oi/OIOpts.h" +#include "oi/OIUtils.h" +#include "oi/PaddingHunter.h" +#include "oi/TimeUtils.h" +#include "oi/TreeBuilder.h" /* Global for signal handling */ std::weak_ptr weak_oid; diff --git a/src/OIDebugger.cpp b/oi/OIDebugger.cpp similarity index 99% rename from src/OIDebugger.cpp rename to oi/OIDebugger.cpp index ab0448c..69497c0 100644 --- a/src/OIDebugger.cpp +++ b/oi/OIDebugger.cpp @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -#include "OIDebugger.h" +#include "oi/OIDebugger.h" #include @@ -44,12 +44,12 @@ extern "C" { #include -#include "ContainerInfo.h" -#include "Metrics.h" -#include "OILexer.h" -#include "OIUtils.h" -#include "PaddingHunter.h" -#include "Syscall.h" +#include "oi/ContainerInfo.h" +#include "oi/Metrics.h" +#include "oi/OILexer.h" +#include "oi/OIUtils.h" +#include "oi/PaddingHunter.h" +#include "oi/Syscall.h" #ifndef OSS_ENABLE #include "cea/object-introspection/internal/GobsService.h" diff --git a/src/OIDebugger.h b/oi/OIDebugger.h similarity index 97% rename from src/OIDebugger.h rename to oi/OIDebugger.h index f6a750c..d36b9ff 100644 --- a/src/OIDebugger.h +++ b/oi/OIDebugger.h @@ -20,14 +20,14 @@ #include #include -#include "OICache.h" -#include "OICodeGen.h" -#include "OICompiler.h" -#include "OIParser.h" -#include "SymbolService.h" -#include "TrapInfo.h" -#include "TreeBuilder.h" -#include "X86InstDefs.h" +#include "oi/OICache.h" +#include "oi/OICodeGen.h" +#include "oi/OICompiler.h" +#include "oi/OIParser.h" +#include "oi/SymbolService.h" +#include "oi/TrapInfo.h" +#include "oi/TreeBuilder.h" +#include "oi/X86InstDefs.h" namespace fs = std::filesystem; diff --git a/src/OIGenerator.cpp b/oi/OIGenerator.cpp similarity index 98% rename from src/OIGenerator.cpp rename to oi/OIGenerator.cpp index 7df659a..80dcade 100644 --- a/src/OIGenerator.cpp +++ b/oi/OIGenerator.cpp @@ -14,7 +14,7 @@ * limitations under the License. */ -#include "OIGenerator.h" +#include "oi/OIGenerator.h" #include @@ -24,8 +24,8 @@ #include #include -#include "DrgnUtils.h" -#include "OIUtils.h" +#include "oi/DrgnUtils.h" +#include "oi/OIUtils.h" namespace ObjectIntrospection { diff --git a/src/OIGenerator.h b/oi/OIGenerator.h similarity index 95% rename from src/OIGenerator.h rename to oi/OIGenerator.h index edb6286..5d29e95 100644 --- a/src/OIGenerator.h +++ b/oi/OIGenerator.h @@ -18,9 +18,9 @@ #include -#include "DrgnUtils.h" -#include "OICodeGen.h" -#include "OICompiler.h" +#include "oi/DrgnUtils.h" +#include "oi/OICodeGen.h" +#include "oi/OICompiler.h" namespace ObjectIntrospection { diff --git a/src/OILexer.h b/oi/OILexer.h similarity index 100% rename from src/OILexer.h rename to oi/OILexer.h diff --git a/src/OILexer.l b/oi/OILexer.l similarity index 99% rename from src/OILexer.l rename to oi/OILexer.l index 47ba72f..cbdd421 100644 --- a/src/OILexer.l +++ b/oi/OILexer.l @@ -18,7 +18,7 @@ /* C++ string header, for string ops below */ #include /* Implementation of yyFlexScanner */ -#include "OILexer.h" +#include "oi/OILexer.h" #undef YY_DECL #define YY_DECL \ int ObjectIntrospection::OIScanner::yylex(ObjectIntrospection::OIParser::semantic_type * const lval, \ diff --git a/src/OILibrary.cpp b/oi/OILibrary.cpp similarity index 98% rename from src/OILibrary.cpp rename to oi/OILibrary.cpp index 863abff..9b0f4c1 100644 --- a/src/OILibrary.cpp +++ b/oi/OILibrary.cpp @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -#include "OILibraryImpl.h" +#include "oi/OILibraryImpl.h" bool debug = false; diff --git a/src/OILibraryImpl.cpp b/oi/OILibraryImpl.cpp similarity index 98% rename from src/OILibraryImpl.cpp rename to oi/OILibraryImpl.cpp index 60bb98b..93effc5 100644 --- a/src/OILibraryImpl.cpp +++ b/oi/OILibraryImpl.cpp @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -#include "OILibraryImpl.h" +#include "oi/OILibraryImpl.h" #include #include @@ -25,8 +25,8 @@ #include #include -#include "OIParser.h" -#include "OIUtils.h" +#include "oi/OIParser.h" +#include "oi/OIUtils.h" extern "C" { #include diff --git a/src/OILibraryImpl.h b/oi/OILibraryImpl.h similarity index 93% rename from src/OILibraryImpl.h rename to oi/OILibraryImpl.h index 3e73dac..8e99340 100644 --- a/src/OILibraryImpl.h +++ b/oi/OILibraryImpl.h @@ -15,10 +15,10 @@ */ #pragma once -#include "OICodeGen.h" -#include "OICompiler.h" #include "ObjectIntrospection.h" -#include "SymbolService.h" +#include "oi/OICodeGen.h" +#include "oi/OICompiler.h" +#include "oi/SymbolService.h" namespace ObjectIntrospection { diff --git a/src/OIOpts.h b/oi/OIOpts.h similarity index 100% rename from src/OIOpts.h rename to oi/OIOpts.h diff --git a/src/OIParser.h b/oi/OIParser.h similarity index 100% rename from src/OIParser.h rename to oi/OIParser.h diff --git a/src/OIParser.yy b/oi/OIParser.yy similarity index 98% rename from src/OIParser.yy rename to oi/OIParser.yy index 4423200..259d8fb 100644 --- a/src/OIParser.yy +++ b/oi/OIParser.yy @@ -54,8 +54,8 @@ #include #include #include -#include "OIParser.h" -#include "OILexer.h" +#include "oi/OIParser.h" +#include "oi/OILexer.h" #undef yylex #define yylex scanner.yylex diff --git a/src/OITraceCode.cpp b/oi/OITraceCode.cpp similarity index 100% rename from src/OITraceCode.cpp rename to oi/OITraceCode.cpp diff --git a/src/OIUtils.cpp b/oi/OIUtils.cpp similarity index 99% rename from src/OIUtils.cpp rename to oi/OIUtils.cpp index 54fd545..0bbd395 100644 --- a/src/OIUtils.cpp +++ b/oi/OIUtils.cpp @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -#include "OIUtils.h" +#include "oi/OIUtils.h" #include #include diff --git a/src/OIUtils.h b/oi/OIUtils.h similarity index 92% rename from src/OIUtils.h rename to oi/OIUtils.h index e5f8f27..5d92fc6 100644 --- a/src/OIUtils.h +++ b/oi/OIUtils.h @@ -18,9 +18,9 @@ #include #include -#include "Features.h" -#include "OICodeGen.h" -#include "OICompiler.h" +#include "oi/Features.h" +#include "oi/OICodeGen.h" +#include "oi/OICompiler.h" namespace OIUtils { diff --git a/src/PaddingHunter.cpp b/oi/PaddingHunter.cpp similarity index 98% rename from src/PaddingHunter.cpp rename to oi/PaddingHunter.cpp index d5a9ecf..dfb63e2 100644 --- a/src/PaddingHunter.cpp +++ b/oi/PaddingHunter.cpp @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -#include "PaddingHunter.h" +#include "oi/PaddingHunter.h" #include #include diff --git a/src/PaddingHunter.h b/oi/PaddingHunter.h similarity index 100% rename from src/PaddingHunter.h rename to oi/PaddingHunter.h diff --git a/src/Serialize.cpp b/oi/Serialize.cpp similarity index 99% rename from src/Serialize.cpp rename to oi/Serialize.cpp index 5535070..ecfa0c8 100644 --- a/src/Serialize.cpp +++ b/oi/Serialize.cpp @@ -13,14 +13,14 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -#include "Serialize.h" +#include "oi/Serialize.h" #include #include #include #include -#include "DrgnUtils.h" +#include "oi/DrgnUtils.h" namespace boost::serialization { diff --git a/src/Serialize.h b/oi/Serialize.h similarity index 97% rename from src/Serialize.h rename to oi/Serialize.h index e2056e0..d1f3f0e 100644 --- a/src/Serialize.h +++ b/oi/Serialize.h @@ -24,9 +24,9 @@ #include #include -#include "Common.h" -#include "PaddingHunter.h" -#include "SymbolService.h" +#include "oi/Common.h" +#include "oi/PaddingHunter.h" +#include "oi/SymbolService.h" #define DEFINE_TYPE_VERSION(Type, size, version) \ static_assert( \ diff --git a/src/SymbolService.cpp b/oi/SymbolService.cpp similarity index 99% rename from src/SymbolService.cpp rename to oi/SymbolService.cpp index 6927220..a0c3ab7 100644 --- a/src/SymbolService.cpp +++ b/oi/SymbolService.cpp @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -#include "SymbolService.h" +#include "oi/SymbolService.h" #include @@ -23,8 +23,8 @@ #include #include -#include "DrgnUtils.h" -#include "OIParser.h" +#include "oi/DrgnUtils.h" +#include "oi/OIParser.h" extern "C" { #include diff --git a/src/SymbolService.h b/oi/SymbolService.h similarity index 97% rename from src/SymbolService.h rename to oi/SymbolService.h index 80f7afb..74a575d 100644 --- a/src/SymbolService.h +++ b/oi/SymbolService.h @@ -23,8 +23,8 @@ #include #include -#include "Common.h" -#include "Descs.h" +#include "oi/Common.h" +#include "oi/Descs.h" namespace fs = std::filesystem; diff --git a/src/Syscall.h b/oi/Syscall.h similarity index 100% rename from src/Syscall.h rename to oi/Syscall.h diff --git a/src/TimeUtils.h b/oi/TimeUtils.h similarity index 100% rename from src/TimeUtils.h rename to oi/TimeUtils.h diff --git a/src/TrapInfo.h b/oi/TrapInfo.h similarity index 98% rename from src/TrapInfo.h rename to oi/TrapInfo.h index ef3efba..85a3d47 100644 --- a/src/TrapInfo.h +++ b/oi/TrapInfo.h @@ -18,8 +18,8 @@ #include #include -#include "Metrics.h" -#include "OICompiler.h" +#include "oi/Metrics.h" +#include "oi/OICompiler.h" extern "C" { #include diff --git a/src/TreeBuilder.cpp b/oi/TreeBuilder.cpp similarity index 99% rename from src/TreeBuilder.cpp rename to oi/TreeBuilder.cpp index eabbb04..400e9f8 100644 --- a/src/TreeBuilder.cpp +++ b/oi/TreeBuilder.cpp @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -#include "TreeBuilder.h" +#include "oi/TreeBuilder.h" #include @@ -25,11 +25,11 @@ #include #include -#include "ContainerInfo.h" -#include "DrgnUtils.h" -#include "Metrics.h" -#include "OICodeGen.h" -#include "PaddingHunter.h" +#include "oi/ContainerInfo.h" +#include "oi/DrgnUtils.h" +#include "oi/Metrics.h" +#include "oi/OICodeGen.h" +#include "oi/PaddingHunter.h" #include "rocksdb/db.h" #include "rocksdb/options.h" #include "rocksdb/statistics.h" diff --git a/src/TreeBuilder.h b/oi/TreeBuilder.h similarity index 98% rename from src/TreeBuilder.h rename to oi/TreeBuilder.h index 1702ac6..28f0636 100644 --- a/src/TreeBuilder.h +++ b/oi/TreeBuilder.h @@ -23,8 +23,8 @@ #include #include -#include "Common.h" -#include "Features.h" +#include "oi/Common.h" +#include "oi/Features.h" // The rocksdb includes are extremely heavy and bloat compile times, // so we just forward-declare `DB` to avoid making other compile units diff --git a/src/X86InstDefs.h b/oi/X86InstDefs.h similarity index 100% rename from src/X86InstDefs.h rename to oi/X86InstDefs.h diff --git a/test/integration/runner_common.cpp b/test/integration/runner_common.cpp index 3f94aac..e5d16a7 100644 --- a/test/integration/runner_common.cpp +++ b/test/integration/runner_common.cpp @@ -14,7 +14,7 @@ #include #include -#include "OIOpts.h" +#include "oi/OIOpts.h" using namespace std::literals; diff --git a/test/test_compiler.cpp b/test/test_compiler.cpp index 5f942d5..06beaea 100644 --- a/test/test_compiler.cpp +++ b/test/test_compiler.cpp @@ -7,7 +7,7 @@ #include #include -#include "OICompiler.h" +#include "oi/OICompiler.h" namespace fs = std::filesystem; diff --git a/test/test_parser.cpp b/test/test_parser.cpp index 4a2e419..295f424 100644 --- a/test/test_parser.cpp +++ b/test/test_parser.cpp @@ -4,8 +4,8 @@ #include -#include "OILexer.h" -#include "OIParser.h" +#include "oi/OILexer.h" +#include "oi/OIParser.h" using ::testing::HasSubstr; diff --git a/tools/OILGen.cpp b/tools/OILGen.cpp index 61e1abc..2d4a90f 100644 --- a/tools/OILGen.cpp +++ b/tools/OILGen.cpp @@ -20,9 +20,9 @@ #include #include -#include "OICodeGen.h" -#include "OIGenerator.h" -#include "OIOpts.h" +#include "oi/OICodeGen.h" +#include "oi/OIGenerator.h" +#include "oi/OIOpts.h" namespace fs = std::filesystem; using namespace ObjectIntrospection; diff --git a/tools/OIP.cpp b/tools/OIP.cpp index f34f0dd..b038642 100644 --- a/tools/OIP.cpp +++ b/tools/OIP.cpp @@ -19,9 +19,9 @@ #include #include -#include "OICompiler.h" -#include "PaddingHunter.h" -#include "Serialize.h" +#include "oi/OICompiler.h" +#include "oi/PaddingHunter.h" +#include "oi/Serialize.h" namespace fs = std::filesystem; diff --git a/tools/OITB.cpp b/tools/OITB.cpp index b66432c..d71216c 100644 --- a/tools/OITB.cpp +++ b/tools/OITB.cpp @@ -21,12 +21,12 @@ #include #include -#include "Common.h" -#include "OIOpts.h" -#include "PaddingHunter.h" -#include "Serialize.h" -#include "TreeBuilder.h" #include "glog/vlog_is_on.h" +#include "oi/Common.h" +#include "oi/OIOpts.h" +#include "oi/PaddingHunter.h" +#include "oi/Serialize.h" +#include "oi/TreeBuilder.h" namespace fs = std::filesystem;