danielkiss added inline comments.
================ Comment at: clang/lib/CodeGen/CGCall.cpp:1828 + if (CodeGenOpts.BranchTargetEnforcement) { + FuncAttrs.addAttribute("branch-target-enforcement", "true"); + } ---------------- chill wrote: > danielkiss wrote: > > chill wrote: > > > I would really prefer to not set values "true" or "false" for the > > > attribute: we don't really have tri-state logic there > > > (absent/present-true/present-false), and those values just add some > > > not-very useful string processing. > > > > > the attribute will be "absent" for the runtime emitted function. > How about setting the attribute for LLVM created functions at the time of > creation, just like Clang created functions > get their attribute at the time of creation? > Attributes are not always set in clang as I see: CodeGenModule::CreateRuntimeFunction() -> CodeGenModule::GetOrCreateLLVMFunction CreateRuntimeFunction could be fixed but, the common location for LLVM created function is the llvm::Function::Create() where the CodeGenOpts and LangOpts are no available. Adding target specific code there seems not right for me. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75181/new/ https://reviews.llvm.org/D75181 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits