Skip to content

Commit

Permalink
Hide header files that are not part of the interface.
Browse files Browse the repository at this point in the history
Header files that are only used in the implementation files can become local
to the library. This would simplify the installation.
  • Loading branch information
vgvassilev committed Oct 30, 2023
1 parent 6069bb1 commit e8709ac
Show file tree
Hide file tree
Showing 9 changed files with 16 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ namespace compat {

// sizeof (m_Opts) + sizeof(m_LLVMContext)
const unsigned m_ExecutorOffset = 72;
int* IncrementalExecutor = ((int*)(&I)) + m_ExecutorOffset;
int* IncrementalExecutor = ((int*)(const_cast<cling::Interpreter*>(&I))) + m_ExecutorOffset;
int* IncrementalJit = *(int**)IncrementalExecutor + 0;
int* LLJIT = *(int**)IncrementalJit + 0;
return *(llvm::orc::LLJIT**)LLJIT;
Expand All @@ -71,7 +71,7 @@ namespace compat {

#include "clang/AST/Mangle.h"
#include "clang/Frontend/CompilerInstance.h"
#include "clang/Interpreter/DynamicLibraryManager.h"
#include "DynamicLibraryManager.h"
#include "clang/Interpreter/Interpreter.h"
#include "clang/Interpreter/Value.h"

Expand Down Expand Up @@ -230,7 +230,7 @@ createClangInterpreter(std::vector<const char*>& args) {

}

#include "clang/Interpreter/CppInterOpInterpreter.h"
#include "CppInterOpInterpreter.h"

namespace Cpp {
namespace Cpp_utils = Cpp::utils;
Expand Down
3 changes: 2 additions & 1 deletion lib/Interpreter/CppInterOp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@
// LICENSE.TXT for details.
//------------------------------------------------------------------------------

#include "clang/Interpreter/Compatibility.h"
#include "clang/Interpreter/CppInterOp.h"

#include "Compatibility.h"

#include "clang/AST/CXXInheritance.h"
#include "clang/AST/Decl.h"
#include "clang/AST/DeclCXX.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@
#ifndef CPPINTEROP_INTERPRETER_H
#define CPPINTEROP_INTERPRETER_H

#include "clang/Interpreter/Compatibility.h"
#include "clang/Interpreter/DynamicLibraryManager.h"
#include "Compatibility.h"
#include "DynamicLibraryManager.h"
#include "Paths.h"

#include "clang/Interpreter/Interpreter.h"
#include "clang/Interpreter/PartialTranslationUnit.h"
#include "clang/Interpreter/Paths.h"

#include "clang/AST/Decl.h"
#include "clang/AST/DeclarationName.h"
Expand Down
4 changes: 2 additions & 2 deletions lib/Interpreter/DynamicLibraryManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
// LICENSE.TXT for details.
//------------------------------------------------------------------------------

#include "clang/Interpreter/DynamicLibraryManager.h"
#include "clang/Interpreter/Paths.h"
#include "DynamicLibraryManager.h"
#include "Paths.h"

#include "llvm/ADT/StringSet.h"
#include "llvm/BinaryFormat/Magic.h"
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions lib/Interpreter/DynamicLibraryManagerSymbol.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
// LICENSE.TXT for details.
//------------------------------------------------------------------------------

#include "clang/Interpreter/DynamicLibraryManager.h"
#include "clang/Interpreter/Paths.h"
#include "DynamicLibraryManager.h"
#include "Paths.h"

#include "llvm/ADT/SmallSet.h"
#include "llvm/ADT/SmallString.h"
Expand Down
3 changes: 2 additions & 1 deletion lib/Interpreter/Paths.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@
// LICENSE.TXT for details.
//------------------------------------------------------------------------------

#include "Paths.h"

#include "clang/Basic/FileManager.h"
#include "clang/Interpreter/Paths.h"
#include "clang/Lex/HeaderSearchOptions.h"

#include "llvm/Support/Debug.h"
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion unittests/CppInterOp/Utils.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#ifndef CPPINTEROP_UNITTESTS_LIBCPPINTEROP_UTILS_H
#define CPPINTEROP_UNITTESTS_LIBCPPINTEROP_UTILS_H

#include "clang/Interpreter/Compatibility.h"
#include "../../../lib/Interpreter/Compatibility.h"

#include <memory>
#include <vector>
Expand Down

0 comments on commit e8709ac

Please sign in to comment.