[Orc] Move Orc code into a namespace (llvm::orc), update Kaleidoscope code.
[oota-llvm.git] / include / llvm / ExecutionEngine / Orc / CloneSubModule.h
index 208a4f7692bb7bc8a975565e298e758dada291ed..1bd3955e879fde55af35e9e5a1b8132c74dd3da2 100644 (file)
@@ -25,21 +25,36 @@ class Function;
 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