[cfe-dev] Debug Info Generation in Clang.

Sanjiv.Gupta at microchip.com Sanjiv.Gupta at microchip.com
Wed Apr 30 04:18:57 PDT 2008


> > 3. SourceManager does not provide APIs like GetDirName (), 
> GetFullPath 
> > (). GetDirName() should be easy to provide as we can get the 
> > DirectoryEntry from Loc and then its name. Should I add this one?
> > GetFullPath () would be little tricky to implement due to path name 
> > variations on different platforms.
> 
> The filename for a file should be returned by 
> 'SourceMgr.getSourceName(Loc);'.  Does this work for you?
> 
> -Chris
> 

%llvm.dbg.compile_unit.type = type {
    uint,   ;; Tag = 17 + LLVMDebugVersion (DW_TAG_compile_unit)
    {  }*,  ;; Compile unit anchor = cast = (%llvm.dbg.anchor.type* %llvm.dbg.compile_units to {  }*)
    uint,   ;; Dwarf language identifier (ex. DW_LANG_C89) 
    sbyte*, ;; Source file name
    sbyte*, ;; Source file directory (includes trailing slash)
    sbyte*  ;; Producer (ex. "4.0.1 LLVM (LLVM research group)")
  }

I do not know how to retrieve last two pieces of information here.
DirectoryEntry.getName() gives relative path but not absolute.
What is the API to retrive version string?

- Sanjiv




More information about the cfe-dev mailing list