Fix '-main-file-name <name>' so that it is used for the ModuleID.
authorRobert Lytton <robert@xmos.com>
Fri, 23 May 2014 07:34:08 +0000 (07:34 +0000)
committerRobert Lytton <robert@xmos.com>
Fri, 23 May 2014 07:34:08 +0000 (07:34 +0000)
commit57dd5cf441351531d26d7255a778430904c5288d
treecadc8e8db6663f87366c0c32030e1029f41cbd7d
parent683b7e087475ffb47312a48a75f5f0dc8e2ec560
Fix '-main-file-name <name>' so that it is used for the ModuleID.

Summary:
Previously, you could not specify the original file name when passing a preprocessed file into the compiler
Now you can use 'clang -Xclang -main-file-name -Xclang <original file name> ...'
Or 'clang -cc1 -main-file-name <original file name> ...'

llvm-svn: 209503
clang/lib/CodeGen/CodeGenAction.cpp
clang/test/CodeGen/main-file-name.c [new file with mode: 0644]