diff options
Diffstat (limited to 'llvm/lib/LTO/LTOModule.cpp')
-rw-r--r-- | llvm/lib/LTO/LTOModule.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
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); |