[cfe-dev] Debug Info Generation in Clang.

Chris Lattner clattner at apple.com
Wed Apr 30 22:27:45 PDT 2008


On Apr 30, 2008, at 10:20 PM, Sanjiv.Gupta at microchip.com wrote:

>>> I do not know how to retrieve last two pieces of information here.
>>> DirectoryEntry.getName() gives relative path but not absolute.
>>
>> Ok, use SourceMgr.getFileEntryForLoc(Loc), which returns a
>> FileEntry.
>> A FileEntry has a 'getName()' accessor for the file name, and
>> 'getDir()' which returns a directory entry.  DirectoryEntry
>> has 'getName()' to get the name of the dir.
>>
>
> Chris,
> I meant the same thing when I said "DirectoryEntry.getName()."
> But the problem is that it doesn't give absolute path.
> llvm-gcc keeps absolute path in compile_unit.

I don't think you need an absolute path.  If you really want it, you  
can prefix 'pwd' onto it.

-Chris



More information about the cfe-dev mailing list