aboutsummaryrefslogtreecommitdiff
path: root/llvm/tools
diff options
context:
space:
mode:
authorFangrui Song <i@maskray.me>2024-06-12 16:42:58 -0700
committerFangrui Song <i@maskray.me>2024-06-12 16:42:58 -0700
commitca91538c9c6f5328f398ac849dcc4230824b007e (patch)
treeb7c1dac8c190c6f5b654ebcd7c4d7f44763d840e /llvm/tools
parente80c59556d2d71cc2d0dcb2bd712c36cc4043025 (diff)
downloadllvm-ca91538c9c6f5328f398ac849dcc4230824b007e.zip
llvm-ca91538c9c6f5328f398ac849dcc4230824b007e.tar.gz
llvm-ca91538c9c6f5328f398ac849dcc4230824b007e.tar.bz2
[MC] Move AllowTemporaryLabels setting to MCContext::MCContext
Also delete `AllowTemporaryLabels = true` from MCContext::reset: when llc supports -save-temp-labels in the next change, this assignment should be removed to support -compile-twice.
Diffstat (limited to 'llvm/tools')
-rw-r--r--llvm/tools/llvm-ml/llvm-ml.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/llvm/tools/llvm-ml/llvm-ml.cpp b/llvm/tools/llvm-ml/llvm-ml.cpp
index f1f39af..24643bd 100644
--- a/llvm/tools/llvm-ml/llvm-ml.cpp
+++ b/llvm/tools/llvm-ml/llvm-ml.cpp
@@ -263,6 +263,7 @@ int llvm_ml_main(int Argc, char **Argv, const llvm::ToolContext &) {
MCTargetOptions MCOptions;
MCOptions.AssemblyLanguage = "masm";
MCOptions.MCFatalWarnings = InputArgs.hasArg(OPT_fatal_warnings);
+ MCOptions.MCSaveTempLabels = InputArgs.hasArg(OPT_save_temp_labels);
Triple TheTriple = GetTriple(ProgName, InputArgs);
std::string Error;
@@ -330,9 +331,6 @@ int llvm_ml_main(int Argc, char **Argv, const llvm::ToolContext &) {
Ctx, /*PIC=*/false, /*LargeCodeModel=*/true));
Ctx.setObjectFileInfo(MOFI.get());
- if (InputArgs.hasArg(OPT_save_temp_labels))
- Ctx.setAllowTemporaryLabels(false);
-
// Set compilation information.
SmallString<128> CWD;
if (!sys::fs::current_path(CWD))