1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 03:33:20 +01:00
llvm-mirror/lib/MC
Chandler Carruth e6f558ca83 [ptr-traits] Provide a real MCFragment address for the sentinel instead
of casting the integer '4' to such a pointer. There is no reason to
expect '4' to be a portable or reliable pointer of this form. The only
reason this ever worked is because the PointerIntPair that this actually
gets used with has an artificially *low* presumed alignment that allowed
it to work. When the alignment of PointerIntPair is derived from the
actual type's alignment, the asserts start firing on this pointer. I'm
amazed we never managed to do anything that triggered the alignment
sanitizer with it, as this is just flat out UB.

If folks dislike this approach to providing a sentinel fragment address,
there are a myriad of other alternatives, suggestions welcome. But this
one has the distinct advantage of not requiring the friend dance of
ilist's sentinel (which I'll point out is *also* in play for
MCFragment!) and seems to be using a nicely provided facility in
MCFragment to establish just such dummy nodes.

This is part of a series of patches to allow LLVM to check for complete
pointee types when computing its pointer traits. This is absolutely
necessary to get correct (or reproducible) results for things like how
many low bits are guaranteed to be zero.

llvm-svn: 256552
2015-12-29 09:32:18 +00:00
..
MCDisassembler
MCParser Use std::unique_ptr. NFC. 2015-12-16 23:49:14 +00:00
CMakeLists.txt [ptr-traits] Split the MCFragment type hierarchy out of the MCAssembler 2015-12-29 09:06:16 +00:00
ConstantPools.cpp
ELFObjectWriter.cpp Avoid explicit relocation sorting most of the time. 2015-12-17 16:22:06 +00:00
LLVMBuild.txt
MachObjectWriter.cpp
Makefile
MCAsmBackend.cpp
MCAsmInfo.cpp
MCAsmInfoCOFF.cpp
MCAsmInfoDarwin.cpp
MCAsmInfoELF.cpp
MCAsmStreamer.cpp
MCAssembler.cpp [ptr-traits] Split the MCFragment type hierarchy out of the MCAssembler 2015-12-29 09:06:16 +00:00
MCCodeEmitter.cpp
MCCodeGenInfo.cpp
MCContext.cpp Use std::unique_ptr. NFC. 2015-12-16 23:49:14 +00:00
MCDwarf.cpp Accept dwarf version 5 for CIE versions. 2015-12-28 23:02:42 +00:00
MCELFObjectTargetWriter.cpp Always sort by offset first. NFC. 2015-12-17 15:08:24 +00:00
MCELFStreamer.cpp
MCExpr.cpp Recognize strings for Hexagon-specific variant kinds 2015-12-18 18:47:27 +00:00
MCFragment.cpp [ptr-traits] Split the MCFragment type hierarchy out of the MCAssembler 2015-12-29 09:06:16 +00:00
MCInst.cpp Teach MCOperand::print how to print FPImm operands. 2015-12-21 16:47:10 +00:00
MCInstPrinter.cpp
MCInstrAnalysis.cpp
MCInstrDesc.cpp Replace uint16_t with the MCPhysReg typedef in many places. A lot of physical register arrays already use this typedef. 2015-12-05 07:13:35 +00:00
MCLabel.cpp
MCLinkerOptimizationHint.cpp
MCMachObjectTargetWriter.cpp
MCMachOStreamer.cpp MC: Make sure to clear *all* of MCMachOStreamer's state 2015-12-03 00:52:20 +00:00
MCNullStreamer.cpp
MCObjectFileInfo.cpp [MC] Don't use the architecture to govern which object file format to use 2015-12-22 01:39:04 +00:00
MCObjectStreamer.cpp
MCObjectWriter.cpp
MCRegisterInfo.cpp
MCSchedule.cpp
MCSection.cpp
MCSectionCOFF.cpp
MCSectionELF.cpp
MCSectionMachO.cpp
MCStreamer.cpp
MCSubtargetInfo.cpp
MCSymbol.cpp [ptr-traits] Provide a real MCFragment address for the sentinel instead 2015-12-29 09:32:18 +00:00
MCSymbolELF.cpp
MCSymbolizer.cpp
MCTargetOptions.cpp [MC, COFF] Support link /incremental conditionally 2015-12-21 22:09:27 +00:00
MCValue.cpp
MCWin64EH.cpp
MCWinEH.cpp
StringTableBuilder.cpp
SubtargetFeature.cpp
WinCOFFObjectWriter.cpp [MC, COFF] Support link /incremental conditionally 2015-12-21 22:09:27 +00:00
WinCOFFStreamer.cpp
YAML.cpp