Another variadics tweak.
authorBenjamin Kramer <benny.kra@googlemail.com>
Sun, 18 Dec 2011 20:51:31 +0000 (20:51 +0000)
committerBenjamin Kramer <benny.kra@googlemail.com>
Sun, 18 Dec 2011 20:51:31 +0000 (20:51 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146852 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/X86/X86ISelLowering.cpp

index e32916499feb5e3b299295353145348bc7a82f5f..6b23d6104ffb4bb6f7853b6e3117e1c9e40c5746 100644 (file)
@@ -14702,11 +14702,10 @@ bool X86TargetLowering::IsDesirableToPromoteOp(SDValue Op, EVT &PVT) const {
 
 namespace {
   // Helper to match a string separated by whitespace.
-  bool matchAsmImpl(ArrayRef<const StringRef *> args) {
-    StringRef s(*args[0]);
+  bool matchAsmImpl(StringRef s, ArrayRef<const StringRef *> args) {
     s = s.substr(s.find_first_not_of(" \t")); // Skip leading whitespace.
 
-    for (unsigned i = 1, e = args.size(); i != e; ++i) {
+    for (unsigned i = 0, e = args.size(); i != e; ++i) {
       StringRef piece(*args[i]);
       if (!s.startswith(piece)) // Check if the piece matches.
         return false;
@@ -14721,7 +14720,7 @@ namespace {
 
     return s.empty();
   }
-  const VariadicFunction<bool, StringRef, matchAsmImpl> matchAsm = {};
+  const VariadicFunction1<bool, StringRef, StringRef, matchAsmImpl> matchAsm={};
 }
 
 bool X86TargetLowering::ExpandInlineAsm(CallInst *CI) const {