diff options
author | Daniel Dunbar <daniel@zuster.org> | 2011-03-28 22:49:15 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2011-03-28 22:49:15 +0000 |
commit | c6cf43d25853efb4a6765954eda52a45998a47f2 (patch) | |
tree | 154af0ed2d8ee6851d48b983b2170362032061bf /tools | |
parent | cede7c05518b8eea67da7e48d0952cc485764737 (diff) | |
download | external_llvm-c6cf43d25853efb4a6765954eda52a45998a47f2.zip external_llvm-c6cf43d25853efb4a6765954eda52a45998a47f2.tar.gz external_llvm-c6cf43d25853efb4a6765954eda52a45998a47f2.tar.bz2 |
MC: Add support for disabling "temporary label" behavior. Useful for debugging
on Darwin.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128430 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools')
-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 b781866..f76b6ed 100644 --- a/tools/llvm-mc/llvm-mc.cpp +++ b/tools/llvm-mc/llvm-mc.cpp @@ -113,6 +113,10 @@ static cl::opt<bool> NoInitialTextSection("n", cl::desc( "Don't assume assembly file starts in the text section")); +static cl::opt<bool> +SaveTempLabels("L", cl::desc( + "Don't discard temporary labels")); + enum ActionType { AC_AsLex, AC_Assemble, @@ -327,6 +331,8 @@ static int AssembleInput(const char *ProgName) { const TargetAsmInfo *tai = new TargetAsmInfo(*TM); MCContext Ctx(*MAI, tai); + if (SaveTempLabels) + Ctx.setAllowTemporaryLabels(false); OwningPtr<tool_output_file> Out(GetOutputStream()); if (!Out) |