Home | History | Annotate | Line # | Download | only in profile
      1      1.1  joerg //===- InstrProfilingRuntime.cpp - PGO runtime initialization -------------===//
      2      1.1  joerg //
      3      1.1  joerg //                     The LLVM Compiler Infrastructure
      4      1.1  joerg //
      5      1.1  joerg // This file is distributed under the University of Illinois Open Source
      6      1.1  joerg // License. See LICENSE.TXT for details.
      7      1.1  joerg //
      8      1.1  joerg //===----------------------------------------------------------------------===//
      9      1.1  joerg 
     10      1.1  joerg extern "C" {
     11      1.1  joerg 
     12      1.1  joerg #include "InstrProfiling.h"
     13      1.1  joerg 
     14  1.1.1.3  joerg COMPILER_RT_VISIBILITY int __llvm_profile_runtime;
     15      1.1  joerg }
     16      1.1  joerg 
     17      1.1  joerg namespace {
     18      1.1  joerg 
     19  1.1.1.2  joerg class RegisterRuntime {
     20      1.1  joerg public:
     21  1.1.1.2  joerg   RegisterRuntime() {
     22  1.1.1.2  joerg     __llvm_profile_register_write_file_atexit();
     23  1.1.1.2  joerg     __llvm_profile_initialize_file();
     24  1.1.1.2  joerg   }
     25      1.1  joerg };
     26      1.1  joerg 
     27  1.1.1.2  joerg RegisterRuntime Registration;
     28      1.1  joerg 
     29      1.1  joerg }
     30