diff options
Diffstat (limited to 'llvm/include')
| -rw-r--r-- | llvm/include/llvm/Bitcode/ReaderWriter.h | 7 | ||||
| -rw-r--r-- | llvm/include/llvm/CodeGen/DIE.h | 2 | ||||
| -rw-r--r-- | llvm/include/llvm/CodeGen/SelectionDAG.h | 2 | ||||
| -rw-r--r-- | llvm/include/llvm/ExecutionEngine/ExecutionEngine.h | 4 | ||||
| -rw-r--r-- | llvm/include/llvm/Object/ModuleSummaryIndexObjectFile.h | 14 | ||||
| -rw-r--r-- | llvm/include/llvm/Support/Printable.h | 2 | ||||
| -rw-r--r-- | llvm/include/llvm/Transforms/IPO/Internalize.h | 11 |
7 files changed, 21 insertions, 21 deletions
diff --git a/llvm/include/llvm/Bitcode/ReaderWriter.h b/llvm/include/llvm/Bitcode/ReaderWriter.h index 0f0c63bd0e6..2913f877cd6 100644 --- a/llvm/include/llvm/Bitcode/ReaderWriter.h +++ b/llvm/include/llvm/Bitcode/ReaderWriter.h @@ -71,13 +71,14 @@ namespace llvm { LLVMContext &Context); /// Check if the given bitcode buffer contains a summary block. - bool hasGlobalValueSummary(MemoryBufferRef Buffer, - DiagnosticHandlerFunction DiagnosticHandler); + bool + hasGlobalValueSummary(MemoryBufferRef Buffer, + const DiagnosticHandlerFunction &DiagnosticHandler); /// Parse the specified bitcode buffer, returning the module summary index. ErrorOr<std::unique_ptr<ModuleSummaryIndex>> getModuleSummaryIndex(MemoryBufferRef Buffer, - DiagnosticHandlerFunction DiagnosticHandler); + const DiagnosticHandlerFunction &DiagnosticHandler); /// \brief Write the specified module to the specified raw output stream. /// diff --git a/llvm/include/llvm/CodeGen/DIE.h b/llvm/include/llvm/CodeGen/DIE.h index d30ebbd4fdb..7d6e66fa6ec 100644 --- a/llvm/include/llvm/CodeGen/DIE.h +++ b/llvm/include/llvm/CodeGen/DIE.h @@ -565,7 +565,7 @@ public: typedef iterator_range<value_iterator> value_range; typedef iterator_range<const_value_iterator> const_value_range; - value_iterator addValue(BumpPtrAllocator &Alloc, DIEValue V) { + value_iterator addValue(BumpPtrAllocator &Alloc, const DIEValue &V) { List.push_back(*new (Alloc) Node(V)); return value_iterator(ListTy::toIterator(List.back())); } diff --git a/llvm/include/llvm/CodeGen/SelectionDAG.h b/llvm/include/llvm/CodeGen/SelectionDAG.h index f83229e5f31..aad5d6fde17 100644 --- a/llvm/include/llvm/CodeGen/SelectionDAG.h +++ b/llvm/include/llvm/CodeGen/SelectionDAG.h @@ -1382,7 +1382,7 @@ private: void *&InsertPos); SDNode *FindModifiedNodeSlot(SDNode *N, ArrayRef<SDValue> Ops, void *&InsertPos); - SDNode *UpdadeSDLocOnMergedSDNode(SDNode *N, SDLoc loc); + SDNode *UpdadeSDLocOnMergedSDNode(SDNode *N, const SDLoc &loc); void DeleteNodeNotInCSEMaps(SDNode *N); void DeallocateNode(SDNode *N); diff --git a/llvm/include/llvm/ExecutionEngine/ExecutionEngine.h b/llvm/include/llvm/ExecutionEngine/ExecutionEngine.h index caeed7ea9da..9518e5ad37d 100644 --- a/llvm/include/llvm/ExecutionEngine/ExecutionEngine.h +++ b/llvm/include/llvm/ExecutionEngine/ExecutionEngine.h @@ -478,11 +478,11 @@ public: /// specified function pointer is invoked to create it. If it returns null, /// the JIT will abort. void InstallLazyFunctionCreator(FunctionCreator C) { - LazyFunctionCreator = C; + LazyFunctionCreator = std::move(C); } protected: - ExecutionEngine(const DataLayout DL) : DL(std::move(DL)){} + ExecutionEngine(DataLayout DL) : DL(std::move(DL)) {} explicit ExecutionEngine(DataLayout DL, std::unique_ptr<Module> M); explicit ExecutionEngine(std::unique_ptr<Module> M); diff --git a/llvm/include/llvm/Object/ModuleSummaryIndexObjectFile.h b/llvm/include/llvm/Object/ModuleSummaryIndexObjectFile.h index 3a3333cd033..d021fb29427 100644 --- a/llvm/include/llvm/Object/ModuleSummaryIndexObjectFile.h +++ b/llvm/include/llvm/Object/ModuleSummaryIndexObjectFile.h @@ -81,23 +81,23 @@ public: /// \brief Looks for summary sections in the given memory buffer, /// returns true if found, else false. - static bool - hasGlobalValueSummaryInMemBuffer(MemoryBufferRef Object, - DiagnosticHandlerFunction DiagnosticHandler); + static bool hasGlobalValueSummaryInMemBuffer( + MemoryBufferRef Object, + const DiagnosticHandlerFunction &DiagnosticHandler); /// \brief Parse module summary index in the given memory buffer. /// Return new ModuleSummaryIndexObjectFile instance containing parsed module /// summary/index. static ErrorOr<std::unique_ptr<ModuleSummaryIndexObjectFile>> - create(MemoryBufferRef Object, DiagnosticHandlerFunction DiagnosticHandler); + create(MemoryBufferRef Object, + const DiagnosticHandlerFunction &DiagnosticHandler); }; } /// Parse the module summary index out of an IR file and return the module /// summary index object if found, or nullptr if not. -ErrorOr<std::unique_ptr<ModuleSummaryIndex>> -getModuleSummaryIndexForFile(StringRef Path, - DiagnosticHandlerFunction DiagnosticHandler); +ErrorOr<std::unique_ptr<ModuleSummaryIndex>> getModuleSummaryIndexForFile( + StringRef Path, const DiagnosticHandlerFunction &DiagnosticHandler); } #endif diff --git a/llvm/include/llvm/Support/Printable.h b/llvm/include/llvm/Support/Printable.h index 016499ea2a3..83b8f0998ae 100644 --- a/llvm/include/llvm/Support/Printable.h +++ b/llvm/include/llvm/Support/Printable.h @@ -38,7 +38,7 @@ class raw_ostream; class Printable { public: std::function<void(raw_ostream &OS)> Print; - Printable(const std::function<void(raw_ostream &OS)> Print) + Printable(std::function<void(raw_ostream &OS)> Print) : Print(std::move(Print)) {} }; diff --git a/llvm/include/llvm/Transforms/IPO/Internalize.h b/llvm/include/llvm/Transforms/IPO/Internalize.h index 604c8b300ca..ba1b06877d3 100644 --- a/llvm/include/llvm/Transforms/IPO/Internalize.h +++ b/llvm/include/llvm/Transforms/IPO/Internalize.h @@ -53,8 +53,7 @@ class InternalizePass : public PassInfoMixin<InternalizePass> { public: InternalizePass(); - InternalizePass( - const std::function<bool(const GlobalValue &)> MustPreserveGV) + InternalizePass(std::function<bool(const GlobalValue &)> MustPreserveGV) : MustPreserveGV(std::move(MustPreserveGV)) {} /// Run the internalizer on \p TheModule, returns true if any changes was @@ -68,10 +67,10 @@ public: }; /// Helper function to internalize functions and variables in a Module. -inline bool internalizeModule( - Module &TheModule, - const std::function<bool(const GlobalValue &)> MustPreserveGV, - CallGraph *CG = nullptr) { +inline bool +internalizeModule(Module &TheModule, + std::function<bool(const GlobalValue &)> MustPreserveGV, + CallGraph *CG = nullptr) { return InternalizePass(std::move(MustPreserveGV)) .internalizeModule(TheModule, CG); } |

