[PATCH] D79900: [BitcodeReader] datalayout must be specified before it is queried.

Mehdi AMINI via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 13 19:39:23 PDT 2020


mehdi_amini added inline comments.


================
Comment at: llvm/lib/Bitcode/Reader/BitcodeReader.cpp:3445
+    TheModule->setDataLayout(DL);
+  };
+
----------------
jdoerfert wrote:
> efriedma wrote:
> > jdoerfert wrote:
> > > Should we emit an error here? I mean, can it happen we now silently ignore the DL or triple and the user is baffled what is happening?
> > We print an error if we see MODULE_CODE_DATALAYOUT or MODULE_CODE_TRIPLE after ResolveDataLayout runs.
> I guess we could test that?
That would require crafting manually some invalid bitcode wouldn't it?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D79900





More information about the llvm-commits mailing list