mirror of
https://github.com/RPCSX/llvm.git
synced 2024-11-24 12:19:53 +00:00
cd405abe71
Also implements the PDBSymbolCompilandEnv::getValue() method, which until now had been unimplemented specifically because variant did not support string values. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@261173 91177308-0d34-0410-b5e6-96231b3b80d8
34 lines
1.0 KiB
C++
34 lines
1.0 KiB
C++
//===- PDBSymbolCompilandEnv.cpp - compiland env variables ------*- C++ -*-===//
|
|
//
|
|
// The LLVM Compiler Infrastructure
|
|
//
|
|
// This file is distributed under the University of Illinois Open Source
|
|
// License. See LICENSE.TXT for details.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#include "llvm/DebugInfo/PDB/PDBSymbolCompilandEnv.h"
|
|
|
|
#include "llvm/DebugInfo/PDB/IPDBRawSymbol.h"
|
|
#include "llvm/DebugInfo/PDB/PDBSymbol.h"
|
|
#include "llvm/DebugInfo/PDB/PDBSymDumper.h"
|
|
|
|
#include <utility>
|
|
|
|
using namespace llvm;
|
|
|
|
PDBSymbolCompilandEnv::PDBSymbolCompilandEnv(
|
|
const IPDBSession &PDBSession, std::unique_ptr<IPDBRawSymbol> Symbol)
|
|
: PDBSymbol(PDBSession, std::move(Symbol)) {}
|
|
|
|
std::string PDBSymbolCompilandEnv::getValue() const {
|
|
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 {
|
|
Dumper.dump(*this);
|
|
}
|