[lld] r268182 - Try to fix MSVC build.

Peter Collingbourne via llvm-commits llvm-commits at lists.llvm.org
Sat Apr 30 22:12:13 PDT 2016


Author: pcc
Date: Sun May  1 00:12:13 2016
New Revision: 268182

URL: http://llvm.org/viewvc/llvm-project?rev=268182&view=rev
Log:
Try to fix MSVC build.

Modified:
    lld/trunk/ELF/Symbols.h

Modified: lld/trunk/ELF/Symbols.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Symbols.h?rev=268182&r1=268181&r2=268182&view=diff
==============================================================================
--- lld/trunk/ELF/Symbols.h (original)
+++ lld/trunk/ELF/Symbols.h Sun May  1 00:12:13 2016
@@ -432,7 +432,8 @@ struct Symbol {
 template <typename T, typename... ArgT>
 void replaceBody(Symbol *S, ArgT &&... Arg) {
   static_assert(sizeof(T) <= sizeof(S->Body), "Body too small");
-  static_assert(alignof(T) <= alignof(decltype(S->Body)),
+  static_assert(llvm::AlignOf<T>::Alignment <=
+                    llvm::AlignOf<decltype(S->Body)>::Alignment,
                 "Body not aligned enough");
   static_assert(static_cast<SymbolBody *>(static_cast<T *>(nullptr)) == nullptr,
                 "Not a SymbolBody");




More information about the llvm-commits mailing list