1 //===- PDBSymbolCompilandEnv.cpp - compiland env variables ------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 #include "llvm/DebugInfo/PDB/PDBSymbolCompilandEnv.h"
12 #include "llvm/DebugInfo/PDB/IPDBRawSymbol.h"
13 #include "llvm/DebugInfo/PDB/PDBSymDumper.h"
14 #include "llvm/DebugInfo/PDB/PDBSymbol.h"
19 using namespace llvm::pdb;
21 PDBSymbolCompilandEnv::PDBSymbolCompilandEnv(
22 const IPDBSession &PDBSession, std::unique_ptr<IPDBRawSymbol> Symbol)
23 : PDBSymbol(PDBSession, std::move(Symbol)) {
24 assert(RawSymbol->getSymTag() == PDB_SymType::CompilandEnv);
27 std::string PDBSymbolCompilandEnv::getValue() const {
28 Variant Value = RawSymbol->getValue();
29 if (Value.Type != PDB_VariantType::String)
31 return std::string(Value.Value.String);
34 void PDBSymbolCompilandEnv::dump(PDBSymDumper &Dumper) const {