================ @@ -128,6 +128,15 @@ bool findOneNVVMAnnotation(const GlobalValue *gv, const std::string &prop, return true; } +static std::optional<unsigned> +findOneNVVMAnnotation(const GlobalValue &GV, const std::string &PropName) { + unsigned RetVal; + bool Found = findOneNVVMAnnotation(&GV, PropName, RetVal); + if (Found) + return RetVal; ---------------- Artem-B wrote:
Could be collapsed into ``` if (findOneNVVMAnnotation(&GV, PropName, RetVal)) return RetVal; ``` https://github.com/llvm/llvm-project/pull/94422 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits