[llvm-commits] [llvm] r109262 - /llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
Chris Lattner
clattner at apple.com
Fri Jul 23 15:28:38 PDT 2010
On Jul 23, 2010, at 1:36 PM, Devang Patel wrote:
> Author: dpatel
> Date: Fri Jul 23 15:36:13 2010
> New Revision: 109262
>
> URL: http://llvm.org/viewvc/llvm-project?rev=109262&view=rev
> Log:
> IF directory name is empty then try to extract one using absolute file name.
Hey Devang,
Is this code commonly executed? The sys::Path interfaces are very expensive.
-Chris
>
> Modified:
> llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
>
> Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp?rev=109262&r1=109261&r2=109262&view=diff
> ==============================================================================
> --- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp (original)
> +++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp Fri Jul 23 15:36:13 2010
> @@ -1805,6 +1805,11 @@
> DICompileUnit DIUnit(N);
> StringRef FN = DIUnit.getFilename();
> StringRef Dir = DIUnit.getDirectory();
> + if (Dir.empty()) {
> + sys::Path AbsFileDirName(FN);
> + AbsFileDirName.makeAbsolute();
> + Dir = AbsFileDirName.getDirname();
> + }
> unsigned ID = GetOrCreateSourceID(Dir, FN);
>
> DIE *Die = new DIE(dwarf::DW_TAG_compile_unit);
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
More information about the llvm-commits
mailing list