1 //===--- Error.h - The LLVM Compiler Driver ---------------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open
6 // Source License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // Exception classes for LLVMC.
12 //===----------------------------------------------------------------------===//
14 #ifndef LLVM_TOOLS_LLVMC2_ERROR_H
15 #define LLVM_TOOLS_LLVMC2_ERROR_H
21 class error_code: public std::runtime_error {
25 : std::runtime_error("Tool returned error code"), Code_(c)
28 int code() const { return Code_; }
33 #endif //LLVM_TOOLS_LLVMC2_ERROR_H