this doesn't use EH either.
authorChris Lattner <sabre@nondot.org>
Thu, 22 Oct 2009 00:50:24 +0000 (00:50 +0000)
committerChris Lattner <sabre@nondot.org>
Thu, 22 Oct 2009 00:50:24 +0000 (00:50 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84818 91177308-0d34-0410-b5e6-96231b3b80d8

tools/llvm-prof/CMakeLists.txt
tools/llvm-prof/Makefile
tools/llvm-prof/llvm-prof.cpp

index 9a5115085dd39b479c617da6403f8a96ce06dec2..442112bc88ed5dc0a3f2fae1884d118d8f323003 100644 (file)
@@ -1,5 +1,4 @@
 set(LLVM_LINK_COMPONENTS bitreader analysis)
-set(LLVM_REQUIRES_EH 1)
 
 add_llvm_tool(llvm-prof
   llvm-prof.cpp
index 3c4948e61548ce0d5f0c760b3bec35c4afc8eef2..86eb54d51bf47eb136cc23ead748aec42d8b9218 100644 (file)
@@ -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
index cff139e1251a7e98f1f07fab57a218b672492d34..88adeb43e6de35390d500cef99c5e8d58786a563 100644 (file)
@@ -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;
 }