forked from OSchip/llvm-project
a63178f756
Davide Italiano reported the following issue if llvm is compiled with gcc -Wstrict-aliasing -Werror: ..... lib/Target/BPF/CMakeFiles/LLVMBPFCodeGen.dir/BPFISelDAGToDAG.cpp.o ../lib/Target/BPF/BPFISelDAGToDAG.cpp: In member function ‘virtual void {anonymous}::BPFDAGToDAGISel::PreprocessISelDAG()’: ../lib/Target/BPF/BPFISelDAGToDAG.cpp:264:26: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] val = *(uint16_t *)new_val; ..... The error is caused by my previous commit (revision 305560). This patch fixed the issue by introducing an union to avoid type casting. Signed-off-by: Yonghong Song <yhs@fb.com> llvm-svn: 305608 |
||
---|---|---|
.. | ||
Disassembler | ||
InstPrinter | ||
MCTargetDesc | ||
TargetInfo | ||
BPF.h | ||
BPF.td | ||
BPFAsmPrinter.cpp | ||
BPFCallingConv.td | ||
BPFFrameLowering.cpp | ||
BPFFrameLowering.h | ||
BPFISelDAGToDAG.cpp | ||
BPFISelLowering.cpp | ||
BPFISelLowering.h | ||
BPFInstrFormats.td | ||
BPFInstrInfo.cpp | ||
BPFInstrInfo.h | ||
BPFInstrInfo.td | ||
BPFMCInstLower.cpp | ||
BPFMCInstLower.h | ||
BPFRegisterInfo.cpp | ||
BPFRegisterInfo.h | ||
BPFRegisterInfo.td | ||
BPFSubtarget.cpp | ||
BPFSubtarget.h | ||
BPFTargetMachine.cpp | ||
BPFTargetMachine.h | ||
CMakeLists.txt | ||
LLVMBuild.txt |