[PATCH] D90322: [RISCV] Remove include of RISCVRegisterInfo.h from RISCVBaseInfo.h

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 30 04:52:22 PDT 2020


RKSimon added a comment.

@craig.topper This is causing a MSVC build failure in RISCVTargetLowering::getRegForInlineAsmConstraint

  if (Subtarget.hasStdExtF() || Subtarget.hasStdExtD()) {
    std::pair<Register, Register> FReg =
        StringSwitch<std::pair<Register, Register>>(Constraint.lower())
            .Cases("{f0}", "{ft0}", {RISCV::F0_F, RISCV::F0_D})
            .Cases("{f1}", "{ft1}", {RISCV::F1_F, RISCV::F1_D})

with this build failure:

  E:\llvm\llvm-project\llvm\include\llvm/Support/type_traits.h(180): error C2338: inconsistent behavior between llvm:: and std:: implementation of is_trivially_copyable
  E:\llvm\llvm-project\llvm\include\llvm/ADT/Optional.h(216): note: see reference to class template instantiation 'llvm::is_trivially_copyable<T>' being compiled
          with
          [
              T=std::pair<llvm::Register,llvm::Register>
          ]
  E:\llvm\llvm-project\llvm\include\llvm/ADT/StringSwitch.h(48): note: see reference to class template instantiation 'llvm::Optional<T>' being compiled
          with
          [
              T=std::pair<llvm::Register,llvm::Register>
          ]
  E:\llvm\llvm-project\llvm\lib\Target\RISCV\RISCVISelLowering.cpp(2725): note: see reference to class template instantiation 'llvm::StringSwitch<std::pair<llvm::Register,llvm::Register>,T>' being compiled
          with
          [
              T=std::pair<llvm::Register,llvm::Register>
          ]
  E:\llvm\llvm-project\llvm\include\llvm/ADT/Optional.h(216): error C2976: 'llvm::optional_detail::OptionalStorage': too few template arguments
  E:\llvm\llvm-project\llvm\include\llvm/ADT/Optional.h(36): note: see declaration of 'llvm::optional_detail::OptionalStorage'


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

https://reviews.llvm.org/D90322



More information about the llvm-commits mailing list