From 19cd3d9d4c1f7f5e59096ac6a2d7ac5bb3070cfa Mon Sep 17 00:00:00 2001 From: svkeerthy Date: Thu, 28 Aug 2025 20:35:13 +0000 Subject: [PATCH] Fix warning in IR2Vec --- llvm/lib/Analysis/IR2Vec.cpp | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/llvm/lib/Analysis/IR2Vec.cpp b/llvm/lib/Analysis/IR2Vec.cpp index 7d0ad6a69a398..af6242d72e1c9 100644 --- a/llvm/lib/Analysis/IR2Vec.cpp +++ b/llvm/lib/Analysis/IR2Vec.cpp @@ -601,17 +601,7 @@ PreservedAnalyses IR2VecPrinterPass::run(Module &M, assert(Vocabulary.isValid() && "IR2Vec Vocabulary is invalid"); for (Function &F : M) { - std::unique_ptr Emb; - switch (IR2VecEmbeddingKind) { - case IR2VecKind::Symbolic: - Emb = std::make_unique(F, Vocabulary); - break; - case IR2VecKind::FlowAware: - Emb = std::make_unique(F, Vocabulary); - break; - default: - llvm_unreachable("Unknown IR2Vec embedding kind"); - } + auto Emb = Embedder::create(IR2VecEmbeddingKind, F, Vocabulary); if (!Emb) { OS << "Error creating IR2Vec embeddings \n"; continue;