Skip to content

Commit 3ffee00

Browse files
[llvm-debuginfo-analyzer] Fix compile/link errors on specific builders. (#117971)
Link errors on builders: - llvm-nvptx-nvidia-ubuntu - llvm-nvptx64-nvidia-ubuntu Add explicitly references to DebugInfoDWARF and Object. Compile errors on builders: - ppc64le-lld-multistage-test - clang-ppc64le-linux-multistage - clang-ppc64le-rhel error: comparison of integers of different signs: Add to the constants used in the 'EXPECT_EQ' the 'u' postfix.
1 parent 69d66fa commit 3ffee00

File tree

2 files changed

+38
-36
lines changed

2 files changed

+38
-36
lines changed

llvm/unittests/DebugInfo/LogicalView/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,11 @@ set(LLVM_LINK_COMPONENTS
44
AllTargetsDisassemblers
55
AllTargetsInfos
66
AsmPrinter
7+
DebugInfoDWARF
78
DebugInfoLogicalView
89
MC
910
MCDisassembler
11+
Object
1012
TargetParser
1113
)
1214

llvm/unittests/DebugInfo/LogicalView/DWARFGeneratedTest.cpp

Lines changed: 36 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -228,40 +228,40 @@ void checkElementAttributes(LVReader *Reader) {
228228
ASSERT_NE(ScopeIter, Scopes->end());
229229
LVScope *Scope = static_cast<LVScope *>(*ScopeIter);
230230
ASSERT_NE(Scope, nullptr);
231-
EXPECT_EQ(Scope->getAccessibilityCode(), 1); // Element
232-
EXPECT_EQ(Scope->getInlineCode(), 2); // Element
233-
EXPECT_EQ(Scope->getVirtualityCode(), 3); // Element
234-
EXPECT_EQ(Scope->getCallFilenameIndex(), 5); // ScopeFunctionInlined
235-
EXPECT_EQ(Scope->getCallLineNumber(), 5); // ScopeFunctionInlined
236-
EXPECT_EQ(Scope->getFilenameIndex(), 7); // Element
237-
EXPECT_EQ(Scope->getLineNumber(), 7); // Element
238-
EXPECT_EQ(Scope->getDiscriminator(), 8); // ScopeFunctionInlined
231+
EXPECT_EQ(Scope->getAccessibilityCode(), 1u); // Element
232+
EXPECT_EQ(Scope->getInlineCode(), 2u); // Element
233+
EXPECT_EQ(Scope->getVirtualityCode(), 3u); // Element
234+
EXPECT_EQ(Scope->getCallFilenameIndex(), 5u); // ScopeFunctionInlined
235+
EXPECT_EQ(Scope->getCallLineNumber(), 5u); // ScopeFunctionInlined
236+
EXPECT_EQ(Scope->getFilenameIndex(), 7u); // Element
237+
EXPECT_EQ(Scope->getLineNumber(), 7u); // Element
238+
EXPECT_EQ(Scope->getDiscriminator(), 8u); // ScopeFunctionInlined
239239

240240
// Check no-values.
241241
ASSERT_NE(++ScopeIter, Scopes->end());
242242
Scope = static_cast<LVScope *>(*ScopeIter);
243243
ASSERT_NE(Scope, nullptr);
244-
EXPECT_EQ(Scope->getAccessibilityCode(), 0); // Element
245-
EXPECT_EQ(Scope->getInlineCode(), 0); // Element
246-
EXPECT_EQ(Scope->getVirtualityCode(), 0); // Element
247-
EXPECT_EQ(Scope->getCallFilenameIndex(), 1); // ScopeFunctionInlined
248-
EXPECT_EQ(Scope->getCallLineNumber(), 0); // ScopeFunctionInlined
249-
EXPECT_EQ(Scope->getFilenameIndex(), 1); // Element
250-
EXPECT_EQ(Scope->getLineNumber(), 0); // Element
251-
EXPECT_EQ(Scope->getDiscriminator(), 0); // ScopeFunctionInlined
244+
EXPECT_EQ(Scope->getAccessibilityCode(), 0u); // Element
245+
EXPECT_EQ(Scope->getInlineCode(), 0u); // Element
246+
EXPECT_EQ(Scope->getVirtualityCode(), 0u); // Element
247+
EXPECT_EQ(Scope->getCallFilenameIndex(), 1u); // ScopeFunctionInlined
248+
EXPECT_EQ(Scope->getCallLineNumber(), 0u); // ScopeFunctionInlined
249+
EXPECT_EQ(Scope->getFilenameIndex(), 1u); // Element
250+
EXPECT_EQ(Scope->getLineNumber(), 0u); // Element
251+
EXPECT_EQ(Scope->getDiscriminator(), 0u); // ScopeFunctionInlined
252252

253253
// Check implicit values.
254254
ASSERT_NE(++ScopeIter, Scopes->end());
255255
Scope = static_cast<LVScope *>(*ScopeIter);
256256
ASSERT_NE(Scope, nullptr);
257-
EXPECT_EQ(Scope->getAccessibilityCode(), 1); // Element
258-
EXPECT_EQ(Scope->getInlineCode(), 2); // Element
259-
EXPECT_EQ(Scope->getVirtualityCode(), 3); // Element
260-
EXPECT_EQ(Scope->getCallFilenameIndex(), 5); // ScopeFunctionInlined
261-
EXPECT_EQ(Scope->getCallLineNumber(), 5); // ScopeFunctionInlined
262-
EXPECT_EQ(Scope->getFilenameIndex(), 7); // Element
263-
EXPECT_EQ(Scope->getLineNumber(), 7); // Element
264-
EXPECT_EQ(Scope->getDiscriminator(), 8); // ScopeFunctionInlined
257+
EXPECT_EQ(Scope->getAccessibilityCode(), 1u); // Element
258+
EXPECT_EQ(Scope->getInlineCode(), 2u); // Element
259+
EXPECT_EQ(Scope->getVirtualityCode(), 3u); // Element
260+
EXPECT_EQ(Scope->getCallFilenameIndex(), 5u); // ScopeFunctionInlined
261+
EXPECT_EQ(Scope->getCallLineNumber(), 5u); // ScopeFunctionInlined
262+
EXPECT_EQ(Scope->getFilenameIndex(), 7u); // Element
263+
EXPECT_EQ(Scope->getLineNumber(), 7u); // Element
264+
EXPECT_EQ(Scope->getDiscriminator(), 8u); // ScopeFunctionInlined
265265

266266
const LVSymbols *Symbols = CompileUnit->getSymbols();
267267
ASSERT_NE(Symbols, nullptr);
@@ -271,17 +271,17 @@ void checkElementAttributes(LVReader *Reader) {
271271
ASSERT_NE(SymbolIter, Symbols->end());
272272
LVSymbol *Symbol = static_cast<LVSymbol *>(*SymbolIter);
273273
ASSERT_NE(Symbol, nullptr);
274-
EXPECT_EQ(Symbol->getBitSize(), 1); // Symbol
274+
EXPECT_EQ(Symbol->getBitSize(), 1u); // Symbol
275275

276276
ASSERT_NE(++SymbolIter, Symbols->end());
277277
Symbol = static_cast<LVSymbol *>(*SymbolIter);
278278
ASSERT_NE(Symbol, nullptr);
279-
EXPECT_EQ(Symbol->getBitSize(), 0); // Symbol
279+
EXPECT_EQ(Symbol->getBitSize(), 0u); // Symbol
280280

281281
ASSERT_NE(++SymbolIter, Symbols->end());
282282
Symbol = static_cast<LVSymbol *>(*SymbolIter);
283283
ASSERT_NE(Symbol, nullptr);
284-
EXPECT_EQ(Symbol->getBitSize(), 1); // Symbol
284+
EXPECT_EQ(Symbol->getBitSize(), 1u); // Symbol
285285

286286
const LVTypes *Types = CompileUnit->getTypes();
287287
ASSERT_NE(Types, nullptr);
@@ -291,35 +291,35 @@ void checkElementAttributes(LVReader *Reader) {
291291
ASSERT_NE(TypeIter, Types->end());
292292
LVType *Type = static_cast<LVType *>(*TypeIter);
293293
ASSERT_NE(Type, nullptr);
294-
EXPECT_EQ(Type->getCount(), 1); // Type
294+
EXPECT_EQ(Type->getCount(), 1u); // Type
295295

296296
ASSERT_NE(++TypeIter, Types->end());
297297
Type = static_cast<LVType *>(*TypeIter);
298298
ASSERT_NE(Type, nullptr);
299-
EXPECT_EQ(Type->getCount(), 0); // Type
299+
EXPECT_EQ(Type->getCount(), 0u); // Type
300300

301301
ASSERT_NE(++TypeIter, Types->end());
302302
Type = static_cast<LVType *>(*TypeIter);
303303
ASSERT_NE(Type, nullptr);
304-
EXPECT_EQ(Type->getCount(), 1); // Type
304+
EXPECT_EQ(Type->getCount(), 1u); // Type
305305

306306
ASSERT_NE(++TypeIter, Types->end());
307307
Type = static_cast<LVType *>(*TypeIter);
308308
ASSERT_NE(Type, nullptr);
309-
EXPECT_EQ(Type->getLowerBound(), 1); // Type
310-
EXPECT_EQ(Type->getUpperBound(), 2); // Type
309+
EXPECT_EQ(Type->getLowerBound(), 1u); // Type
310+
EXPECT_EQ(Type->getUpperBound(), 2u); // Type
311311

312312
ASSERT_NE(++TypeIter, Types->end());
313313
Type = static_cast<LVType *>(*TypeIter);
314314
ASSERT_NE(Type, nullptr);
315-
EXPECT_EQ(Type->getLowerBound(), 0); // Type
316-
EXPECT_EQ(Type->getUpperBound(), 0); // Type
315+
EXPECT_EQ(Type->getLowerBound(), 0u); // Type
316+
EXPECT_EQ(Type->getUpperBound(), 0u); // Type
317317

318318
ASSERT_NE(++TypeIter, Types->end());
319319
Type = static_cast<LVType *>(*TypeIter);
320320
ASSERT_NE(Type, nullptr);
321-
EXPECT_EQ(Type->getLowerBound(), 5); // Type
322-
EXPECT_EQ(Type->getUpperBound(), 6); // Type
321+
EXPECT_EQ(Type->getLowerBound(), 5u); // Type
322+
EXPECT_EQ(Type->getUpperBound(), 6u); // Type
323323
}
324324

325325
TEST(LogicalViewTest, ElementAttributes) {

0 commit comments

Comments
 (0)