[lsan] Add a missing file.

llvm-svn: 195643
This commit is contained in:
Sergey Matveev 2013-11-25 14:30:37 +00:00
parent 2d3f8d7840
commit 6b0f6af374
1 changed files with 22 additions and 0 deletions

View File

@ -0,0 +1,22 @@
//===-- lsan_preinit.cc ---------------------------------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
// This file is a part of LeakSanitizer.
//
// Call __lsan_init at the very early stage of process startup.
//===----------------------------------------------------------------------===//
#include "lsan.h"
#if !defined(PIC)
// We force __lsan_init to be called before anyone else by placing it into
// .preinit_array section.
__attribute__((section(".preinit_array"), used))
void (*__local_lsan_preinit)(void) = __lsan_init;
#endif