[PATCH] D79570: [MC] Fix PR45805: infinite recursion in assembler

Thomas Preud'homme via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 7 08:29:51 PDT 2020


thopre added a comment.

clang-tidy errors are:

llvm-project/llvm/include/llvm/ADT/SmallPtrSet.h:377:48: error: incomplete definition of type 'llvm::PointerLikeTypeTraits<const llvm::MCFragment *>' [clang-diagnostic-error]

  return makeIterator(find_imp(ConstPtrTraits::getAsVoidPointer(Ptr)));
                                             ^

llvm-project/llvm/include/llvm/MC/MCAsmLayout.h:57:34: note: in instantiation of member function 'llvm::SmallPtrSetImpl<llvm::MCFragment *>::find' requested here

  return LayingOutFragmentsSet.find(F) != LayingOutFragmentsSet.end();
                               ^

llvm-project/llvm/include/llvm/Support/PointerLikeTypeTraits.h:61:28: error: invalid application of 'alignof' to an incomplete type 'llvm::MCFragment' [clang-diagnostic-error]

  detail::ConstantLog2<alignof(T)>::value;
                       ^

llvm-project/llvm/include/llvm/Support/PointerLikeTypeTraits.h:101:46: note: in instantiation of template class 'llvm::PointerLikeTypeTraits<llvm::MCFragment *>' requested here

  static constexpr int NumLowBitsAvailable = NonConst::NumLowBitsAvailable;
                                             ^

llvm-project/llvm/include/llvm/ADT/SmallPtrSet.h:377:34: note: in instantiation of template class 'llvm::PointerLikeTypeTraits<const llvm::MCFragment *>' requested here

  return makeIterator(find_imp(ConstPtrTraits::getAsVoidPointer(Ptr)));
                               ^

llvm-project/llvm/include/llvm/MC/MCAsmLayout.h:57:34: note: in instantiation of member function 'llvm::SmallPtrSetImpl<llvm::MCFragment *>::find' requested here

  return LayingOutFragmentsSet.find(F) != LayingOutFragmentsSet.end();
                               ^

llvm-project/llvm/include/llvm/MC/MCAsmLayout.h:18:7: note: forward declaration of 'llvm::MCFragment'
class MCFragment;

  ^

Does that mean SmallPtrSet cannot be used for a pointer to incomplete type?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D79570/new/

https://reviews.llvm.org/D79570





More information about the llvm-commits mailing list