From e5bc4c83edd91a90b8801a0ce7b6d4c86b76e6bc Mon Sep 17 00:00:00 2001 From: Fabian Schiebel Date: Thu, 24 Oct 2024 21:05:17 +0200 Subject: [PATCH] DITH fix attempt for CI --- .../TypeHierarchy/DIBasedTypeHierarchy.cpp | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/lib/PhasarLLVM/TypeHierarchy/DIBasedTypeHierarchy.cpp b/lib/PhasarLLVM/TypeHierarchy/DIBasedTypeHierarchy.cpp index 640533c7a..d6188b1b5 100644 --- a/lib/PhasarLLVM/TypeHierarchy/DIBasedTypeHierarchy.cpp +++ b/lib/PhasarLLVM/TypeHierarchy/DIBasedTypeHierarchy.cpp @@ -196,18 +196,12 @@ DIBasedTypeHierarchy::DIBasedTypeHierarchy(const LLVMProjectIRDB &IRDB) { if (!llvm::is_contained(DwarfTags, Composite->getTag())) { continue; } - if (TypeToVertex.try_emplace(Composite, VertexTypes.size()).second) { - VertexTypes.push_back(Composite); - NameToType.try_emplace(getCompositeTypeName(Composite), Composite); - - if (getCompositeTypeName(Composite).empty()) { - llvm::errs() << "ERROR: Composite Type is empty: " << *Composite - << '\n'; - IRDB.emitPreprocessedIR(llvm::errs()); - llvm::errs().flush(); - } + auto Name = getCompositeTypeName(Composite); + if (!Name.empty() && + TypeToVertex.try_emplace(Composite, VertexTypes.size()).second) { - assert(!getCompositeTypeName(Composite).empty()); + VertexTypes.push_back(Composite); + NameToType.try_emplace(Name, Composite); } } }