hvdijk added inline comments.

================
Comment at: llvm/lib/IR/AutoUpgrade.cpp:5233
+      SmallVector<StringRef, 4> Groups;
+      Regex R("(.*-i64:64)(-.*)");
+      if (R.match(Res, &Groups))
----------------
hvdijk wrote:
> nikic wrote:
> > I don't think this will work for the 32-bit targets that don't have 
> > `-i64:64`.
> Oh, you're right, thanks. That was intentional but wrong: there is a test 
> that we do not upgrade data layout strings that do not look sufficiently 
> close to valid, and this was intended to address that. But this also avoids 
> it for data layout strings that do need upgrading. I'll have to figure out 
> how to handle both; will update when I know how.
This should now be fixed. X86 data layout strings always have their components 
in the same order, `mpifnaS`, where some may be omitted. I make use of this by 
looking for any leading `-m`/`-p`/`-i` components and inserting `-i128:128` 
after the last of those.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D86310

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to