From d03b2375f2c38f7034ff40a2fbe39af667114d59 Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Wed, 23 Jul 2025 23:36:14 -0700 Subject: [PATCH] [SPIRV] Remove an unnecessary cast (NFC) getObjFileLowering() already returns TargetLoweringObjectFile *. --- llvm/lib/Target/SPIRV/SPIRVAPI.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/llvm/lib/Target/SPIRV/SPIRVAPI.cpp b/llvm/lib/Target/SPIRV/SPIRVAPI.cpp index bbf1d87656813..cfe7ef486381d 100644 --- a/llvm/lib/Target/SPIRV/SPIRVAPI.cpp +++ b/llvm/lib/Target/SPIRV/SPIRVAPI.cpp @@ -116,8 +116,8 @@ SPIRVTranslate(Module *M, std::string &SpirvObj, std::string &ErrMsg, PM.add(new TargetLibraryInfoWrapperPass(TLII)); std::unique_ptr MMIWP( new MachineModuleInfoWrapperPass(Target.get())); - const_cast(Target->getObjFileLowering()) - ->Initialize(MMIWP->getMMI().getContext(), *Target); + Target->getObjFileLowering()->Initialize(MMIWP->getMMI().getContext(), + *Target); SmallString<4096> OutBuffer; raw_svector_ostream OutStream(OutBuffer);