fix a major regression from my patch this afternoon
authorChris Lattner <sabre@nondot.org>
Wed, 14 Sep 2005 06:06:45 +0000 (06:06 +0000)
committerChris Lattner <sabre@nondot.org>
Wed, 14 Sep 2005 06:06:45 +0000 (06:06 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23347 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/X86/X86ISelPattern.cpp

index 536f2645a468686e5eb9b0438857994d5b1c0ab8..f3ce7a73860362e06391cd5eccd079e157acee79 100644 (file)
@@ -1157,6 +1157,7 @@ static void EmitSpecialCodeForMain(MachineBasicBlock *BB,
 
 void ISel::EmitFunctionEntryCode(Function &Fn, MachineFunction &MF) {
   // If this is main, emit special code for main.
+  MachineBasicBlock *BB = MF.begin();
   if (Fn.hasExternalLinkage() && Fn.getName() == "main")
     EmitSpecialCodeForMain(BB, MF.getFrameInfo());
 }