[llvm-commits] [llvm] r146852 - /llvm/trunk/lib/Target/X86/X86ISelLowering.cpp

Benjamin Kramer benny.kra at googlemail.com
Sun Dec 18 12:51:31 PST 2011


Author: d0k
Date: Sun Dec 18 14:51:31 2011
New Revision: 146852

URL: http://llvm.org/viewvc/llvm-project?rev=146852&view=rev
Log:
Another variadics tweak.

Modified:
    llvm/trunk/lib/Target/X86/X86ISelLowering.cpp

Modified: llvm/trunk/lib/Target/X86/X86ISelLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelLowering.cpp?rev=146852&r1=146851&r2=146852&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86ISelLowering.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86ISelLowering.cpp Sun Dec 18 14:51:31 2011
@@ -14702,11 +14702,10 @@
 
 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 @@
 
     return s.empty();
   }
-  const VariadicFunction<bool, StringRef, matchAsmImpl> matchAsm = {};
+  const VariadicFunction1<bool, StringRef, StringRef, matchAsmImpl> matchAsm={};
 }
 
 bool X86TargetLowering::ExpandInlineAsm(CallInst *CI) const {





More information about the llvm-commits mailing list