summaryrefslogtreecommitdiffstats
path: root/llvm/lib/MC/MCAssembler.cpp
diff options
context:
space:
mode:
authorEli Bendersky <eliben@google.com>2012-12-11 17:16:00 +0000
committerEli Bendersky <eliben@google.com>2012-12-11 17:16:00 +0000
commit0f74f173f7bd513b62274d92629a47ad6d181c66 (patch)
treeb9b073975f0be8b3252d84a2968b9f43fd59d872 /llvm/lib/MC/MCAssembler.cpp
parent0d3ed6f1c238bd2970fb6b7973ef448fb191ce87 (diff)
downloadbcm5719-llvm-0f74f173f7bd513b62274d92629a47ad6d181c66.tar.gz
bcm5719-llvm-0f74f173f7bd513b62274d92629a47ad6d181c66.zip
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. llvm-svn: 169886
Diffstat (limited to 'llvm/lib/MC/MCAssembler.cpp')
-rw-r--r--llvm/lib/MC/MCAssembler.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/llvm/lib/MC/MCAssembler.cpp b/llvm/lib/MC/MCAssembler.cpp
index 8f8ec151e5e..9835e34cbc5 100644
--- a/llvm/lib/MC/MCAssembler.cpp
+++ b/llvm/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:
OpenPOWER on IntegriCloud