diff options
author | Xinliang David Li <davidxl@google.com> | 2016-05-24 18:47:38 +0000 |
---|---|---|
committer | Xinliang David Li <davidxl@google.com> | 2016-05-24 18:47:38 +0000 |
commit | f4edae6076d9c09f2c759b0b26bddf6e2eab8b13 (patch) | |
tree | 9962d076443257e7210bac8bfd32ce9df328595b /llvm/test | |
parent | 141149ff4865e024a0f971f3138f226896fdeddf (diff) | |
download | bcm5719-llvm-f4edae6076d9c09f2c759b0b26bddf6e2eab8b13.tar.gz bcm5719-llvm-f4edae6076d9c09f2c759b0b26bddf6e2eab8b13.zip |
[profile] Fix runtime hook linkage bug for COFF
Patch by: Johan Engelen
the user hook has linkonceODR linkage and it needs to be
in comdatAny group.
llvm-svn: 270596
Diffstat (limited to 'llvm/test')
-rw-r--r-- | llvm/test/Instrumentation/InstrProfiling/linkage.ll | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/test/Instrumentation/InstrProfiling/linkage.ll b/llvm/test/Instrumentation/InstrProfiling/linkage.ll index c4344b6617c..72320ef523b 100644 --- a/llvm/test/Instrumentation/InstrProfiling/linkage.ll +++ b/llvm/test/Instrumentation/InstrProfiling/linkage.ll @@ -4,6 +4,8 @@ ; RUN: opt < %s -mtriple=x86_64-unknown-linux -instrprof -S | FileCheck %s --check-prefix=LINUX --check-prefix=COMMON ; RUN: opt < %s -mtriple=x86_64-apple-macosx10.10.0 -passes=instrprof -S | FileCheck %s --check-prefix=OTHER --check-prefix=COMMON ; RUN: opt < %s -mtriple=x86_64-unknown-linux -passes=instrprof -S | FileCheck %s --check-prefix=LINUX --check-prefix=COMMON +; RUN: opt < %s -mtriple=x86_64-pc-win32-coff -instrprof -S | FileCheck %s --check-prefix=COFF +; RUN: opt < %s -mtriple=x86_64-pc-win32-coff -passes=instrprof -S | FileCheck %s --check-prefix=COFF @__profn_foo = hidden constant [3 x i8] c"foo" @__profn_foo_weak = weak hidden constant [8 x i8] c"foo_weak" @@ -57,5 +59,6 @@ declare void @llvm.instrprof.increment(i8*, i64, i32, i32) ; OTHER: %[[REG:.*]] = load i32, i32* @__llvm_profile_runtime ; OTHER: ret i32 %[[REG]] ; OTHER: } +; COFF: define linkonce_odr hidden i32 @__llvm_profile_runtime_user() {{.*}} comdat { ; LINUX-NOT: define linkonce_odr hidden i32 @__llvm_profile_runtime_user() {{.*}} { ; LINUX-NOT: %[[REG:.*]] = load i32, i32* @__llvm_profile_runtime |