diff options
| author | Simon Pilgrim <llvm-dev@redking.me.uk> | 2021-10-05 17:00:13 +0100 |
|---|---|---|
| committer | Simon Pilgrim <llvm-dev@redking.me.uk> | 2021-10-05 17:03:18 +0100 |
| commit | 3ca232feb3526281bf9640f5f6f21e8f4c622b28 (patch) | |
| tree | a1492969985ef4ac48e8f483112d04f3121887ec /llvm/utils/TableGen/CodeEmitterGen.cpp | |
| parent | 9503ad3b533cb84b51cfc80c51d262da50435013 (diff) | |
[TableGen] CodeEmitterGen - emit report_fatal_error(const char*) instead of report_fatal_error(std::string&)
As described on D111049, we're trying to remove the <string> dependency from error handling. In most cases the plan is to use the Twine() variant directly but to reduce introducing additional headers for the generated files, I'm using the const char* variant here instead.
Diffstat (limited to 'llvm/utils/TableGen/CodeEmitterGen.cpp')
| -rw-r--r-- | llvm/utils/TableGen/CodeEmitterGen.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/utils/TableGen/CodeEmitterGen.cpp b/llvm/utils/TableGen/CodeEmitterGen.cpp index ffc2878d3508..ee77ef5eda5f 100644 --- a/llvm/utils/TableGen/CodeEmitterGen.cpp +++ b/llvm/utils/TableGen/CodeEmitterGen.cpp @@ -515,7 +515,7 @@ void CodeEmitterGen::run(raw_ostream &o) { << " std::string msg;\n" << " raw_string_ostream Msg(msg);\n" << " Msg << \"Not supported instr: \" << MI;\n" - << " report_fatal_error(Msg.str());\n" + << " report_fatal_error(Msg.str().c_str());\n" << " }\n"; if (UseAPInt) o << " Inst = Value;\n"; @@ -638,7 +638,7 @@ void CodeEmitterGen::run(raw_ostream &o) { << " if (MissingFeatures.test(i))\n" << " Msg << SubtargetFeatureNames[i] << \" \";\n" << " Msg << \"predicate(s) are not met\";\n" - << " report_fatal_error(Msg.str());\n" + << " report_fatal_error(Msg.str().c_str());\n" << " }\n" << "#else\n" << " // Silence unused variable warning on targets that don't use MCII for " |
