const_cast the memory MemoryBuffer following LLVM r211883