blob: f88df2df6be482a98475dd62b95c69b901014c0f [file] [log] [blame]
Zachary Turner0e9e6632015-02-06 20:30:52 +00001//===- PDBSymbolCompilandEnv.cpp - compiland env variables ------*- C++ -*-===//
2//
3// The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9
Zachary Turner52c9f882015-02-14 03:53:56 +000010#include "llvm/DebugInfo/PDB/PDBSymbolCompilandEnv.h"
11
Zachary Turner0e9e6632015-02-06 20:30:52 +000012#include "llvm/DebugInfo/PDB/IPDBRawSymbol.h"
Zachary Turner9a818ad2015-02-22 22:03:38 +000013#include "llvm/DebugInfo/PDB/PDBSymDumper.h"
Chandler Carruth6bda14b2017-06-06 11:49:48 +000014#include "llvm/DebugInfo/PDB/PDBSymbol.h"
Zachary Turner52c9f882015-02-14 03:53:56 +000015
Chandler Carruth71f308a2015-02-13 09:09:03 +000016#include <utility>
Zachary Turner0e9e6632015-02-06 20:30:52 +000017
18using namespace llvm;
Zachary Turnerec28fc32016-05-04 20:32:13 +000019using namespace llvm::pdb;
Zachary Turner0e9e6632015-02-06 20:30:52 +000020
21std::string PDBSymbolCompilandEnv::getValue() const {
Zachary Turnerec28fc32016-05-04 20:32:13 +000022 Variant Value = RawSymbol->getValue();
23 if (Value.Type != PDB_VariantType::String)
24 return std::string();
25 return std::string(Value.Value.String);
Zachary Turner0e9e6632015-02-06 20:30:52 +000026}
Zachary Turner21473f72015-02-08 00:29:29 +000027
Zachary Turnerb52d08d2015-03-01 06:51:29 +000028void PDBSymbolCompilandEnv::dump(PDBSymDumper &Dumper) const {
29 Dumper.dump(*this);
Zachary Turner9a818ad2015-02-22 22:03:38 +000030}