Skip to content

Commit 5fd73a5

Browse files
chinrwjinghao-jia
authored andcommitted
Remove redundancy cast and header
Signed-off-by: Ruowen Qin <[email protected]>
1 parent 6c8fa42 commit 5fd73a5

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

llvm/lib/Transforms/InnerUnikernels/IUInsertEntry.cpp

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@
4141
#include "llvm/IRReader/IRReader.h"
4242
#include "llvm/Support/Casting.h"
4343
#include "llvm/Support/ErrorHandling.h"
44-
#include "llvm/Support/ErrorOr.h"
4544
#include "llvm/Support/SourceMgr.h"
4645
#include "llvm/Support/raw_ostream.h"
4746
#include "llvm/Transforms/Utils/ModuleUtils.h"
@@ -224,12 +223,10 @@ bool IUEntryInsertion::runOnModule(Module &M) const {
224223
ProgNameCda->getType()->getNumElements());
225224

226225
// Add inserted program name metadata to backend pass
227-
if (auto *FunOP1 = dyn_cast<Function>(Func)) {
228-
StringRef UserProg = FunOP1->getName();
229-
Metadata *Str = MDString::get(Context, UserProg);
230-
MDNode *Node = MDNode::get(Context, Str);
231-
NamedMD->addOperand(Node);
232-
}
226+
StringRef UserProg = Func->getName();
227+
Metadata *Str = MDString::get(Context, UserProg);
228+
MDNode *Node = MDNode::get(Context, Str);
229+
NamedMD->addOperand(Node);
233230

234231
// Add the function using the extracted information above
235232
Function *EntryFunc = insertEntry(M, ProgRun, &G, CtxPT, ProgName, RTTI);

0 commit comments

Comments
 (0)