================ @@ -239,7 +240,7 @@ arm::ReadTPMode arm::getReadTPMode(const Driver &D, const ArgList &Args, D.Diag(diag::err_drv_invalid_mtp) << A->getAsString(Args); return ReadTPMode::Invalid; } - return ReadTPMode::Soft; + return ReadTPMode::Auto; ---------------- smithp35 wrote:
Is there a way of rewriting this so that we don't have to return `Auto` from the function? I think the intention is that the logic of handling the mtp option is centralised here. Ideally we should translate `Auto` to either `Soft` or `TPIDRURO`. That would mean it wouldn't need to be handled in setArchNameInTriple This may need some reorganisation to avoid duplication. Although it may just be simple enough to live with it. ``` if (ThreadPointer == ReadTPMode::Auto) return (isHardTPSupported(Triple) ? ReadTPMode::TPIDRURO : ReadTPMode::Soft); ``` At the end we could replace `return ReadTPMode::Auto` with ``` return (isHardTPSupported(Triple) ? ReadTPMode::TPIDRURO : ReadTPMode::Soft); ``` https://github.com/llvm/llvm-project/pull/128728 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits