summaryrefslogtreecommitdiff
path: root/tools/opt/opt.cpp
diff options
context:
space:
mode:
authorTobias Grosser <tobias@grosser.es>2014-06-13 16:12:08 +0000
committerTobias Grosser <tobias@grosser.es>2014-06-13 16:12:08 +0000
commitdf46288714f402f50a45993650b20e5543e95976 (patch)
tree7635f90dcb8f2ef40fee26748b917b63f826002f /tools/opt/opt.cpp
parentcc0d35a2e811dbc69df266322cc80807fa489359 (diff)
downloadllvm-df46288714f402f50a45993650b20e5543e95976.tar.gz
llvm-df46288714f402f50a45993650b20e5543e95976.tar.bz2
llvm-df46288714f402f50a45993650b20e5543e95976.tar.xz
opt: Initialize asm printers
Without initializing the assembly printers a shared library build of opt is linked with these libraries whereas for a static build these libraries are dead code eliminated. This is unfortunate for plugins in case they want to use them, as they neither can rely on opt to provide this functionality nor can they link the printers in themselves as this breaks with a shared object build of opt. This patch calls InitializeAllAsmPrinters() from opt, which increases the static binary size from 50MB -> 52MB on my system (all backends compiled) and causes no measurable increase in the time needed to run 'make check'. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210914 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/opt/opt.cpp')
-rw-r--r--tools/opt/opt.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/opt/opt.cpp b/tools/opt/opt.cpp
index 6f0fbf66b7..6ba6340040 100644
--- a/tools/opt/opt.cpp
+++ b/tools/opt/opt.cpp
@@ -336,6 +336,7 @@ int main(int argc, char **argv) {
InitializeAllTargets();
InitializeAllTargetMCs();
+ InitializeAllAsmPrinters();
// Initialize passes
PassRegistry &Registry = *PassRegistry::getPassRegistry();