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
This commit is contained in:
Mikhail Glushenkov
2009-03-02 09:01:14 +00:00
parent 99dac47b0a
commit f188178a2f
18 changed files with 103 additions and 61 deletions

View File

@ -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