Skip to content

Commit fc6cc40

Browse files
committed
[AsmPrinter] Remove unnecessary casts. NFC
1 parent 2d6e7ef commit fc6cc40

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -473,11 +473,9 @@ bool AsmPrinter::doInitialization(Module &M) {
473473
AddrLabelSymbols = nullptr;
474474

475475
// Initialize TargetLoweringObjectFile.
476-
const_cast<TargetLoweringObjectFile&>(getObjFileLowering())
477-
.Initialize(OutContext, TM);
476+
TM.getObjFileLowering()->Initialize(OutContext, TM);
478477

479-
const_cast<TargetLoweringObjectFile &>(getObjFileLowering())
480-
.getModuleMetadata(M);
478+
TM.getObjFileLowering()->getModuleMetadata(M);
481479

482480
// On AIX, we delay emitting any section information until
483481
// after emitting the .file pseudo-op. This allows additional

0 commit comments

Comments
 (0)