PDBSymbolCompilandEnv.cpp 927 B

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