summaryrefslogtreecommitdiffstats
path: root/llvm/lib/LTO
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/LTO')
-rw-r--r--llvm/lib/LTO/LTOCodeGenerator.cpp2
-rw-r--r--llvm/lib/LTO/LTOModule.cpp12
-rw-r--r--llvm/lib/LTO/ThinLTOCodeGenerator.cpp2
3 files changed, 8 insertions, 8 deletions
diff --git a/llvm/lib/LTO/LTOCodeGenerator.cpp b/llvm/lib/LTO/LTOCodeGenerator.cpp
index 0e1c46cff27..52634652932 100644
--- a/llvm/lib/LTO/LTOCodeGenerator.cpp
+++ b/llvm/lib/LTO/LTOCodeGenerator.cpp
@@ -165,7 +165,7 @@ void LTOCodeGenerator::setModule(std::unique_ptr<LTOModule> Mod) {
HasVerifiedInput = false;
}
-void LTOCodeGenerator::setTargetOptions(TargetOptions Options) {
+void LTOCodeGenerator::setTargetOptions(const TargetOptions &Options) {
this->Options = Options;
}
diff --git a/llvm/lib/LTO/LTOModule.cpp b/llvm/lib/LTO/LTOModule.cpp
index 7e826779870..fca6ca8011f 100644
--- a/llvm/lib/LTO/LTOModule.cpp
+++ b/llvm/lib/LTO/LTOModule.cpp
@@ -108,7 +108,7 @@ std::string LTOModule::getProducerString(MemoryBuffer *Buffer) {
ErrorOr<std::unique_ptr<LTOModule>>
LTOModule::createFromFile(LLVMContext &Context, const char *path,
- TargetOptions options) {
+ const TargetOptions &options) {
ErrorOr<std::unique_ptr<MemoryBuffer>> BufferOrErr =
MemoryBuffer::getFile(path);
if (std::error_code EC = BufferOrErr.getError()) {
@@ -122,14 +122,14 @@ LTOModule::createFromFile(LLVMContext &Context, const char *path,
ErrorOr<std::unique_ptr<LTOModule>>
LTOModule::createFromOpenFile(LLVMContext &Context, int fd, const char *path,
- size_t size, TargetOptions options) {
+ size_t size, const TargetOptions &options) {
return createFromOpenFileSlice(Context, fd, path, size, 0, options);
}
ErrorOr<std::unique_ptr<LTOModule>>
LTOModule::createFromOpenFileSlice(LLVMContext &Context, int fd,
const char *path, size_t map_size,
- off_t offset, TargetOptions options) {
+ off_t offset, const TargetOptions &options) {
ErrorOr<std::unique_ptr<MemoryBuffer>> BufferOrErr =
MemoryBuffer::getOpenFileSlice(fd, path, map_size, offset);
if (std::error_code EC = BufferOrErr.getError()) {
@@ -143,7 +143,7 @@ LTOModule::createFromOpenFileSlice(LLVMContext &Context, int fd,
ErrorOr<std::unique_ptr<LTOModule>>
LTOModule::createFromBuffer(LLVMContext &Context, const void *mem,
- size_t length, TargetOptions options,
+ size_t length, const TargetOptions &options,
StringRef path) {
StringRef Data((const char *)mem, length);
MemoryBufferRef Buffer(Data, path);
@@ -153,7 +153,7 @@ LTOModule::createFromBuffer(LLVMContext &Context, const void *mem,
ErrorOr<std::unique_ptr<LTOModule>>
LTOModule::createInLocalContext(std::unique_ptr<LLVMContext> Context,
const void *mem, size_t length,
- TargetOptions options, StringRef path) {
+ const TargetOptions &options, StringRef path) {
StringRef Data((const char *)mem, length);
MemoryBufferRef Buffer(Data, path);
// If we own a context, we know this is being used only for symbol extraction,
@@ -196,7 +196,7 @@ parseBitcodeFileImpl(MemoryBufferRef Buffer, LLVMContext &Context,
}
ErrorOr<std::unique_ptr<LTOModule>>
-LTOModule::makeLTOModule(MemoryBufferRef Buffer, TargetOptions options,
+LTOModule::makeLTOModule(MemoryBufferRef Buffer, const TargetOptions &options,
LLVMContext &Context, bool ShouldBeLazy) {
ErrorOr<std::unique_ptr<Module>> MOrErr =
parseBitcodeFileImpl(Buffer, Context, ShouldBeLazy);
diff --git a/llvm/lib/LTO/ThinLTOCodeGenerator.cpp b/llvm/lib/LTO/ThinLTOCodeGenerator.cpp
index 8baab57a796..4758ef8ba9f 100644
--- a/llvm/lib/LTO/ThinLTOCodeGenerator.cpp
+++ b/llvm/lib/LTO/ThinLTOCodeGenerator.cpp
@@ -335,7 +335,7 @@ ProcessThinLTOModule(Module &TheModule, ModuleSummaryIndex &Index,
const FunctionImporter::ExportSetTy &ExportList,
const DenseSet<GlobalValue::GUID> &GUIDPreservedSymbols,
const GVSummaryMapTy &DefinedGlobals,
- ThinLTOCodeGenerator::CachingOptions CacheOptions,
+ const ThinLTOCodeGenerator::CachingOptions &CacheOptions,
bool DisableCodeGen, StringRef SaveTempsDir,
unsigned count) {
OpenPOWER on IntegriCloud