summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvmc
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2004-08-30 00:06:52 +0000
committerReid Spencer <rspencer@reidspencer.com>2004-08-30 00:06:52 +0000
commit9f64b91e273b7cc7e680e69d7bf6329d03b15cb8 (patch)
treedb8b7827184bb3e22968dcc4edbb65980ec4c823 /llvm/tools/llvmc
parent94596c2102234342be4801ce52c5e6ea791a0d90 (diff)
downloadbcm5719-llvm-9f64b91e273b7cc7e680e69d7bf6329d03b15cb8.tar.gz
bcm5719-llvm-9f64b91e273b7cc7e680e69d7bf6329d03b15cb8.zip
Need to throw std::string not const char* if we want error messages to be
caught. llvm-svn: 16109
Diffstat (limited to 'llvm/tools/llvmc')
-rw-r--r--llvm/tools/llvmc/llvmc.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/tools/llvmc/llvmc.cpp b/llvm/tools/llvmc/llvmc.cpp
index ad0d2187aae..0f8662382ca 100644
--- a/llvm/tools/llvmc/llvmc.cpp
+++ b/llvm/tools/llvmc/llvmc.cpp
@@ -216,13 +216,13 @@ int main(int argc, char **argv) {
// Deal with unimplemented options.
if (PipeCommands)
- throw "Not implemented yet: -pipe";
+ throw std::string("Not implemented yet: -pipe");
if (OutputFilename.empty())
if (OptLevel == CompilerDriver::LINKING)
OutputFilename = "a.out";
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
LLVMC_ConfigDataProvider Provider;
@@ -300,7 +300,7 @@ int main(int argc, char **argv) {
// Tell the driver to do its thing
int result = CD->execute(InpList,sys::Path(OutputFilename));
if (result != 0) {
- throw "Error executing actions. Terminated.\n";
+ throw std::string("Error executing actions. Terminated.");
return result;
}
OpenPOWER on IntegriCloud