Don't re-instantiate the std::string in catch block.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16159 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Reid Spencer 2004-09-03 22:59:32 +00:00
parent 9c3c65806f
commit a3b4e09715

View File

@ -323,7 +323,7 @@ int main(int argc, char **argv) {
// All is good, return success
return 0;
} catch (std::string& msg) {
} catch (const std::string& msg) {
std::cerr << argv[0] << ": " << msg << "\n";
} catch (...) {
std::cerr << argv[0] << ": Unexpected unknown exception occurred.\n";