[PATCH] D45926: Fix DISubprogram while extracting instructions out of function

Adrian Prantl via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 26 09:55:37 PDT 2018


aprantl added inline comments.


================
Comment at: include/llvm/Transforms/Utils/Cloning.h:132
 
+enum class CloneType {
+    InvalidCloneType,
----------------
aprantl wrote:
> aprantl wrote:
> > Can you please also add documentation to CloneFunctionInto that explains what the difference between those modes is?
> `/// Used to control \p CloneFunctionInto.`
```
/// Used to control \p CloneFunctionInto.
enum class CloneType {
    InvalidCloneType,
    /// Cloning will result in module level changes.
    ModuleLevelChanges,
    /// What does this mean exactly? Do we even need it?
    NoModuleLevelChanges,
    /// Cloning will be used for extracting functions
    /// by passes like function merging, it does not require module level changes
    /// but debug info needs special treatment like: DISubprogram is not cloned.
    ExtractingFunctions,
};
```


https://reviews.llvm.org/D45926





More information about the llvm-commits mailing list