diff options
author | Eric Christopher <echristo@gmail.com> | 2012-12-18 00:31:01 +0000 |
---|---|---|
committer | Eric Christopher <echristo@gmail.com> | 2012-12-18 00:31:01 +0000 |
commit | 6c583141bf6b7a6b5f8125c1037ecbc089813288 (patch) | |
tree | 7e22b30849a5a15a044a3423d0e8df884992ceea /tools/llvm-mc/llvm-mc.cpp | |
parent | 2318ba16ef4414eec4bc43eaf6e0703c40e1c580 (diff) |
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
Diffstat (limited to 'tools/llvm-mc/llvm-mc.cpp')
-rw-r--r-- | tools/llvm-mc/llvm-mc.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/llvm-mc/llvm-mc.cpp b/tools/llvm-mc/llvm-mc.cpp index c12a93d171..930f528668 100644 --- a/tools/llvm-mc/llvm-mc.cpp +++ b/tools/llvm-mc/llvm-mc.cpp @@ -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; |