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
This commit is contained in:
Daniel Dunbar
2011-03-28 22:49:15 +00:00
parent cede7c0551
commit c6cf43d258
4 changed files with 52 additions and 3 deletions

View File

@ -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)