Fix a bug that prevented compilation of multiple functions
authorChris Lattner <sabre@nondot.org>
Thu, 21 Nov 2002 17:26:58 +0000 (17:26 +0000)
committerChris Lattner <sabre@nondot.org>
Thu, 21 Nov 2002 17:26:58 +0000 (17:26 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4809 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/X86/InstSelectSimple.cpp
lib/Target/X86/X86ISelSimple.cpp

index c3da2fe914edbb05d264e48a491e6e29c81ebd92..7f163b8db2cda6006e2530a16a0edc538fb8049e 100644 (file)
@@ -44,6 +44,7 @@ namespace {
       F = &MachineFunction::construct(&Fn, TM);
       visit(Fn);
       RegMap.clear();
+      CurReg = MRegisterInfo::FirstVirtualRegister;
       F = 0;
       return false;  // We never modify the LLVM itself.
     }
index c3da2fe914edbb05d264e48a491e6e29c81ebd92..7f163b8db2cda6006e2530a16a0edc538fb8049e 100644 (file)
@@ -44,6 +44,7 @@ namespace {
       F = &MachineFunction::construct(&Fn, TM);
       visit(Fn);
       RegMap.clear();
+      CurReg = MRegisterInfo::FirstVirtualRegister;
       F = 0;
       return false;  // We never modify the LLVM itself.
     }