diff options
| author | Daniel Dunbar <daniel@zuster.org> | 2010-05-17 21:54:26 +0000 |
|---|---|---|
| committer | Daniel Dunbar <daniel@zuster.org> | 2010-05-17 21:54:26 +0000 |
| commit | c10d5039833a1cc9e1305a73e65b63329c9104ea (patch) | |
| tree | 4bf44a58963ea7ef65b4dea08df69fe73dff1ee1 /include/llvm/MC/MCSectionMachO.h | |
| parent | 87f4f57691e11b5153e7c959ebe4dbeede45f209 (diff) | |
| download | external_llvm-c10d5039833a1cc9e1305a73e65b63329c9104ea.zip external_llvm-c10d5039833a1cc9e1305a73e65b63329c9104ea.tar.gz external_llvm-c10d5039833a1cc9e1305a73e65b63329c9104ea.tar.bz2 | |
MC: Add dyn_cast support to MCSection.
- Of questionable utility, since in general anything which wants to do this should probably be within a target specific hook, which can rely on the sections being of the appropriate type. However, it can be useful for short term hacks.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103980 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/MC/MCSectionMachO.h')
| -rw-r--r-- | include/llvm/MC/MCSectionMachO.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/llvm/MC/MCSectionMachO.h b/include/llvm/MC/MCSectionMachO.h index 1474649..c149926 100644 --- a/include/llvm/MC/MCSectionMachO.h +++ b/include/llvm/MC/MCSectionMachO.h @@ -165,6 +165,11 @@ public: virtual void PrintSwitchToSection(const MCAsmInfo &MAI, raw_ostream &OS) const; + + static bool classof(const MCSection *S) { + return S->getVariant() == SV_MachO; + } + static bool classof(const MCSectionMachO *) { return true; } }; } // end namespace llvm |
