diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2018-03-09 18:42:25 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2018-03-09 18:42:25 +0000 |
commit | 47b4d6ba196d09900284caff7ed372b3878f28ef (patch) | |
tree | df9dca690710ef6908ad52eba2cc20f94afba41f /llvm/lib/Object/RecordStreamer.cpp | |
parent | 2cd489feb2b99d1a24aab4c8971ae528e0b77d78 (diff) | |
download | bcm5719-llvm-47b4d6ba196d09900284caff7ed372b3878f28ef.tar.gz bcm5719-llvm-47b4d6ba196d09900284caff7ed372b3878f28ef.zip |
Delay creating an alias for @@@.
With this we only create an alias for @@@ once we know if it should
use @ or @@. This avoids last minutes renames and hacks to handle MS
names.
This only handles the ELF writer. LTO still has issues with @@@
aliases.
llvm-svn: 327160
Diffstat (limited to 'llvm/lib/Object/RecordStreamer.cpp')
-rw-r--r-- | llvm/lib/Object/RecordStreamer.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/Object/RecordStreamer.cpp b/llvm/lib/Object/RecordStreamer.cpp index a9e3a46b519..56e9ce73047 100644 --- a/llvm/lib/Object/RecordStreamer.cpp +++ b/llvm/lib/Object/RecordStreamer.cpp @@ -8,6 +8,7 @@ //===----------------------------------------------------------------------===// #include "RecordStreamer.h" +#include "llvm/MC/MCContext.h" #include "llvm/MC/MCSymbol.h" using namespace llvm; @@ -112,8 +113,9 @@ void RecordStreamer::EmitCommonSymbol(MCSymbol *Symbol, uint64_t Size, markDefined(*Symbol); } -void RecordStreamer::emitELFSymverDirective(MCSymbol *Alias, +void RecordStreamer::emitELFSymverDirective(StringRef AliasName, const MCSymbol *Aliasee) { + MCSymbol *Alias = getContext().getOrCreateSymbol(AliasName); const MCExpr *Value = MCSymbolRefExpr::create(Aliasee, getContext()); EmitAssignment(Alias, Value); SymverAliasMap[Aliasee].push_back(Alias); |