about summary refs log tree commit diff
path: root/src/rustllvm/RustWrapper.cpp
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2018-09-23 21:46:59 +0000
committerbors <bors@rust-lang.org>2018-09-23 21:46:59 +0000
commitd4c6f40e7ed20902b1c724f0c207f1d5ed38e35c (patch)
tree724df340966887bb3c33e4f52a7d3a0c94a5735f /src/rustllvm/RustWrapper.cpp
parentf49f6e73a8a2dd6ec9f86df9922ccfa2210d9eda (diff)
parent2c28c4ed69fd99eea1972e7d796435b9bb0e171d (diff)
downloadrust-d4c6f40e7ed20902b1c724f0c207f1d5ed38e35c.tar.gz
rust-d4c6f40e7ed20902b1c724f0c207f1d5ed38e35c.zip
Auto merge of #54485 - arielb1:avoid-ctor-attrs, r=eddyb
avoid loading constructor attributes in AdtDef decoding

During metadata loading, the AdtDefs for every ADT in the universe need
to be loaded (for example, for coherence of builtin traits). For that,
the attributes of the AdtDef need to be loaded too.

The attributes of a struct are duplicated between 2 def ids - the
constructor def-id, and the "type" def id. Loading attributes for both
def-ids, which was done in #53721, slowed the compilation of small
crates by 2-3%. This PR makes sure we only load the attributes for the
"type" def-id, avoiding the slowdown.

r? @eddyb & cc @nnethercote
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions