xref: /freebsd/contrib/llvm-project/llvm/lib/DebugInfo/PDB/PDBSymbolCompilandEnv.cpp (revision 7ef62cebc2f965b0f640263e179276928885e33d)
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