diff --git a/tools/llvmc/llvmc.cpp b/tools/llvmc/llvmc.cpp index f457795a0c7..9d677d73581 100644 --- a/tools/llvmc/llvmc.cpp +++ b/tools/llvmc/llvmc.cpp @@ -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";