Update LLVM to bab165ecb0d (#7413)

This required a minor change to patch 0009, and allows us to drop patch
0010.
This commit is contained in:
Nicholas Bishop
2026-06-24 18:04:48 +00:00
committed by GitHub
parent 039b4e9b17
commit 999dcc5bf0
14 changed files with 86 additions and 221 deletions
+2 -3
View File
@@ -83,8 +83,8 @@ git_override(
build_file_content = "# empty",
# We pin to specific upstream commits and try to track top-of-tree
# reasonably closely rather than pinning to a specific release.
# HEAD as of 2026-05-14.
commit = "9a4faee1068c09efbf837cfb7b0f5693b24635f4",
# HEAD as of 2026-06-23.
commit = "bab165ecb0d64686849dfa14d1798589eee7b66e",
patch_cmds = ["echo \"module(name='llvm-raw')\" > MODULE.bazel"],
patch_strip = 1,
patches = [
@@ -93,7 +93,6 @@ git_override(
"//bazel/llvm_project:0004_Introduce_basic_sources_exporting_for_libunwind.patch",
"//bazel/llvm_project:0005_Introduce_basic_sources_exporting_for_libcxx_and_libcxxabi.patch",
"//bazel/llvm_project:0009_Introduce_starlark_exporting_compiler-rt_build_information.patch",
"//bazel/llvm_project:0010_Expose_vptr_init.patch",
],
remote = "https://github.com/llvm/llvm-project.git",
)
+1 -1
View File
@@ -323,7 +323,7 @@
},
"//bazel/llvm_project:llvm_project.bzl%llvm_project": {
"general": {
"bzlTransitiveDigest": "xDeO6VeJOhQ/KmsAtVhSrY+/XoomqAxdF2SG/XbIkX4=",
"bzlTransitiveDigest": "4DgU62e9O5rmV6Yzqa1tjFyBSVED44nXdYn84nxuJC8=",
"usagesDigest": "uwwVdRj/NhFVoOIaadPP393kgC/Uu3/nTX9ln69oWp4=",
"recordedFileInputs": {},
"recordedDirentsInputs": {},
@@ -1,18 +1,22 @@
Commit ID: d3b82534c2546a892a27856672ed95a7db97dba3
Change ID: zyxuvzwmzsnorloyuupuurxkppkoplnw
Author : Chandler Carruth <chandlerc@gmail.com> (2026-02-16 23:17:06)
Committer: Chandler Carruth <chandlerc@gmail.com> (2026-03-11 07:54:02)
From 0ee985a794692a0eba510f54657400d814f5d2fa Mon Sep 17 00:00:00 2001
From: Chandler Carruth <chandlerc@gmail.com>
Date: Wed, 24 Jun 2026 11:29:41 -0400
Subject: [PATCH] Improve compiler-rt build structure and export compilation
info
Improve compiler-rt build structure and export compilation info
This first improves the structure of the compiler-rt BUILD.bazel, fixing
bugs and exposing more carefully arranged source files.
This first improves the structure of the compiler-rt BUILD.bazel, fixing
bugs and exposing more carefully arranged source files.
It also exposes compilation info for builtins and CRT files for use in
compiling these source files.
It also exposes compilation info for builtins and CRT files for use in
compiling these source files.
---
.../compiler-rt/BUILD.bazel | 219 +++++++++++++++---
.../compiler-rt/compiler-rt.bzl | 153 ++++++++++++
2 files changed, 336 insertions(+), 36 deletions(-)
create mode 100644 utils/bazel/llvm-project-overlay/compiler-rt/compiler-rt.bzl
diff --git a/utils/bazel/llvm-project-overlay/compiler-rt/BUILD.bazel b/utils/bazel/llvm-project-overlay/compiler-rt/BUILD.bazel
index 4ded226174..3b5b8fc787 100644
index 0c5e0af4cb48..ae4a99d6885c 100644
--- a/utils/bazel/llvm-project-overlay/compiler-rt/BUILD.bazel
+++ b/utils/bazel/llvm-project-overlay/compiler-rt/BUILD.bazel
@@ -3,6 +3,7 @@
@@ -23,7 +27,7 @@ index 4ded226174..3b5b8fc787 100644
package(
default_visibility = ["//visibility:public"],
@@ -160,9 +161,15 @@
@@ -188,9 +189,15 @@ filegroup(
srcs = BUILTINS_CRTEND_SRCS,
)
@@ -40,7 +44,7 @@ index 4ded226174..3b5b8fc787 100644
"lib/builtins/enable_execute_stack.c",
"lib/builtins/eprintf.c",
]
@@ -224,11 +231,11 @@
@@ -252,11 +259,11 @@ filegroup(
),
)
@@ -54,7 +58,7 @@ index 4ded226174..3b5b8fc787 100644
)
BUILTINS_MACOS_ATOMIC_SRCS_PATTERNS = [
@@ -241,6 +248,28 @@
@@ -269,6 +276,28 @@ filegroup(
srcs = glob(BUILTINS_MACOS_ATOMIC_SRCS_PATTERNS),
)
@@ -83,7 +87,7 @@ index 4ded226174..3b5b8fc787 100644
# Apple-platform specific SME source file.
filegroup(
name = "builtins_aarch64_apple_sme_srcs",
@@ -305,10 +334,13 @@
@@ -341,11 +370,14 @@ AARCH64_OUTLINE_ATOMICS_FMT = "lib/builtins/aarch64/outline_atomic_{0}{1}_{2}.S"
# Source files for the AArch64 architecture-specific builtins.
filegroup(
@@ -92,13 +96,14 @@ index 4ded226174..3b5b8fc787 100644
srcs = [
"lib/builtins/cpu_model/aarch64.c",
"lib/builtins/cpu_model/aarch64.h",
":builtins_aarch64_sme_os_srcs",
+ ":builtins_bf16_srcs",
+ ":builtins_generic_srcs",
+ ":builtins_tf_srcs",
] + [
AARCH64_OUTLINE_ATOMICS_FMT.format(pat, size, model)
for (pat, size, model) in AARCH64_OUTLINE_ATOMICS
@@ -328,10 +360,20 @@
@@ -365,10 +397,20 @@ filegroup(
"lib/builtins/aarch64/lse.S",
# These files are provided by SME-specific file groups above.
"lib/builtins/aarch64/*sme*",
@@ -119,7 +124,7 @@ index 4ded226174..3b5b8fc787 100644
BUILTINS_ARM_VFP_SRCS_PATTERNS = [
"lib/builtins/arm/*vfp*.S",
"lib/builtins/arm/*vfp*.c",
@@ -348,9 +390,19 @@
@@ -385,9 +427,19 @@ filegroup(
),
)
@@ -140,7 +145,7 @@ index 4ded226174..3b5b8fc787 100644
srcs = glob(
[
"lib/builtins/arm/*.S",
@@ -359,14 +411,52 @@
@@ -396,14 +448,52 @@ filegroup(
"lib/builtins/arm/*.h",
],
allow_empty = True,
@@ -154,10 +159,9 @@ index 4ded226174..3b5b8fc787 100644
)
-# Source files for the PPC architecture-specific builtins.
-filegroup(
filegroup(
- name = "builtins_ppc_srcs",
- srcs = glob(
+filegroup(
+ name = "builtins_unfiltered_armv7_srcs",
+ srcs = [
+ ":builtins_arm_arch_srcs",
@@ -198,28 +202,20 @@ index 4ded226174..3b5b8fc787 100644
[
"lib/builtins/ppc/*.S",
"lib/builtins/ppc/*.c",
@@ -377,17 +467,64 @@
@@ -414,19 +504,66 @@ filegroup(
),
)
-# Source files for the RISC-V architecture-specific builtins.
-filegroup(
- name = "builtins_riscv_srcs",
- srcs = glob(
- [
- "lib/builtins/riscv/*.S",
- "lib/builtins/riscv/*.c",
- "lib/builtins/riscv/*.cpp",
- ],
- allow_empty = True,
- ),
+make_filtered_builtins_srcs_groups(
+ name = "builtins_ppc64_srcs",
+ srcs = [":builtins_unfiltered_ppc64_srcs"],
+ textual_name = "builtins_ppc64_textual_srcs",
+)
+
+filegroup(
filegroup(
- name = "builtins_riscv_srcs",
- srcs = glob(
+ name = "builtins_unfiltered_ppc32_srcs",
+ srcs = [":builtins_generic_srcs"],
+)
@@ -257,24 +253,26 @@ index 4ded226174..3b5b8fc787 100644
+ srcs = [
+ ":builtins_generic_srcs",
+ ] + glob(
+ [
+ "lib/builtins/riscv/*.S",
+ "lib/builtins/riscv/*.c",
+ "lib/builtins/riscv/*.cpp",
[
"lib/builtins/riscv/*.S",
"lib/builtins/riscv/*.c",
"lib/builtins/riscv/*.cpp",
+ "lib/builtins/riscv/*.h",
+ ],
+ allow_empty = True,
+ ),
+)
+
],
allow_empty = True,
),
)
+make_filtered_builtins_srcs_groups(
+ name = "builtins_riscv32_srcs",
+ srcs = [":builtins_unfiltered_riscv32_srcs"],
+ textual_name = "builtins_riscv32_textual_srcs",
)
+)
+
# Source files for the x86 architecture specific builtins (both 32-bit and
@@ -402,8 +539,14 @@
# 64-bit).
filegroup(
@@ -439,8 +576,14 @@ filegroup(
# Source files for the x86-64 architecture specific builtins.
filegroup(
@@ -291,7 +289,7 @@ index 4ded226174..3b5b8fc787 100644
[
"lib/builtins/x86_64/*.S",
"lib/builtins/x86_64/*.c",
@@ -411,13 +554,29 @@
@@ -448,13 +591,29 @@ filegroup(
"lib/builtins/x86_64/*.h",
],
allow_empty = True,
@@ -323,7 +321,7 @@ index 4ded226174..3b5b8fc787 100644
[
"lib/builtins/i386/*.S",
"lib/builtins/i386/*.c",
@@ -429,28 +588,16 @@
@@ -466,28 +625,16 @@ filegroup(
# This file is used for both i386 and x86_64 and so included in the
# broader x86 sources.
"lib/builtins/i386/fp_mode.c",
@@ -362,7 +360,7 @@ index 4ded226174..3b5b8fc787 100644
)
diff --git a/utils/bazel/llvm-project-overlay/compiler-rt/compiler-rt.bzl b/utils/bazel/llvm-project-overlay/compiler-rt/compiler-rt.bzl
new file mode 100644
index 0000000000..e33ceb6a89
index 000000000000..e33ceb6a89da
--- /dev/null
+++ b/utils/bazel/llvm-project-overlay/compiler-rt/compiler-rt.bzl
@@ -0,0 +1,153 @@
@@ -519,3 +517,6 @@ index 0000000000..e33ceb6a89
+ name = textual_name,
+ srcs = srcs,
+ )
--
2.55.0.rc0.799.gd6f94ed593-goog
@@ -1,145 +0,0 @@
diff --git a/clang/include/clang/CodeGen/ModuleBuilder.h b/clang/include/clang/CodeGen/ModuleBuilder.h
index 5173fd05d75d..a144e904b022 100644
--- a/clang/include/clang/CodeGen/ModuleBuilder.h
+++ b/clang/include/clang/CodeGen/ModuleBuilder.h
@@ -32,6 +32,7 @@ namespace llvm {
inline constexpr llvm::StringRef ClangTrapPrefix = "__clang_trap_msg";
namespace clang {
+ class BaseSubobject;
class CodeGenOptions;
class CoverageSourceInfo;
class Decl;
@@ -105,6 +106,8 @@ public:
/// definition has been registered with this code generator.
llvm::Constant *GetAddrOfGlobal(GlobalDecl decl, bool isForDefinition);
+ llvm::Constant *GetAddrOfVTable(BaseSubobject base, CXXRecordDecl *decl);
+
/// Create a new \c llvm::Module after calling HandleTranslationUnit. This
/// enable codegen in interactive processing environments.
llvm::Module* StartModule(llvm::StringRef ModuleName, llvm::LLVMContext &C);
diff --git a/clang/lib/CodeGen/ModuleBuilder.cpp b/clang/lib/CodeGen/ModuleBuilder.cpp
index dd6b3c904d03..82f5bc336591 100644
--- a/clang/lib/CodeGen/ModuleBuilder.cpp
+++ b/clang/lib/CodeGen/ModuleBuilder.cpp
@@ -11,6 +11,7 @@
//===----------------------------------------------------------------------===//
#include "clang/CodeGen/ModuleBuilder.h"
+#include "CGCXXABI.h"
#include "CGDebugInfo.h"
#include "CodeGenModule.h"
#include "clang/AST/ASTContext.h"
@@ -131,6 +132,11 @@ namespace {
return Builder->GetAddrOfGlobal(global, ForDefinition_t(isForDefinition));
}
+ llvm::Constant *GetAddrOfVTable(BaseSubobject subobject,
+ CXXRecordDecl *decl) {
+ return Builder->getCXXABI().getVTableAddressPoint(subobject, decl);
+ }
+
llvm::Module *StartModule(llvm::StringRef ModuleName,
llvm::LLVMContext &C) {
assert(!M && "Replacing existing Module?");
@@ -377,6 +383,11 @@ llvm::Constant *CodeGenerator::GetAddrOfGlobal(GlobalDecl global,
->GetAddrOfGlobal(global, isForDefinition);
}
+llvm::Constant *CodeGenerator::GetAddrOfVTable(BaseSubobject base,
+ CXXRecordDecl *decl) {
+ return static_cast<CodeGeneratorImpl *>(this)->GetAddrOfVTable(base, decl);
+}
+
llvm::Module *CodeGenerator::StartModule(llvm::StringRef ModuleName,
llvm::LLVMContext &C) {
return static_cast<CodeGeneratorImpl*>(this)->StartModule(ModuleName, C);
diff --git a/clang/unittests/CodeGen/CodeGenExternalTest.cpp b/clang/unittests/CodeGen/CodeGenExternalTest.cpp
index be3be147460f..8ad1ead91532 100644
--- a/clang/unittests/CodeGen/CodeGenExternalTest.cpp
+++ b/clang/unittests/CodeGen/CodeGenExternalTest.cpp
@@ -10,6 +10,7 @@
#include "clang/AST/ASTConsumer.h"
#include "clang/AST/ASTContext.h"
+#include "clang/AST/BaseSubobject.h"
#include "clang/AST/GlobalDecl.h"
#include "clang/AST/RecursiveASTVisitor.h"
#include "clang/Basic/TargetInfo.h"
@@ -21,6 +22,7 @@
#include "clang/Sema/Sema.h"
#include "llvm/IR/Instructions.h"
#include "llvm/IR/LLVMContext.h"
+#include "llvm/IR/Operator.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/MemoryBuffer.h"
#include "llvm/TargetParser/Host.h"
@@ -163,7 +165,12 @@ bool MyASTConsumer::shouldSkipFunctionBody(Decl *D) {
const char TestProgram[] =
"struct mytest_struct { char x; short y; char p; long z; };\n"
- "int mytest_fn(int x) { return x; }\n";
+ "int mytest_fn(int x) { return x; }\n"
+ "struct mytest_dynamic_struct {\n"
+ " mytest_dynamic_struct();\n"
+ " virtual void f1();\n"
+ "};\n"
+ "mytest_dynamic_struct::mytest_dynamic_struct() { }\n";
// This function has the real test code here
static void test_codegen_fns(MyASTConsumer *my) {
@@ -176,17 +183,19 @@ static void test_codegen_fns(MyASTConsumer *my) {
for (auto decl : my->toplevel_decls ) {
if (FunctionDecl *fd = dyn_cast<FunctionDecl>(decl)) {
- if (fd->getName() == "mytest_fn") {
- Constant *c = my->Builder->GetAddrOfGlobal(GlobalDecl(fd), false);
- // Verify that we got a function.
- ASSERT_TRUE(c != NULL);
- if (DebugThisTest) {
- c->print(dbgs(), true);
- dbgs() << "\n";
+ if (fd->getDeclName().isIdentifier()) {
+ if (fd->getName() == "mytest_fn") {
+ Constant *c = my->Builder->GetAddrOfGlobal(GlobalDecl(fd), false);
+ // Verify that we got a function.
+ ASSERT_TRUE(c != NULL);
+ if (DebugThisTest) {
+ c->print(dbgs(), true);
+ dbgs() << "\n";
+ }
+ mytest_fn_ok = true;
}
- mytest_fn_ok = true;
}
- } else if(clang::RecordDecl *rd = dyn_cast<RecordDecl>(decl)) {
+ } else if(CXXRecordDecl *rd = dyn_cast<CXXRecordDecl>(decl)) {
if (rd->getName() == "mytest_struct") {
RecordDecl *def = rd->getDefinition();
ASSERT_TRUE(def != NULL);
@@ -247,6 +256,24 @@ static void test_codegen_fns(MyASTConsumer *my) {
ASSERT_GE(zTy->getPrimitiveSizeInBits(), 32u); // long is at least 32b
mytest_struct_ok = true;
+ } else if (rd->getName() == "mytest_dynamic_struct") {
+ Constant *c = my->Builder->GetAddrOfVTable(
+ BaseSubobject(rd, CharUnits::fromQuantity(0)), rd);
+ ASSERT_NE(c, nullptr);
+ Value *vtableGlobal = c->getOperand(0);
+ ASSERT_NE(vtableGlobal, nullptr);
+ ASSERT_EQ(vtableGlobal->getName(), "_ZTV21mytest_dynamic_struct");
+ const DataLayout &dataLayout =
+ my->Builder->GetModule()->getDataLayout();
+ unsigned pointerSizeInBits =
+ dataLayout.getPointerTypeSizeInBits(c->getType());
+ APInt offset(pointerSizeInBits, 0);
+ GEPOperator* gepOperator = dyn_cast<GEPOperator>(c);
+ ASSERT_NE(gepOperator, nullptr);
+ gepOperator->accumulateConstantOffset(dataLayout, offset);
+ // Itanium ABI has a couple of pointersi (offset to top, type info)
+ // before the array of function pointers.
+ ASSERT_EQ(offset, (pointerSizeInBits / 8) * 2);
}
}
}
@@ -24,9 +24,19 @@ import Cpp library "";
library "[[@TEST_NAME]]";
// CHECK:STDERR: fail_import_cpp_library_file_with_quotes.carbon:[[@LINE+4]]:10: error: '\"foo.h\"' file not found [CppInteropParseError]
// CHECK:STDERR: 8 | #include "\"foo.h\""
// CHECK:STDERR: | ^~~~~~~~~~~
// CHECK:STDERR: fail_import_cpp_library_file_with_quotes.carbon:[[@LINE+14]]:10: error: '\' file not found [CppInteropParseError]
// CHECK:STDERR: 18 | #include "\"foo.h\""
// CHECK:STDERR: | ^~~
// CHECK:STDERR:
// CHECK:STDERR: fail_import_cpp_library_file_with_quotes.carbon:[[@LINE+10]]:13: error: invalid suffix on literal; C++11 requires a space between literal and identifier [CppInteropParseError]
// CHECK:STDERR: 18 | #include "\"foo.h\""
// CHECK:STDERR: | ^
// CHECK:STDERR: | {{}}
// CHECK:STDERR:
// CHECK:STDERR: fail_import_cpp_library_file_with_quotes.carbon:[[@LINE+5]]:13: warning: extra tokens at end of #include directive [CppInteropParseWarning]
// CHECK:STDERR: 18 | #include "\"foo.h\""
// CHECK:STDERR: | ^
// CHECK:STDERR: | //
// CHECK:STDERR:
import Cpp library "\"foo.h\"";
@@ -59,7 +59,7 @@ fn VectorizedWithOptSpeed(a: array(i32, 65536)*) {
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: ; Function Attrs: nofree norecurse nosync nounwind memory(argmem: readwrite)
// CHECK:STDOUT: define void @_CVectorizedWithOptSpeed.Main(ptr captures(none) %a) local_unnamed_addr #1 !dbg !16 {
// CHECK:STDOUT: define void @_CVectorizedWithOptSpeed.Main(ptr nofree captures(none) %a) local_unnamed_addr #1 !dbg !16 {
// CHECK:STDOUT: entry:
// CHECK:STDOUT: br label %while.body, !dbg !22
// CHECK:STDOUT:
@@ -59,7 +59,7 @@ fn VectorizedWithOptSpeed(a: array(i32, 65536)*) {
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: ; Function Attrs: nofree norecurse nosync nounwind memory(argmem: readwrite)
// CHECK:STDOUT: define void @_CVectorizedWithOptSpeed.Main(ptr captures(none) %a) local_unnamed_addr #1 !dbg !16 {
// CHECK:STDOUT: define void @_CVectorizedWithOptSpeed.Main(ptr nofree captures(none) %a) local_unnamed_addr #1 !dbg !16 {
// CHECK:STDOUT: entry:
// CHECK:STDOUT: br label %while.body, !dbg !22
// CHECK:STDOUT:
@@ -59,7 +59,7 @@ fn VectorizedWithOptSpeed(a: array(i32, 65536)*) {
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: ; Function Attrs: nofree norecurse nosync nounwind memory(argmem: readwrite)
// CHECK:STDOUT: define void @_CVectorizedWithOptSpeed.Main(ptr captures(none) %a) local_unnamed_addr #1 !dbg !16 {
// CHECK:STDOUT: define void @_CVectorizedWithOptSpeed.Main(ptr nofree captures(none) %a) local_unnamed_addr #1 !dbg !16 {
// CHECK:STDOUT: entry:
// CHECK:STDOUT: br label %vector.body, !dbg !22
// CHECK:STDOUT:
@@ -82,7 +82,7 @@ void f2() {
// CHECK:STDOUT: @a = external global [10 x i8], align 1
// CHECK:STDOUT: @b = dso_local global ptr @a, align 8
// CHECK:STDOUT: @_ZN2t3IiE1iE = linkonce_odr dso_local global i32 0, comdat, align 4
// CHECK:STDOUT: @_ZTV2t1 = dso_local unnamed_addr constant { [3 x ptr] } { [3 x ptr] [ptr null, ptr @_ZTI2t1, ptr @_ZN2t12f1Ev] }, align 8
// CHECK:STDOUT: @_ZTV2t1 = dso_local constant { [3 x ptr] } { [3 x ptr] [ptr null, ptr @_ZTI2t1, ptr @_ZN2t12f1Ev] }, align 8
// CHECK:STDOUT: @_ZTI2t1 = dso_local constant { ptr, ptr } { ptr getelementptr inbounds (ptr, ptr @_ZTVN10__cxxabiv117__class_type_infoE, i64 2), ptr @_ZTS2t1 }, align 8
// CHECK:STDOUT: @_ZTVN10__cxxabiv117__class_type_infoE = external global [0 x ptr]
// CHECK:STDOUT: @_ZTS2t1 = dso_local constant [4 x i8] c"2t1\00", align 1
@@ -619,7 +619,7 @@ fn Four() {
// CHECK:STDOUT:
// CHECK:STDOUT: $_ZTS4Base = comdat any
// CHECK:STDOUT:
// CHECK:STDOUT: @_ZTV7Derived = linkonce_odr dso_local unnamed_addr constant { [3 x ptr] } { [3 x ptr] [ptr null, ptr null, ptr @_ZTI7Derived] }, comdat, align 8
// CHECK:STDOUT: @_ZTV7Derived = linkonce_odr dso_local constant { [3 x ptr] } { [3 x ptr] [ptr null, ptr null, ptr @_ZTI7Derived] }, comdat, align 8
// CHECK:STDOUT: @_ZTT7Derived = linkonce_odr dso_local unnamed_addr constant [1 x ptr] [ptr getelementptr inbounds inrange(-24, 0) ({ [3 x ptr] }, ptr @_ZTV7Derived, i32 0, i32 0, i32 3)], comdat, align 8
// CHECK:STDOUT: @_ZTI7Derived = linkonce_odr dso_local constant { ptr, ptr, i32, i32, ptr, i64 } { ptr getelementptr inbounds (ptr, ptr @_ZTVN10__cxxabiv121__vmi_class_type_infoE, i64 2), ptr @_ZTS7Derived, i32 0, i32 1, ptr @_ZTI4Base, i64 -6141 }, comdat, align 8
// CHECK:STDOUT: @_ZTVN10__cxxabiv121__vmi_class_type_infoE = external global [0 x ptr]
@@ -60,9 +60,9 @@ fn DoThing() {
// CHECK:STDOUT:
// CHECK:STDOUT: $_ZTSN6Carbon7DerivedE = comdat any
// CHECK:STDOUT:
// CHECK:STDOUT: @_ZTV4Base = available_externally unnamed_addr constant { [4 x ptr] } { [4 x ptr] [ptr null, ptr @_ZTI4Base, ptr @_ZN11FurtherBase17further_base_funcEv, ptr @_ZNR4Base4funcEv] }, align 8
// CHECK:STDOUT: @_ZTV11FurtherBase = available_externally unnamed_addr constant { [3 x ptr] } { [3 x ptr] [ptr null, ptr @_ZTI11FurtherBase, ptr @_ZN11FurtherBase17further_base_funcEv] }, align 8
// CHECK:STDOUT: @_ZTVN6Carbon7DerivedE = linkonce_odr dso_local unnamed_addr constant { [5 x ptr] } { [5 x ptr] [ptr null, ptr @_ZTIN6Carbon7DerivedE, ptr @_ZN11FurtherBase17further_base_funcEv, ptr @_ZNR6Carbon7Derived4funcEv, ptr @_ZN6Carbon7Derived10other_funcEv] }, comdat, align 8
// CHECK:STDOUT: @_ZTV4Base = available_externally constant { [4 x ptr] } { [4 x ptr] [ptr null, ptr @_ZTI4Base, ptr @_ZN11FurtherBase17further_base_funcEv, ptr @_ZNR4Base4funcEv] }, align 8
// CHECK:STDOUT: @_ZTV11FurtherBase = available_externally constant { [3 x ptr] } { [3 x ptr] [ptr null, ptr @_ZTI11FurtherBase, ptr @_ZN11FurtherBase17further_base_funcEv] }, align 8
// CHECK:STDOUT: @_ZTVN6Carbon7DerivedE = linkonce_odr dso_local constant { [5 x ptr] } { [5 x ptr] [ptr null, ptr @_ZTIN6Carbon7DerivedE, ptr @_ZN11FurtherBase17further_base_funcEv, ptr @_ZNR6Carbon7Derived4funcEv, ptr @_ZN6Carbon7Derived10other_funcEv] }, comdat, align 8
// CHECK:STDOUT: @_ZTI4Base = external constant ptr
// CHECK:STDOUT: @_ZTI11FurtherBase = external constant ptr
// CHECK:STDOUT: @_ZTIN6Carbon7DerivedE = linkonce_odr dso_local constant { ptr, ptr, ptr } { ptr getelementptr inbounds (ptr, ptr @_ZTVN10__cxxabiv120__si_class_type_infoE, i64 2), ptr @_ZTSN6Carbon7DerivedE, ptr @_ZTI4Base }, comdat, align 8
@@ -98,8 +98,8 @@ fn F(ref r: Cpp.A) {
// CHECK:STDOUT:
// CHECK:STDOUT: $_ZNK1A6by_valEv = comdat any
// CHECK:STDOUT:
// CHECK:STDOUT: @_ZTV1A = available_externally unnamed_addr constant { [4 x ptr] } { [4 x ptr] [ptr null, ptr @_ZTI1A, ptr @_ZN4Base5virt0Ev, ptr @_ZN1A5virt1Ev] }, align 8
// CHECK:STDOUT: @_ZTV4Base = available_externally unnamed_addr constant { [3 x ptr] } { [3 x ptr] [ptr null, ptr @_ZTI4Base, ptr @_ZN4Base5virt0Ev] }, align 8
// CHECK:STDOUT: @_ZTV1A = available_externally constant { [4 x ptr] } { [4 x ptr] [ptr null, ptr @_ZTI1A, ptr @_ZN4Base5virt0Ev, ptr @_ZN1A5virt1Ev] }, align 8
// CHECK:STDOUT: @_ZTV4Base = available_externally constant { [3 x ptr] } { [3 x ptr] [ptr null, ptr @_ZTI4Base, ptr @_ZN4Base5virt0Ev] }, align 8
// CHECK:STDOUT: @_ZTI1A = external constant ptr
// CHECK:STDOUT: @_ZTI4Base = external constant ptr
// CHECK:STDOUT:
@@ -185,8 +185,8 @@ fn F(ref r: Cpp.A) {
// CHECK:STDOUT:
// CHECK:STDOUT: $_ZN1A6by_refEv = comdat any
// CHECK:STDOUT:
// CHECK:STDOUT: @_ZTV1A = available_externally unnamed_addr constant { [4 x ptr] } { [4 x ptr] [ptr null, ptr @_ZTI1A, ptr @_ZN4Base5virt0Ev, ptr @_ZN1A5virt1Ev] }, align 8
// CHECK:STDOUT: @_ZTV4Base = available_externally unnamed_addr constant { [3 x ptr] } { [3 x ptr] [ptr null, ptr @_ZTI4Base, ptr @_ZN4Base5virt0Ev] }, align 8
// CHECK:STDOUT: @_ZTV1A = available_externally constant { [4 x ptr] } { [4 x ptr] [ptr null, ptr @_ZTI1A, ptr @_ZN4Base5virt0Ev, ptr @_ZN1A5virt1Ev] }, align 8
// CHECK:STDOUT: @_ZTV4Base = available_externally constant { [3 x ptr] } { [3 x ptr] [ptr null, ptr @_ZTI4Base, ptr @_ZN4Base5virt0Ev] }, align 8
// CHECK:STDOUT: @_ZTI1A = external constant ptr
// CHECK:STDOUT: @_ZTI4Base = external constant ptr
// CHECK:STDOUT:
@@ -254,8 +254,8 @@ fn F(ref r: Cpp.A) {
// CHECK:STDOUT: target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
// CHECK:STDOUT: target triple = "x86_64-unknown-linux-gnu"
// CHECK:STDOUT:
// CHECK:STDOUT: @_ZTV1A = available_externally unnamed_addr constant { [4 x ptr] } { [4 x ptr] [ptr null, ptr @_ZTI1A, ptr @_ZN4Base5virt0Ev, ptr @_ZN1A5virt1Ev] }, align 8
// CHECK:STDOUT: @_ZTV4Base = available_externally unnamed_addr constant { [3 x ptr] } { [3 x ptr] [ptr null, ptr @_ZTI4Base, ptr @_ZN4Base5virt0Ev] }, align 8
// CHECK:STDOUT: @_ZTV1A = available_externally constant { [4 x ptr] } { [4 x ptr] [ptr null, ptr @_ZTI1A, ptr @_ZN4Base5virt0Ev, ptr @_ZN1A5virt1Ev] }, align 8
// CHECK:STDOUT: @_ZTV4Base = available_externally constant { [3 x ptr] } { [3 x ptr] [ptr null, ptr @_ZTI4Base, ptr @_ZN4Base5virt0Ev] }, align 8
// CHECK:STDOUT: @_ZTI1A = external constant ptr
// CHECK:STDOUT: @_ZTI4Base = external constant ptr
// CHECK:STDOUT:
@@ -101,18 +101,18 @@ fn AccessD(d: Cpp.D) -> i32 {
// CHECK:STDOUT:
// CHECK:STDOUT: $_ZTT1B = comdat any
// CHECK:STDOUT:
// CHECK:STDOUT: @_ZTV1D = linkonce_odr dso_local unnamed_addr constant { [3 x ptr], [3 x ptr] } { [3 x ptr] [ptr inttoptr (i64 32 to ptr), ptr null, ptr @_ZTI1D], [3 x ptr] [ptr inttoptr (i64 16 to ptr), ptr inttoptr (i64 -16 to ptr), ptr @_ZTI1D] }, comdat, align 8
// CHECK:STDOUT: @_ZTV1C = linkonce_odr dso_local unnamed_addr constant { [3 x ptr] } { [3 x ptr] [ptr inttoptr (i64 12 to ptr), ptr null, ptr @_ZTI1C] }, comdat, align 8
// CHECK:STDOUT: @_ZTV1B = linkonce_odr dso_local unnamed_addr constant { [3 x ptr] } { [3 x ptr] [ptr inttoptr (i64 12 to ptr), ptr null, ptr @_ZTI1B] }, comdat, align 8
// CHECK:STDOUT: @_ZTV1D = linkonce_odr dso_local constant { [3 x ptr], [3 x ptr] } { [3 x ptr] [ptr inttoptr (i64 32 to ptr), ptr null, ptr @_ZTI1D], [3 x ptr] [ptr inttoptr (i64 16 to ptr), ptr inttoptr (i64 -16 to ptr), ptr @_ZTI1D] }, comdat, align 8
// CHECK:STDOUT: @_ZTV1C = linkonce_odr dso_local constant { [3 x ptr] } { [3 x ptr] [ptr inttoptr (i64 12 to ptr), ptr null, ptr @_ZTI1C] }, comdat, align 8
// CHECK:STDOUT: @_ZTV1B = linkonce_odr dso_local constant { [3 x ptr] } { [3 x ptr] [ptr inttoptr (i64 12 to ptr), ptr null, ptr @_ZTI1B] }, comdat, align 8
// CHECK:STDOUT: @_ZTT1D = linkonce_odr dso_local unnamed_addr constant [4 x ptr] [ptr getelementptr inbounds inrange(-24, 0) ({ [3 x ptr], [3 x ptr] }, ptr @_ZTV1D, i32 0, i32 0, i32 3), ptr getelementptr inbounds inrange(-24, 0) ({ [3 x ptr] }, ptr @_ZTC1D0_1B, i32 0, i32 0, i32 3), ptr getelementptr inbounds inrange(-24, 0) ({ [3 x ptr] }, ptr @_ZTC1D16_1C, i32 0, i32 0, i32 3), ptr getelementptr inbounds inrange(-24, 0) ({ [3 x ptr], [3 x ptr] }, ptr @_ZTV1D, i32 0, i32 1, i32 3)], comdat, align 8
// CHECK:STDOUT: @_ZTC1D0_1B = linkonce_odr dso_local unnamed_addr constant { [3 x ptr] } { [3 x ptr] [ptr inttoptr (i64 32 to ptr), ptr null, ptr @_ZTI1B] }, comdat, align 8
// CHECK:STDOUT: @_ZTC1D0_1B = linkonce_odr dso_local constant { [3 x ptr] } { [3 x ptr] [ptr inttoptr (i64 32 to ptr), ptr null, ptr @_ZTI1B] }, comdat, align 8
// CHECK:STDOUT: @_ZTI1B = linkonce_odr dso_local constant { ptr, ptr, i32, i32, ptr, i64 } { ptr getelementptr inbounds (ptr, ptr @_ZTVN10__cxxabiv121__vmi_class_type_infoE, i64 2), ptr @_ZTS1B, i32 0, i32 1, ptr @_ZTI1A, i64 -6141 }, comdat, align 8
// CHECK:STDOUT: @_ZTVN10__cxxabiv121__vmi_class_type_infoE = external global [0 x ptr]
// CHECK:STDOUT: @_ZTS1B = linkonce_odr dso_local constant [3 x i8] c"1B\00", comdat, align 1
// CHECK:STDOUT: @_ZTI1A = linkonce_odr dso_local constant { ptr, ptr } { ptr getelementptr inbounds (ptr, ptr @_ZTVN10__cxxabiv117__class_type_infoE, i64 2), ptr @_ZTS1A }, comdat, align 8
// CHECK:STDOUT: @_ZTVN10__cxxabiv117__class_type_infoE = external global [0 x ptr]
// CHECK:STDOUT: @_ZTS1A = linkonce_odr dso_local constant [3 x i8] c"1A\00", comdat, align 1
// CHECK:STDOUT: @_ZTC1D16_1C = linkonce_odr dso_local unnamed_addr constant { [3 x ptr] } { [3 x ptr] [ptr inttoptr (i64 16 to ptr), ptr null, ptr @_ZTI1C] }, comdat, align 8
// CHECK:STDOUT: @_ZTC1D16_1C = linkonce_odr dso_local constant { [3 x ptr] } { [3 x ptr] [ptr inttoptr (i64 16 to ptr), ptr null, ptr @_ZTI1C] }, comdat, align 8
// CHECK:STDOUT: @_ZTI1C = linkonce_odr dso_local constant { ptr, ptr, i32, i32, ptr, i64 } { ptr getelementptr inbounds (ptr, ptr @_ZTVN10__cxxabiv121__vmi_class_type_infoE, i64 2), ptr @_ZTS1C, i32 0, i32 1, ptr @_ZTI1A, i64 -6141 }, comdat, align 8
// CHECK:STDOUT: @_ZTS1C = linkonce_odr dso_local constant [3 x i8] c"1C\00", comdat, align 1
// CHECK:STDOUT: @_ZTI1D = linkonce_odr dso_local constant { ptr, ptr, i32, i32, ptr, i64, ptr, i64 } { ptr getelementptr inbounds (ptr, ptr @_ZTVN10__cxxabiv121__vmi_class_type_infoE, i64 2), ptr @_ZTS1D, i32 2, i32 2, ptr @_ZTI1B, i64 2, ptr @_ZTI1C, i64 4098 }, comdat, align 8
@@ -80,9 +80,9 @@ void delete_new_Base() {
// CHECK:STDOUT:
// CHECK:STDOUT: $_ZTSN6Carbon4BaseE = comdat any
// CHECK:STDOUT:
// CHECK:STDOUT: @_ZTV1A = available_externally unnamed_addr constant { [5 x ptr] } { [5 x ptr] [ptr null, ptr @_ZTI1A, ptr @__cxa_pure_virtual, ptr @__cxa_pure_virtual, ptr @_ZNK1A1FEv] }, align 8
// CHECK:STDOUT: @_ZTVN6Carbon5FinalE = linkonce_odr dso_local unnamed_addr constant { [6 x ptr] } { [6 x ptr] [ptr null, ptr @_ZTIN6Carbon5FinalE, ptr @_ZN6Carbon5FinalD2Ev, ptr @_ZN6Carbon5FinalD0Ev, ptr @_ZNK1A1FEv, ptr @_ZN6Carbon5Final1FEv] }, comdat, align 8
// CHECK:STDOUT: @_ZTVN6Carbon4BaseE = linkonce_odr dso_local unnamed_addr constant { [6 x ptr] } { [6 x ptr] [ptr null, ptr @_ZTIN6Carbon4BaseE, ptr @_ZN6Carbon4BaseD2Ev, ptr @_ZN6Carbon4BaseD0Ev, ptr @_ZNK1A1FEv, ptr @_ZN6Carbon4Base1FEv] }, comdat, align 8
// CHECK:STDOUT: @_ZTV1A = available_externally constant { [5 x ptr] } { [5 x ptr] [ptr null, ptr @_ZTI1A, ptr @__cxa_pure_virtual, ptr @__cxa_pure_virtual, ptr @_ZNK1A1FEv] }, align 8
// CHECK:STDOUT: @_ZTVN6Carbon5FinalE = linkonce_odr dso_local constant { [6 x ptr] } { [6 x ptr] [ptr null, ptr @_ZTIN6Carbon5FinalE, ptr @_ZN6Carbon5FinalD2Ev, ptr @_ZN6Carbon5FinalD0Ev, ptr @_ZNK1A1FEv, ptr @_ZN6Carbon5Final1FEv] }, comdat, align 8
// CHECK:STDOUT: @_ZTVN6Carbon4BaseE = linkonce_odr dso_local constant { [6 x ptr] } { [6 x ptr] [ptr null, ptr @_ZTIN6Carbon4BaseE, ptr @_ZN6Carbon4BaseD2Ev, ptr @_ZN6Carbon4BaseD0Ev, ptr @_ZNK1A1FEv, ptr @_ZN6Carbon4Base1FEv] }, comdat, align 8
// CHECK:STDOUT: @_ZTI1A = external constant ptr
// CHECK:STDOUT: @_ZTIN6Carbon5FinalE = linkonce_odr dso_local constant { ptr, ptr, ptr } { ptr getelementptr inbounds (ptr, ptr @_ZTVN10__cxxabiv120__si_class_type_infoE, i64 2), ptr @_ZTSN6Carbon5FinalE, ptr @_ZTI1A }, comdat, align 8
// CHECK:STDOUT: @_ZTVN10__cxxabiv120__si_class_type_infoE = external global [0 x ptr]