From: Benjamin Kramer Date: Sun, 18 Dec 2011 20:51:31 +0000 (+0000) Subject: Another variadics tweak. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=0581ed792b0e28803b3d584f1b15243e583c6a84;p=oota-llvm.git Another variadics tweak. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146852 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Target/X86/X86ISelLowering.cpp b/lib/Target/X86/X86ISelLowering.cpp index e32916499fe..6b23d6104ff 100644 --- a/lib/Target/X86/X86ISelLowering.cpp +++ b/lib/Target/X86/X86ISelLowering.cpp @@ -14702,11 +14702,10 @@ bool X86TargetLowering::IsDesirableToPromoteOp(SDValue Op, EVT &PVT) const { namespace { // Helper to match a string separated by whitespace. - bool matchAsmImpl(ArrayRef args) { - StringRef s(*args[0]); + bool matchAsmImpl(StringRef s, ArrayRef 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 matchAsm = {}; + const VariadicFunction1 matchAsm={}; } bool X86TargetLowering::ExpandInlineAsm(CallInst *CI) const {