<commit_before>import os
import subprocess
import sys

#### UTILITIES ####


def enum(*sequential, **named):
    enums = dict(zip(sequential, range(len(sequential))), **named)
    return type('Enum', (), enums)

#### SETTINGS ####

def building_with_asan_enabled():
    """Return a True if the ASAN Swift build preset is being used."""
    if 'ENABLE_ADDRESS_SANITIZER' in os.environ.keys() and os.environ["ENABLE_ADDRESS_SANITIZER"] == "YES":
        return True
    else:
        return False

def build_dir_asan_suffix():
    if building_with_asan_enabled():
        return "+asan"
    else:
        return ""

def LLVM_BUILD_DIRS():
    return {
        "Debug": "Ninja-RelWithDebInfoAssert" + build_dir_asan_suffix(),
        "DebugClang": "Ninja-DebugAssert" + build_dir_asan_suffix(),
        "Release": "Ninja-RelWithDebInfoAssert" + build_dir_asan_suffix(),
    }

#### INTERFACE TO THE XCODEPROJ ####


def lldb_source_path():<commit_msg>lldbbuild.py: Use the +ubsan build dir suffix when needed<commit_after>import os
import subprocess
import sys

#### UTILITIES ####


def enum(*sequential, **named):
    enums = dict(zip(sequential, range(len(sequential))), **named)
    return type('Enum', (), enums)

#### SETTINGS ####

def building_with_asan_enabled():
    """Return a True if the ASAN Swift build preset is being used."""
    if 'ENABLE_ADDRESS_SANITIZER' in os.environ.keys() and os.environ["ENABLE_ADDRESS_SANITIZER"] == "YES":
        return True
    else:
        return False

def building_with_ubsan_enabled():
    """Return a True if the UBSAN Swift build preset is being used."""
    if 'ENABLE_UNDEFINED_BEHAVIOR_SANITIZER' in os.environ.keys() and os.environ["ENABLE_UNDEFINED_BEHAVIOR_SANITIZER"] == "YES":
        return True
    else:
        return False

def build_dir_san_suffix():
    if building_with_asan_enabled():
        return "+asan"
    elif building_with_ubsan_enabled():
        return "+ubsan"
    else:
        return ""

def LLVM_BUILD_DIRS():
    return {
        "Debug": "Ninja-RelWithDebInfoAssert" + build_dir_san_suffix(),
        "DebugClang": "Ninja-DebugAssert" + build_dir_san_suffix(),
        "Release": "Ninja-RelWithDebInfoAssert" + build_dir_san_suffix(),
    }

#### INTERFACE TO THE XCODEPROJ ####


def lldb_source_path():
{'fraction_non_alphanumeric': 0.13111888111888112, 'fraction_numerical': 0.0, 'mean_word_length': 3.8495762711864407, 'pattern_counts': {'":': 9, '<': 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': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1431913', 'n_tokens_mistral': 793, 'n_tokens_neox': 756, 'n_words': 177}