Skip to content
Commit 8de16131 authored by Jie Fu's avatar Jie Fu
Browse files

[X86] Fix -Wsometimes-uninitialized in X86InstrInfo.cpp (NFC)

/data/llvm-project/llvm/lib/Target/X86/X86InstrInfo.cpp:9793:3: error: variable 'MaddOpc' is used uninitialized whenever switch default is taken [-Werror,-Wsometimes-uninitialized]
  default:
  ^~~~~~~
/data/llvm-project/llvm/lib/Target/X86/X86InstrInfo.cpp:9854:25: note: uninitialized use occurs here
  Madd->setDesc(TII.get(MaddOpc));
                        ^~~~~~~
/data/llvm-project/llvm/lib/Target/X86/X86InstrInfo.cpp:9791:19: note: initialize the variable 'MaddOpc' to silence this warning
  unsigned MaddOpc;
                  ^
                   = 0
/data/llvm-project/llvm/lib/Target/X86/X86InstrInfo.cpp:9793:3: error: variable 'AddOpc' is used uninitialized whenever switch default is taken [-Werror,-Wsometimes-uninitialized]
  default:
  ^~~~~~~
/data/llvm-project/llvm/lib/Target/X86/X86InstrInfo.cpp:9862:46: note: uninitialized use occurs here
      BuildMI(*MF, MIMetadata(Root), TII.get(AddOpc), DstReg)
                                             ^~~~~~
/data/llvm-project/llvm/lib/Target/X86/X86InstrInfo.cpp:9790:18: note: initialize the variable 'AddOpc' to silence this warning
  unsigned AddOpc;
                 ^
                  = 0
2 errors generated.
parent 25462d14
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment