jasonliu added inline comments.
================ Comment at: llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp:1492 + + if (MAI->hasDotExternDirective()) { + MCSymbol *Name = getSymbol(&F); ---------------- This query asked if the target supports .extern. However, .extern is not the only directive that could get emitted here. We could also emit .weak. ================ Comment at: llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp:1498 + } + emitLinkage(&F, Name); + continue; ---------------- I'm surprised we do not enter here for `foo_ext_weak()`. The result of that is we need to do something in `lowerConstant()`, which I would want to avoid if possible. Should we look into why `isDeclarationForLinker()` returns false for `foo_ext_weak()` here? My guess is we returned false for `!F->isMaterializable()`. And I'm not sure if `foo_ext_weak` is materializable is the correct answer here. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76932/new/ https://reviews.llvm.org/D76932 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits