aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-10-22 00:50:24 +0000
committerChris Lattner <sabre@nondot.org>2009-10-22 00:50:24 +0000
commit42a8832ff7441e4c64eabfe7d2ec09278cca8813 (patch)
treebb162ae6108ed6ad1e2b37849766a3a5b82f2b9d /tools
parent61db1a1b6a02b868f63bccefc17a31a21ac3a871 (diff)
this doesn't use EH either.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84818 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools')
-rw-r--r--tools/llvm-prof/CMakeLists.txt1
-rw-r--r--tools/llvm-prof/Makefile1
-rw-r--r--tools/llvm-prof/llvm-prof.cpp65
3 files changed, 29 insertions, 38 deletions
diff --git a/tools/llvm-prof/CMakeLists.txt b/tools/llvm-prof/CMakeLists.txt
index 9a5115085d..442112bc88 100644
--- a/tools/llvm-prof/CMakeLists.txt
+++ b/tools/llvm-prof/CMakeLists.txt
@@ -1,5 +1,4 @@
set(LLVM_LINK_COMPONENTS bitreader analysis)
-set(LLVM_REQUIRES_EH 1)
add_llvm_tool(llvm-prof
llvm-prof.cpp
diff --git a/tools/llvm-prof/Makefile b/tools/llvm-prof/Makefile
index 3c4948e615..86eb54d51b 100644
--- a/tools/llvm-prof/Makefile
+++ b/tools/llvm-prof/Makefile
@@ -10,7 +10,6 @@ LEVEL = ../..
TOOLNAME = llvm-prof
LINK_COMPONENTS = bitreader analysis
-REQUIRES_EH := 1
# This tool has no plugins, optimize startup time.
TOOL_NO_EXPORTS = 1
diff --git a/tools/llvm-prof/llvm-prof.cpp b/tools/llvm-prof/llvm-prof.cpp
index cff139e125..88adeb43e6 100644
--- a/tools/llvm-prof/llvm-prof.cpp
+++ b/tools/llvm-prof/llvm-prof.cpp
@@ -255,41 +255,34 @@ int main(int argc, char **argv) {
LLVMContext &Context = getGlobalContext();
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;
}