[flang-commits] [flang] 1cc3b13 - [fir] Get rid of the global option in FIRBuilder
Valentin Clement via flang-commits
flang-commits at lists.llvm.org
Mon Nov 29 08:08:16 PST 2021
Author: Valentin Clement
Date: 2021-11-29T17:08:09+01:00
New Revision: 1cc3b135aa61a31a7f7e488dd720e29bd8907bfc
URL: https://github.com/llvm/llvm-project/commit/1cc3b135aa61a31a7f7e488dd720e29bd8907bfc
DIFF: https://github.com/llvm/llvm-project/commit/1cc3b135aa61a31a7f7e488dd720e29bd8907bfc.diff
LOG: [fir] Get rid of the global option in FIRBuilder
Replace the global option `nameLengthHashSize` with a constexpr
with the same name. The option was not used in fir-dev so switching
to a constexpr is fine.
Reviewed By: kiranchandramohan
Differential Revision: https://reviews.llvm.org/D114630
Added:
Modified:
flang/lib/Optimizer/Builder/FIRBuilder.cpp
Removed:
################################################################################
diff --git a/flang/lib/Optimizer/Builder/FIRBuilder.cpp b/flang/lib/Optimizer/Builder/FIRBuilder.cpp
index 9b0ea245f4a4f..19aa32c4dd294 100644
--- a/flang/lib/Optimizer/Builder/FIRBuilder.cpp
+++ b/flang/lib/Optimizer/Builder/FIRBuilder.cpp
@@ -19,12 +19,7 @@
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/MD5.h"
-static llvm::cl::opt<std::size_t>
- nameLengthHashSize("length-to-hash-string-literal",
- llvm::cl::desc("string literals that exceed this length"
- " will use a hash value as their symbol "
- "name"),
- llvm::cl::init(32));
+static constexpr std::size_t nameLengthHashSize = 32;
mlir::FuncOp fir::FirOpBuilder::createFunction(mlir::Location loc,
mlir::ModuleOp module,
More information about the flang-commits
mailing list