[cfe-commits] r51553 - in /cfe/trunk: include/clang/AST/Type.h lib/CodeGen/CGDebugInfo.cpp lib/CodeGen/CGDebugInfo.h lib/CodeGen/CGStmt.cpp lib/CodeGen/CodeGenFunction.cpp
Sanjiv.Gupta at microchip.com
Sanjiv.Gupta at microchip.com
Sun May 25 01:52:13 PDT 2008
> -----Original Message-----
> From: Eli Friedman [mailto:eli.friedman at gmail.com]
> Sent: Sunday, May 25, 2008 11:12 AM
> To: Sanjiv Kumar Gupta - I00171
> Cc: cfe-commits at cs.uiuc.edu
> Subject: Re: [cfe-commits] r51553 - in /cfe/trunk:
> include/clang/AST/Type.h lib/CodeGen/CGDebugInfo.cpp
> lib/CodeGen/CGDebugInfo.h lib/CodeGen/CGStmt.cpp
> lib/CodeGen/CodeGenFunction.cpp
>
> On Sat, May 24, 2008 at 10:15 PM, Sanjiv Gupta
> <sanjiv.gupta at microchip.com> wrote:
> > + default:
> > + {
> > + assert (0 && "Unsupported type");
>
> This assertion isn't very nice; it fires on real code.
>
The work is still in progress. Probably we need to just replace it with
return NULL.
> > /// EmitRegionStart- Constructs the debug code for
> entering a declarative
> > /// region - "llvm.dbg.region.start.".
> > -void CGDebugInfo::EmitFunctionStart(llvm::Function *Fn,
> llvm::IRBuilder &Builder)
> > +void CGDebugInfo::EmitRegionStart(llvm::Function *Fn,
> llvm::IRBuilder &Builder)
> > {
> > - // Get the appropriate compile unit.
> > - llvm::CompileUnitDesc *Unit = getOrCreateCompileUnit(CurLoc);
> > }
>
> Curious: does llc actually support regions? llvm-gcc doesn't
> generate them.
>
I think llc doesn't. But we will need them for our port of llc.
The reason llvm-gcc does not generate is here:
http://llvm.org/bugs/show_bug.cgi?id=1617
> > - CGDebugInfo *DI = CGM.getDebugInfo();
> > - if (DI) {
> > - CompoundStmt* body =
> cast<CompoundStmt>(CurFuncDecl->getBody());
> > - if (body->getRBracLoc().isValid()) {
> > - DI->setLocation(body->getRBracLoc());
> > - }
> > - DI->EmitFunctionEnd(CurFn, Builder);
> > - }
> > -
>
> What happens if the last block gets zapped by SimplfyCFG or
> something similar?
>
These insns (which are part of the BB by then) will also get zapped.
Do you see any problems there? Let me know.
> -Eli
>
More information about the cfe-commits
mailing list