1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-22 04:22:57 +02:00
llvm-mirror/include/llvm/CompilerDriver/Error.h
Mikhail Glushenkov 1a0ddf169b Add a comment.
llvm-svn: 65822
2009-03-02 09:01:39 +00:00

36 lines
948 B
C++

//===--- Error.h - The LLVM Compiler Driver ---------------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open
// Source License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
// Exception classes for llvmc.
//
//===----------------------------------------------------------------------===//
#ifndef LLVM_TOOLS_LLVMC2_ERROR_H
#define LLVM_TOOLS_LLVMC2_ERROR_H
#include <stdexcept>
namespace llvmc {
/// error_code - This gets thrown during the compilation process if a tool
/// invocation returns a non-zero exit code.
class error_code: public std::runtime_error {
int Code_;
public:
error_code (int c)
: std::runtime_error("Tool returned error code"), Code_(c)
{}
int code() const { return Code_; }
};
}
#endif //LLVM_TOOLS_LLVMC2_ERROR_H