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 | 906da23229af3e8f11694f6feb125682f02c93dc (patch) | |
tree | 3605e50651eb04af950ae0a094aae207fd330a98 /llvm/tools/llvm-mc/llvm-mc.cpp | |
parent | a7c3273e85790b664f7b5d048b12e8c3cb0c3dc4 (diff) | |
download | bcm5719-llvm-906da23229af3e8f11694f6feb125682f02c93dc.tar.gz bcm5719-llvm-906da23229af3e8f11694f6feb125682f02c93dc.zip |
Add support for passing -main-file-name all the way through to
the assembler.
Part of PR14624
llvm-svn: 170390
Diffstat (limited to 'llvm/tools/llvm-mc/llvm-mc.cpp')
-rw-r--r-- | llvm/tools/llvm-mc/llvm-mc.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/tools/llvm-mc/llvm-mc.cpp b/llvm/tools/llvm-mc/llvm-mc.cpp index c12a93d1716..930f528668f 100644 --- a/llvm/tools/llvm-mc/llvm-mc.cpp +++ b/llvm/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; |