mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-26 07:24:25 +00:00
this doesn't use EH either.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84818 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -1,5 +1,4 @@
|
|||||||
set(LLVM_LINK_COMPONENTS bitreader analysis)
|
set(LLVM_LINK_COMPONENTS bitreader analysis)
|
||||||
set(LLVM_REQUIRES_EH 1)
|
|
||||||
|
|
||||||
add_llvm_tool(llvm-prof
|
add_llvm_tool(llvm-prof
|
||||||
llvm-prof.cpp
|
llvm-prof.cpp
|
||||||
|
@ -10,7 +10,6 @@ LEVEL = ../..
|
|||||||
|
|
||||||
TOOLNAME = llvm-prof
|
TOOLNAME = llvm-prof
|
||||||
LINK_COMPONENTS = bitreader analysis
|
LINK_COMPONENTS = bitreader analysis
|
||||||
REQUIRES_EH := 1
|
|
||||||
|
|
||||||
# This tool has no plugins, optimize startup time.
|
# This tool has no plugins, optimize startup time.
|
||||||
TOOL_NO_EXPORTS = 1
|
TOOL_NO_EXPORTS = 1
|
||||||
|
@ -255,41 +255,34 @@ int main(int argc, char **argv) {
|
|||||||
|
|
||||||
LLVMContext &Context = getGlobalContext();
|
LLVMContext &Context = getGlobalContext();
|
||||||
llvm_shutdown_obj Y; // Call llvm_shutdown() on exit.
|
llvm_shutdown_obj Y; // Call llvm_shutdown() on exit.
|
||||||
try {
|
|
||||||
cl::ParseCommandLineOptions(argc, argv, "llvm profile dump decoder\n");
|
|
||||||
|
|
||||||
// Read in the bitcode file...
|
|
||||||
std::string ErrorMessage;
|
|
||||||
Module *M = 0;
|
|
||||||
if (MemoryBuffer *Buffer = MemoryBuffer::getFileOrSTDIN(BitcodeFile,
|
|
||||||
&ErrorMessage)) {
|
|
||||||
M = ParseBitcodeFile(Buffer, Context, &ErrorMessage);
|
|
||||||
delete Buffer;
|
|
||||||
}
|
|
||||||
if (M == 0) {
|
|
||||||
errs() << argv[0] << ": " << BitcodeFile << ": "
|
|
||||||
<< ErrorMessage << "\n";
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Read the profiling information. This is redundant since we load it again
|
|
||||||
// using the standard profile info provider pass, but for now this gives us
|
|
||||||
// access to additional information not exposed via the ProfileInfo
|
|
||||||
// interface.
|
|
||||||
ProfileInfoLoader PIL(argv[0], ProfileDataFile, *M);
|
|
||||||
|
|
||||||
// Run the printer pass.
|
|
||||||
PassManager PassMgr;
|
|
||||||
PassMgr.add(createProfileLoaderPass(ProfileDataFile));
|
|
||||||
PassMgr.add(new ProfileInfoPrinterPass(PIL));
|
|
||||||
PassMgr.run(*M);
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
} catch (const std::string& msg) {
|
|
||||||
errs() << argv[0] << ": " << msg << "\n";
|
|
||||||
} catch (...) {
|
|
||||||
errs() << argv[0] << ": Unexpected unknown exception occurred.\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
return 1;
|
cl::ParseCommandLineOptions(argc, argv, "llvm profile dump decoder\n");
|
||||||
|
|
||||||
|
// Read in the bitcode file...
|
||||||
|
std::string ErrorMessage;
|
||||||
|
Module *M = 0;
|
||||||
|
if (MemoryBuffer *Buffer = MemoryBuffer::getFileOrSTDIN(BitcodeFile,
|
||||||
|
&ErrorMessage)) {
|
||||||
|
M = ParseBitcodeFile(Buffer, Context, &ErrorMessage);
|
||||||
|
delete Buffer;
|
||||||
|
}
|
||||||
|
if (M == 0) {
|
||||||
|
errs() << argv[0] << ": " << BitcodeFile << ": "
|
||||||
|
<< ErrorMessage << "\n";
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Read the profiling information. This is redundant since we load it again
|
||||||
|
// using the standard profile info provider pass, but for now this gives us
|
||||||
|
// access to additional information not exposed via the ProfileInfo
|
||||||
|
// interface.
|
||||||
|
ProfileInfoLoader PIL(argv[0], ProfileDataFile, *M);
|
||||||
|
|
||||||
|
// Run the printer pass.
|
||||||
|
PassManager PassMgr;
|
||||||
|
PassMgr.add(createProfileLoaderPass(ProfileDataFile));
|
||||||
|
PassMgr.add(new ProfileInfoPrinterPass(PIL));
|
||||||
|
PassMgr.run(*M);
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user