diff options
author | Mikhail Glushenkov <foldr@codedgers.com> | 2008-10-03 21:26:27 +0000 |
---|---|---|
committer | Mikhail Glushenkov <foldr@codedgers.com> | 2008-10-03 21:26:27 +0000 |
commit | 3945b7cfce6cc58163e66c9524bc1d559df1d2d7 (patch) | |
tree | f54c0f5fe7a77e8625740e6800735943f8b76a35 /tools/llvmc2/driver/Error.h | |
parent | ebb9f9b76db716e8731fa935d5d045bd1c5e49d8 (diff) |
Rename llvmc2/core to llvmc2/driver.
Makefiles try to remove 'core' by default, so it wasn't a very good name.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57031 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/llvmc2/driver/Error.h')
-rw-r--r-- | tools/llvmc2/driver/Error.h | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/tools/llvmc2/driver/Error.h b/tools/llvmc2/driver/Error.h new file mode 100644 index 0000000000..c0aaff1a72 --- /dev/null +++ b/tools/llvmc2/driver/Error.h @@ -0,0 +1,33 @@ +//===--- 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 |