llvm-6502/tools/llvmc2/core/Error.h
Mikhail Glushenkov b6cc085134 Rename llvmc2/src to llvmc2/core.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57000 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-03 10:27:23 +00:00

34 lines
824 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 {
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