CodeGen: address -Wcast-qual warning

Add a const_cast rather than the C-style cast.  NFC.

llvm-svn: 270180
This commit is contained in:
Saleem Abdulrasool 2016-05-20 03:58:12 +00:00
parent b01e4b7727
commit b1d50c1c12
1 changed files with 1 additions and 1 deletions

View File

@ -853,7 +853,7 @@ void clang::EmbedBitcode(llvm::Module *M, const CodeGenOptions &CGOpts,
// 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);