[llvm] r209263 - This command line option is only used in one place. Move it there and

Eric Christopher echristo at gmail.com
Tue May 20 17:20:01 PDT 2014


Author: echristo
Date: Tue May 20 19:20:01 2014
New Revision: 209263

URL: http://llvm.org/viewvc/llvm-project?rev=209263&view=rev
Log:
This command line option is only used in one place. Move it there and
rename it to something more descriptive.

Modified:
    llvm/trunk/include/llvm/MC/MCTargetOptionsCommandFlags.h
    llvm/trunk/test/MC/MachO/temp-labels.s
    llvm/trunk/tools/llvm-mc/llvm-mc.cpp

Modified: llvm/trunk/include/llvm/MC/MCTargetOptionsCommandFlags.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/MC/MCTargetOptionsCommandFlags.h?rev=209263&r1=209262&r2=209263&view=diff
==============================================================================
--- llvm/trunk/include/llvm/MC/MCTargetOptionsCommandFlags.h (original)
+++ llvm/trunk/include/llvm/MC/MCTargetOptionsCommandFlags.h Tue May 20 19:20:01 2014
@@ -40,8 +40,6 @@ cl::opt<bool> EnableDwarfDirectory(
 cl::opt<bool> NoExecStack("mc-no-exec-stack",
                           cl::desc("File doesn't need an exec stack"));
 
-cl::opt<bool> SaveTempLabels("L", cl::desc("Don't discard temporary labels"));
-
 cl::opt<bool> ShowMCEncoding("show-mc-encoding", cl::Hidden,
                              cl::desc("Show encoding in .s output"));
 cl::opt<bool> ShowMCInst("show-mc-inst", cl::Hidden,
@@ -57,7 +55,6 @@ static inline MCTargetOptions InitMCTarg
   Options.MCRelaxAll = RelaxAll;
   Options.MCUseDwarfDirectory = EnableDwarfDirectory;
   Options.MCNoExecStack = NoExecStack;
-  Options.MCSaveTempLabels = SaveTempLabels;
   Options.ShowMCEncoding = ShowMCEncoding;
   Options.ShowMCInst = ShowMCInst;
   Options.AsmVerbose = AsmVerbose;

Modified: llvm/trunk/test/MC/MachO/temp-labels.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/MachO/temp-labels.s?rev=209263&r1=209262&r2=209263&view=diff
==============================================================================
--- llvm/trunk/test/MC/MachO/temp-labels.s (original)
+++ llvm/trunk/test/MC/MachO/temp-labels.s Tue May 20 19:20:01 2014
@@ -1,4 +1,4 @@
-// RUN: llvm-mc -triple x86_64-apple-darwin10 %s -filetype=obj -L -o - | macho-dump --dump-section-data | FileCheck %s
+// RUN: llvm-mc -triple x86_64-apple-darwin10 %s -filetype=obj -save-temp-labels -o - | macho-dump --dump-section-data | FileCheck %s
 
 // CHECK:   # Load Command 1
 // CHECK:  (('command', 2)

Modified: llvm/trunk/tools/llvm-mc/llvm-mc.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-mc/llvm-mc.cpp?rev=209263&r1=209262&r2=209263&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-mc/llvm-mc.cpp (original)
+++ llvm/trunk/tools/llvm-mc/llvm-mc.cpp Tue May 20 19:20:01 2014
@@ -156,6 +156,9 @@ static cl::opt<std::string>
 MainFileName("main-file-name",
              cl::desc("Specifies the name we should consider the input file"));
 
+static cl::opt<bool> SaveTempLabels("save-temp-labels",
+                                    cl::desc("Don't discard temporary labels"));
+
 enum ActionType {
   AC_AsLex,
   AC_Assemble,





More information about the llvm-commits mailing list