mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-10-19 11:02:59 +02:00
Don't reinsert the 'atexit' function if it already exists.
llvm-svn: 159491
This commit is contained in:
parent
7f56993d8e
commit
53675fa303
@ -687,8 +687,7 @@ void GCOVProfiler::insertCounterWriteout(
|
||||
|
||||
FTy = FunctionType::get(Type::getInt32Ty(*Ctx),
|
||||
PointerType::get(FTy, 0), false);
|
||||
Function *AtExitFn =
|
||||
Function::Create(FTy, GlobalValue::ExternalLinkage, "atexit", M);
|
||||
Constant *AtExitFn = M->getOrInsertFunction("atexit", FTy);
|
||||
Builder.CreateCall(AtExitFn, WriteoutF);
|
||||
Builder.CreateRetVoid();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user