summaryrefslogtreecommitdiffstats
path: root/contrib/llvm/lib/DebugInfo/PDB/PDBSymbolCompilandEnv.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/llvm/lib/DebugInfo/PDB/PDBSymbolCompilandEnv.cpp')
-rw-r--r--contrib/llvm/lib/DebugInfo/PDB/PDBSymbolCompilandEnv.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/contrib/llvm/lib/DebugInfo/PDB/PDBSymbolCompilandEnv.cpp b/contrib/llvm/lib/DebugInfo/PDB/PDBSymbolCompilandEnv.cpp
index e863ccf..9c7f0b1 100644
--- a/contrib/llvm/lib/DebugInfo/PDB/PDBSymbolCompilandEnv.cpp
+++ b/contrib/llvm/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 {
OpenPOWER on IntegriCloud