mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-04-01 18:33:56 +00:00
Don't reinsert the 'atexit' function if it already exists.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159491 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
cf23bd3d8f
commit
c1b6ea7b6c
@ -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…
x
Reference in New Issue
Block a user