summaryrefslogtreecommitdiff
path: root/lib/Bitcode
diff options
context:
space:
mode:
authorAlp Toker <alp@nuanti.com>2014-06-27 04:48:32 +0000
committerAlp Toker <alp@nuanti.com>2014-06-27 04:48:32 +0000
commit9fc1a6ffb71e88d3139ef9ad2ccbaddd80a18562 (patch)
tree1081e7a1f37537b3b346efd7567efc93bba523c3 /lib/Bitcode
parent260f9375bd6e29ed720ab56b434528a27be753a5 (diff)
downloadllvm-9fc1a6ffb71e88d3139ef9ad2ccbaddd80a18562.tar.gz
llvm-9fc1a6ffb71e88d3139ef9ad2ccbaddd80a18562.tar.bz2
llvm-9fc1a6ffb71e88d3139ef9ad2ccbaddd80a18562.tar.xz
Propagate const-correctness into parseBitcodeFile()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211864 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Bitcode')
-rw-r--r--lib/Bitcode/Reader/BitcodeReader.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/Bitcode/Reader/BitcodeReader.cpp b/lib/Bitcode/Reader/BitcodeReader.cpp
index 4bbecfdb17..d763397e55 100644
--- a/lib/Bitcode/Reader/BitcodeReader.cpp
+++ b/lib/Bitcode/Reader/BitcodeReader.cpp
@@ -3406,9 +3406,10 @@ Module *llvm::getStreamedBitcodeModule(const std::string &name,
return M;
}
-ErrorOr<Module *> llvm::parseBitcodeFile(MemoryBuffer *Buffer,
+ErrorOr<Module *> llvm::parseBitcodeFile(const MemoryBuffer *Buffer,
LLVMContext &Context) {
- ErrorOr<Module *> ModuleOrErr = getLazyBitcodeModule(Buffer, Context);
+ ErrorOr<Module *> ModuleOrErr =
+ getLazyBitcodeModule(const_cast<MemoryBuffer *>(Buffer), Context);
if (!ModuleOrErr)
return ModuleOrErr;
Module *M = ModuleOrErr.get();