================
@@ -196,6 +198,36 @@ static std::optional<unsigned> getFnAttrParsedInt(const
Function &F,
: std::nullopt;
}
+static SmallVector<unsigned, 3> getFnAttrParsedVector(const Function &F,
+ StringRef Attr) {
+ SmallVector<unsigned, 3> V;
+ auto &Ctx = F.getContext();
+
+ if (F.hasFnAttribute(Attr)) {
+ StringRef S = F.getFnAttribute(Attr).getValueAsString();
+ for (unsigned I = 0; I < 3 && !S.empty(); I++) {
----------------
Artem-B wrote:
Ditto. A comment on the expected input format would be useful.
https://github.com/llvm/llvm-project/pull/127736
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits