forked from OSchip/llvm-project
gold plugin: call llvm_shutdown so that -stats works.
llvm-svn: 222787
This commit is contained in:
parent
9b7c15a364
commit
947bdb69cb
|
@ -0,0 +1,5 @@
|
||||||
|
; RUN: llvm-as %s -o %t.o
|
||||||
|
; RUN: ld -plugin %llvmshlibdir/LLVMgold.so -shared \
|
||||||
|
; RUN: -plugin-opt=-stats %t.o -o %t2 2>&1 | FileCheck %s
|
||||||
|
|
||||||
|
; CHECK: Statistics Collected
|
|
@ -28,6 +28,7 @@
|
||||||
#include "llvm/PassManager.h"
|
#include "llvm/PassManager.h"
|
||||||
#include "llvm/Support/FormattedStream.h"
|
#include "llvm/Support/FormattedStream.h"
|
||||||
#include "llvm/Support/Host.h"
|
#include "llvm/Support/Host.h"
|
||||||
|
#include "llvm/Support/ManagedStatic.h"
|
||||||
#include "llvm/Support/MemoryBuffer.h"
|
#include "llvm/Support/MemoryBuffer.h"
|
||||||
#include "llvm/Support/TargetRegistry.h"
|
#include "llvm/Support/TargetRegistry.h"
|
||||||
#include "llvm/Support/TargetSelect.h"
|
#include "llvm/Support/TargetSelect.h"
|
||||||
|
@ -838,6 +839,8 @@ static ld_plugin_status all_symbols_read_hook(void) {
|
||||||
Ret = allSymbolsReadHook(&ApiFile);
|
Ret = allSymbolsReadHook(&ApiFile);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
llvm_shutdown();
|
||||||
|
|
||||||
if (options::TheOutputType == options::OT_BC_ONLY ||
|
if (options::TheOutputType == options::OT_BC_ONLY ||
|
||||||
options::TheOutputType == options::OT_DISABLE)
|
options::TheOutputType == options::OT_DISABLE)
|
||||||
exit(0);
|
exit(0);
|
||||||
|
|
Loading…
Reference in New Issue