diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2016-07-23 20:41:05 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2016-07-23 20:41:05 +0000 |
commit | 01095a5d43bbfde13731688ddcf6048ebb8b7721 (patch) | |
tree | 4def12e759965de927d963ac65840d663ef9d1ea /lib/DebugInfo/PDB/PDBSymbolCompilandEnv.cpp | |
parent | f0f4822ed4b66e3579e92a89f368f8fb860e218e (diff) |
Diffstat (limited to 'lib/DebugInfo/PDB/PDBSymbolCompilandEnv.cpp')
-rw-r--r-- | lib/DebugInfo/PDB/PDBSymbolCompilandEnv.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/DebugInfo/PDB/PDBSymbolCompilandEnv.cpp b/lib/DebugInfo/PDB/PDBSymbolCompilandEnv.cpp index e863ccf1ffa30..9c7f0b1be56f4 100644 --- a/lib/DebugInfo/PDB/PDBSymbolCompilandEnv.cpp +++ b/lib/DebugInfo/PDB/PDBSymbolCompilandEnv.cpp @@ -16,14 +16,17 @@ #include <utility> using namespace llvm; +using namespace llvm::pdb; PDBSymbolCompilandEnv::PDBSymbolCompilandEnv( const IPDBSession &PDBSession, std::unique_ptr<IPDBRawSymbol> Symbol) : PDBSymbol(PDBSession, std::move(Symbol)) {} std::string PDBSymbolCompilandEnv::getValue() const { - // call RawSymbol->getValue() and convert the result to an std::string. - return std::string(); + Variant Value = RawSymbol->getValue(); + if (Value.Type != PDB_VariantType::String) + return std::string(); + return std::string(Value.Value.String); } void PDBSymbolCompilandEnv::dump(PDBSymDumper &Dumper) const { |