1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 19:12:56 +02:00
llvm-mirror/tools/opt
serge-sans-paille c884b23a0a Replace MCTargetOptionsCommandFlags.inc and CommandFlags.inc by runtime registration
MCTargetOptionsCommandFlags.inc and CommandFlags.inc are headers which contain
cl::opt with static storage.
These headers are meant to be incuded by tools to make it easier to parametrize
codegen/mc.

However, these headers are also included in at least two libraries: lldCommon
and handle-llvm. As a result, when creating DYLIB, clang-cpp holds a reference
to the options, and lldCommon holds another reference. Linking the two in a
single executable, as zig does[0], results in a double registration.

This patch explores an other approach: the .inc files are moved to regular
files, and the registration happens on-demand through static declaration of
options in the constructor of a static object.

[0] https://bugzilla.redhat.com/show_bug.cgi?id=1756977#c5

Differential Revision: https://reviews.llvm.org/D75579
2020-03-17 14:01:30 +01:00
..
AnalysisWrappers.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
BreakpointPrinter.cpp [DebugInfo] Delete TypedDINodeRef 2019-05-07 02:06:37 +00:00
BreakpointPrinter.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
CMakeLists.txt Re-apply "[Examples] Add IRTransformations directory to examples." 2020-01-04 15:47:23 +00:00
GraphPrinters.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
LLVMBuild.txt Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
NewPMDriver.cpp [Coroutines][5/6] Add coroutine passes to pipeline 2020-02-19 00:57:14 -05:00
NewPMDriver.h [Coroutines][5/6] Add coroutine passes to pipeline 2020-02-19 00:57:14 -05:00
opt.cpp Replace MCTargetOptionsCommandFlags.inc and CommandFlags.inc by runtime registration 2020-03-17 14:01:30 +01:00
PassPrinters.cpp Make llvm::StringRef to std::string conversions explicit. 2020-01-28 23:25:25 +01:00
PassPrinters.h [LegacyPassManager] Delete BasicBlockPass/Manager. 2019-10-30 11:40:16 -07:00
PrintSCC.cpp [ADT][NFC] SCCIterator: Change hasLoop() to hasCycle() 2020-03-01 19:17:21 +02:00