[llvm] r310459 - Suppress a warning. NFC.

David Blaikie via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 14 13:39:27 PDT 2017


Which warning is being suppressed? If it's a -Wswitch-enum - why not remove
the default? (& place the unreachable after the switch)

On Wed, Aug 9, 2017 at 3:39 AM Gabor Horvath via llvm-commits <
llvm-commits at lists.llvm.org> wrote:

> Author: xazax
> Date: Wed Aug  9 03:38:53 2017
> New Revision: 310459
>
> URL: http://llvm.org/viewvc/llvm-project?rev=310459&view=rev
> Log:
> Suppress a warning. NFC.
>
> Modified:
>     llvm/trunk/lib/Target/AMDGPU/MCTargetDesc/AMDGPUAsmBackend.cpp
>
> Modified: llvm/trunk/lib/Target/AMDGPU/MCTargetDesc/AMDGPUAsmBackend.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AMDGPU/MCTargetDesc/AMDGPUAsmBackend.cpp?rev=310459&r1=310458&r2=310459&view=diff
>
> ==============================================================================
> --- llvm/trunk/lib/Target/AMDGPU/MCTargetDesc/AMDGPUAsmBackend.cpp
> (original)
> +++ llvm/trunk/lib/Target/AMDGPU/MCTargetDesc/AMDGPUAsmBackend.cpp Wed
> Aug  9 03:38:53 2017
> @@ -78,7 +78,7 @@ static uint64_t adjustFixupValue(const M
>                                   MCContext *Ctx) {
>    int64_t SignedValue = static_cast<int64_t>(Value);
>
> -  switch (Fixup.getKind()) {
> +  switch (static_cast<unsigned>(Fixup.getKind())) {
>    case AMDGPU::fixup_si_sopp_br: {
>      int64_t BrImm = (SignedValue - 4) / 4;
>
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170814/b7423906/attachment.html>


More information about the llvm-commits mailing list