[all-commits] [llvm/llvm-project] 42f588: Use ManagedStatic and lazy initialization of cl::o...
Mehdi Amini via All-commits
all-commits at lists.llvm.org
Thu Jul 15 20:34:58 PDT 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 42f588f39c5ce6f521e3709b8871d1fdd076292f
https://github.com/llvm/llvm-project/commit/42f588f39c5ce6f521e3709b8871d1fdd076292f
Author: Mehdi Amini <joker.eph at gmail.com>
Date: 2021-07-16 (Fri, 16 Jul 2021)
Changed paths:
M clang-tools-extra/clangd/index/dex/dexp/Dexp.cpp
M clang-tools-extra/clangd/indexer/IndexerMain.cpp
M clang/tools/clang-refactor/ClangRefactor.cpp
M llvm/docs/CommandLine.rst
M llvm/include/llvm/Support/ARMAttributeParser.h
M llvm/include/llvm/Support/ARMBuildAttributes.h
M llvm/include/llvm/Support/CommandLine.h
M llvm/include/llvm/Support/RISCVAttributeParser.h
M llvm/include/llvm/Support/RISCVAttributes.h
M llvm/include/llvm/Support/ScopedPrinter.h
M llvm/include/llvm/Support/WithColor.h
M llvm/lib/Support/ARMBuildAttrs.cpp
M llvm/lib/Support/CommandLine.cpp
M llvm/lib/Support/Debug.cpp
M llvm/lib/Support/DebugCounter.cpp
A llvm/lib/Support/DebugOptions.h
M llvm/lib/Support/ELFAttributeParser.cpp
M llvm/lib/Support/GraphWriter.cpp
M llvm/lib/Support/RISCVAttributes.cpp
M llvm/lib/Support/RandomNumberGenerator.cpp
M llvm/lib/Support/Signals.cpp
M llvm/lib/Support/Statistic.cpp
M llvm/lib/Support/TimeProfiler.cpp
M llvm/lib/Support/Timer.cpp
M llvm/lib/Support/TypeSize.cpp
M llvm/lib/Support/Windows/Signals.inc
M llvm/lib/Support/WithColor.cpp
M llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp
M llvm/lib/Target/ARM/MCTargetDesc/ARMELFStreamer.cpp
M llvm/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp
M llvm/tools/llvm-dwarfdump/llvm-dwarfdump.cpp
M llvm/tools/llvm-libtool-darwin/llvm-libtool-darwin.cpp
M llvm/unittests/Support/ARMAttributeParser.cpp
M llvm/unittests/Support/CommandLineTest.cpp
M llvm/unittests/Support/RISCVAttributeParserTest.cpp
Log Message:
-----------
Use ManagedStatic and lazy initialization of cl::opt in libSupport to make it free of global initializer
We can build it with -Werror=global-constructors now. This helps
in situation where libSupport is embedded as a shared library,
potential with dlopen/dlclose scenario, and when command-line
parsing or other facilities may not be involved. Avoiding the
implicit construction of these cl::opt can avoid double-registration
issues and other kind of behavior.
Reviewed By: lattner, jpienaar
Differential Revision: https://reviews.llvm.org/D105959
More information about the All-commits
mailing list