mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-07-19 03:29:22 +00:00
Need to throw std::string not const char* if we want error messages to be
caught. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16109 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
514b9671f9
commit
6386009ea6
@ -216,13 +216,13 @@ int main(int argc, char **argv) {
|
|||||||
|
|
||||||
// Deal with unimplemented options.
|
// Deal with unimplemented options.
|
||||||
if (PipeCommands)
|
if (PipeCommands)
|
||||||
throw "Not implemented yet: -pipe";
|
throw std::string("Not implemented yet: -pipe");
|
||||||
|
|
||||||
if (OutputFilename.empty())
|
if (OutputFilename.empty())
|
||||||
if (OptLevel == CompilerDriver::LINKING)
|
if (OptLevel == CompilerDriver::LINKING)
|
||||||
OutputFilename = "a.out";
|
OutputFilename = "a.out";
|
||||||
else
|
else
|
||||||
throw "An output file must be specified. Please use the -o option";
|
throw std::string("An output file must be specified. Please use the -o option");
|
||||||
|
|
||||||
// Construct the ConfigDataProvider object
|
// Construct the ConfigDataProvider object
|
||||||
LLVMC_ConfigDataProvider Provider;
|
LLVMC_ConfigDataProvider Provider;
|
||||||
@ -300,7 +300,7 @@ int main(int argc, char **argv) {
|
|||||||
// Tell the driver to do its thing
|
// Tell the driver to do its thing
|
||||||
int result = CD->execute(InpList,sys::Path(OutputFilename));
|
int result = CD->execute(InpList,sys::Path(OutputFilename));
|
||||||
if (result != 0) {
|
if (result != 0) {
|
||||||
throw "Error executing actions. Terminated.\n";
|
throw std::string("Error executing actions. Terminated.");
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user