<commit_before>//===- NativeCompilandSymbol.h - Native impl of PDBCompilandSymbol -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/Native/NativeCompilandSymbol.h"

namespace llvm {
namespace pdb {

NativeCompilandSymbol::NativeCompilandSymbol(NativeSession &Session,
                                             const ModuleInfoEx &MI)
    : NativeRawSymbol(Session), Module(MI) {}

PDB_SymType NativeCompilandSymbol::getSymTag() const {
  return PDB_SymType::Compiland;
}

bool NativeCompilandSymbol::isEditAndContinueEnabled() const {
  return Module.Info.hasECInfo();
}

uint32_t NativeCompilandSymbol::getLexicalParentId() const { return 0; }

// DIA, which this API was modeled after, uses counter-intuitive meanings for
// IDiaSymbol::get_name and IDiaSymbol::get_libraryName, which is why these
// methods may appear to be cross-mapped.

std::string NativeCompilandSymbol::getLibraryName() const {
  return Module.Info.getObjFileName();
}

std::string NativeCompilandSymbol::getName() const {
  return Module.Info.getModuleName();
}

} // namespace pdb
} // namespace llvm
<commit_msg>NFC:  Corrects comments that were supposed to go in with earlier commit.<commit_after>//===- NativeCompilandSymbol.cpp - Native impl for compilands ---*- 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/Native/NativeCompilandSymbol.h"

namespace llvm {
namespace pdb {

NativeCompilandSymbol::NativeCompilandSymbol(NativeSession &Session,
                                             const ModuleInfoEx &MI)
    : NativeRawSymbol(Session), Module(MI) {}

PDB_SymType NativeCompilandSymbol::getSymTag() const {
  return PDB_SymType::Compiland;
}

bool NativeCompilandSymbol::isEditAndContinueEnabled() const {
  return Module.Info.hasECInfo();
}

uint32_t NativeCompilandSymbol::getLexicalParentId() const { return 0; }

// The usage of getObjFileName for getLibraryName and getModuleName for getName
// may seem backwards, but it is consistent with DIA, which is what this API
// was modeled after.  We may rename these methods later to try to eliminate
// this potential confusion.

std::string NativeCompilandSymbol::getLibraryName() const {
  return Module.Info.getObjFileName();
}

std::string NativeCompilandSymbol::getName() const {
  return Module.Info.getModuleName();
}

} // namespace pdb
} // namespace llvm

{'fraction_non_alphanumeric': 0.15460992907801419, 'fraction_numerical': 0.002127659574468085, 'mean_word_length': 3.012802275960171, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2884857', 'n_tokens_mistral': 775, 'n_tokens_neox': 760, 'n_words': 213}