Driver: Add two option form of ArgList::getLastArg.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67090 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Driver/ArgList.cpp b/lib/Driver/ArgList.cpp
index 66fcb70..d273516 100644
--- a/lib/Driver/ArgList.cpp
+++ b/lib/Driver/ArgList.cpp
@@ -44,6 +44,20 @@
   return 0;
 }
 
+Arg *ArgList::getLastArg(options::ID Id0, options::ID Id1, bool Claim) const {
+  Arg *Res, *A0 = getLastArg(Id0, false), *A1 = getLastArg(Id1, false);
+  
+  if (A0 && A1)
+    Res = A0->getIndex() > A1->getIndex() ? A0 : A1;
+  else
+    Res = A0 ? A0 : A1;
+
+  if (Claim && Res)
+    Res->claim();
+
+  return Res;
+}
+
 unsigned ArgList::MakeIndex(const char *String0) const {
   unsigned Index = ArgStrings.size();