20 lines · plain
1; Verify that in the cases of explict distinct LTO piplines,2; explicit unified LTO pipelines, and the default LTO pipeline,3; there is no crash and the anonoymous global is named4; as expected.5 6; RUN: %clang_cc1 -emit-llvm-bc -O1 -flto -fsanitize=address -o - -x ir < %s | llvm-dis -o - | FileCheck %s7; RUN: %clang_cc1 -emit-llvm-bc -O1 -flto -funified-lto -fsanitize=address -o - -x ir < %s | llvm-dis -o - | FileCheck %s8; RUN: %clang_cc1 -emit-llvm-bc -O1 -flto -fno-unified-lto -fsanitize=address -o - -x ir < %s | llvm-dis -o - | FileCheck %s9; CHECK: @anon.3ee0898e5200a57350fed5485ae5d23710 11target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"12target triple = "x86_64-pc-linux-gnu"13 14@.str = private unnamed_addr constant [5 x i8] c"none\00", align 115 16define ptr @f() {17 %ptr = getelementptr inbounds [5 x i8], ptr @.str, i32 0, i32 018 ret ptr %ptr19}20