diff options
Diffstat (limited to 'contrib/llvm/lib/Bitcode/Reader/ValueList.cpp')
| -rw-r--r-- | contrib/llvm/lib/Bitcode/Reader/ValueList.cpp | 29 | 
1 files changed, 23 insertions, 6 deletions
| diff --git a/contrib/llvm/lib/Bitcode/Reader/ValueList.cpp b/contrib/llvm/lib/Bitcode/Reader/ValueList.cpp index f2a3439a87be..08bfa291098c 100644 --- a/contrib/llvm/lib/Bitcode/Reader/ValueList.cpp +++ b/contrib/llvm/lib/Bitcode/Reader/ValueList.cpp @@ -1,4 +1,4 @@ -//===----- ValueList.cpp - Internal BitcodeReader implementation ----------===// +//===- ValueList.cpp - Internal BitcodeReader implementation --------------===//  //  //                     The LLVM Compiler Infrastructure  // @@ -8,27 +8,44 @@  //===----------------------------------------------------------------------===//  #include "ValueList.h" +#include "llvm/ADT/SmallVector.h" +#include "llvm/IR/Argument.h" +#include "llvm/IR/Constant.h"  #include "llvm/IR/Constants.h" -#include "llvm/IR/Instructions.h" +#include "llvm/IR/GlobalValue.h" +#include "llvm/IR/Instruction.h" +#include "llvm/IR/Type.h" +#include "llvm/IR/User.h" +#include "llvm/IR/Value.h" +#include "llvm/IR/ValueHandle.h" +#include "llvm/Support/Casting.h" +#include "llvm/Support/ErrorHandling.h" +#include <algorithm> +#include <cassert> +#include <cstddef> +#include <limits> +#include <utility>  using namespace llvm;  namespace llvm { +  namespace {  /// \brief A class for maintaining the slot number definition  /// as a placeholder for the actual definition for forward constants defs.  class ConstantPlaceHolder : public ConstantExpr { -  void operator=(const ConstantPlaceHolder &) = delete; -  public: -  // allocate space for exactly one operand -  void *operator new(size_t s) { return User::operator new(s, 1); }    explicit ConstantPlaceHolder(Type *Ty, LLVMContext &Context)        : ConstantExpr(Ty, Instruction::UserOp1, &Op<0>(), 1) {      Op<0>() = UndefValue::get(Type::getInt32Ty(Context));    } +  ConstantPlaceHolder &operator=(const ConstantPlaceHolder &) = delete; + +  // allocate space for exactly one operand +  void *operator new(size_t s) { return User::operator new(s, 1); } +    /// \brief Methods to support type inquiry through isa, cast, and dyn_cast.    static bool classof(const Value *V) {      return isa<ConstantExpr>(V) && | 
