[LLVMdev] Build Failure

David Blaikie dblaikie at gmail.com
Wed Jan 2 13:14:11 PST 2013


On Wed, Jan 2, 2013 at 1:04 PM,  <dag at cray.com> wrote:
> I'm getting a build failure with -Werror:
>
> [off-dbg]    : [llvm] /ptmp/dag/llvm/official/llvm/lib/IR/Use.cpp: In member function 'llvm::User* llvm::Use::getUser() const':
> [off-dbg]    : [llvm] /ptmp/dag/llvm/official/llvm/lib/IR/Use.cpp:142:14: error: cast from type 'const llvm::Use*' to type 'llvm::User*' casts away qualifiers [-Werror=cast-qual]

There's little effort to keep the GCC build warning clean, but I've
seen people cleaning up this particular warning, so feel free to
commit a fix for it (replacing the c-style cast with a const_cast if
it's intended, or just adding "const" to the cast if it wasn't
intended/necessary to remove const).

We should probably setup a GCC -Werror build bot if we are warning
clean for some sufficiently modern version of GCC.

- David



More information about the llvm-dev mailing list