summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Object/RecordStreamer.h
diff options
context:
space:
mode:
authorVlad Tsyrklevich <vlad@tsyrklevich.net>2018-04-20 01:36:48 +0000
committerVlad Tsyrklevich <vlad@tsyrklevich.net>2018-04-20 01:36:48 +0000
commit230b256783e567266d9f07787c4fc1c5a667d227 (patch)
treee7f8637719a7bb92038774d6cd52c3cde7ebd178 /llvm/lib/Object/RecordStreamer.h
parenta59aacf52bf36ec8f2dd5b2395107f13d018cb0d (diff)
downloadbcm5719-llvm-230b256783e567266d9f07787c4fc1c5a667d227.tar.gz
bcm5719-llvm-230b256783e567266d9f07787c4fc1c5a667d227.zip
LowerTypeTests: Propagate symver directives
Summary: This change fixes https://crbug.com/834474, a build failure caused by LowerTypeTests not preserving .symver symbol versioning directives for exported functions. Emit symver information to ThinLTO summary data and then propagate symver directives for exported functions to the merged module. Emitting symver information to the summaries increases the size of intermediate build artifacts for a Chromium build by less than 0.2%. Reviewers: pcc Reviewed By: pcc Subscribers: tejohnson, mehdi_amini, eraman, llvm-commits, eugenis, kcc Differential Revision: https://reviews.llvm.org/D45798 llvm-svn: 330387
Diffstat (limited to 'llvm/lib/Object/RecordStreamer.h')
-rw-r--r--llvm/lib/Object/RecordStreamer.h14
1 files changed, 10 insertions, 4 deletions
diff --git a/llvm/lib/Object/RecordStreamer.h b/llvm/lib/Object/RecordStreamer.h
index 60b2d3ec3e8..13eac028a28 100644
--- a/llvm/lib/Object/RecordStreamer.h
+++ b/llvm/lib/Object/RecordStreamer.h
@@ -47,10 +47,6 @@ private:
public:
RecordStreamer(MCContext &Context, const Module &M);
- using const_iterator = StringMap<State>::const_iterator;
-
- const_iterator begin();
- const_iterator end();
void EmitInstruction(const MCInst &Inst, const MCSubtargetInfo &STI,
bool) override;
void EmitLabel(MCSymbol *Symbol, SMLoc Loc = SMLoc()) override;
@@ -63,9 +59,19 @@ public:
/// Record .symver aliases for later processing.
void emitELFSymverDirective(StringRef AliasName,
const MCSymbol *Aliasee) override;
+
// Emit ELF .symver aliases and ensure they have the same binding as the
// defined symbol they alias with.
void flushSymverDirectives();
+
+ // Symbols iterators
+ using const_iterator = StringMap<State>::const_iterator;
+ const_iterator begin();
+ const_iterator end();
+
+ // SymverAliasMap iterators
+ using const_symver_iterator = decltype(SymverAliasMap)::const_iterator;
+ iterator_range<const_symver_iterator> symverAliases();
};
} // end namespace llvm
OpenPOWER on IntegriCloud