From 45c7439d11214d8b1a80edd9308537bb2d48c0e7 Mon Sep 17 00:00:00 2001 From: Hans Wennborg Date: Tue, 12 Jan 2016 20:54:36 +0000 Subject: 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. llvm-svn: 257516 --- clang/lib/CodeGen/CGOpenMPRuntime.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'clang/lib/CodeGen') diff --git a/clang/lib/CodeGen/CGOpenMPRuntime.cpp b/clang/lib/CodeGen/CGOpenMPRuntime.cpp index 6d4fc9f64b4..3b97ba2469a 100644 --- a/clang/lib/CodeGen/CGOpenMPRuntime.cpp +++ b/clang/lib/CodeGen/CGOpenMPRuntime.cpp @@ -84,7 +84,7 @@ public: protected: CGOpenMPRegionKind RegionKind; - const RegionCodeGenTy &CodeGen; + RegionCodeGenTy CodeGen; OpenMPDirectiveKind Kind; bool HasCancel; }; -- cgit v1.2.3