From 7b41393497019bbfae2010ea2d41d28e0ce8766c Mon Sep 17 00:00:00 2001 From: Xinliang David Li Date: Sun, 22 May 2016 16:36:03 +0000 Subject: [profile] initialize static pool properly Remove dependency on runtime initializer to avoid issues related to initialization order. llvm-svn: 270371 --- compiler-rt/lib/profile/InstrProfilingPlatformLinux.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'compiler-rt/lib/profile/InstrProfilingPlatformLinux.c') diff --git a/compiler-rt/lib/profile/InstrProfilingPlatformLinux.c b/compiler-rt/lib/profile/InstrProfilingPlatformLinux.c index 679f183859e..b6c780ff514 100644 --- a/compiler-rt/lib/profile/InstrProfilingPlatformLinux.c +++ b/compiler-rt/lib/profile/InstrProfilingPlatformLinux.c @@ -66,8 +66,10 @@ COMPILER_RT_VISIBILITY ValueProfNode * __llvm_profile_begin_vnodes(void) { return &PROF_VNODES_START; } -COMPILER_RT_VISIBILITY ValueProfNode * -__llvm_profile_end_vnodes(void) { +COMPILER_RT_VISIBILITY ValueProfNode *__llvm_profile_end_vnodes(void) { return &PROF_VNODES_STOP; } +COMPILER_RT_VISIBILITY ValueProfNode *CurrentVNode = &PROF_VNODES_START; +COMPILER_RT_VISIBILITY ValueProfNode *EndVNode = &PROF_VNODES_STOP; + #endif -- cgit v1.2.3