================ @@ -1444,15 +1444,16 @@ void clang::emitBackendOutput(CompilerInstance &CI, CodeGenOptions &CGOpts, // Verify clang's TargetInfo DataLayout against the LLVM TargetMachine's // DataLayout. - if (AsmHelper.TM) { - std::string DLDesc = M->getDataLayout().getStringRepresentation(); - if (DLDesc != TDesc) { + if (AsmHelper.TM) + if (!AsmHelper.TM->isCompatibleDataLayout(M->getDataLayout()) || + !AsmHelper.TM->isCompatibleDataLayout(DataLayout(TDesc))) { + std::string DLDesc = M->getDataLayout().getStringRepresentation(); ---------------- Artem-B wrote:
Can you elaborate on the failures? What exactly the DL strings that failed to match? Where did they come from? I think in general there should be no mismatch between clang and LLVM regarding what they consider to be the right data layout for the module. If they disagree, we need to figure out why and fix that. https://github.com/llvm/llvm-project/pull/154814 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits