mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-12 05:56:28 +00:00
IR: Use Optional instead of unique_ptr for Metadata map in ValueMap, NFC
llvm-svn: 266751
This commit is contained in:
parent
d8a373b882
commit
a434679bb1
@ -85,7 +85,7 @@ class ValueMap {
|
||||
typedef DenseMap<const Metadata *, TrackingMDRef> MDMapT;
|
||||
typedef typename Config::ExtraData ExtraData;
|
||||
MapT Map;
|
||||
std::unique_ptr<MDMapT> MDMap;
|
||||
Optional<MDMapT> MDMap;
|
||||
ExtraData Data;
|
||||
|
||||
bool MayMapMetadata = true;
|
||||
@ -106,7 +106,7 @@ public:
|
||||
bool hasMD() const { return bool(MDMap); }
|
||||
MDMapT &MD() {
|
||||
if (!MDMap)
|
||||
MDMap.reset(new MDMapT);
|
||||
MDMap.emplace();
|
||||
return *MDMap;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user