================
@@ -749,10 +749,20 @@ TEST_F(SymtabTest, TestSymtabCreatedOnDemand) {
ASSERT_THAT_EXPECTED(ExpectedFile, llvm::Succeeded());
auto module_sp = std::make_shared<Module>(ExpectedFile->moduleSpec());
- // The symbol table should not be loaded by default.
+ // The symbol file should not be created by default.
Symtab *module_symtab = module_sp->GetSymtab(/*can_create=*/false);
ASSERT_EQ(module_symtab, nullptr);
+ // Even if the symbol file is created, the symbol table should not be
created by default.
+
+ // TODO:
+ // I need to create a symbol file here, but without causing it to parse the
symbol table.
+ // See next line as a failed attempt.
+
+ // module_sp->GetSymbolFile(/*can_create=*/true); // Cannot do this because
it will parse the symbol table.
----------------
dmpots wrote:
> // I need to create a symbol file here, but without causing it to parse the
> symbol table.
> // See next line as a failed attempt.
I'm not sure its possible to create a symbol file without creating a symbol
table. I'm fuzzy on the relationship between the two, but I thought the symbol
table is going to hold the symbols parsed from the symbol file. In which case
you need the symbol table there to hold the symbols if you are creating the
symbol file.
Are you saying the code is currently unable to create the symbol file without
creating the symbol table and you want to update it to separate the two?
Or do you mean that you are having trouble writing the test because the two are
linked. In which case you could add a separate test function if that helps
separate out the two.
https://github.com/llvm/llvm-project/pull/136236
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits