summaryrefslogtreecommitdiffstats
path: root/llvm/tools
diff options
context:
space:
mode:
authorEric Christopher <echristo@gmail.com>2014-05-21 21:05:09 +0000
committerEric Christopher <echristo@gmail.com>2014-05-21 21:05:09 +0000
commit472cee30809daaffc510c138ed50bb46aa3fcdcf (patch)
tree1fd96aa0068007fc462fcf179fc6778bf53f4275 /llvm/tools
parent473ec184a206fbc615c4995a1b58dbdb2ffeffa6 (diff)
downloadbcm5719-llvm-472cee30809daaffc510c138ed50bb46aa3fcdcf.tar.gz
bcm5719-llvm-472cee30809daaffc510c138ed50bb46aa3fcdcf.zip
Move MCOptions that aren't shared between programs into their specific
program and have them initialize the MCOptions struct explicitly. llvm-svn: 209321
Diffstat (limited to 'llvm/tools')
-rw-r--r--llvm/tools/llc/llc.cpp20
-rw-r--r--llvm/tools/llvm-mc/llvm-mc.cpp3
2 files changed, 18 insertions, 5 deletions
diff --git a/llvm/tools/llc/llc.cpp b/llvm/tools/llc/llc.cpp
index 47be4a8b71a..09ff4613b97 100644
--- a/llvm/tools/llc/llc.cpp
+++ b/llvm/tools/llc/llc.cpp
@@ -81,7 +81,18 @@ static cl::opt<bool> NoVerify("disable-verify", cl::Hidden,
static cl::opt<bool> DisableSimplifyLibCalls("disable-simplify-libcalls",
cl::desc("Disable simplify-libcalls"));
-static int compileModule(char**, LLVMContext&);
+static cl::opt<bool> ShowMCEncoding("show-mc-encoding", cl::Hidden,
+ cl::desc("Show encoding in .s output"));
+
+static cl::opt<bool> EnableDwarfDirectory(
+ "enable-dwarf-directory", cl::Hidden,
+ cl::desc("Use .file directives with an explicit directory."));
+
+static cl::opt<bool> AsmVerbose("asm-verbose",
+ cl::desc("Add comments to directives."),
+ cl::init(true));
+
+static int compileModule(char **, LLVMContext &);
// GetFileNameRoot - Helper function to get the basename of a filename.
static inline std::string
@@ -270,10 +281,9 @@ static int compileModule(char **argv, LLVMContext &Context) {
TargetOptions Options = InitTargetOptionsFromCodeGenFlags();
Options.DisableIntegratedAS = NoIntegratedAssembler;
-
- // Override default to generate verbose assembly unless we've seen the flag.
- if (AsmVerbose.getNumOccurrences() == 0)
- Options.MCOptions.AsmVerbose = true;
+ Options.MCOptions.ShowMCEncoding = ShowMCEncoding;
+ Options.MCOptions.MCUseDwarfDirectory = EnableDwarfDirectory;
+ Options.MCOptions.AsmVerbose = AsmVerbose;
std::unique_ptr<TargetMachine> target(
TheTarget->createTargetMachine(TheTriple.getTriple(), MCPU, FeaturesStr,
diff --git a/llvm/tools/llvm-mc/llvm-mc.cpp b/llvm/tools/llvm-mc/llvm-mc.cpp
index 02dcfcd2dd0..84d578b4d00 100644
--- a/llvm/tools/llvm-mc/llvm-mc.cpp
+++ b/llvm/tools/llvm-mc/llvm-mc.cpp
@@ -159,6 +159,9 @@ MainFileName("main-file-name",
static cl::opt<bool> SaveTempLabels("save-temp-labels",
cl::desc("Don't discard temporary labels"));
+static cl::opt<bool> NoExecStack("no-exec-stack",
+ cl::desc("File doesn't need an exec stack"));
+
enum ActionType {
AC_AsLex,
AC_Assemble,
OpenPOWER on IntegriCloud