diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2017-12-18 20:10:56 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2017-12-18 20:10:56 +0000 |
| commit | 044eb2f6afba375a914ac9d8024f8f5142bb912e (patch) | |
| tree | 1475247dc9f9fe5be155ebd4c9069c75aadf8c20 /lib/Bitcode/Reader/ValueList.h | |
| parent | eb70dddbd77e120e5d490bd8fbe7ff3f8fa81c6b (diff) | |
Notes
Diffstat (limited to 'lib/Bitcode/Reader/ValueList.h')
| -rw-r--r-- | lib/Bitcode/Reader/ValueList.h | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/lib/Bitcode/Reader/ValueList.h b/lib/Bitcode/Reader/ValueList.h index 72775a3cf3bc..5ad7899347ad 100644 --- a/lib/Bitcode/Reader/ValueList.h +++ b/lib/Bitcode/Reader/ValueList.h @@ -1,4 +1,4 @@ -//===-- Bitcode/Reader/ValueEnumerator.h - Number values --------*- C++ -*-===// +//===-- Bitcode/Reader/ValueList.h - Number values --------------*- C++ -*-===// // // The LLVM Compiler Infrastructure // @@ -11,13 +11,20 @@ // //===----------------------------------------------------------------------===// -#include "llvm/IR/LLVMContext.h" -#include "llvm/IR/ValueHandle.h" +#ifndef LLVM_LIB_BITCODE_READER_VALUELIST_H +#define LLVM_LIB_BITCODE_READER_VALUELIST_H +#include "llvm/IR/ValueHandle.h" +#include <cassert> +#include <utility> #include <vector> namespace llvm { + class Constant; +class LLVMContext; +class Type; +class Value; class BitcodeReaderValueList { std::vector<WeakTrackingVH> ValuePtrs; @@ -29,12 +36,13 @@ class BitcodeReaderValueList { /// /// The key of this vector is the placeholder constant, the value is the slot /// number that holds the resolved value. - typedef std::vector<std::pair<Constant *, unsigned>> ResolveConstantsTy; + using ResolveConstantsTy = std::vector<std::pair<Constant *, unsigned>>; ResolveConstantsTy ResolveConstants; LLVMContext &Context; public: BitcodeReaderValueList(LLVMContext &C) : Context(C) {} + ~BitcodeReaderValueList() { assert(ResolveConstants.empty() && "Constants not resolved?"); } @@ -73,4 +81,6 @@ public: void resolveConstantForwardRefs(); }; -} // namespace llvm +} // end namespace llvm + +#endif // LLVM_LIB_BITCODE_READER_VALUELIST_H |
