diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2014-04-29 12:46:50 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2014-04-29 12:46:50 +0000 |
commit | b60c829a2a83fd21f0c4c78a956d9e6a7a21918f (patch) | |
tree | 2a071ed6ee2304e7f5a7cfbf539b2d6caa80fb13 /llvm/lib/MC/MachObjectWriter.cpp | |
parent | 6468f5d3094708b2290ebddc28a2ba3fa1f25f6f (diff) | |
download | bcm5719-llvm-b60c829a2a83fd21f0c4c78a956d9e6a7a21918f.tar.gz bcm5719-llvm-b60c829a2a83fd21f0c4c78a956d9e6a7a21918f.zip |
Centralize the handling of the thumb bit.
This patch centralizes the handling of the thumb bit around
MCStreamer::isThumbFunc and makes isThumbFunc handle aliases.
This fixes a corner case, but the main advantage is having just one
way to check if a MCSymbol is thumb or not. This should still be
refactored to be ARM only, but at least now it is just one predicate
that has to be refactored instead of 3 (isThumbFunc,
ELF_Other_ThumbFunc, and SF_ThumbFunc).
llvm-svn: 207522
Diffstat (limited to 'llvm/lib/MC/MachObjectWriter.cpp')
-rw-r--r-- | llvm/lib/MC/MachObjectWriter.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/MC/MachObjectWriter.cpp b/llvm/lib/MC/MachObjectWriter.cpp index b4e53be7d52..cbaf0b87d6e 100644 --- a/llvm/lib/MC/MachObjectWriter.cpp +++ b/llvm/lib/MC/MachObjectWriter.cpp @@ -351,6 +351,9 @@ void MachObjectWriter::WriteNlist(MachSymbolData &MSD, } } + if (Layout.getAssembler().isThumbFunc(&Symbol)) + Flags |= SF_ThumbFunc; + // struct nlist (12 bytes) Write32(MSD.StringIndex); |