Skip to content

Commit 646a6e7

Browse files
committed
[PowerPC] Simplify PPCMCExpr::printImpl
1 parent 08a3c53 commit 646a6e7

File tree

1 file changed

+1
-32
lines changed

1 file changed

+1
-32
lines changed

llvm/lib/Target/PowerPC/MCTargetDesc/PPCMCExpr.cpp

Lines changed: 1 addition & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -24,38 +24,7 @@ const PPCMCExpr *PPCMCExpr::create(VariantKind Kind, const MCExpr *Expr,
2424

2525
void PPCMCExpr::printImpl(raw_ostream &OS, const MCAsmInfo *MAI) const {
2626
getSubExpr()->print(OS, MAI);
27-
28-
switch (Kind) {
29-
default:
30-
llvm_unreachable("Invalid kind!");
31-
case VK_PPC_LO:
32-
OS << "@l";
33-
break;
34-
case VK_PPC_HI:
35-
OS << "@h";
36-
break;
37-
case VK_PPC_HA:
38-
OS << "@ha";
39-
break;
40-
case VK_PPC_HIGH:
41-
OS << "@high";
42-
break;
43-
case VK_PPC_HIGHA:
44-
OS << "@higha";
45-
break;
46-
case VK_PPC_HIGHER:
47-
OS << "@higher";
48-
break;
49-
case VK_PPC_HIGHERA:
50-
OS << "@highera";
51-
break;
52-
case VK_PPC_HIGHEST:
53-
OS << "@highest";
54-
break;
55-
case VK_PPC_HIGHESTA:
56-
OS << "@highesta";
57-
break;
58-
}
27+
OS << '@' << MAI->getVariantKindName(Kind);
5928
}
6029

6130
bool

0 commit comments

Comments
 (0)