[llvm] [llvm-debuginfo-analyzer] Common handling of unsigned attribute values. (PR #116027)
Carlos Alberto Enciso via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 27 00:02:13 PST 2024
================
@@ -0,0 +1,369 @@
+//===- llvm/unittest/DebugInfo/LogicalView/DWARFGeneratedTest.cpp ---------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#include "../DWARF/DwarfGenerator.h"
+#include "../DWARF/DwarfUtils.h"
+#include "llvm/DebugInfo/DWARF/DWARFCompileUnit.h"
+#include "llvm/DebugInfo/DWARF/DWARFContext.h"
+#include "llvm/DebugInfo/LogicalView/Core/LVReader.h"
+#include "llvm/DebugInfo/LogicalView/Core/LVScope.h"
+#include "llvm/DebugInfo/LogicalView/Core/LVSymbol.h"
+#include "llvm/DebugInfo/LogicalView/Core/LVType.h"
+#include "llvm/DebugInfo/LogicalView/LVReaderHandler.h"
+#include "llvm/MC/TargetRegistry.h"
+#include "llvm/Support/COM.h"
+#include "llvm/Support/InitLLVM.h"
+#include "llvm/Support/ScopedPrinter.h"
+#include "llvm/Support/TargetSelect.h"
+#include "llvm/Support/ToolOutputFile.h"
+#include "llvm/Testing/Support/Error.h"
+#include "llvm/Testing/Support/SupportHelpers.h"
+
+#include "gtest/gtest.h"
+
+using namespace llvm;
+using namespace llvm::logicalview;
+using namespace llvm::dwarf;
+using namespace llvm::dwarf::utils;
+
+namespace {
+
+// Helper function to get the first compile unit.
+LVScopeCompileUnit *getFirstCompileUnit(LVScopeRoot *Root) {
+ EXPECT_NE(Root, nullptr);
+ const LVScopes *CompileUnits = Root->getScopes();
+ EXPECT_NE(CompileUnits, nullptr);
+ EXPECT_EQ(CompileUnits->size(), 1u);
+
+ LVScopes::const_iterator Iter = CompileUnits->begin();
+ EXPECT_NE(Iter, nullptr);
----------------
CarlosAlbertoEnciso wrote:
Change to use `end()` for all the iterators.
https://github.com/llvm/llvm-project/pull/116027
More information about the llvm-commits
mailing list