r257516 - Don't store CGOpenMPRegionInfo::CodeGen as a reference (PR26078)
Hans Wennborg via cfe-commits
cfe-commits at lists.llvm.org
Tue Jan 12 12:54:36 PST 2016
Author: hans
Date: Tue Jan 12 14:54:36 2016
New Revision: 257516
URL: http://llvm.org/viewvc/llvm-project?rev=257516&view=rev
Log:
Don't store CGOpenMPRegionInfo::CodeGen as a reference (PR26078)
The referenced llvm::function_ref<void(CodeGenFunction &)> object can go
away before CodeGen is used, resulting in a crash.
Modified:
cfe/trunk/lib/CodeGen/CGOpenMPRuntime.cpp
Modified: cfe/trunk/lib/CodeGen/CGOpenMPRuntime.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGOpenMPRuntime.cpp?rev=257516&r1=257515&r2=257516&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGOpenMPRuntime.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGOpenMPRuntime.cpp Tue Jan 12 14:54:36 2016
@@ -84,7 +84,7 @@ public:
protected:
CGOpenMPRegionKind RegionKind;
- const RegionCodeGenTy &CodeGen;
+ RegionCodeGenTy CodeGen;
OpenMPDirectiveKind Kind;
bool HasCancel;
};
More information about the cfe-commits
mailing list