mirror of
https://github.com/RPCSX/llvm.git
synced 2024-11-24 04:09:45 +00:00
IRReader: don't mark MemoryBuffers const
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211883 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
22e371c74e
commit
9b0be7b61a
@ -52,7 +52,7 @@ namespace llvm {
|
||||
|
||||
/// Read the specified bitcode file, returning the module.
|
||||
/// This method *never* takes ownership of Buffer.
|
||||
ErrorOr<Module *> parseBitcodeFile(const MemoryBuffer *Buffer,
|
||||
ErrorOr<Module *> parseBitcodeFile(MemoryBuffer *Buffer,
|
||||
LLVMContext &Context);
|
||||
|
||||
/// WriteBitcodeToFile - Write the specified module to the specified
|
||||
|
@ -41,8 +41,7 @@ Module *getLazyIRFileModule(const std::string &Filename, SMDiagnostic &Err,
|
||||
/// If the given MemoryBuffer holds a bitcode image, return a Module
|
||||
/// for it. Otherwise, attempt to parse it as LLVM Assembly and return
|
||||
/// a Module for it. This function *never* takes ownership of Buffer.
|
||||
Module *ParseIR(const MemoryBuffer *Buffer, SMDiagnostic &Err,
|
||||
LLVMContext &Context);
|
||||
Module *ParseIR(MemoryBuffer *Buffer, SMDiagnostic &Err, LLVMContext &Context);
|
||||
|
||||
/// If the given file holds a bitcode image, return a Module for it.
|
||||
/// Otherwise, attempt to parse it as LLVM Assembly and return a Module
|
||||
|
@ -3406,10 +3406,9 @@ Module *llvm::getStreamedBitcodeModule(const std::string &name,
|
||||
return M;
|
||||
}
|
||||
|
||||
ErrorOr<Module *> llvm::parseBitcodeFile(const MemoryBuffer *Buffer,
|
||||
ErrorOr<Module *> llvm::parseBitcodeFile(MemoryBuffer *Buffer,
|
||||
LLVMContext &Context) {
|
||||
ErrorOr<Module *> ModuleOrErr =
|
||||
getLazyBitcodeModule(const_cast<MemoryBuffer *>(Buffer), Context);
|
||||
ErrorOr<Module *> ModuleOrErr = getLazyBitcodeModule(Buffer, Context);
|
||||
if (!ModuleOrErr)
|
||||
return ModuleOrErr;
|
||||
Module *M = ModuleOrErr.get();
|
||||
|
@ -62,7 +62,7 @@ Module *llvm::getLazyIRFileModule(const std::string &Filename, SMDiagnostic &Err
|
||||
return getLazyIRModule(File.release(), Err, Context);
|
||||
}
|
||||
|
||||
Module *llvm::ParseIR(const MemoryBuffer *Buffer, SMDiagnostic &Err,
|
||||
Module *llvm::ParseIR(MemoryBuffer *Buffer, SMDiagnostic &Err,
|
||||
LLVMContext &Context) {
|
||||
NamedRegionTimer T(TimeIRParsingName, TimeIRParsingGroupName,
|
||||
TimePassesIsEnabled);
|
||||
|
Loading…
Reference in New Issue
Block a user