diff options
author | Eli Bendersky <eliben@google.com> | 2012-12-11 17:16:00 +0000 |
---|---|---|
committer | Eli Bendersky <eliben@google.com> | 2012-12-11 17:16:00 +0000 |
commit | 37a9830d20018dee5557a3a72f750d965ba383c5 (patch) | |
tree | 2b7481ca36d6eed4ef724b4c67e8b88afd9f65af /lib/MC | |
parent | 0439f3e0cf67049877578aa9ae94f7a0a90e86e7 (diff) | |
download | external_llvm-37a9830d20018dee5557a3a72f750d965ba383c5.zip external_llvm-37a9830d20018dee5557a3a72f750d965ba383c5.tar.gz external_llvm-37a9830d20018dee5557a3a72f750d965ba383c5.tar.bz2 |
Remove the RelaxAll overrule in MCAssembler::fixupNeedsRelaxation,
because that method is only getting called for MCInstFragment. These
fragments aren't even generated when RelaxAll is set, which is why the
flag reference here is superfluous. Removing it simplifies the code
with no harmful effects.
An assertion is added higher up to make sure this path is never
reached.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169886 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/MC')
-rw-r--r-- | lib/MC/MCAssembler.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/MC/MCAssembler.cpp b/lib/MC/MCAssembler.cpp index 8f8ec15..9835e34 100644 --- a/lib/MC/MCAssembler.cpp +++ b/lib/MC/MCAssembler.cpp @@ -657,9 +657,6 @@ void MCAssembler::Finish() { bool MCAssembler::fixupNeedsRelaxation(const MCFixup &Fixup, const MCInstFragment *DF, const MCAsmLayout &Layout) const { - if (getRelaxAll()) - return true; - // If we cannot resolve the fixup value, it requires relaxation. MCValue Target; uint64_t Value; @@ -780,6 +777,8 @@ bool MCAssembler::layoutSectionOnce(MCAsmLayout &Layout, MCSectionData &SD) { default: break; case MCFragment::FT_Inst: + assert(!getRelaxAll() && + "Did not expect a MCInstFragment in RelaxAll mode"); RelaxedFrag = relaxInstruction(Layout, *cast<MCInstFragment>(I)); break; case MCFragment::FT_Dwarf: |