[llvm] r264516 - Revert "NFC: static_assert instead of comment"

David Blaikie via llvm-commits llvm-commits at lists.llvm.org
Sat Mar 26 11:26:52 PDT 2016


looking at the isPodLike implementation - the fallback is... very
conservative (& I guess it occurs with MSVC) - so it's probably only good
for situations where we have a fallback that's still correct, so not much
use in an assertion

On Sat, Mar 26, 2016 at 11:20 AM, JF Bastien via llvm-commits <
llvm-commits at lists.llvm.org> wrote:

> Author: jfb
> Date: Sat Mar 26 13:20:02 2016
> New Revision: 264516
>
> URL: http://llvm.org/viewvc/llvm-project?rev=264516&view=rev
> Log:
> Revert "NFC: static_assert instead of comment"
>
> This reverts commit fa36fcff16c7d4f78204d6296bf96c3558a4a672.
>
> Causes the following Windows failure:
>
>
> C:\Buildbot\Slave\llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast\llvm.src\lib\CodeGen\MachineInstr.cpp(762):
>   error C2338: must be trivially copyable to memmove
>
> Modified:
>     llvm/trunk/lib/CodeGen/MachineInstr.cpp
>
> Modified: llvm/trunk/lib/CodeGen/MachineInstr.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineInstr.cpp?rev=264516&r1=264515&r2=264516&view=diff
>
> ==============================================================================
> --- llvm/trunk/lib/CodeGen/MachineInstr.cpp (original)
> +++ llvm/trunk/lib/CodeGen/MachineInstr.cpp Sat Mar 26 13:20:02 2016
> @@ -38,7 +38,6 @@
>  #include "llvm/Support/ErrorHandling.h"
>  #include "llvm/Support/MathExtras.h"
>  #include "llvm/Support/raw_ostream.h"
> -#include "llvm/Support/type_traits.h"
>  #include "llvm/Target/TargetInstrInfo.h"
>  #include "llvm/Target/TargetMachine.h"
>  #include "llvm/Target/TargetRegisterInfo.h"
> @@ -758,8 +757,7 @@ static void moveOperands(MachineOperand
>    if (MRI)
>      return MRI->moveOperands(Dst, Src, NumOps);
>
> -  static_assert(isPodLike<MachineOperand>::value,
> -                "must be trivially copyable to memmove");
> +  // MachineOperand is a trivially copyable type so we can just use
> memmove.
>    std::memmove(Dst, Src, NumOps * sizeof(MachineOperand));
>  }
>
>
>
> _______________________________________________
> 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/20160326/18e27d23/attachment.html>


More information about the llvm-commits mailing list