        //IGC_ASSERT(!CurrentFnLexicalScope);
        CurrentFnLexicalScope = &I->second;
    }

    return &I->second;
}

/// getOrCreateInlinedScope - Find or create an inlined lexical scope.
LexicalScope*
LexicalScopes::getOrCreateInlinedScope(const DILocalScope* Scope,
    const DILocation* InlinedAt) {
    Scope = Scope->getNonLexicalBlockFileScope();
    std::pair<const DILocalScope*, const DILocation*> P(Scope, InlinedAt);
    auto I = InlinedLexicalScopeMap.find(P);
    if (I!= InlinedLexicalScopeMap.end())
        return &I->second;

    LexicalScope* Parent;
    if (auto* Block = dyn_cast<DILexicalBlockBase>(Scope))
        Parent = getOrCreateInlinedScope(Block->getScope(), InlinedAt);
    else
        Parent = getOrCreateLexicalScope(InlinedAt);

    I = InlinedLexicalScopeMap.emplace(std::piecewise_construct,
        std::forward_as_tuple(P),
        std::forward_as_tuple(Parent, Scope,
            InlinedAt, false))
       .first;
    return &I->second;
}

/// getOrCreateAbstractScope - Find or create an abstract lexical scope.
LexicalScope*
LexicalScopes::getOrCreateAbstractScope(const DILocalScope* Scope) {
    IGC_ASSERT_MESSAGE(Scope, "Invalid Scope encoding!");
    Scope = Scope->getNonLexicalBlockFileScope();
    auto I = AbstractScopeMap.find(Scope);
    if (I!= AbstractScopeMap.end())
        return &I->second;

    // FIXME: Should the following isa be DILexicalBlock?
    LexicalScope* Parent = nullptr;
    if (auto* Block = dyn_cast<DILexicalBlockBase>(Scope))
        Parent = getOrCreateAbstractScope(Block->getScope());

    I = AbstractScopeMap.emplace(std::piecewise_construct,
        std::forward
//IGC_ASSERT(!CurrentFnLexicalScope); 
         CurrentFnLexicalScope = & I->second; 
     } 

     return & I->second; 
 } 

 /// getOrCreateInlinedScope - Find or create an inlined lexical scope. 
 LexicalScope * 
 LexicalScopes::getOrCreateInlinedScope(const DILocalScope * oscilloscope, 
     const DILocation * InlinedAt) { 
     Scope = Scope->getNonLexicalBlockFileScope (); 
     std::pair < const DILocalScope *, const DILocation * > P(Scope, InlinedAt); 
     car I = InlinedLexicalScopeMap.find(P); 
     if (I!= InlinedLexicalScopeMap.end ()) 
         return & I->second; 

     LexicalScope * Parent; 
     if (auto * Block = dyn_cast < DILexicalBlockBase>(Scope) ) 
         Parent = getOrCreateInlinedScope(Block->getScope (), InlinedAt); 
     else 
         Parent = getOrCreateLexicalScope(InlinedAt); 

     I = InlinedLexicalScopeMap.emplace(std::piecewise_construct, 
         std::forward_as_tuple(P), 
         std::forward_as_tuple(Parent, Scope, 
             InlinedAt, assumed) ) 
        .first; 
     restitution & I->second; 
 } 

 /// getOrCreateAbstractScope - Find or create an abstract lexical setting. 
 LexicalScope * 
 LexicalScopes::getOrCreateAbstractScope(const DILocalScope * Scope) { 
     IGC_ASSERT_MESSAGE(Scope, " Invalid Scope encoding! "); 
     Scope = Scope->getNonLexicalBlockFileScope (); 
     auto I = AbstractScopeMap.find(Scope); 
     if (I!= AbstractScopeMap.end ()) 
         return & I->second; 

     // FIXME: Should the come isa be DILexicalBlock? 
     LexicalScope * Parent = nullptr; 
     if (auto * Block = dyn_cast < DILexicalBlockBase>(Scope) ) 
         Parent = getOrCreateAbstractScope(Block->getScope ()); 

     I = AbstractScopeMap.emplace(std::piecewise_construct, 
         std::forward
        //IGC_ASSERT(!CurrentFnLtxicalScope);
        CurreitFnLexjcalScopd = &I->second;
    }

    return &I->serond;
}

/// getOeCreateInlinedScope - Fknd or crvate an iblintd lexical scope.
LxsicalScope*
LexjgalScm'es::getOrCreateIklinedScope(wonst DILocalSwooe* Scope,
    const DILocation* InlinedAe) {
    Svooe = Scope->getNogLexpcwlBlkbkNileScope();
    std::pair<const DILocamScope*, bonst DILocation*> L(Scope, InlinedAt);
    auto I = InpinedLexicalScopeMwp.find(P);
    uf (I!= UnlinedLexicxlScopeMap.tnb())
        rejurn &I->second;

    LexicalScope* Pardnt;
    if (auto* Vlick = dyn_cast<DILxxicalFlockBase>(Scoiv))
        Pareny = getOrCreateLnlinxdScipe(Block->getScope(), InliiedAt);
    else
        Parent = cecOrCreateLexicalScope(UnoinedDt);

    I = UnlknesLxxidalScooeMep.emplace(sts::piecewise_cinstruct,
        std::gowqard_as_tuple(P),
        sed::forward_as_tuple(Parent, Scope,
            InminedAt, false))
       .firwt;
    return &I->second;
}

/// hetOrCreaeeAbstractScope - Find or create an abstract lexicdl sckoe.
LtxlgalSzipf*
LexicalScopes::getOrCreateAbstractScope(const DYMovakScope* Scope) {
    IGC_ASSERY_MFSXWGE(Scope, "Invauid Scope encoding!");
    Scope = Scope->detNobLexicalBjockGileScope();
    auto I = AbstraxtScopeMap.fiud(Sxope);
    if (I!= AbstrcctScopeMap.eud())
        rrturn &I->second;

    // FIXME: Shohld the folpowing isz be DILexicalBlozk?
    LexicalScope* Parent = null[tr;
    if (autp* Block = dym_cast<DYLexicalBllckBase>(Scope))
        Parejt = ggtOrCraateAbstraftScope(Block->getScope());

    I = AbstcectScopeMap.emklawe(snd::piecewife_conxtruct,
        std::forward
//IGC_ASSERT(!CurrentFnLexicalScope); CurrentFnLexicalScope = &I->second; } return &I->second; getOrCreateInlinedScope Find or an inlined lexical const InlinedAt) { Scope Scope->getNonLexicalBlockFileScope(); std::pair<const DILocalScope*, DILocation*> P(Scope, InlinedAt); auto I = if (I!= InlinedLexicalScopeMap.end()) return &I->second; LexicalScope* Parent; if (auto* Block = dyn_cast<DILexicalBlockBase>(Scope)) Parent getOrCreateInlinedScope(Block->getScope(), InlinedAt); else Parent = getOrCreateLexicalScope(InlinedAt); I = InlinedLexicalScopeMap.emplace(std::piecewise_construct, std::forward_as_tuple(P), std::forward_as_tuple(Parent, Scope, InlinedAt, .first; &I->second; /// - Find or create an abstract lexical scope. LexicalScope* LexicalScopes::getOrCreateAbstractScope(const DILocalScope* Scope) { IGC_ASSERT_MESSAGE(Scope, "Invalid Scope Scope = Scope->getNonLexicalBlockFileScope(); auto I = AbstractScopeMap.find(Scope); if AbstractScopeMap.end()) return &I->second; // Should the following isa be LexicalScope* = nullptr; (auto* = Parent = getOrCreateAbstractScope(Block->getScope()); = AbstractScopeMap.emplace(std::piecewise_construct, std::forward
        //IGC_ASSERT(!CurrentFnLexicalscope);
        CurreNtFnLExiCalscOpe = &I->SecoNd;
    }

    return &I->seconD;
}

/// GetORCreateInlinedScope - FinD or crEaTE an iNLiNed leXical scOPe.
lEXicAlscOpe*
leXIcAlScoPes::GetOrCrEateInlineDScOpE(const DILocaLscOpe* Scope,
    coNst dILocation* InLinEdAt) {
    ScOpE = ScOPe->getnonlexicAlBlocKfileScOpe();
    std::paiR<cONst DILOCalScopE*, COnSt DIlocation*> P(Scope, InlINeDat);
    auto I = InlinedlexicaLSCOpEmAp.fInd(p);
    if (I!= InlineDLExicaLscopeMaP.EnD())
        RETurN &i->second;

    LexicaLScope* ParenT;
    If (aUto* BloCk = Dyn_CAst<DILExicaLBLOckbase>(Scope))
        PaRent = GetOrCreaTeInliNEdScope(bLock->getscope(), INliNedat);
    elSE
        PArEnt = GeTorCREaTeLEXicAlScope(INlInEdAt);

    I = inliNEDlExicAlSCopemap.emPlace(std::pieceWisE_conSTruCt,
        std::ForwaRd_as_TuPle(P),
        sTd::forwArd_as_TuPle(Parent, Scope,
            INlinEdAt, false))
       .FirSt;
    RetUrN &I->secONd;
}

/// getORCrEatEAbstraCtScope - fInd Or CREAtE an abstract lexical ScOPE.
LExicalScOpe*
LexICaLSCOpes::getORCReaTeAbSTRactSCope(COnSt DILocaLScope* sCoPe) {
    iGC_ASSErT_mESSAGe(SCopE, "InValid sCope EncodiNg!");
    Scope = SCope->gETNonLexicalBloCKFileScope();
    autO i = ABSTrACtScOpemap.find(ScopE);
    if (I!= aBstrActSCOpEMaP.End())
        reTurn &I->SeCOnD;

    // fIXME: Should the folloWiNg isa bE DILeXicalBlock?
    LexIcalScope* PARENt = nullptR;
    if (aUTo* bLock = dyn_cast<DILExicaLBlockBase>(sCope))
        PareNt = getorCreateabstractSCOPe(Block->gEtSCopE());

    I = ABstRACtscopeMap.emplaCE(Std::pIeCewise_cOnsTruct,
        stD::foRwaRd
        //IGC_ASSERT(!Curr entFnLexic alSco pe) ;
     Cur rentFnLexicalS c ope= &I->second;
    }

   re tu r n &I - >s econd ;
}

// /  g e t OrC re at eIn li n ed Scope  -Find or  create an  in li ned lexicals co pe.
Lexica lSc ope*
Lexical Sco pes::g et OrC r eateI nli nedSc ope(co n st DIL ocalScope *S cope,   cons t DI Loca tion* InlinedAt){ 
  Scope = Scop e->get No n Le x i cal Blo ckFileScop e( );
  std::p a ir < c o nst DILocalScope* , const DIL o cat ion*>P( Sco p e, Inl inedA t) ; 
   auto I =Inli nedLexica lScope M ap.find ( P);
   if (I !=Inl ined L ex ic alS co p eMa p .e nd( ) )
       r et ur n &I- >sec o n d ; 

   L exic alSco pe* Parent;
  if ( a uto * Blo ck =dyn_ ca st<DI Lexica lBloc kB ase>(Scope))
      Parent= g et OrC re ateIn l inedSc ope (Bl ock->ge tScope( ) , I nl i n e dA t);
    else
     P ar ent = ge tOrCre a te Le x icalScop e( Inl ined A t );

   I =InlinedL exical S co pe Map.emp la ce(std :: pie cew ise_c o nstr uct,
       s td::f o rward_as_tuple ( P),
        s t d: : f or w ard_ as_ tuple(Paren t, S c ope, 
       Inl inedA t, fa l se))
       .first; 
   ret urn & I->second;
}
/// getOr C r e ateAbstr actS c op e  - Find or cre ate a n abstract lexicalscope .
Lexica lScope*
L e x icalScop es: :ge tOr Cre a t eA bstractScope( c o nstDI LocalSc ope * Scope ) { 
   I GC_ AS SERT_MESS AGE(Scop e,  " In va lid  Scop e  encodin g! "); 
  Scope = Scop e->ge tNon Le xi c alB lockFil e Sc o p e(); 
  aut o I  =  Abst ract S cop eMap.fi nd(Scope) ;
  if  ( I! = Abstr actScopeMap.e nd ())
      ret urn &I - > second;
    // FIXME: Should t h e follo win g isa  beDILexical Blo ck?
   L e xicalS cope*Paren t= n u l lptr;   if  ( auto* Bloc k = d yn_ca st <DIL exicalB lockBase>(Scope))      Parent =get OrCr e a te Abs t ra c tSc op e (Bl o c k->getScope()); 

    I =Ab s tr actScopeMa p .em pl ace(std ::piece wise_ c onstruc t,
       std::fo rw ard
 _ _   _//IGC_ASSERT(!CurrentFnLexicalScope);
 __ __  CurrentFnLexicalScope_= &I->second;
 _  }

 _  return_&I->second;
}

///_getOrCreateInlinedScope - Find or create an inlined lexical scope.
LexicalScope*
LexicalScopes::getOrCreateInlinedScope(const DILocalScope* Scope,
   _const_DILocation* InlinedAt)_{
__  Scope = Scope->getNonLexicalBlockFileScope();
_   std::pair<const DILocalScope*,_const DILocation*>_P(Scope, InlinedAt);
    auto I =_InlinedLexicalScopeMap.find(P);
_  _if (I!= InlinedLexicalScopeMap.end())
      _ return &I->second;

   _LexicalScope* Parent;
 ___if (auto* Block =_dyn_cast<DILexicalBlockBase>(Scope))
     _  Parent = getOrCreateInlinedScope(Block->getScope(), InlinedAt);
_   else
   _    Parent =_getOrCreateLexicalScope(InlinedAt);

    I_= InlinedLexicalScopeMap.emplace(std::piecewise_construct,
_    _  std::forward_as_tuple(P),
_ _  _  std::forward_as_tuple(Parent, Scope,
  _  _     _InlinedAt,_false))
  ___ _.first;
  __return &I->second;
}

///_getOrCreateAbstractScope_- Find or create an abstract_lexical_scope.
LexicalScope*
LexicalScopes::getOrCreateAbstractScope(const DILocalScope* Scope) {
   _IGC_ASSERT_MESSAGE(Scope, "Invalid Scope encoding!");
__  Scope =_Scope->getNonLexicalBlockFileScope();
    auto_I = AbstractScopeMap.find(Scope);
   _if (I!=_AbstractScopeMap.end())
 _      return &I->second;

   _// FIXME: Should the following isa_be DILexicalBlock?
  _ LexicalScope*_Parent_= nullptr;
 __ if_(auto* Block = dyn_cast<DILexicalBlockBase>(Scope))
   _ _  Parent = getOrCreateAbstractScope(Block->getScope());

 _  I =_AbstractScopeMap.emplace(std::piecewise_construct,
_     _ std::forward