[llvm-commits] [dragonegg] r137590 - /dragonegg/trunk/src/Constants.cpp
Duncan Sands
baldrick at free.fr
Sun Aug 14 11:37:54 PDT 2011
Author: baldrick
Date: Sun Aug 14 13:37:54 2011
New Revision: 137590
URL: http://llvm.org/viewvc/llvm-project?rev=137590&view=rev
Log:
This cache is shared with get/set_decl_llvm, so check that the same
tree cannot occur both here and in the decl_llvm routines.
Modified:
dragonegg/trunk/src/Constants.cpp
Modified: dragonegg/trunk/src/Constants.cpp
URL: http://llvm.org/viewvc/llvm-project/dragonegg/trunk/src/Constants.cpp?rev=137590&r1=137589&r2=137590&view=diff
==============================================================================
--- dragonegg/trunk/src/Constants.cpp (original)
+++ dragonegg/trunk/src/Constants.cpp Sun Aug 14 13:37:54 2011
@@ -1276,6 +1276,8 @@
/// ConvertInitializerImpl - Implementation of ConvertInitializer.
static Constant *ConvertInitializerImpl(tree exp, TargetFolder &Folder) {
+ assert(!HAS_RTL_P(exp) && "Cache collision with decl_llvm!");
+
// If we already converted the initializer then return the cached copy.
if (Constant *C = cast_or_null<Constant>(getCachedValue(exp)))
return C;
More information about the llvm-commits
mailing list