[llvm-commits] [llvm] r84818 - in /llvm/trunk/tools/llvm-prof: CMakeLists.txt Makefile llvm-prof.cpp

Chris Lattner sabre at nondot.org
Wed Oct 21 17:50:25 PDT 2009


Author: lattner
Date: Wed Oct 21 19:50:24 2009
New Revision: 84818

URL: http://llvm.org/viewvc/llvm-project?rev=84818&view=rev
Log:
this doesn't use EH either.

Modified:
    llvm/trunk/tools/llvm-prof/CMakeLists.txt
    llvm/trunk/tools/llvm-prof/Makefile
    llvm/trunk/tools/llvm-prof/llvm-prof.cpp

Modified: llvm/trunk/tools/llvm-prof/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-prof/CMakeLists.txt?rev=84818&r1=84817&r2=84818&view=diff

==============================================================================
--- llvm/trunk/tools/llvm-prof/CMakeLists.txt (original)
+++ llvm/trunk/tools/llvm-prof/CMakeLists.txt Wed Oct 21 19:50:24 2009
@@ -1,5 +1,4 @@
 set(LLVM_LINK_COMPONENTS bitreader analysis)
-set(LLVM_REQUIRES_EH 1)
 
 add_llvm_tool(llvm-prof
   llvm-prof.cpp

Modified: llvm/trunk/tools/llvm-prof/Makefile
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-prof/Makefile?rev=84818&r1=84817&r2=84818&view=diff

==============================================================================
--- llvm/trunk/tools/llvm-prof/Makefile (original)
+++ llvm/trunk/tools/llvm-prof/Makefile Wed Oct 21 19:50:24 2009
@@ -10,7 +10,6 @@
 
 TOOLNAME = llvm-prof
 LINK_COMPONENTS = bitreader analysis
-REQUIRES_EH := 1
 
 # This tool has no plugins, optimize startup time.
 TOOL_NO_EXPORTS = 1

Modified: llvm/trunk/tools/llvm-prof/llvm-prof.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-prof/llvm-prof.cpp?rev=84818&r1=84817&r2=84818&view=diff

==============================================================================
--- llvm/trunk/tools/llvm-prof/llvm-prof.cpp (original)
+++ llvm/trunk/tools/llvm-prof/llvm-prof.cpp Wed Oct 21 19:50:24 2009
@@ -255,41 +255,34 @@
 
   LLVMContext &Context = getGlobalContext();
   llvm_shutdown_obj Y;  // Call llvm_shutdown() on exit.
-  try {
-    cl::ParseCommandLineOptions(argc, argv, "llvm profile dump decoder\n");
+  
+  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 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);
+  // 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);
+  // 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;
+  return 0;
 }





More information about the llvm-commits mailing list