Skip to content

Commit 027d012

Browse files
committed
[MC,Hexagon] Simplify switchSection. NFC
1 parent c0c24d8 commit 027d012

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

llvm/lib/Target/Hexagon/AsmParser/HexagonAsmParser.cpp

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -745,11 +745,8 @@ bool HexagonAsmParser::ParseDirectiveSubsection(SMLoc L) {
745745
// end of the section. Only legacy hexagon-gcc created assembly code
746746
// used negative subsections.
747747
if ((Res < 0) && (Res > -8193))
748-
Subsection = HexagonMCExpr::create(
749-
MCConstantExpr::create(8192 + Res, getContext()), getContext());
750-
751-
getStreamer().switchSection(getStreamer().getCurrentSectionOnly(),
752-
Subsection);
748+
Res += 8192;
749+
getStreamer().switchSection(getStreamer().getCurrentSectionOnly(), Res);
753750
return false;
754751
}
755752

0 commit comments

Comments
 (0)