diff options
author | Nick Kledzik <kledzik@apple.com> | 2014-07-23 00:51:37 +0000 |
---|---|---|
committer | Nick Kledzik <kledzik@apple.com> | 2014-07-23 00:51:37 +0000 |
commit | 7e9808f7de23e0136d3c8b5dea7d31d745933454 (patch) | |
tree | 3ad794c33f451f4ee1da62aa02cfc99d979c5ec5 /lld/lib/ReaderWriter/MachO/File.h | |
parent | 16d99f93a8cfaab97fc8a60a53a95f72708f4f5d (diff) | |
download | bcm5719-llvm-7e9808f7de23e0136d3c8b5dea7d31d745933454.tar.gz bcm5719-llvm-7e9808f7de23e0136d3c8b5dea7d31d745933454.zip |
[mach-o] add initial support for modes in arm code.
This patch just supports marking ranges that are thumb code (vs arm code).
Future patches will mark data and jump table ranges. The ranges are encoded
as References with offsetInAtom being the start of the range and the target
being the same atom.
llvm-svn: 213712
Diffstat (limited to 'lld/lib/ReaderWriter/MachO/File.h')
-rw-r--r-- | lld/lib/ReaderWriter/MachO/File.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lld/lib/ReaderWriter/MachO/File.h b/lld/lib/ReaderWriter/MachO/File.h index dffc14952b6..df9be71c18c 100644 --- a/lld/lib/ReaderWriter/MachO/File.h +++ b/lld/lib/ReaderWriter/MachO/File.h @@ -139,6 +139,16 @@ public: return pos->second; } + typedef std::function<void (MachODefinedAtom* atom)> DefinedAtomVisitor; + + void eachDefinedAtom(DefinedAtomVisitor vistor) { + for (auto §AndAtoms : _sectionAtoms) { + for (auto &offAndAtom : sectAndAtoms.second) { + vistor(offAndAtom.atom); + } + } + } + llvm::BumpPtrAllocator &allocator() { return _allocator; } private: |