From 1cc3b135aa61a31a7f7e488dd720e29bd8907bfc Mon Sep 17 00:00:00 2001 From: Valentin Clement Date: Mon, 29 Nov 2021 17:07:49 +0100 Subject: [PATCH] [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 --- flang/lib/Optimizer/Builder/FIRBuilder.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/flang/lib/Optimizer/Builder/FIRBuilder.cpp b/flang/lib/Optimizer/Builder/FIRBuilder.cpp index 9b0ea24..19aa32c 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 - 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, -- 2.7.4