Add support for passing -main-file-name all the way through to

the assembler.

Part of PR14624

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170390 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Eric Christopher
2012-12-18 00:31:01 +00:00
parent 2318ba16ef
commit 6c583141bf
7 changed files with 47 additions and 2 deletions

View File

@ -161,6 +161,10 @@ static cl::opt<std::string>
DebugCompilationDir("fdebug-compilation-dir",
cl::desc("Specifies the debug info's compilation dir"));
static cl::opt<std::string>
MainFileName("main-file-name",
cl::desc("Specifies the name we should consider the input file"));
enum ActionType {
AC_AsLex,
AC_Assemble,
@ -397,6 +401,8 @@ int main(int argc, char **argv) {
Ctx.setDwarfDebugFlags(StringRef(DwarfDebugFlags));
if (!DebugCompilationDir.empty())
Ctx.setCompilationDir(DebugCompilationDir);
if (!MainFileName.empty())
Ctx.setMainFileName(MainFileName);
// Package up features to be passed to target/subtarget
std::string FeaturesStr;