summaryrefslogtreecommitdiff
path: root/include/llvm/CompilerDriver
diff options
context:
space:
mode:
authorMikhail Glushenkov <foldr@codedgers.com>2009-03-02 09:01:14 +0000
committerMikhail Glushenkov <foldr@codedgers.com>2009-03-02 09:01:14 +0000
commitf188178a2f8e6452d3e161acdad9a79e1f36c43f (patch)
treede8d87fb2706a89f24bc57ce512955909645eecc /include/llvm/CompilerDriver
parent99dac47b0abfaf40c36822a11310b43e95654e50 (diff)
downloadllvm-f188178a2f8e6452d3e161acdad9a79e1f36c43f.tar.gz
llvm-f188178a2f8e6452d3e161acdad9a79e1f36c43f.tar.bz2
llvm-f188178a2f8e6452d3e161acdad9a79e1f36c43f.tar.xz
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/CompilerDriver')
-rw-r--r--include/llvm/CompilerDriver/Error.h33
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 0000000000..c0aaff1a72
--- /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