diff options
author | Fangrui Song <maskray@google.com> | 2020-04-15 15:49:05 -0700 |
---|---|---|
committer | Fangrui Song <maskray@google.com> | 2020-04-15 18:35:27 -0700 |
commit | 90a63f6d2d6b8144f0c7cd99232fc27ed10c41fe (patch) | |
tree | 81d33df0132ca97361d5631987aaa0a80446434f /llvm/lib/MC/MCAssembler.cpp | |
parent | 3ca54f45953e4217ad764c68ee2abcbc3eead1e8 (diff) | |
download | llvm-90a63f6d2d6b8144f0c7cd99232fc27ed10c41fe.zip llvm-90a63f6d2d6b8144f0c7cd99232fc27ed10c41fe.tar.gz llvm-90a63f6d2d6b8144f0c7cd99232fc27ed10c41fe.tar.bz2 |
[MC] Replace MCSection*::getName() with MCSection::getName(). NFC
I plan to use MCSection::getName() in D78138. Having the function in the base class is also convenient for debugging.
Reviewed By: rnk
Differential Revision: https://reviews.llvm.org/D78251
Diffstat (limited to 'llvm/lib/MC/MCAssembler.cpp')
-rw-r--r-- | llvm/lib/MC/MCAssembler.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/llvm/lib/MC/MCAssembler.cpp b/llvm/lib/MC/MCAssembler.cpp index d03fc15..0d28827 100644 --- a/llvm/lib/MC/MCAssembler.cpp +++ b/llvm/lib/MC/MCAssembler.cpp @@ -686,11 +686,8 @@ void MCAssembler::writeSectionData(raw_ostream &OS, const MCSection *Sec, report_fatal_error("cannot have fixups in virtual section!"); for (unsigned i = 0, e = DF.getContents().size(); i != e; ++i) if (DF.getContents()[i]) { - if (auto *ELFSec = dyn_cast<const MCSectionELF>(Sec)) - report_fatal_error("non-zero initializer found in section '" + - ELFSec->getName() + "'"); - else - report_fatal_error("non-zero initializer found in virtual section"); + report_fatal_error("non-zero initializer found in section '" + + Sec->getName() + "'"); } break; } |