#include <sstream>
#include <string>
#include <vector>
+
using namespace llvm;
+using namespace llvm::orc;
//===----------------------------------------------------------------------===//
// Lexer
#include <sstream>
#include <string>
#include <vector>
+
using namespace llvm;
+using namespace llvm::orc;
//===----------------------------------------------------------------------===//
// Lexer
#include <sstream>
#include <string>
#include <vector>
+
using namespace llvm;
+using namespace llvm::orc;
//===----------------------------------------------------------------------===//
// Lexer
#include <sstream>
#include <string>
#include <vector>
+
using namespace llvm;
+using namespace llvm::orc;
//===----------------------------------------------------------------------===//
// Lexer
class GlobalVariable;
class Module;
+namespace orc {
+
+/// @brief Functor type for describing how CloneSubModule should mutate a
+/// GlobalVariable.
typedef std::function<void(GlobalVariable &, const GlobalVariable &,
ValueToValueMapTy &)> HandleGlobalVariableFtor;
+/// @brief Functor type for describing how CloneSubModule should mutate a
+/// Function.
typedef std::function<void(Function &, const Function &, ValueToValueMapTy &)>
HandleFunctionFtor;
+/// @brief Copies the initializer from Orig to New.
+///
+/// Type is suitable for implicit conversion to a HandleGlobalVariableFtor.
void copyGVInitializer(GlobalVariable &New, const GlobalVariable &Orig,
ValueToValueMapTy &VMap);
+/// @brief Copies the body of Orig to New.
+///
+/// Type is suitable for implicit conversion to a HandleFunctionFtor.
void copyFunctionBody(Function &New, const Function &Orig,
ValueToValueMapTy &VMap);
+/// @brief Clone a subset of the module Src into Dst.
void CloneSubModule(Module &Dst, const Module &Src,
HandleGlobalVariableFtor HandleGlobalVariable,
HandleFunctionFtor HandleFunction, bool KeepInlineAsm);
-}
+
+} // End namespace orc.
+} // End namespace llvm.
#endif // LLVM_EXECUTIONENGINE_ORC_CLONESUBMODULE_H
#include <list>
namespace llvm {
+namespace orc {
/// @brief Compile-on-demand layer.
///
CompileCallbackMgrT CompileCallbackMgr;
ModuleSetInfoListT ModuleSetInfos;
};
-}
+
+} // End namespace orc.
+} // End namespace llvm.
#endif // LLVM_EXECUTIONENGINE_ORC_COMPILEONDEMANDLAYER_H
#include "llvm/Target/TargetMachine.h"
namespace llvm {
+namespace orc {
/// @brief Simple compile functor: Takes a single IR module and returns an
/// ObjectFile.
private:
TargetMachine &TM;
};
-}
+
+} // End namespace orc.
+} // End namespace llvm.
#endif // LLVM_EXECUTIONENGINE_ORC_COMPILEUTILS_H
#include <memory>
namespace llvm {
+namespace orc {
/// @brief Eager IR compiling layer.
///
CompileFtor Compile;
ObjectCache *ObjCache;
};
-}
+
+} // End namespace orc.
+} // End namespace llvm.
#endif // LLVM_EXECUTIONENGINE_ORC_IRCOMPILINGLAYER_H
#include <sstream>
namespace llvm {
+namespace orc {
/// @brief Base class for JITLayer independent aspects of
/// JITCompileCallbackManager.
FullyPartitionedModule fullyPartition(Module &M);
-}
+} // End namespace orc.
+} // End namespace llvm.
#endif // LLVM_EXECUTIONENGINE_ORC_INDIRECTIONUTILS_H
#include <functional>
namespace llvm {
+namespace orc {
/// @brief Represents an address in the target process's address space.
typedef uint64_t TargetAddress;
GetAddressFtor GetAddress;
};
-}
+} // End namespace orc.
+} // End namespace llvm.
#endif // LLVM_EXECUTIONENGINE_ORC_JITSYMBOL_H
#include <list>
namespace llvm {
+namespace orc {
/// @brief Lazy-emitting IR layer.
///
return llvm::make_unique<EmissionDeferredSetImpl<ModuleSetT>>(std::move(Ms),
std::move(MM));
}
-}
+
+} // End namespace orc.
+} // End namespace llvm.
#endif // LLVM_EXECUTIONENGINE_ORC_LAZYEMITTINGLAYER_H
#include <vector>
namespace llvm {
+namespace orc {
/// @brief Defines an adapter for RuntimeDyldMM that allows lookups for external
/// symbols to go via a functor, before falling back to the lookup logic
std::forward<ExternalLookupFtor>(ExternalLookup),
std::forward<DylibLookupFtor>(DylibLookup));
}
-}
+
+} // End namespace orc.
+} // End namespace llvm.
#endif // LLVM_EXECUTIONENGINE_ORC_LOOKASIDERTDYLDMM_H
#include <memory>
namespace llvm {
+namespace orc {
class ObjectLinkingLayerBase {
protected:
CreateRTDyldMMFtor CreateMemoryManager;
};
-} // end namespace llvm
+} // End namespace orc.
+} // End namespace llvm
#endif // LLVM_EXECUTIONENGINE_ORC_OBJECTLINKINGLAYER_H
#include "IndirectionUtils.h"
namespace llvm {
+namespace orc {
class OrcX86_64 {
public:
};
-}
+} // End namespace orc.
+} // End namespace llvm.
#endif // LLVM_EXECUTIONENGINE_ORC_ORCTARGETSUPPORT_H
#include "llvm/IR/Module.h"
#include "llvm/Transforms/Utils/Cloning.h"
-using namespace llvm;
+namespace llvm {
+namespace orc {
-void llvm::copyGVInitializer(GlobalVariable &New, const GlobalVariable &Orig,
+void copyGVInitializer(GlobalVariable &New, const GlobalVariable &Orig,
ValueToValueMapTy &VMap) {
if (Orig.hasInitializer())
New.setInitializer(MapValue(Orig.getInitializer(), VMap));
}
-void llvm::copyFunctionBody(Function &New, const Function &Orig,
+void copyFunctionBody(Function &New, const Function &Orig,
ValueToValueMapTy &VMap) {
if (!Orig.isDeclaration()) {
Function::arg_iterator DestI = New.arg_begin();
}
}
-void llvm::CloneSubModule(llvm::Module &Dst, const Module &Src,
- HandleGlobalVariableFtor HandleGlobalVariable,
- HandleFunctionFtor HandleFunction, bool CloneInlineAsm) {
+void CloneSubModule(llvm::Module &Dst, const Module &Src,
+ HandleGlobalVariableFtor HandleGlobalVariable,
+ HandleFunctionFtor HandleFunction, bool CloneInlineAsm) {
ValueToValueMapTy VMap;
}
}
+
+} // End namespace orc.
+} // End namespace llvm.
using namespace llvm;
namespace llvm {
+namespace orc {
GlobalVariable* createImplPointer(Function &F, const Twine &Name,
Constant *Initializer) {
return MP;
}
-}
+} // End namespace orc.
+} // End namespace llvm.
namespace {
static struct RegisterJIT {
- RegisterJIT() { llvm::OrcMCJITReplacement::Register(); }
+ RegisterJIT() { llvm::orc::OrcMCJITReplacement::Register(); }
} JITRegistrator;
}
extern "C" void LLVMLinkInOrcMCJITReplacement() {}
namespace llvm {
+namespace orc {
GenericValue
OrcMCJITReplacement::runFunction(Function *F,
llvm_unreachable("Full-featured argument passing not supported yet!");
}
-}
+
+} // End namespace orc.
+} // End namespace llvm.
#include "llvm/Object/Archive.h"
namespace llvm {
+namespace orc {
class OrcMCJITReplacement : public ExecutionEngine {
};
private:
+
static ExecutionEngine *
createOrcMCJITReplacement(std::string *ErrorMsg,
std::unique_ptr<RTDyldMemoryManager> OrcJMM,
- std::unique_ptr<llvm::TargetMachine> TM) {
- return new llvm::OrcMCJITReplacement(std::move(OrcJMM), std::move(TM));
+ std::unique_ptr<TargetMachine> TM) {
+ return new OrcMCJITReplacement(std::move(OrcJMM), std::move(TM));
}
public:
std::vector<object::OwningBinary<object::Archive>> Archives;
};
-}
+
+} // End namespace orc.
+} // End namespace llvm.
#endif // LLVM_LIB_EXECUTIONENGINE_ORC_MCJITREPLACEMENT_H
#include "llvm/ExecutionEngine/Orc/OrcTargetSupport.h"
#include <array>
-using namespace llvm;
+using namespace llvm::orc;
namespace {
}
namespace llvm {
+namespace orc {
const char* OrcX86_64::ResolverBlockName = "orc_resolver_block";
return GetLabelName;
}
-}
+} // End namespace orc.
+} // End namespace llvm.