diff options
author | David Majnemer <david.majnemer@gmail.com> | 2014-03-07 18:49:54 +0000 |
---|---|---|
committer | David Majnemer <david.majnemer@gmail.com> | 2014-03-07 18:49:54 +0000 |
commit | cd481d3845a66619968efc06b3513d09533158a0 (patch) | |
tree | 0e52d17b79e19116f1c8b9568b627697fd7fa450 /llvm | |
parent | 4bd13b7515af330fc1111fdac49953c52cb5ab6e (diff) | |
download | bcm5719-llvm-cd481d3845a66619968efc06b3513d09533158a0.tar.gz bcm5719-llvm-cd481d3845a66619968efc06b3513d09533158a0.zip |
MC: Use MachO::SectionType for MCSectionMachO::getType's return type
This is a straightfoward replacement, it makes debugging a little
easier.
This has no functional impact.
llvm-svn: 203264
Diffstat (limited to 'llvm')
-rw-r--r-- | llvm/include/llvm/MC/MCSectionMachO.h | 5 | ||||
-rw-r--r-- | llvm/lib/MC/MCParser/DarwinAsmParser.cpp | 2 | ||||
-rw-r--r-- | llvm/lib/MC/MCSectionMachO.cpp | 2 |
3 files changed, 6 insertions, 3 deletions
diff --git a/llvm/include/llvm/MC/MCSectionMachO.h b/llvm/include/llvm/MC/MCSectionMachO.h index 444a84836b6..a5a2089a297 100644 --- a/llvm/include/llvm/MC/MCSectionMachO.h +++ b/llvm/include/llvm/MC/MCSectionMachO.h @@ -64,7 +64,10 @@ public: unsigned getTypeAndAttributes() const { return TypeAndAttributes; } unsigned getStubSize() const { return Reserved2; } - unsigned getType() const { return TypeAndAttributes & MachO::SECTION_TYPE; } + MachO::SectionType getType() const { + return static_cast<MachO::SectionType>(TypeAndAttributes & + MachO::SECTION_TYPE); + } bool hasAttribute(unsigned Value) const { return (TypeAndAttributes & Value) != 0; } diff --git a/llvm/lib/MC/MCParser/DarwinAsmParser.cpp b/llvm/lib/MC/MCParser/DarwinAsmParser.cpp index d19d2ef1e11..10fca7043ef 100644 --- a/llvm/lib/MC/MCParser/DarwinAsmParser.cpp +++ b/llvm/lib/MC/MCParser/DarwinAsmParser.cpp @@ -428,7 +428,7 @@ bool DarwinAsmParser::ParseDirectiveDesc(StringRef, SMLoc) { bool DarwinAsmParser::ParseDirectiveIndirectSymbol(StringRef, SMLoc Loc) { const MCSectionMachO *Current = static_cast<const MCSectionMachO*>( getStreamer().getCurrentSection().first); - unsigned SectionType = Current->getType(); + MachO::SectionType SectionType = Current->getType(); if (SectionType != MachO::S_NON_LAZY_SYMBOL_POINTERS && SectionType != MachO::S_LAZY_SYMBOL_POINTERS && SectionType != MachO::S_SYMBOL_STUBS) diff --git a/llvm/lib/MC/MCSectionMachO.cpp b/llvm/lib/MC/MCSectionMachO.cpp index b8e51422998..29829463c18 100644 --- a/llvm/lib/MC/MCSectionMachO.cpp +++ b/llvm/lib/MC/MCSectionMachO.cpp @@ -102,7 +102,7 @@ void MCSectionMachO::PrintSwitchToSection(const MCAsmInfo &MAI, return; } - unsigned SectionType = getType(); + MachO::SectionType SectionType = getType(); assert(SectionType <= MachO::LAST_KNOWN_SECTION_TYPE && "Invalid SectionType specified!"); |