aboutsummaryrefslogtreecommitdiff
path: root/tools/llvm-mc/llvm-mc.cpp
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2012-12-20 22:31:43 +0000
committerChandler Carruth <chandlerc@gmail.com>2012-12-20 22:31:43 +0000
commit41d2daa9344a4c4e8bb88dba51cd087c0648b695 (patch)
tree7e22b30849a5a15a044a3423d0e8df884992ceea /tools/llvm-mc/llvm-mc.cpp
parent571f3e0cc9e767d1e3dcfd3e7e0b3d11ec4f7884 (diff)
parent6c583141bf6b7a6b5f8125c1037ecbc089813288 (diff)
Updating branches/google/testing to 170392
git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/google/testing@170779 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/llvm-mc/llvm-mc.cpp')
-rw-r--r--tools/llvm-mc/llvm-mc.cpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/tools/llvm-mc/llvm-mc.cpp b/tools/llvm-mc/llvm-mc.cpp
index 15cacfabeb..930f528668 100644
--- a/tools/llvm-mc/llvm-mc.cpp
+++ b/tools/llvm-mc/llvm-mc.cpp
@@ -157,6 +157,14 @@ static cl::opt<bool>
GenDwarfForAssembly("g", cl::desc("Generate dwarf debugging info for assembly "
"source files"));
+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,
@@ -389,8 +397,12 @@ int main(int argc, char **argv) {
Ctx.setAllowTemporaryLabels(false);
Ctx.setGenDwarfForAssembly(GenDwarfForAssembly);
- if (!DwarfDebugFlags.empty())
+ if (!DwarfDebugFlags.empty())
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;