[NativePDB] Fix a use after free and enable corresponding native test.
We had a use after free where we were assigning the result of a function
that returned a string to a StringRef. After fixing this use after
free, one of the DIA PDB tests now passes with the native PDB reader,
so we enable the test under native mode as well. The goal is to
eventually make all the tests pass under both, at which point we can
disable them all under DIA mode.
llvm-svn: 349673
diff --git a/lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp b/lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp
index fa16889..bd44474 100644
--- a/lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp
+++ b/lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp
@@ -419,7 +419,7 @@
if (cci.m_compile_opts && cci.m_compile_opts->hasOptimizations())
optimized = eLazyBoolYes;
- llvm::StringRef source_file_name =
+ llvm::SmallString<64> source_file_name =
m_index->compilands().GetMainSourceFile(cci);
FileSpec fs(source_file_name);