[llvm-commits] [llvm] r109302 - /llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
Daniel Dunbar
daniel at zuster.org
Mon Jul 26 08:28:59 PDT 2010
Hi Devang,
The backend should not be introducing dependencies on the current
working directory. This kind of stuff needs to be in the frontend.
- Daniel
On Fri, Jul 23, 2010 at 5:53 PM, Devang Patel <dpatel at apple.com> wrote:
> Author: dpatel
> Date: Fri Jul 23 19:53:22 2010
> New Revision: 109302
>
> URL: http://llvm.org/viewvc/llvm-project?rev=109302&view=rev
> Log:
> Use current working directory when Dirname is empty. This only happens when absolute source file path is used on compiler command line.
>
> 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=109302&r1=109301&r2=109302&view=diff
> ==============================================================================
> --- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp (original)
> +++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp Fri Jul 23 19:53:22 2010
> @@ -1753,6 +1753,11 @@
> /// maps as well.
> unsigned DwarfDebug::GetOrCreateSourceID(StringRef DirName, StringRef FileName){
> unsigned DId;
> + if (DirName.empty()) {
> + llvm::sys::Path CWD = llvm::sys::Path::GetCurrentDirectory();
> + DirName = StringRef(CWD.c_str(), CWD.size());
> + }
> +
> StringMap<unsigned>::iterator DI = DirectoryIdMap.find(DirName);
> if (DI != DirectoryIdMap.end()) {
> DId = DI->getValue();
>
>
> _______________________________________________
> 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