diff options
author | Roman Divacky <rdivacky@freebsd.org> | 2012-09-05 22:26:57 +0000 |
---|---|---|
committer | Roman Divacky <rdivacky@freebsd.org> | 2012-09-05 22:26:57 +0000 |
commit | 59324297650c12a8dccf1a7ad650a9e895fdc17e (patch) | |
tree | fb52c6e19359d66d87961588b41f2f98ffb894b3 /tools/lto | |
parent | 77fffa6fdd389ad6d70a42b36c1c36c768c2de41 (diff) | |
download | external_llvm-59324297650c12a8dccf1a7ad650a9e895fdc17e.zip external_llvm-59324297650c12a8dccf1a7ad650a9e895fdc17e.tar.gz external_llvm-59324297650c12a8dccf1a7ad650a9e895fdc17e.tar.bz2 |
Stop casting away const qualifier needlessly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163258 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/lto')
-rw-r--r-- | tools/lto/LTOModule.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/lto/LTOModule.cpp b/tools/lto/LTOModule.cpp index d588f6a..b98bfab 100644 --- a/tools/lto/LTOModule.cpp +++ b/tools/lto/LTOModule.cpp @@ -163,7 +163,7 @@ LTOModule::LTOModule(llvm::Module *m, llvm::TargetMachine *t) /// isBitcodeFile - Returns 'true' if the file (or memory contents) is LLVM /// bitcode. bool LTOModule::isBitcodeFile(const void *mem, size_t length) { - return llvm::sys::IdentifyFileType((char*)mem, length) + return llvm::sys::IdentifyFileType((const char*)mem, length) == llvm::sys::Bitcode_FileType; } @@ -307,7 +307,7 @@ LTOModule *LTOModule::makeLTOModule(MemoryBuffer *buffer, /// makeBuffer - Create a MemoryBuffer from a memory range. MemoryBuffer *LTOModule::makeBuffer(const void *mem, size_t length) { - const char *startPtr = (char*)mem; + const char *startPtr = (const char*)mem; return MemoryBuffer::getMemBuffer(StringRef(startPtr, length), "", false); } |