aboutsummaryrefslogtreecommitdiffstats
path: root/lib/MC/MCMachOStreamer.cpp
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2010-12-29 14:14:06 +0000
committerDaniel Dunbar <daniel@zuster.org>2010-12-29 14:14:06 +0000
commitb2624eda5ad0ead99ec5ab7ead47b586c96d1109 (patch)
treea290f67cbb44544dff0284c119a70db091d5be42 /lib/MC/MCMachOStreamer.cpp
parentdd061b317711d4165e01f30e8be4798c832819b8 (diff)
downloadexternal_llvm-b2624eda5ad0ead99ec5ab7ead47b586c96d1109.zip
external_llvm-b2624eda5ad0ead99ec5ab7ead47b586c96d1109.tar.gz
external_llvm-b2624eda5ad0ead99ec5ab7ead47b586c96d1109.tar.bz2
MC/Mach-O/Thumb: Set the thumb bit in the symbol table.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122630 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/MC/MCMachOStreamer.cpp')
-rw-r--r--lib/MC/MCMachOStreamer.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/MC/MCMachOStreamer.cpp b/lib/MC/MCMachOStreamer.cpp
index 0e21f4d..7e1cda2 100644
--- a/lib/MC/MCMachOStreamer.cpp
+++ b/lib/MC/MCMachOStreamer.cpp
@@ -140,12 +140,16 @@ void MCMachOStreamer::EmitAssemblerFlag(MCAssemblerFlag Flag) {
}
}
-void MCMachOStreamer::EmitThumbFunc(MCSymbol *Func) {
+void MCMachOStreamer::EmitThumbFunc(MCSymbol *Symbol) {
// FIXME: Flag the function ISA as thumb with DW_AT_APPLE_isa.
// Remember that the function is a thumb function. Fixup and relocation
// values will need adjusted.
- getAssembler().setIsThumbFunc(Func);
+ getAssembler().setIsThumbFunc(Symbol);
+
+ // Mark the thumb bit on the symbol.
+ MCSymbolData &SD = getAssembler().getOrCreateSymbolData(*Symbol);
+ SD.setFlags(SD.getFlags() | SF_ThumbFunc);
}
void MCMachOStreamer::EmitAssignment(MCSymbol *Symbol, const MCExpr *Value) {