summaryrefslogtreecommitdiffstats
path: root/llvm/lib/DebugInfo/PDB/PDBSymbolCompilandEnv.cpp
diff options
context:
space:
mode:
authorZachary Turner <zturner@google.com>2016-02-17 22:46:33 +0000
committerZachary Turner <zturner@google.com>2016-02-17 22:46:33 +0000
commit2a9ac0d2c538a97711bb39f44551a7836ca07fb5 (patch)
tree70143f120ca6ded0c1ae5981abfccb8163375249 /llvm/lib/DebugInfo/PDB/PDBSymbolCompilandEnv.cpp
parent22d2878399f4cb31cd30f40d42993cc20e2cc05b (diff)
downloadbcm5719-llvm-2a9ac0d2c538a97711bb39f44551a7836ca07fb5.tar.gz
bcm5719-llvm-2a9ac0d2c538a97711bb39f44551a7836ca07fb5.zip
[DebugInfoPDB] A few cleanups on PDB Variant class.
Also implements the PDBSymbolCompilandEnv::getValue() method, which until now had been unimplemented specifically because variant did not support string values. llvm-svn: 261173
Diffstat (limited to 'llvm/lib/DebugInfo/PDB/PDBSymbolCompilandEnv.cpp')
-rw-r--r--llvm/lib/DebugInfo/PDB/PDBSymbolCompilandEnv.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/llvm/lib/DebugInfo/PDB/PDBSymbolCompilandEnv.cpp b/llvm/lib/DebugInfo/PDB/PDBSymbolCompilandEnv.cpp
index e863ccf1ffa..1b30c446a44 100644
--- a/llvm/lib/DebugInfo/PDB/PDBSymbolCompilandEnv.cpp
+++ b/llvm/lib/DebugInfo/PDB/PDBSymbolCompilandEnv.cpp
@@ -22,8 +22,10 @@ PDBSymbolCompilandEnv::PDBSymbolCompilandEnv(
: PDBSymbol(PDBSession, std::move(Symbol)) {}
std::string PDBSymbolCompilandEnv::getValue() const {
- // call RawSymbol->getValue() and convert the result to an std::string.
- return std::string();
+ llvm::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