IPO: Avoid brace initialization of a map, some versions of libc++ don't like it
[oota-llvm.git] / lib / Transforms / IPO / GlobalOpt.cpp
index 27be1b40a32af3174eeb30ec6e0e3037b8fd505e..b74cff1aafe001a65f0cc181b5581a2803ec599f 100644 (file)
@@ -2000,6 +2000,9 @@ struct MutatedGlobal {
   GlobalVariable *GV;
   Constant *Initializer;
   StoreMap Pending;
+
+public:
+  MutatedGlobal(GlobalVariable *GV) : GV(GV), Initializer(nullptr) {}
 };
 
 /// MutatedGlobals - This class tracks and commits stores to globals as basic
@@ -2047,7 +2050,7 @@ void MutatedGlobals::AddStore(Constant *Ptr, Constant *Value) {
 
   auto I = Globals.find(GV);
   if (I == Globals.end()) {
-    auto R = Globals.insert(std::make_pair(GV, MutatedGlobal{GV, nullptr, {}}));
+    auto R = Globals.insert(std::make_pair(GV, MutatedGlobal(GV)));
     assert(R.second && "Global value already in the map?");
     I = R.first;
   }