Skip to content

Add support for LLVM 20 (modulo dynamic-compile regressions) #4911

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 24 commits into from
May 12, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
f5436c2
tree-wide: replace pointerTo() with LLPointerType::get(...)
liushuyu Feb 5, 2025
9cd0407
tree-wide: shuffle headers around
liushuyu Feb 5, 2025
3e31906
gen/llvm.h: adapt GET_INTRINSIC_DECL macro to LLVM 20 API
liushuyu Feb 5, 2025
147170e
utils/gen_gccbuiltins.cpp: mark most variables as const
liushuyu Feb 5, 2025
df2b7f4
gen/classes.cpp: suppress unused variable warning
liushuyu Feb 5, 2025
5f883c7
gen/optimizer.cpp: add the new LTO parameter everywhere
liushuyu Feb 5, 2025
fd37f7b
gen/dibuilder.cpp: adapt to API changes
liushuyu Feb 15, 2025
37b4ce7
jit-rt: adapt to LLVM 20 header changes
liushuyu Feb 15, 2025
cd2196c
CI: Bump LDC-LLVM to v20.1.3
kinke Apr 19, 2025
0dc1eb9
Cirrus CI: Adapt to Ubuntu rolling now being 25.04
kinke Apr 19, 2025
11babd1
druntime: Support LLVM v20.1 in ldc.intrinsics
kinke Apr 19, 2025
bcf4dc1
LLVM 20: Add vendored profdata/profgen tools and FileCheck util
kinke Apr 19, 2025
ccbb284
Adapt android-llvm-config.in to LLVM 20
kinke Apr 19, 2025
cc3bfbb
CMake: Auto-detect llvm-config-20 etc.
kinke Apr 19, 2025
b02f572
Hide new/recently inherited LLVM command-line options
kinke Apr 19, 2025
cdf8d9e
Adapt some tests to LLVM 20
kinke Apr 25, 2025
a7848bc
Fix up SPIR-V data-layout strings for LLVM 20
kinke Apr 25, 2025
d506a20
Adapt to LLVM 20 ASan library changes on Windows (CMake + linking)
kinke Apr 25, 2025
03fa7d6
Adapt some ASan lit-tests to LLVM 20
kinke Apr 26, 2025
7b71e15
CI: Bump LDC-LLVM to v20.1.4
kinke May 1, 2025
14050a6
Cirrus CI: Try to work around non-default libcurl dependency for ldc-…
kinke May 3, 2025
1ae8018
jit-rt: avoid double registering EHFrame plugin ...
liushuyu May 5, 2025
b145d96
CI: Bump LDC-LLVM to v20.1.5 RC
kinke May 10, 2025
ad4a35a
CI: Revert to LDC-LLVM v19.1.7 due to remaining dynamic-compile regre…
kinke May 10, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ clone_steps_template: &CLONE_STEPS_TEMPLATE
common_steps_template: &COMMON_STEPS_TEMPLATE
install_lit_script: |
# Install lit
rm -f /usr/lib/python3.12/EXTERNALLY-MANAGED # required for Ubuntu 24.04
rm -f /usr/lib/python3.13/EXTERNALLY-MANAGED # required for Ubuntu 25.04
python3 -m pip install --user lit
python3 -c "import lit.main; lit.main.main();" --version . | head -n 1
clone_submodules_script: |
Expand Down Expand Up @@ -197,8 +197,14 @@ task:
environment:
CI_ARCH: x86_64
CI_OS: linux
EXTRA_APT_PACKAGES: "gdmd llvm-dev libclang-common-19-dev lld"
EXTRA_CMAKE_FLAGS: "-DBUILD_SHARED_LIBS=ON -DBUILD_LTO_LIBS=ON -DD_COMPILER=gdmd -DLDC_LINK_MANUALLY=ON"
EXTRA_APT_PACKAGES: "gdmd llvm-dev libclang-common-20-dev lld libcurl4-openssl-dev"
# need `-DCMAKE_EXE_LINKER_FLAGS=-lcurl` to work around libcurl dependency for ldc-profdata (distro LLVM apparently built with non-default LLVM_ENABLE_CURL=ON)
EXTRA_CMAKE_FLAGS: >-
-DBUILD_SHARED_LIBS=ON
-DBUILD_LTO_LIBS=ON
-DD_COMPILER=gdmd
-DLDC_LINK_MANUALLY=ON
-DCMAKE_EXE_LINKER_FLAGS=-lcurl
PARALLELISM: 8
# for gdmd:
LANG: C.UTF-8
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,8 @@ jobs:
os: android
arch: armv7a
android_x86_arch: i686
extra_cmake_flags: >-
-DLDC_INSTALL_LLVM_RUNTIME_LIBS_ARCH=arm-android

- job_name: Android aarch64
host_os: ubuntu-22.04
Expand Down
11 changes: 9 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -894,8 +894,15 @@ if (LDC_INSTALL_LLVM_RUNTIME_LIBS)
if(CMAKE_SIZEOF_VOID_P EQUAL 4)
set(compilerrt_arch_suffix "i386")
endif()
copy_compilerrt_lib("clang_rt.asan-${compilerrt_arch_suffix}.lib" "ldc_rt.asan.lib" FALSE)
copy_compilerrt_lib("clang_rt.lsan-${compilerrt_arch_suffix}.lib" "ldc_rt.lsan.lib" FALSE)
if(LDC_LLVM_VER LESS 2000)
copy_compilerrt_lib("clang_rt.asan-${compilerrt_arch_suffix}.lib" "ldc_rt.asan.lib" FALSE)
copy_compilerrt_lib("clang_rt.lsan-${compilerrt_arch_suffix}.lib" "ldc_rt.lsan.lib" FALSE)
else()
copy_compilerrt_lib("clang_rt.asan_static_runtime_thunk-${compilerrt_arch_suffix}.lib" "ldc_rt.asan_static_runtime_thunk.lib" FALSE)
copy_compilerrt_lib("clang_rt.asan_dynamic_runtime_thunk-${compilerrt_arch_suffix}.lib" "ldc_rt.asan_dynamic_runtime_thunk.lib" FALSE)
copy_compilerrt_lib("clang_rt.asan_dynamic-${compilerrt_arch_suffix}.lib" "ldc_rt.asan.lib" FALSE)
copy_compilerrt_lib("clang_rt.asan_dynamic-${compilerrt_arch_suffix}.dll" "clang_rt.asan_dynamic-${compilerrt_arch_suffix}.dll" FALSE)
endif()
copy_compilerrt_lib("clang_rt.builtins-${compilerrt_arch_suffix}.lib" "ldc_rt.builtins.lib" FALSE)
copy_compilerrt_lib("clang_rt.profile-${compilerrt_arch_suffix}.lib" "ldc_rt.profile.lib" FALSE)
copy_compilerrt_lib("clang_rt.fuzzer-${compilerrt_arch_suffix}.lib" "ldc_rt.fuzzer.lib" FALSE)
Expand Down
7 changes: 4 additions & 3 deletions cmake/Modules/FindLLVM.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@
# We also want an user-specified LLVM_ROOT_DIR to take precedence over the
# system default locations such as /usr/local/bin. Executing find_program()
# multiples times is the approach recommended in the docs.
set(llvm_config_names llvm-config-19.1 llvm-config191 llvm-config-19
set(llvm_config_names llvm-config-20.1 llvm-config201 llvm-config-20
llvm-config-19.1 llvm-config191 llvm-config-19
llvm-config-18.1 llvm-config181 llvm-config-18
llvm-config-17.0 llvm-config170 llvm-config-17
llvm-config-16.0 llvm-config160 llvm-config-16
Expand All @@ -47,11 +48,11 @@ if(APPLE)
# extra fallbacks for MacPorts & Homebrew
find_program(LLVM_CONFIG
NAMES ${llvm_config_names}
PATHS /opt/local/libexec/llvm-19/bin
PATHS /opt/local/libexec/llvm-20/bin /opt/local/libexec/llvm-19/bin
/opt/local/libexec/llvm-18/bin /opt/local/libexec/llvm-17/bin
/opt/local/libexec/llvm-16/bin /opt/local/libexec/llvm-15/bin
/opt/local/libexec/llvm/bin
/usr/local/opt/llvm@19/bin
/usr/local/opt/llvm@20/bin /usr/local/opt/llvm@19/bin
/usr/local/opt/llvm@18/bin /usr/local/opt/llvm@17/bin
/usr/local/opt/llvm@16/bin /usr/local/opt/llvm@15/bin
/usr/local/opt/llvm/bin
Expand Down
60 changes: 39 additions & 21 deletions driver/cl_options.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -818,17 +818,21 @@ void hideLLVMOptions() {
"amdgpu-dump-hsa-metadata", "amdgpu-enable-flat-scratch",
"amdgpu-enable-global-sgpr-addr", "amdgpu-enable-merge-m0",
"amdgpu-enable-power-sched", "amdgpu-igrouplp",
"amdgpu-kernarg-preload-count", "amdgpu-promote-alloca-to-vector-limit",
"amdgpu-indirect-call-specialization-threshold",
"amdgpu-kernarg-preload-count", "amdgpu-module-splitting-max-depth",
"amdgpu-promote-alloca-to-vector-limit",
"amdgpu-reserve-vgpr-for-sgpr-spill", "amdgpu-sdwa-peephole",
"amdgpu-use-aa-in-codegen", "amdgpu-verify-hsa-metadata",
"amdgpu-vgpr-index-mode", "arm-add-build-attributes",
"amdgpu-vgpr-index-mode", "argext-abi-check",
"arm-add-build-attributes",
"arm-implicit-it", "asm-instrumentation", "asm-show-inst",
"atomic-counter-update-promoted", "atomic-first-counter",
"basic-block-sections",
"basic-block-address-map", "basic-block-sections",
"basicblock-sections", "bounds-checking-single-trap",
"bounds-checking-unique-traps", "bpf-stack-size", "cfg-hide-cold-paths",
"cfg-hide-deoptimize-paths", "cfg-hide-unreachable-paths",
"code-model", "cost-kind", "cppfname", "cppfor", "cppgen",
"check-functions-filter", "code-model", "conditional-counter-update",
"cost-kind", "cppfname", "cppfor", "cppgen", "crel",
"cvp-dont-add-nowrap-flags",
"cvp-dont-process-adds", "debug-counter", "debug-entry-values",
"debugger-tune", "debugify-func-limit", "debugify-level",
Expand All @@ -847,27 +851,32 @@ void hideLLVMOptions() {
"enable-cse-in-irtranslator", "enable-cse-in-legalizer",
"enable-emscripten-cxx-exceptions", "enable-emscripten-sjlj",
"enable-fp-mad", "enable-gvn-hoist", "enable-gvn-memdep",
"enable-gvn-memoryssa",
"enable-gvn-sink", "enable-implicit-null-checks", "enable-jmc-instrument",
"enable-load-in-loop-pre",
"enable-jump-table-to-switch", "enable-load-in-loop-pre",
"enable-load-pre", "enable-loop-simplifycfg-term-folding",
"enable-misched", "enable-name-compression", "enable-no-infs-fp-math",
"enable-no-nans-fp-math", "enable-no-signed-zeros-fp-math",
"enable-no-trapping-fp-math", "enable-objc-arc-annotations",
"enable-objc-arc-opts", "enable-pie", "enable-scoped-noalias",
"enable-objc-arc-opts", "enable-pgo-force-function-attrs",
"enable-pie", "enable-scoped-noalias",
"enable-split-backedge-in-load-pre", "enable-split-loopiv-heuristic",
"enable-tbaa", "enable-tlsdesc", "enable-unsafe-fp-math",
"exception-model", "exhaustive-register-search", "expensive-combines",
"enable-vtable-profile-use", "enable-vtable-value-profiling",
"exception-model", "exhaustive-register-search",
"expand-variadics-override", "expensive-combines",
"experimental-debug-variable-locations",
"experimental-debuginfo-iterators",
"fatal-assembler-warnings", "filter-print-funcs",
"fatal-assembler-warnings", "fdpic", "filter-print-funcs",
"force-dwarf-frame-section", "force-opaque-pointers",
"force-tail-folding-style",
"fs-profile-debug-bw-threshold", "fs-profile-debug-prob-diff-threshold",
"generate-merged-base-profiles",
"gpsize", "hash-based-counter-split", "hexagon-rdf-limit",
"hot-cold-split", "ignore-xcoff-visibility",
"gpsize", "hash-based-counter-split", "hexagon-add-build-attributes",
"hexagon-rdf-limit", "hot-cold-split", "hwasan-percentile-cutoff-hot",
"hwasan-random-rate", "ignore-xcoff-visibility",
"imp-null-check-page-size", "imp-null-max-insts-to-consider",
"import-all-index", "incremental-linker-compatible",
"implicit-mapsyms", "import-all-index", "incremental-linker-compatible",
"instcombine-code-sinking", "instcombine-guard-widening-window",
"instcombine-max-iterations", "instcombine-max-num-phis",
"instcombine-max-sink-users",
Expand All @@ -876,7 +885,9 @@ void hideLLVMOptions() {
"instrprof-atomic-counter-update-all", "internalize-public-api-file",
"internalize-public-api-list", "iterative-counter-promotion",
"join-liveintervals", "jump-table-type", "large-data-threshold",
"limit-float-precision", "lower-global-dtors-via-cxa-atexit",
"limit-float-precision", "lint-abort-on-error", "loongarch-use-aa",
"lower-allow-check-percentile-cutoff-hot",
"lower-allow-check-random-rate", "lower-global-dtors-via-cxa-atexit",
"lto-embed-bitcode", "matrix-default-layout",
"matrix-print-after-transpose-opt", "matrix-propagate-shape",
"max-counter-promotions", "max-counter-promotions-per-loop",
Expand All @@ -888,7 +899,7 @@ void hideLLVMOptions() {
"mno-fixup", "mno-ldc1-sdc1", "mno-pairing", "mwarn-missing-parenthesis",
"mwarn-noncontigious-register", "mwarn-sign-mismatch", "mxcoff-roptr",
"no-discriminators", "no-integrated-as", "no-type-check", "no-xray-index",
"nozero-initialized-in-bss", "nvptx-sched4reg",
"nozero-initialized-in-bss", "nvptx-approx-log2f32", "nvptx-sched4reg",
"objc-arc-annotation-target-identifier",
"object-size-offset-visitor-max-visit-instructions",
"pgo-block-coverage", "pgo-temporal-instrumentation",
Expand All @@ -900,21 +911,26 @@ void hideLLVMOptions() {
"print-pipeline-passes", "profile-correlate",
"profile-estimator-loop-weight", "profile-estimator-loop-weight",
"profile-file", "profile-info-file", "profile-verifier-noassert",
"pseudo-probe-for-profiling",
"promote-alloca-vector-loop-user-weight", "pseudo-probe-for-profiling",
"r600-ir-structurize", "rdf-dump", "rdf-limit", "recip", "regalloc",
"relax-elf-relocations", "remarks-section", "rewrite-map-file",
"riscv-add-build-attributes", "riscv-use-aa", "rng-seed",
"runtime-counter-relocation", "safepoint-ir-verifier-print-only",
"sample-profile-check-record-coverage",
"sample-profile-check-sample-coverage",
"sample-profile-inline-hot-threshold",
"sample-profile-max-propagate-iterations", "shrink-wrap", "simplify-mir",
"sample-profile-max-propagate-iterations",
"sampled-instr-burst-duration", "sampled-instr-period",
"sampled-instrumentation", "save-temp-labels", "separate-named-sections",
"shrink-wrap", "simplify-mir",
"skip-ret-exit-block",
"speculative-counter-promotion-max-exiting",
"speculative-counter-promotion-to-loop", "spiller", "spirv-debug",
"spirv-erase-cl-md", "spirv-lower-const-expr", "spirv-mem2reg",
"spirv-erase-cl-md", "spirv-ext", "spirv-lower-const-expr",
"spirv-mem2reg",
"spirv-no-deref-attr", "spirv-text", "spirv-verify-regularize-passes",
"split-machine-functions", "spv-dump-deps",
"spv-emit-nonsemantic-debug-info",
"spv-lower-saddwithoverflow-validate", "spvbool-validate",
"spvmemmove-validate", "stack-alignment", "stack-protector-guard",
"stack-protector-guard-offset", "stack-protector-guard-reg",
Expand All @@ -923,21 +939,23 @@ void hideLLVMOptions() {
"static-func-strip-dirname-prefix", "stats", "stats-json", "strict-dwarf",
"strip-debug", "struct-path-tbaa", "summary-file", "sve-tail-folding",
"swift-async-fp",
"tail-predication", "tailcallopt", "thinlto-assume-merged",
"tail-predication", "tailcallopt", "target-abi", "thinlto-assume-merged",
"thread-model", "time-passes", "time-trace-granularity", "tls-size",
"translator-compatibility-mode",
"type-based-intrinsic-cost", "unfold-element-atomic-memcpy-max-elements",
"unique-basic-block-section-names", "unique-bb-section-names",
"unique-section-names", "unit-at-a-time", "use-ctors",
"vec-extabi", "verify-debug-info", "verify-dom-info",
"verify-legalizer-debug-locs", "verify-loop-info",
"verify-loop-lcssa", "verify-machine-dom-info", "verify-regalloc",
"verify-region-info", "verify-scev", "verify-scev-maps",
"vp-counters-per-site", "vp-static-alloc",
"wasm-enable-eh", "wasm-enable-sjlj",
"vp-counters-per-site", "vp-static-alloc", "wasm-enable-eh",
"wasm-enable-exnref", "wasm-enable-sjlj", "wasm-use-legacy-eh",
"wholeprogramdevirt-cutoff", "write-experimental-debuginfo",
"x86-align-branch", "x86-align-branch-boundary",
"x86-branches-within-32B-boundaries", "x86-early-ifcvt",
"x86-pad-max-prefix-size",
"x86-recip-refinement-steps", "x86-use-vzeroupper",
"x86-pad-max-prefix-size", "x86-recip-refinement-steps",
"x86-relax-relocations", "x86-sse2avx", "x86-use-vzeroupper",
"xcoff-traceback-table", "xray-function-index",

// We enable -fdata-sections/-ffunction-sections by default where it makes
Expand Down
4 changes: 4 additions & 0 deletions driver/cl_options_sanitizers.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,11 @@
#pragma once

#include "driver/cl_helpers.h"
#if LDC_LLVM_VER >= 2000
#include "llvm/Transforms/Utils/Instrumentation.h"
#else
#include "llvm/Transforms/Instrumentation.h"
#endif

class FuncDeclaration;
namespace llvm {
Expand Down
13 changes: 11 additions & 2 deletions driver/linker-msvc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,18 @@ void addLibIfFound(std::vector<std::string> &args, const llvm::Twine &name) {
}
}

void addSanitizerLibs(std::vector<std::string> &args) {
void addSanitizerLibs(bool useInternalToolchain,
std::vector<std::string> &args) {
if (opts::isSanitizerEnabled(opts::AddressSanitizer)) {
args.push_back("ldc_rt.asan.lib");
#if LDC_LLVM_VER >= 2000 // extra library since LLVM 20
const bool linkStaticCRT =
getMscrtLibName(&useInternalToolchain).contains_lower("libcmt");
args.push_back((llvm::Twine("ldc_rt.asan_") +
(linkStaticCRT ? "static" : "dynamic") +
"_runtime_thunk.lib")
.str());
#endif
} else if (opts::isSanitizerEnabled(opts::LeakSanitizer)) {
// If ASan is enabled, it includes LSan. So only add LSan link flags if ASan is _not_ enabled already.
args.push_back("ldc_rt.lsan.lib");
Expand Down Expand Up @@ -187,7 +196,7 @@ int linkObjToBinaryMSVC(llvm::StringRef outputPath,

// LLVM compiler-rt libs
addLibIfFound(args, "ldc_rt.builtins.lib");
addSanitizerLibs(args);
addSanitizerLibs(useInternalToolchain, args);
if (opts::isInstrumentingForPGO()) {
args.push_back("ldc_rt.profile.lib");
// it depends on ws2_32 for symbol `gethostname`
Expand Down
15 changes: 9 additions & 6 deletions driver/targetmachine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,18 @@
#endif

#ifdef LDC_LLVM_SUPPORTS_MACHO_DWARF_LINE_AS_REGULAR_SECTION
// LDC-LLVM >= 6.0.1:
// On Mac, emit __debug_line section in __DWARF segment as regular (non-debug)
// section, like DMD, to enable file/line infos in backtraces. See
// LDC-LLVM >= 20:
// On Darwin, emit __debug_line section in __DWARF segment as regular
// (non-debug) section, like DMD, to enable file/line infos in backtraces
// without having to resort to an atos process. See
// https://github.com/ldc-developers/ldc/issues/4895
// https://github.com/dlang/dmd/commit/2bf7d0db29416eacbb01a91e6502140e354ee0ef
// https://github.com/ldc-developers/llvm-project/commit/110deda1bc1cf195983fea8c1107886057987955
// https://github.com/ldc-developers/llvm-project/commit/356e996bd217afd883adf3da5fe9a16c1102b273
static llvm::cl::opt<bool, true> preserveDwarfLineSection(
"preserve-dwarf-line-section",
llvm::cl::desc("Mac: preserve DWARF line section during linking for "
"file/line infos in backtraces. Defaults to true."),
llvm::cl::desc("Darwin: preserve DWARF __debug_line section during linking "
"for builtin file/line infos in backtraces without having "
"to resort to an atos process."),
llvm::cl::Hidden, llvm::cl::ZeroOrMore,
llvm::cl::location(ldc::emitMachODwarfLineAsRegularSection),
llvm::cl::init(false));
Expand Down
2 changes: 1 addition & 1 deletion gen/abi/aarch64.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ struct AArch64TargetABI : TargetABI {
// compiler magic: pass va_list args implicitly by reference
if (!isReturnVal && isAAPCS64VaList(t)) {
arg.byref = true;
arg.ltype = arg.ltype->getPointerTo();
arg.ltype = LLPointerType::getUnqual(arg.ltype);
return;
}

Expand Down
4 changes: 2 additions & 2 deletions gen/classes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ DValue *DtoDynamicCastObject(Loc loc, DValue *val, Type *_to) {
// Object _d_dynamic_cast(Object o, ClassInfo c)
llvm::Function *func =
getRuntimeFunction(loc, gIR->module, "_d_dynamic_cast");
LLFunctionType *funcTy = func->getFunctionType();
[[maybe_unused]] LLFunctionType *funcTy = func->getFunctionType();

// Object o
LLValue *obj = DtoRVal(val);
Expand Down Expand Up @@ -483,7 +483,7 @@ DtoVirtualFunctionPointer(DValue *inst, FuncDeclaration *fdecl) {
// get the vtbl for objects
vtable = DtoGEP(irtc->getMemoryLLType(), vthis, 0u, 0);
// load vtbl ptr
vtable = DtoLoad(vtblType->getPointerTo(), vtable);
vtable = DtoLoad(LLPointerType::getUnqual(vtblType), vtable);
// index vtbl
const std::string name = fdecl->toChars();
const auto vtblname = name + "@vtbl";
Expand Down
2 changes: 1 addition & 1 deletion gen/dcompute/druntime.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ struct DcomputePointer {
int as = addrspace;
if (translate)
as = gIR->dcomputetarget->mapping[as];
return llType->getPointerTo(as);
return LLPointerType::get(llType, as);
}
};
llvm::Optional<DcomputePointer> toDcomputePointer(StructDeclaration *sd);
Loading