diff --git a/llvm/include/llvm/Option/ArgList.h b/llvm/include/llvm/Option/ArgList.h index 313164bc29689..3e80574355b87 100644 --- a/llvm/include/llvm/Option/ArgList.h +++ b/llvm/include/llvm/Option/ArgList.h @@ -253,8 +253,8 @@ class ArgList { } /// Return the last argument matching \p Id, or null. - template - Arg *getLastArg(OptSpecifiers ...Ids) const { + template + LLVM_ATTRIBUTE_NOINLINE Arg *getLastArg(OptSpecifiers... Ids) const { Arg *Res = nullptr; for (Arg *A : filtered(Ids...)) { Res = A; @@ -265,8 +265,8 @@ class ArgList { /// Return the last argument matching \p Id, or null. Do not "claim" the /// option (don't mark it as having been used). - template - Arg *getLastArgNoClaim(OptSpecifiers ...Ids) const { + template + LLVM_ATTRIBUTE_NOINLINE Arg *getLastArgNoClaim(OptSpecifiers... Ids) const { for (Arg *A : filtered_reverse(Ids...)) return A; return nullptr;