[llvm] r217832 - [FastISel] Fix a bug in FastISel::CallLoweringInfo.

Juergen Ributzka juergen at apple.com
Mon Sep 15 15:07:44 PDT 2014


Author: ributzka
Date: Mon Sep 15 17:07:44 2014
New Revision: 217832

URL: http://llvm.org/viewvc/llvm-project?rev=217832&view=rev
Log:
[FastISel] Fix a bug in FastISel::CallLoweringInfo.

This fixes a bug in FastISel::CallLoweringInfo, where the number of
arguments was obtained from the argument vector before it had been
initialized.

Test case follows in another commit.

Modified:
    llvm/trunk/include/llvm/CodeGen/FastISel.h

Modified: llvm/trunk/include/llvm/CodeGen/FastISel.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/FastISel.h?rev=217832&r1=217831&r2=217832&view=diff
==============================================================================
--- llvm/trunk/include/llvm/CodeGen/FastISel.h (original)
+++ llvm/trunk/include/llvm/CodeGen/FastISel.h Mon Sep 15 17:07:44 2014
@@ -103,8 +103,8 @@ public:
       RetZExt = Call.paramHasAttr(0, Attribute::ZExt);
 
       CallConv = Call.getCallingConv();
-      NumFixedArgs = FuncTy->getNumParams();
       Args = std::move(ArgsList);
+      NumFixedArgs = FuncTy->getNumParams();
 
       CS = &Call;
 
@@ -127,8 +127,8 @@ public:
       RetZExt = Call.paramHasAttr(0, Attribute::ZExt);
 
       CallConv = Call.getCallingConv();
-      NumFixedArgs = (FixedArgs == ~0U) ? FuncTy->getNumParams() : FixedArgs;
       Args = std::move(ArgsList);
+      NumFixedArgs = (FixedArgs == ~0U) ? FuncTy->getNumParams() : FixedArgs;
 
       CS = &Call;
 





More information about the llvm-commits mailing list