Skip to content

Commit

Permalink
Remove redundancy cast and header
Browse files Browse the repository at this point in the history
Signed-off-by: Ruowen Qin <ruowenq2@illinois.edu>
  • Loading branch information
chinrw committed Jun 25, 2024
1 parent 7bbf44c commit ae09e77
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions llvm/lib/Transforms/InnerUnikernels/IUInsertEntry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
#include "llvm/IRReader/IRReader.h"
#include "llvm/Support/Casting.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/ErrorOr.h"
#include "llvm/Support/SourceMgr.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/Transforms/Utils/ModuleUtils.h"
Expand Down Expand Up @@ -224,12 +223,10 @@ bool IUEntryInsertion::runOnModule(Module &M) const {
ProgNameCda->getType()->getNumElements());

// Add inserted program name metadata to backend pass
if (auto *FunOP1 = dyn_cast<Function>(Func)) {
StringRef UserProg = FunOP1->getName();
Metadata *Str = MDString::get(Context, UserProg);
MDNode *Node = MDNode::get(Context, Str);
NamedMD->addOperand(Node);
}
StringRef UserProg = Func->getName();
Metadata *Str = MDString::get(Context, UserProg);
MDNode *Node = MDNode::get(Context, Str);
NamedMD->addOperand(Node);

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

0 comments on commit ae09e77

Please sign in to comment.