Make debug info work when using -save-temps.
authorDaniel Dunbar <daniel@zuster.org>
Wed, 8 Apr 2009 05:11:16 +0000 (05:11 +0000)
committerDaniel Dunbar <daniel@zuster.org>
Wed, 8 Apr 2009 05:11:16 +0000 (05:11 +0000)
commitc9abc043af88f90d177a5bd147f627b78ca49fde
treed767381f7166211a708c2f4f71f144ac2b7717d2
parent797a2479dac447138a6276eb5e9fb6ad4f61fd92
Make debug info work when using -save-temps.
 - This is pretty ugly, but the most obvious solution. Chime in if you
   have a nicer one.

 - The problem is that with -save-temps, clang-cc has no idea what the
   name of the original input file is. However, the user expects to be
   able to set breakpoints based on the input file name.

 - We support this by providing a new option -main-file-name (similar
   to -dumpbase used by gcc) which allows the driver to pass in the
   original file name.

 - <rdar://problem/6753383> building with clang using --save-temps
   gets the compile unit name from the .i file...

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68595 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Basic/LangOptions.h
lib/CodeGen/CGDebugInfo.cpp
lib/Driver/Tools.cpp
tools/clang-cc/clang-cc.cpp