Add a const_cast rather than the C-style cast. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@270180
91177308-0d34-0410-b5e6-
96231b3b80d8
// Skip if only bitcode needs to be embedded.
if (CGOpts.getEmbedBitcode() != CodeGenOptions::Embed_Bitcode) {
// Embed command-line options.
- ArrayRef<uint8_t> CmdData((uint8_t*)CGOpts.CmdArgs.data(),
+ ArrayRef<uint8_t> CmdData(const_cast<uint8_t *>(CGOpts.CmdArgs.data()),
CGOpts.CmdArgs.size());
llvm::Constant *CmdConstant =
llvm::ConstantDataArray::get(M->getContext(), CmdData);