[PATCH] D38479: Make -mgeneral-regs-only more like GCC's

Eli Friedman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue May 21 12:20:29 PDT 2019


efriedma added a comment.

We don't necessarily need to block the clang changes on the backend error reporting actually being implemented, I guess, if the architecture we want is settled.

With this patch, do we pass the general-regs-only attribute to the backend?  If so, would that be the attribute we'd want to check to emit errors from the backend from any "accidental" floating-point operations?



================
Comment at: clang/lib/Sema/SemaExprCXX.cpp:7840
+
+  const auto *StructTy = Ty.getCanonicalType()->getAsStructureType();
+  if (!StructTy)
----------------
Do you really want to enforce isStruct() here?  That's types declared with the keyword "struct".


================
Comment at: clang/lib/Sema/SemaExprCXX.cpp:7857
+
+  return llvm::any_of(StructTy->getDecl()->fields(), [](const FieldDecl *FD) {
+    return typeHasFloatingOrVectorComponent(FD->getType());
----------------
Do we have to be concerned about base classes here?


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

https://reviews.llvm.org/D38479





More information about the cfe-commits mailing list