summaryrefslogtreecommitdiff
path: root/lib/LTO
diff options
context:
space:
mode:
authorTom Roeder <tmroeder@google.com>2014-03-31 16:59:13 +0000
committerTom Roeder <tmroeder@google.com>2014-03-31 16:59:13 +0000
commit5ca1ddf66811ea15eb730a88bda7e97741b0261a (patch)
treeabba6d0b01971671812b3b87d8e56182e71a8fde /lib/LTO
parentbd5fac585ed0789655a4133f41e12654c99766b9 (diff)
downloadllvm-5ca1ddf66811ea15eb730a88bda7e97741b0261a.tar.gz
llvm-5ca1ddf66811ea15eb730a88bda7e97741b0261a.tar.bz2
llvm-5ca1ddf66811ea15eb730a88bda7e97741b0261a.tar.xz
This patch fixes LTO's RecordStreamer so that it records symbols in the MCExpr
part of an asm .symver directive as being used. This prevents referenced functions from being internalized and deleted. Without the patch to LTOModule.cpp, the test case will produce the error: LLVM ERROR: A @@ version cannot be undefined. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205221 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/LTO')
-rw-r--r--lib/LTO/LTOModule.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/LTO/LTOModule.cpp b/lib/LTO/LTOModule.cpp
index cffc9aaf7e..567da04f90 100644
--- a/lib/LTO/LTOModule.cpp
+++ b/lib/LTO/LTOModule.cpp
@@ -660,6 +660,7 @@ namespace {
void EmitAssignment(MCSymbol *Symbol, const MCExpr *Value) override {
// FIXME: should we handle aliases?
markDefined(*Symbol);
+ AddValueSymbols(Value);
}
bool EmitSymbolAttribute(MCSymbol *Symbol,
MCSymbolAttr Attribute) override {