-//===-- llvm/Constant.h - Constant class definition --------------*- C++ -*--=//
+//===-- llvm/Constant.h - Constant class definition -------------*- C++ -*-===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file was developed by the LLVM research group and is distributed under
+// the University of Illinois Open Source License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
//
// This file contains the declaration of the Constant class.
//
#ifndef LLVM_CONSTANT_H
#define LLVM_CONSTANT_H
-#include <assert.h>
#include "llvm/User.h"
+namespace llvm {
+
class Constant : public User {
protected:
inline Constant(const Type *Ty) : User(Ty, Value::ConstantVal) {}
/// use Value::replaceAllUsesWith, which automatically dispatches to this
/// method as needed.
///
- virtual void replaceUsesOfWithOnConstant(Value *From, Value *To) {
+ virtual void replaceUsesOfWithOnConstant(Value *From, Value *To,
+ bool DisableChecking = false) {
// Provide a default implementation for constants (like integers) that
// cannot use any other values. This cannot be called at runtime, but needs
// to be here to avoid link errors.
"implemented for all constants that have operands!");
assert(0 && "Constants that do not have operands cannot be using 'From'!");
}
-
- // WARNING: Only to be used by Bytecode & Assembly Parsers! USER CODE SHOULD
- // NOT USE THIS!!
- // Returns the number of uses of OldV that were replaced.
- unsigned mutateReferences(Value* OldV, Value *NewV);
- // END WARNING!!
};
+} // End llvm namespace
+
#endif