From: Saleem Abdulrasool Date: Fri, 20 May 2016 03:58:12 +0000 (+0000) Subject: CodeGen: address -Wcast-qual warning X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=626b380d09aac666852650eb384d9c500a502ac0;p=clang CodeGen: address -Wcast-qual warning 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 --- diff --git a/lib/CodeGen/BackendUtil.cpp b/lib/CodeGen/BackendUtil.cpp index 0c95eb573c..2de897b51d 100644 --- a/lib/CodeGen/BackendUtil.cpp +++ b/lib/CodeGen/BackendUtil.cpp @@ -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 CmdData((uint8_t*)CGOpts.CmdArgs.data(), + ArrayRef CmdData(const_cast(CGOpts.CmdArgs.data()), CGOpts.CmdArgs.size()); llvm::Constant *CmdConstant = llvm::ConstantDataArray::get(M->getContext(), CmdData);