Auto upgrade the old EH scheme to use the new one. This is on a trial basis. If
[oota-llvm.git] / lib / AsmParser / LLParser.cpp
index c865afd915b3c65a14a0346df0ac96d695c621bc..4d233cab6fbe93a539b0a209ea0042a64e4c7405 100644 (file)
@@ -120,6 +120,9 @@ bool LLParser::ValidateEndOfModule() {
   for (Module::iterator FI = M->begin(), FE = M->end(); FI != FE; )
     UpgradeCallsToIntrinsic(FI++); // must be post-increment, as we remove
 
+  // Upgrade to new EH scheme. N.B. This will go away in 3.1.
+  UpgradeExceptionHandling(M);
+
   // Check debug info intrinsics.
   CheckDebugInfoIntrinsics(M);
   return false;
@@ -3519,7 +3522,6 @@ int LLParser::ParsePHI(Instruction *&Inst, PerFunctionState &PFS) {
 bool LLParser::ParseLandingPad(Instruction *&Inst, PerFunctionState &PFS) {
   Type *Ty = 0; LocTy TyLoc;
   Value *PersFn; LocTy PersFnLoc;
-  LocTy LPLoc = Lex.getLoc();
 
   if (ParseType(Ty, TyLoc) ||
       ParseToken(lltok::kw_personality, "expected 'personality'") ||