From: Hans Wennborg Date: Tue, 12 Jan 2016 20:54:36 +0000 (+0000) Subject: Don't store CGOpenMPRegionInfo::CodeGen as a reference (PR26078) X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d7aab0685a4b4241dc7618f0003a9c5430b944de;p=clang Don't store CGOpenMPRegionInfo::CodeGen as a reference (PR26078) The referenced llvm::function_ref object can go away before CodeGen is used, resulting in a crash. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@257516 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/CGOpenMPRuntime.cpp b/lib/CodeGen/CGOpenMPRuntime.cpp index 6d4fc9f64b..3b97ba2469 100644 --- a/lib/CodeGen/CGOpenMPRuntime.cpp +++ b/lib/CodeGen/CGOpenMPRuntime.cpp @@ -84,7 +84,7 @@ public: protected: CGOpenMPRegionKind RegionKind; - const RegionCodeGenTy &CodeGen; + RegionCodeGenTy CodeGen; OpenMPDirectiveKind Kind; bool HasCancel; };