PDBSymbolCompilandEnv.cpp 906 B

123456789101112131415161718192021222324252627
  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. #include "llvm/DebugInfo/PDB/PDBSymbolCompilandEnv.h"
  9. #include "llvm/DebugInfo/PDB/IPDBRawSymbol.h"
  10. #include "llvm/DebugInfo/PDB/PDBSymDumper.h"
  11. #include "llvm/DebugInfo/PDB/PDBTypes.h"
  12. using namespace llvm;
  13. using namespace llvm::pdb;
  14. std::string PDBSymbolCompilandEnv::getValue() const {
  15. Variant Value = RawSymbol->getValue();
  16. if (Value.Type != PDB_VariantType::String)
  17. return std::string();
  18. return std::string(Value.Value.String);
  19. }
  20. void PDBSymbolCompilandEnv::dump(PDBSymDumper &Dumper) const {
  21. Dumper.dump(*this);
  22. }