1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-25 04:02:41 +01:00
llvm-mirror/include/llvm/MC
Serge Guelton b20ef5f960 Replace llvm::isPodLike<...> by llvm::is_trivially_copyable<...>
As noted in https://bugs.llvm.org/show_bug.cgi?id=36651, the specialization for
isPodLike<std::pair<...>> did not match the expectation of
std::is_trivially_copyable which makes the memcpy optimization invalid.

This patch renames the llvm::isPodLike trait into llvm::is_trivially_copyable.
Unfortunately std::is_trivially_copyable is not portable across compiler / STL
versions. So a portable version is provided too.

Note that the following specialization were invalid:

    std::pair<T0, T1>
    llvm::Optional<T>

Tests have been added to assert that former specialization are respected by the
standard usage of llvm::is_trivially_copyable, and that when a decent version
of std::is_trivially_copyable is available, llvm::is_trivially_copyable is
compared to std::is_trivially_copyable.

As of this patch, llvm::Optional is no longer considered trivially copyable,
even if T is. This is to be fixed in a later patch, as it has impact on a
long-running bug (see r347004)

Note that GCC warns about this UB, but this got silented by https://reviews.llvm.org/D50296.

Differential Revision: https://reviews.llvm.org/D54472

llvm-svn: 351701
2019-01-20 21:19:56 +00:00
..
MCDisassembler Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MCParser Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
ConstantPools.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
LaneBitmask.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MachineLocation.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MCAsmBackend.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MCAsmInfo.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MCAsmInfoCOFF.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MCAsmInfoDarwin.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MCAsmInfoELF.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MCAsmInfoWasm.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MCAsmLayout.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MCAsmMacro.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MCAssembler.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MCCodeEmitter.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MCCodePadder.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MCCodeView.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MCContext.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MCDirectives.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MCDwarf.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MCELFObjectWriter.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MCELFStreamer.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MCExpr.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MCFixedLenDisassembler.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MCFixup.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MCFixupKindInfo.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MCFragment.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MCInst.h Replace llvm::isPodLike<...> by llvm::is_trivially_copyable<...> 2019-01-20 21:19:56 +00:00
MCInstBuilder.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MCInstPrinter.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MCInstrAnalysis.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MCInstrDesc.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MCInstrInfo.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MCInstrItineraries.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MCLabel.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MCLinkerOptimizationHint.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MCMachObjectWriter.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MCObjectFileInfo.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MCObjectStreamer.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MCObjectWriter.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MCRegisterInfo.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MCSchedule.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MCSection.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MCSectionCOFF.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MCSectionELF.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MCSectionMachO.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MCSectionWasm.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MCStreamer.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MCSubtargetInfo.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MCSymbol.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MCSymbolCOFF.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MCSymbolELF.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MCSymbolMachO.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MCSymbolWasm.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MCTargetOptions.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MCTargetOptionsCommandFlags.inc Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MCValue.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MCWasmObjectWriter.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MCWasmStreamer.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MCWin64EH.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MCWinCOFFObjectWriter.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MCWinCOFFStreamer.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MCWinEH.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
SectionKind.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
StringTableBuilder.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
SubtargetFeature.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00