<div dir="ltr">Yep - it's intended for use. I'll try to hook it up to LLI soon.<div><br><div><div>Cheers,</div><div>Lang.</div></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Mar 13, 2015 at 3:03 PM, David Blaikie <span dir="ltr"><<a href="mailto:dblaikie@gmail.com" target="_blank">dblaikie@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote"><span class="">On Thu, Mar 12, 2015 at 8:59 PM, Richard Smith <span dir="ltr"><<a href="mailto:richard@metafoo.co.uk" target="_blank">richard@metafoo.co.uk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">There are no in-tree users of CompileOnDemandLayer.h, and it hasn't built for quite a while (fixed in r232139, because it broke the modules build). Can we delete it?</div></blockquote></span><div><br>It's experimental - does need some tests, though. We'll get to some unit tests at least, maybe options no llvm-mcjit or something to use it.<br> </div><div><div class="h5"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Feb 21, 2015 at 12:44 PM, Lang Hames <span dir="ltr"><<a href="mailto:lhames@gmail.com" target="_blank">lhames@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: lhames<br>
Date: Sat Feb 21 14:44:36 2015<br>
New Revision: 230143<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=230143&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=230143&view=rev</a><br>
Log:<br>
[Orc] Move Orc code into a namespace (llvm::orc), update Kaleidoscope code.<br>
<br>
NFC.<br>
<br>
Modified:<br>
llvm/trunk/examples/Kaleidoscope/Orc/fully_lazy/toy.cpp<br>
llvm/trunk/examples/Kaleidoscope/Orc/initial/toy.cpp<br>
llvm/trunk/examples/Kaleidoscope/Orc/lazy_codegen/toy.cpp<br>
llvm/trunk/examples/Kaleidoscope/Orc/lazy_irgen/toy.cpp<br>
llvm/trunk/include/llvm/ExecutionEngine/Orc/CloneSubModule.h<br>
llvm/trunk/include/llvm/ExecutionEngine/Orc/CompileOnDemandLayer.h<br>
llvm/trunk/include/llvm/ExecutionEngine/Orc/CompileUtils.h<br>
llvm/trunk/include/llvm/ExecutionEngine/Orc/IRCompileLayer.h<br>
llvm/trunk/include/llvm/ExecutionEngine/Orc/IndirectionUtils.h<br>
llvm/trunk/include/llvm/ExecutionEngine/Orc/JITSymbol.h<br>
llvm/trunk/include/llvm/ExecutionEngine/Orc/LazyEmittingLayer.h<br>
llvm/trunk/include/llvm/ExecutionEngine/Orc/LookasideRTDyldMM.h<br>
llvm/trunk/include/llvm/ExecutionEngine/Orc/ObjectLinkingLayer.h<br>
llvm/trunk/include/llvm/ExecutionEngine/Orc/OrcTargetSupport.h<br>
llvm/trunk/lib/ExecutionEngine/Orc/CloneSubModule.cpp<br>
llvm/trunk/lib/ExecutionEngine/Orc/IndirectionUtils.cpp<br>
llvm/trunk/lib/ExecutionEngine/Orc/OrcMCJITReplacement.cpp<br>
llvm/trunk/lib/ExecutionEngine/Orc/OrcMCJITReplacement.h<br>
llvm/trunk/lib/ExecutionEngine/Orc/OrcTargetSupport.cpp<br>
<br>
Modified: llvm/trunk/examples/Kaleidoscope/Orc/fully_lazy/toy.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/examples/Kaleidoscope/Orc/fully_lazy/toy.cpp?rev=230143&r1=230142&r2=230143&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/examples/Kaleidoscope/Orc/fully_lazy/toy.cpp?rev=230143&r1=230142&r2=230143&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/examples/Kaleidoscope/Orc/fully_lazy/toy.cpp (original)<br>
+++ llvm/trunk/examples/Kaleidoscope/Orc/fully_lazy/toy.cpp Sat Feb 21 14:44:36 2015<br>
@@ -20,7 +20,9 @@<br>
#include <sstream><br>
#include <string><br>
#include <vector><br>
+<br>
using namespace llvm;<br>
+using namespace llvm::orc;<br>
<br>
//===----------------------------------------------------------------------===//<br>
// Lexer<br>
<br>
Modified: llvm/trunk/examples/Kaleidoscope/Orc/initial/toy.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/examples/Kaleidoscope/Orc/initial/toy.cpp?rev=230143&r1=230142&r2=230143&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/examples/Kaleidoscope/Orc/initial/toy.cpp?rev=230143&r1=230142&r2=230143&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/examples/Kaleidoscope/Orc/initial/toy.cpp (original)<br>
+++ llvm/trunk/examples/Kaleidoscope/Orc/initial/toy.cpp Sat Feb 21 14:44:36 2015<br>
@@ -20,7 +20,9 @@<br>
#include <sstream><br>
#include <string><br>
#include <vector><br>
+<br>
using namespace llvm;<br>
+using namespace llvm::orc;<br>
<br>
//===----------------------------------------------------------------------===//<br>
// Lexer<br>
<br>
Modified: llvm/trunk/examples/Kaleidoscope/Orc/lazy_codegen/toy.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/examples/Kaleidoscope/Orc/lazy_codegen/toy.cpp?rev=230143&r1=230142&r2=230143&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/examples/Kaleidoscope/Orc/lazy_codegen/toy.cpp?rev=230143&r1=230142&r2=230143&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/examples/Kaleidoscope/Orc/lazy_codegen/toy.cpp (original)<br>
+++ llvm/trunk/examples/Kaleidoscope/Orc/lazy_codegen/toy.cpp Sat Feb 21 14:44:36 2015<br>
@@ -19,7 +19,9 @@<br>
#include <sstream><br>
#include <string><br>
#include <vector><br>
+<br>
using namespace llvm;<br>
+using namespace llvm::orc;<br>
<br>
//===----------------------------------------------------------------------===//<br>
// Lexer<br>
<br>
Modified: llvm/trunk/examples/Kaleidoscope/Orc/lazy_irgen/toy.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/examples/Kaleidoscope/Orc/lazy_irgen/toy.cpp?rev=230143&r1=230142&r2=230143&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/examples/Kaleidoscope/Orc/lazy_irgen/toy.cpp?rev=230143&r1=230142&r2=230143&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/examples/Kaleidoscope/Orc/lazy_irgen/toy.cpp (original)<br>
+++ llvm/trunk/examples/Kaleidoscope/Orc/lazy_irgen/toy.cpp Sat Feb 21 14:44:36 2015<br>
@@ -19,7 +19,9 @@<br>
#include <sstream><br>
#include <string><br>
#include <vector><br>
+<br>
using namespace llvm;<br>
+using namespace llvm::orc;<br>
<br>
//===----------------------------------------------------------------------===//<br>
// Lexer<br>
<br>
Modified: llvm/trunk/include/llvm/ExecutionEngine/Orc/CloneSubModule.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ExecutionEngine/Orc/CloneSubModule.h?rev=230143&r1=230142&r2=230143&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ExecutionEngine/Orc/CloneSubModule.h?rev=230143&r1=230142&r2=230143&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/include/llvm/ExecutionEngine/Orc/CloneSubModule.h (original)<br>
+++ llvm/trunk/include/llvm/ExecutionEngine/Orc/CloneSubModule.h Sat Feb 21 14:44:36 2015<br>
@@ -25,21 +25,36 @@ class Function;<br>
class GlobalVariable;<br>
class Module;<br>
<br>
+namespace orc {<br>
+<br>
+/// @brief Functor type for describing how CloneSubModule should mutate a<br>
+/// GlobalVariable.<br>
typedef std::function<void(GlobalVariable &, const GlobalVariable &,<br>
ValueToValueMapTy &)> HandleGlobalVariableFtor;<br>
<br>
+/// @brief Functor type for describing how CloneSubModule should mutate a<br>
+/// Function.<br>
typedef std::function<void(Function &, const Function &, ValueToValueMapTy &)><br>
HandleFunctionFtor;<br>
<br>
+/// @brief Copies the initializer from Orig to New.<br>
+///<br>
+/// Type is suitable for implicit conversion to a HandleGlobalVariableFtor.<br>
void copyGVInitializer(GlobalVariable &New, const GlobalVariable &Orig,<br>
ValueToValueMapTy &VMap);<br>
<br>
+/// @brief Copies the body of Orig to New.<br>
+///<br>
+/// Type is suitable for implicit conversion to a HandleFunctionFtor.<br>
void copyFunctionBody(Function &New, const Function &Orig,<br>
ValueToValueMapTy &VMap);<br>
<br>
+/// @brief Clone a subset of the module Src into Dst.<br>
void CloneSubModule(Module &Dst, const Module &Src,<br>
HandleGlobalVariableFtor HandleGlobalVariable,<br>
HandleFunctionFtor HandleFunction, bool KeepInlineAsm);<br>
-}<br>
+<br>
+} // End namespace orc.<br>
+} // End namespace llvm.<br>
<br>
#endif // LLVM_EXECUTIONENGINE_ORC_CLONESUBMODULE_H<br>
<br>
Modified: llvm/trunk/include/llvm/ExecutionEngine/Orc/CompileOnDemandLayer.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ExecutionEngine/Orc/CompileOnDemandLayer.h?rev=230143&r1=230142&r2=230143&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ExecutionEngine/Orc/CompileOnDemandLayer.h?rev=230143&r1=230142&r2=230143&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/include/llvm/ExecutionEngine/Orc/CompileOnDemandLayer.h (original)<br>
+++ llvm/trunk/include/llvm/ExecutionEngine/Orc/CompileOnDemandLayer.h Sat Feb 21 14:44:36 2015<br>
@@ -22,6 +22,7 @@<br>
#include <list><br>
<br>
namespace llvm {<br>
+namespace orc {<br>
<br>
/// @brief Compile-on-demand layer.<br>
///<br>
@@ -347,6 +348,8 @@ private:<br>
CompileCallbackMgrT CompileCallbackMgr;<br>
ModuleSetInfoListT ModuleSetInfos;<br>
};<br>
-}<br>
+<br>
+} // End namespace orc.<br>
+} // End namespace llvm.<br>
<br>
#endif // LLVM_EXECUTIONENGINE_ORC_COMPILEONDEMANDLAYER_H<br>
<br>
Modified: llvm/trunk/include/llvm/ExecutionEngine/Orc/CompileUtils.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ExecutionEngine/Orc/CompileUtils.h?rev=230143&r1=230142&r2=230143&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ExecutionEngine/Orc/CompileUtils.h?rev=230143&r1=230142&r2=230143&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/include/llvm/ExecutionEngine/Orc/CompileUtils.h (original)<br>
+++ llvm/trunk/include/llvm/ExecutionEngine/Orc/CompileUtils.h Sat Feb 21 14:44:36 2015<br>
@@ -21,6 +21,7 @@<br>
#include "llvm/Target/TargetMachine.h"<br>
<br>
namespace llvm {<br>
+namespace orc {<br>
<br>
/// @brief Simple compile functor: Takes a single IR module and returns an<br>
/// ObjectFile.<br>
@@ -54,6 +55,8 @@ public:<br>
private:<br>
TargetMachine &TM;<br>
};<br>
-}<br>
+<br>
+} // End namespace orc.<br>
+} // End namespace llvm.<br>
<br>
#endif // LLVM_EXECUTIONENGINE_ORC_COMPILEUTILS_H<br>
<br>
Modified: llvm/trunk/include/llvm/ExecutionEngine/Orc/IRCompileLayer.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ExecutionEngine/Orc/IRCompileLayer.h?rev=230143&r1=230142&r2=230143&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ExecutionEngine/Orc/IRCompileLayer.h?rev=230143&r1=230142&r2=230143&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/include/llvm/ExecutionEngine/Orc/IRCompileLayer.h (original)<br>
+++ llvm/trunk/include/llvm/ExecutionEngine/Orc/IRCompileLayer.h Sat Feb 21 14:44:36 2015<br>
@@ -21,6 +21,7 @@<br>
#include <memory><br>
<br>
namespace llvm {<br>
+namespace orc {<br>
<br>
/// @brief Eager IR compiling layer.<br>
///<br>
@@ -138,6 +139,8 @@ private:<br>
CompileFtor Compile;<br>
ObjectCache *ObjCache;<br>
};<br>
-}<br>
+<br>
+} // End namespace orc.<br>
+} // End namespace llvm.<br>
<br>
#endif // LLVM_EXECUTIONENGINE_ORC_IRCOMPILINGLAYER_H<br>
<br>
Modified: llvm/trunk/include/llvm/ExecutionEngine/Orc/IndirectionUtils.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ExecutionEngine/Orc/IndirectionUtils.h?rev=230143&r1=230142&r2=230143&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ExecutionEngine/Orc/IndirectionUtils.h?rev=230143&r1=230142&r2=230143&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/include/llvm/ExecutionEngine/Orc/IndirectionUtils.h (original)<br>
+++ llvm/trunk/include/llvm/ExecutionEngine/Orc/IndirectionUtils.h Sat Feb 21 14:44:36 2015<br>
@@ -22,6 +22,7 @@<br>
#include <sstream><br>
<br>
namespace llvm {<br>
+namespace orc {<br>
<br>
/// @brief Base class for JITLayer independent aspects of<br>
/// JITCompileCallbackManager.<br>
@@ -239,6 +240,7 @@ public:<br>
<br>
FullyPartitionedModule fullyPartition(Module &M);<br>
<br>
-}<br>
+} // End namespace orc.<br>
+} // End namespace llvm.<br>
<br>
#endif // LLVM_EXECUTIONENGINE_ORC_INDIRECTIONUTILS_H<br>
<br>
Modified: llvm/trunk/include/llvm/ExecutionEngine/Orc/JITSymbol.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ExecutionEngine/Orc/JITSymbol.h?rev=230143&r1=230142&r2=230143&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ExecutionEngine/Orc/JITSymbol.h?rev=230143&r1=230142&r2=230143&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/include/llvm/ExecutionEngine/Orc/JITSymbol.h (original)<br>
+++ llvm/trunk/include/llvm/ExecutionEngine/Orc/JITSymbol.h Sat Feb 21 14:44:36 2015<br>
@@ -19,6 +19,7 @@<br>
#include <functional><br>
<br>
namespace llvm {<br>
+namespace orc {<br>
<br>
/// @brief Represents an address in the target process's address space.<br>
typedef uint64_t TargetAddress;<br>
@@ -67,6 +68,7 @@ private:<br>
GetAddressFtor GetAddress;<br>
};<br>
<br>
-}<br>
+} // End namespace orc.<br>
+} // End namespace llvm.<br>
<br>
#endif // LLVM_EXECUTIONENGINE_ORC_JITSYMBOL_H<br>
<br>
Modified: llvm/trunk/include/llvm/ExecutionEngine/Orc/LazyEmittingLayer.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ExecutionEngine/Orc/LazyEmittingLayer.h?rev=230143&r1=230142&r2=230143&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ExecutionEngine/Orc/LazyEmittingLayer.h?rev=230143&r1=230142&r2=230143&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/include/llvm/ExecutionEngine/Orc/LazyEmittingLayer.h (original)<br>
+++ llvm/trunk/include/llvm/ExecutionEngine/Orc/LazyEmittingLayer.h Sat Feb 21 14:44:36 2015<br>
@@ -22,6 +22,7 @@<br>
#include <list><br>
<br>
namespace llvm {<br>
+namespace orc {<br>
<br>
/// @brief Lazy-emitting IR layer.<br>
///<br>
@@ -273,6 +274,8 @@ LazyEmittingLayer<BaseLayerT>::EmissionD<br>
return llvm::make_unique<EmissionDeferredSetImpl<ModuleSetT>>(std::move(Ms),<br>
std::move(MM));<br>
}<br>
-}<br>
+<br>
+} // End namespace orc.<br>
+} // End namespace llvm.<br>
<br>
#endif // LLVM_EXECUTIONENGINE_ORC_LAZYEMITTINGLAYER_H<br>
<br>
Modified: llvm/trunk/include/llvm/ExecutionEngine/Orc/LookasideRTDyldMM.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ExecutionEngine/Orc/LookasideRTDyldMM.h?rev=230143&r1=230142&r2=230143&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ExecutionEngine/Orc/LookasideRTDyldMM.h?rev=230143&r1=230142&r2=230143&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/include/llvm/ExecutionEngine/Orc/LookasideRTDyldMM.h (original)<br>
+++ llvm/trunk/include/llvm/ExecutionEngine/Orc/LookasideRTDyldMM.h Sat Feb 21 14:44:36 2015<br>
@@ -20,6 +20,7 @@<br>
#include <vector><br>
<br>
namespace llvm {<br>
+namespace orc {<br>
<br>
/// @brief Defines an adapter for RuntimeDyldMM that allows lookups for external<br>
/// symbols to go via a functor, before falling back to the lookup logic<br>
@@ -84,6 +85,8 @@ createLookasideRTDyldMM(ExternalLookupFt<br>
std::forward<ExternalLookupFtor>(ExternalLookup),<br>
std::forward<DylibLookupFtor>(DylibLookup));<br>
}<br>
-}<br>
+<br>
+} // End namespace orc.<br>
+} // End namespace llvm.<br>
<br>
#endif // LLVM_EXECUTIONENGINE_ORC_LOOKASIDERTDYLDMM_H<br>
<br>
Modified: llvm/trunk/include/llvm/ExecutionEngine/Orc/ObjectLinkingLayer.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ExecutionEngine/Orc/ObjectLinkingLayer.h?rev=230143&r1=230142&r2=230143&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ExecutionEngine/Orc/ObjectLinkingLayer.h?rev=230143&r1=230142&r2=230143&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/include/llvm/ExecutionEngine/Orc/ObjectLinkingLayer.h (original)<br>
+++ llvm/trunk/include/llvm/ExecutionEngine/Orc/ObjectLinkingLayer.h Sat Feb 21 14:44:36 2015<br>
@@ -22,6 +22,7 @@<br>
#include <memory><br>
<br>
namespace llvm {<br>
+namespace orc {<br>
<br>
class ObjectLinkingLayerBase {<br>
protected:<br>
@@ -260,6 +261,7 @@ private:<br>
CreateRTDyldMMFtor CreateMemoryManager;<br>
};<br>
<br>
-} // end namespace llvm<br>
+} // End namespace orc.<br>
+} // End namespace llvm<br>
<br>
#endif // LLVM_EXECUTIONENGINE_ORC_OBJECTLINKINGLAYER_H<br>
<br>
Modified: llvm/trunk/include/llvm/ExecutionEngine/Orc/OrcTargetSupport.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ExecutionEngine/Orc/OrcTargetSupport.h?rev=230143&r1=230142&r2=230143&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ExecutionEngine/Orc/OrcTargetSupport.h?rev=230143&r1=230142&r2=230143&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/include/llvm/ExecutionEngine/Orc/OrcTargetSupport.h (original)<br>
+++ llvm/trunk/include/llvm/ExecutionEngine/Orc/OrcTargetSupport.h Sat Feb 21 14:44:36 2015<br>
@@ -17,6 +17,7 @@<br>
#include "IndirectionUtils.h"<br>
<br>
namespace llvm {<br>
+namespace orc {<br>
<br>
class OrcX86_64 {<br>
public:<br>
@@ -49,6 +50,7 @@ public:<br>
<br>
};<br>
<br>
-}<br>
+} // End namespace orc.<br>
+} // End namespace llvm.<br>
<br>
#endif // LLVM_EXECUTIONENGINE_ORC_ORCTARGETSUPPORT_H<br>
<br>
Modified: llvm/trunk/lib/ExecutionEngine/Orc/CloneSubModule.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/Orc/CloneSubModule.cpp?rev=230143&r1=230142&r2=230143&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/Orc/CloneSubModule.cpp?rev=230143&r1=230142&r2=230143&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/lib/ExecutionEngine/Orc/CloneSubModule.cpp (original)<br>
+++ llvm/trunk/lib/ExecutionEngine/Orc/CloneSubModule.cpp Sat Feb 21 14:44:36 2015<br>
@@ -4,15 +4,16 @@<br>
#include "llvm/IR/Module.h"<br>
#include "llvm/Transforms/Utils/Cloning.h"<br>
<br>
-using namespace llvm;<br>
+namespace llvm {<br>
+namespace orc {<br>
<br>
-void llvm::copyGVInitializer(GlobalVariable &New, const GlobalVariable &Orig,<br>
+void copyGVInitializer(GlobalVariable &New, const GlobalVariable &Orig,<br>
ValueToValueMapTy &VMap) {<br>
if (Orig.hasInitializer())<br>
New.setInitializer(MapValue(Orig.getInitializer(), VMap));<br>
}<br>
<br>
-void llvm::copyFunctionBody(Function &New, const Function &Orig,<br>
+void copyFunctionBody(Function &New, const Function &Orig,<br>
ValueToValueMapTy &VMap) {<br>
if (!Orig.isDeclaration()) {<br>
Function::arg_iterator DestI = New.arg_begin();<br>
@@ -27,9 +28,9 @@ void llvm::copyFunctionBody(Function &Ne<br>
}<br>
}<br>
<br>
-void llvm::CloneSubModule(llvm::Module &Dst, const Module &Src,<br>
- HandleGlobalVariableFtor HandleGlobalVariable,<br>
- HandleFunctionFtor HandleFunction, bool CloneInlineAsm) {<br>
+void CloneSubModule(llvm::Module &Dst, const Module &Src,<br>
+ HandleGlobalVariableFtor HandleGlobalVariable,<br>
+ HandleFunctionFtor HandleFunction, bool CloneInlineAsm) {<br>
<br>
ValueToValueMapTy VMap;<br>
<br>
@@ -102,3 +103,6 @@ void llvm::CloneSubModule(llvm::Module &<br>
}<br>
<br>
}<br>
+<br>
+} // End namespace orc.<br>
+} // End namespace llvm.<br>
<br>
Modified: llvm/trunk/lib/ExecutionEngine/Orc/IndirectionUtils.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/Orc/IndirectionUtils.cpp?rev=230143&r1=230142&r2=230143&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/Orc/IndirectionUtils.cpp?rev=230143&r1=230142&r2=230143&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/lib/ExecutionEngine/Orc/IndirectionUtils.cpp (original)<br>
+++ llvm/trunk/lib/ExecutionEngine/Orc/IndirectionUtils.cpp Sat Feb 21 14:44:36 2015<br>
@@ -8,6 +8,7 @@<br>
using namespace llvm;<br>
<br>
namespace llvm {<br>
+namespace orc {<br>
<br>
GlobalVariable* createImplPointer(Function &F, const Twine &Name,<br>
Constant *Initializer) {<br>
@@ -106,4 +107,5 @@ FullyPartitionedModule fullyPartition(Mo<br>
return MP;<br>
}<br>
<br>
-}<br>
+} // End namespace orc.<br>
+} // End namespace llvm.<br>
<br>
Modified: llvm/trunk/lib/ExecutionEngine/Orc/OrcMCJITReplacement.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/Orc/OrcMCJITReplacement.cpp?rev=230143&r1=230142&r2=230143&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/Orc/OrcMCJITReplacement.cpp?rev=230143&r1=230142&r2=230143&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/lib/ExecutionEngine/Orc/OrcMCJITReplacement.cpp (original)<br>
+++ llvm/trunk/lib/ExecutionEngine/Orc/OrcMCJITReplacement.cpp Sat Feb 21 14:44:36 2015<br>
@@ -13,7 +13,7 @@<br>
namespace {<br>
<br>
static struct RegisterJIT {<br>
- RegisterJIT() { llvm::OrcMCJITReplacement::Register(); }<br>
+ RegisterJIT() { llvm::orc::OrcMCJITReplacement::Register(); }<br>
} JITRegistrator;<br>
<br>
}<br>
@@ -21,6 +21,7 @@ static struct RegisterJIT {<br>
extern "C" void LLVMLinkInOrcMCJITReplacement() {}<br>
<br>
namespace llvm {<br>
+namespace orc {<br>
<br>
GenericValue<br>
OrcMCJITReplacement::runFunction(Function *F,<br>
@@ -122,4 +123,6 @@ OrcMCJITReplacement::runFunction(Functio<br>
<br>
llvm_unreachable("Full-featured argument passing not supported yet!");<br>
}<br>
-}<br>
+<br>
+} // End namespace orc.<br>
+} // End namespace llvm.<br>
<br>
Modified: llvm/trunk/lib/ExecutionEngine/Orc/OrcMCJITReplacement.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/Orc/OrcMCJITReplacement.h?rev=230143&r1=230142&r2=230143&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/Orc/OrcMCJITReplacement.h?rev=230143&r1=230142&r2=230143&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/lib/ExecutionEngine/Orc/OrcMCJITReplacement.h (original)<br>
+++ llvm/trunk/lib/ExecutionEngine/Orc/OrcMCJITReplacement.h Sat Feb 21 14:44:36 2015<br>
@@ -22,6 +22,7 @@<br>
#include "llvm/Object/Archive.h"<br>
<br>
namespace llvm {<br>
+namespace orc {<br>
<br>
class OrcMCJITReplacement : public ExecutionEngine {<br>
<br>
@@ -104,11 +105,12 @@ class OrcMCJITReplacement : public Execu<br>
};<br>
<br>
private:<br>
+<br>
static ExecutionEngine *<br>
createOrcMCJITReplacement(std::string *ErrorMsg,<br>
std::unique_ptr<RTDyldMemoryManager> OrcJMM,<br>
- std::unique_ptr<llvm::TargetMachine> TM) {<br>
- return new llvm::OrcMCJITReplacement(std::move(OrcJMM), std::move(TM));<br>
+ std::unique_ptr<TargetMachine> TM) {<br>
+ return new OrcMCJITReplacement(std::move(OrcJMM), std::move(TM));<br>
}<br>
<br>
public:<br>
@@ -323,6 +325,8 @@ private:<br>
<br>
std::vector<object::OwningBinary<object::Archive>> Archives;<br>
};<br>
-}<br>
+<br>
+} // End namespace orc.<br>
+} // End namespace llvm.<br>
<br>
#endif // LLVM_LIB_EXECUTIONENGINE_ORC_MCJITREPLACEMENT_H<br>
<br>
Modified: llvm/trunk/lib/ExecutionEngine/Orc/OrcTargetSupport.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/Orc/OrcTargetSupport.cpp?rev=230143&r1=230142&r2=230143&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/Orc/OrcTargetSupport.cpp?rev=230143&r1=230142&r2=230143&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/lib/ExecutionEngine/Orc/OrcTargetSupport.cpp (original)<br>
+++ llvm/trunk/lib/ExecutionEngine/Orc/OrcTargetSupport.cpp Sat Feb 21 14:44:36 2015<br>
@@ -2,7 +2,7 @@<br>
#include "llvm/ExecutionEngine/Orc/OrcTargetSupport.h"<br>
#include <array><br>
<br>
-using namespace llvm;<br>
+using namespace llvm::orc;<br>
<br>
namespace {<br>
<br>
@@ -47,6 +47,7 @@ uint64_t executeCompileCallback(JITCompi<br>
}<br>
<br>
namespace llvm {<br>
+namespace orc {<br>
<br>
const char* OrcX86_64::ResolverBlockName = "orc_resolver_block";<br>
<br>
@@ -123,4 +124,5 @@ OrcX86_64::insertCompileCallbackTrampoli<br>
return GetLabelName;<br>
}<br>
<br>
-}<br>
+} // End namespace orc.<br>
+} // End namespace llvm.<br>
<br>
<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@cs.uiuc.edu" target="_blank">llvm-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br>
</blockquote></div><br></div>
</div></div><br>_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@cs.uiuc.edu" target="_blank">llvm-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br>
<br></blockquote></div></div></div><br></div></div>
</blockquote></div><br></div>