diff options
author | Mikhail Glushenkov <foldr@codedgers.com> | 2009-03-02 09:01:14 +0000 |
---|---|---|
committer | Mikhail Glushenkov <foldr@codedgers.com> | 2009-03-02 09:01:14 +0000 |
commit | f188178a2f8e6452d3e161acdad9a79e1f36c43f (patch) | |
tree | de8d87fb2706a89f24bc57ce512955909645eecc /include/llvm | |
parent | 99dac47b0abfaf40c36822a11310b43e95654e50 (diff) | |
download | external_llvm-f188178a2f8e6452d3e161acdad9a79e1f36c43f.zip external_llvm-f188178a2f8e6452d3e161acdad9a79e1f36c43f.tar.gz external_llvm-f188178a2f8e6452d3e161acdad9a79e1f36c43f.tar.bz2 |
Reorganize llvmc code.
Move the code from 'llvmc/driver' into a new CompilerDriver library, and change
the build system accordingly. Makes it easier for projects using LLVM to build
their own llvmc-based drivers.
Tested with objdir != srcdir.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65821 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm')
-rw-r--r-- | include/llvm/CompilerDriver/Error.h | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/include/llvm/CompilerDriver/Error.h b/include/llvm/CompilerDriver/Error.h new file mode 100644 index 0000000..c0aaff1 --- /dev/null +++ b/include/llvm/CompilerDriver/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 |