1 //===- PDBSymbolCompilandEnv.cpp - compiland env variables ------*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 
9 #include "llvm/DebugInfo/PDB/PDBSymbolCompilandEnv.h"
10 
11 #include "llvm/DebugInfo/PDB/IPDBRawSymbol.h"
12 #include "llvm/DebugInfo/PDB/PDBSymDumper.h"
13 #include "llvm/DebugInfo/PDB/PDBTypes.h"
14 
15 using namespace llvm;
16 using namespace llvm::pdb;
17 
18 std::string PDBSymbolCompilandEnv::getValue() const {
19   Variant Value = RawSymbol->getValue();
20   if (Value.Type != PDB_VariantType::String)
21     return std::string();
22   return std::string(Value.Value.String);
23 }
24 
25 void PDBSymbolCompilandEnv::dump(PDBSymDumper &Dumper) const {
26   Dumper.dump(*this);
27 }
28