aboutsummaryrefslogtreecommitdiff
path: root/include/llvm/Transforms/Utils/ValueMapper.h
blob: dd320a3fb4ceb71fcde997f92a92e775b5ae448e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
//===- ValueMapper.h - Remapping for constants and metadata -----*- C++ -*-===//
//
//                     The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
// This file defines the MapValue interface which is used by various parts of
// the Transforms/Utils library to implement cloning and linking facilities.
//
//===----------------------------------------------------------------------===//

#ifndef LLVM_TRANSFORMS_UTILS_VALUEMAPPER_H
#define LLVM_TRANSFORMS_UTILS_VALUEMAPPER_H

#include "llvm/ADT/ValueMap.h"

namespace llvm {
  class Value;
  class Instruction;
  typedef ValueMap<const Value *, TrackingVH<Value> > ValueToValueMapTy;

  Value *MapValue(const Value *V, ValueToValueMapTy &VM,
                  bool ModuleLevelChanges);
  void RemapInstruction(Instruction *I, ValueToValueMapTy &VM,
                        bool ModuleLevelChanges);
} // End llvm namespace

#endif