diff options
Diffstat (limited to 'llvm/include')
-rw-r--r-- | llvm/include/llvm/ADT/APInt.h | 2 | ||||
-rw-r--r-- | llvm/include/llvm/Analysis/ScalarEvolutionExpressions.h | 4 | ||||
-rw-r--r-- | llvm/include/llvm/Analysis/TargetLibraryInfo.h | 2 | ||||
-rw-r--r-- | llvm/include/llvm/DebugInfo/Symbolize/DIPrinter.h | 2 | ||||
-rw-r--r-- | llvm/include/llvm/ExecutionEngine/Orc/IndirectionUtils.h | 5 | ||||
-rw-r--r-- | llvm/include/llvm/LTO/LTOCodeGenerator.h | 2 | ||||
-rw-r--r-- | llvm/include/llvm/LTO/LTOModule.h | 15 | ||||
-rw-r--r-- | llvm/include/llvm/MC/MCObjectFileInfo.h | 6 | ||||
-rw-r--r-- | llvm/include/llvm/ProfileData/SampleProf.h | 4 | ||||
-rw-r--r-- | llvm/include/llvm/Support/CommandLine.h | 2 | ||||
-rw-r--r-- | llvm/include/llvm/Support/ScopedPrinter.h | 2 |
11 files changed, 25 insertions, 21 deletions
diff --git a/llvm/include/llvm/ADT/APInt.h b/llvm/include/llvm/ADT/APInt.h index cdb72b95ad7..bde05ff973e 100644 --- a/llvm/include/llvm/ADT/APInt.h +++ b/llvm/include/llvm/ADT/APInt.h @@ -177,7 +177,7 @@ class APInt { /// provides a more convenient form of divide for internal use since KnuthDiv /// has specific constraints on its inputs. If those constraints are not met /// then it provides a simpler form of divide. - static void divide(const APInt LHS, unsigned lhsWords, const APInt &RHS, + static void divide(const APInt &LHS, unsigned lhsWords, const APInt &RHS, unsigned rhsWords, APInt *Quotient, APInt *Remainder); /// out-of-line slow case for inline constructor diff --git a/llvm/include/llvm/Analysis/ScalarEvolutionExpressions.h b/llvm/include/llvm/Analysis/ScalarEvolutionExpressions.h index 5724a11e601..bc6fb578f1f 100644 --- a/llvm/include/llvm/Analysis/ScalarEvolutionExpressions.h +++ b/llvm/include/llvm/Analysis/ScalarEvolutionExpressions.h @@ -335,8 +335,8 @@ namespace llvm { /// where the value is not in the condition, thus computing the /// exit count. If the iteration count can't be computed, an /// instance of SCEVCouldNotCompute is returned. - const SCEV *getNumIterationsInRange(ConstantRange Range, - ScalarEvolution &SE) const; + const SCEV *getNumIterationsInRange(const ConstantRange &Range, + ScalarEvolution &SE) const; /// Return an expression representing the value of this expression /// one iteration of the loop ahead. diff --git a/llvm/include/llvm/Analysis/TargetLibraryInfo.h b/llvm/include/llvm/Analysis/TargetLibraryInfo.h index a28e0fa739d..afe6d8b0377 100644 --- a/llvm/include/llvm/Analysis/TargetLibraryInfo.h +++ b/llvm/include/llvm/Analysis/TargetLibraryInfo.h @@ -315,7 +315,7 @@ private: StringMap<std::unique_ptr<TargetLibraryInfoImpl>> Impls; - TargetLibraryInfoImpl &lookupInfoImpl(Triple T); + TargetLibraryInfoImpl &lookupInfoImpl(const Triple &T); }; class TargetLibraryInfoWrapperPass : public ImmutablePass { diff --git a/llvm/include/llvm/DebugInfo/Symbolize/DIPrinter.h b/llvm/include/llvm/DebugInfo/Symbolize/DIPrinter.h index 3098199bb4d..49f86eae01c 100644 --- a/llvm/include/llvm/DebugInfo/Symbolize/DIPrinter.h +++ b/llvm/include/llvm/DebugInfo/Symbolize/DIPrinter.h @@ -31,7 +31,7 @@ class DIPrinter { int PrintSourceContext; void print(const DILineInfo &Info, bool Inlined); - void printContext(std::string FileName, int64_t Line); + void printContext(const std::string &FileName, int64_t Line); public: DIPrinter(raw_ostream &OS, bool PrintFunctionNames = true, diff --git a/llvm/include/llvm/ExecutionEngine/Orc/IndirectionUtils.h b/llvm/include/llvm/ExecutionEngine/Orc/IndirectionUtils.h index fe7a85ba020..51172c51e13 100644 --- a/llvm/include/llvm/ExecutionEngine/Orc/IndirectionUtils.h +++ b/llvm/include/llvm/ExecutionEngine/Orc/IndirectionUtils.h @@ -334,13 +334,14 @@ private: /// ErrorHandlerAddress will be used by the resulting compile callback /// manager if a compile callback fails. std::unique_ptr<JITCompileCallbackManager> -createLocalCompileCallbackManager(Triple T, TargetAddress ErrorHandlerAddress); +createLocalCompileCallbackManager(const Triple &T, + TargetAddress ErrorHandlerAddress); /// @brief Create a local indriect stubs manager builder. /// /// The given target triple will determine the ABI. std::function<std::unique_ptr<IndirectStubsManager>()> -createLocalIndirectStubsManagerBuilder(Triple T); +createLocalIndirectStubsManagerBuilder(const Triple &T); /// @brief Build a function pointer of FunctionType with the given constant /// address. diff --git a/llvm/include/llvm/LTO/LTOCodeGenerator.h b/llvm/include/llvm/LTO/LTOCodeGenerator.h index e6a9fb1813f..d083e37d75b 100644 --- a/llvm/include/llvm/LTO/LTOCodeGenerator.h +++ b/llvm/include/llvm/LTO/LTOCodeGenerator.h @@ -77,7 +77,7 @@ struct LTOCodeGenerator { /// Resets \a HasVerifiedInput. void setModule(std::unique_ptr<LTOModule> M); - void setTargetOptions(TargetOptions Options); + void setTargetOptions(const TargetOptions &Options); void setDebugInfo(lto_debug_model); void setCodePICModel(Optional<Reloc::Model> Model) { RelocModel = Model; } diff --git a/llvm/include/llvm/LTO/LTOModule.h b/llvm/include/llvm/LTO/LTOModule.h index 0d89d819c50..2e46219be19 100644 --- a/llvm/include/llvm/LTO/LTOModule.h +++ b/llvm/include/llvm/LTO/LTOModule.h @@ -91,19 +91,22 @@ public: /// InitializeAllAsmPrinters(); /// InitializeAllAsmParsers(); static ErrorOr<std::unique_ptr<LTOModule>> - createFromFile(LLVMContext &Context, const char *path, TargetOptions options); + createFromFile(LLVMContext &Context, const char *path, + const TargetOptions &options); static ErrorOr<std::unique_ptr<LTOModule>> createFromOpenFile(LLVMContext &Context, int fd, const char *path, - size_t size, TargetOptions options); + size_t size, const TargetOptions &options); static ErrorOr<std::unique_ptr<LTOModule>> createFromOpenFileSlice(LLVMContext &Context, int fd, const char *path, - size_t map_size, off_t offset, TargetOptions options); + size_t map_size, off_t offset, + const TargetOptions &options); static ErrorOr<std::unique_ptr<LTOModule>> createFromBuffer(LLVMContext &Context, const void *mem, size_t length, - TargetOptions options, StringRef path = ""); + const TargetOptions &options, StringRef path = ""); static ErrorOr<std::unique_ptr<LTOModule>> createInLocalContext(std::unique_ptr<LLVMContext> Context, const void *mem, - size_t length, TargetOptions options, StringRef path); + size_t length, const TargetOptions &options, + StringRef path); const Module &getModule() const { return const_cast<LTOModule*>(this)->getModule(); @@ -202,7 +205,7 @@ private: /// Create an LTOModule (private version). static ErrorOr<std::unique_ptr<LTOModule>> - makeLTOModule(MemoryBufferRef Buffer, TargetOptions options, + makeLTOModule(MemoryBufferRef Buffer, const TargetOptions &options, LLVMContext &Context, bool ShouldBeLazy); }; } diff --git a/llvm/include/llvm/MC/MCObjectFileInfo.h b/llvm/include/llvm/MC/MCObjectFileInfo.h index 0b1ec32bd1a..cef4e5b3eb9 100644 --- a/llvm/include/llvm/MC/MCObjectFileInfo.h +++ b/llvm/include/llvm/MC/MCObjectFileInfo.h @@ -356,9 +356,9 @@ private: MCContext *Ctx; Triple TT; - void initMachOMCObjectFileInfo(Triple T); - void initELFMCObjectFileInfo(Triple T); - void initCOFFMCObjectFileInfo(Triple T); + void initMachOMCObjectFileInfo(const Triple &T); + void initELFMCObjectFileInfo(const Triple &T); + void initCOFFMCObjectFileInfo(const Triple &T); public: const Triple &getTargetTriple() const { return TT; } diff --git a/llvm/include/llvm/ProfileData/SampleProf.h b/llvm/include/llvm/ProfileData/SampleProf.h index d731dec1c1c..9fefefa627b 100644 --- a/llvm/include/llvm/ProfileData/SampleProf.h +++ b/llvm/include/llvm/ProfileData/SampleProf.h @@ -204,8 +204,8 @@ public: } sampleprof_error addCalledTargetSamples(uint32_t LineOffset, uint32_t Discriminator, - std::string FName, uint64_t Num, - uint64_t Weight = 1) { + const std::string &FName, + uint64_t Num, uint64_t Weight = 1) { return BodySamples[LineLocation(LineOffset, Discriminator)].addCalledTarget( FName, Num, Weight); } diff --git a/llvm/include/llvm/Support/CommandLine.h b/llvm/include/llvm/Support/CommandLine.h index 943d2df3770..432ae267478 100644 --- a/llvm/include/llvm/Support/CommandLine.h +++ b/llvm/include/llvm/Support/CommandLine.h @@ -946,7 +946,7 @@ public: // getValueName - Overload in subclass to provide a better default value. const char *getValueName() const override { return "string"; } - void printOptionDiff(const Option &O, StringRef V, OptVal Default, + void printOptionDiff(const Option &O, StringRef V, const OptVal &Default, size_t GlobalWidth) const; // An out-of-line virtual method to provide a 'home' for this class. diff --git a/llvm/include/llvm/Support/ScopedPrinter.h b/llvm/include/llvm/Support/ScopedPrinter.h index b9d8a8db1b6..a2f2e098543 100644 --- a/llvm/include/llvm/Support/ScopedPrinter.h +++ b/llvm/include/llvm/Support/ScopedPrinter.h @@ -190,7 +190,7 @@ public: startLine() << Label << ": " << int(Value) << "\n"; } - void printNumber(StringRef Label, APSInt Value) { + void printNumber(StringRef Label, const APSInt &Value) { startLine() << Label << ": " << Value << "\n"; } |