]> granicus.if.org Git - clang/commitdiff
Disable the function address cache; this doesn't have any ill effects,
authorEli Friedman <eli.friedman@gmail.com>
Tue, 20 May 2008 09:21:07 +0000 (09:21 +0000)
committerEli Friedman <eli.friedman@gmail.com>
Tue, 20 May 2008 09:21:07 +0000 (09:21 +0000)
as far as I can tell, and it fixes code like test/CodeGen/functions.c.

(Whatever performance effect it might have, crashing on a
construct like this isn't really acceptable; I've run into this
multiple times.)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51312 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CodeGenModule.cpp

index b234788a08f81f4015c693745e20a30979a9aac1..7bf1e01b27e9e1b2e5937f701ea04980377cba50 100644 (file)
@@ -168,8 +168,11 @@ llvm::Constant *CodeGenModule::GetAddrOfFunctionDecl(const FunctionDecl *D,
                                                      bool isDefinition) {
   // See if it is already in the map.  If so, just return it.
   llvm::Constant *&Entry = GlobalDeclMap[D];
+#if 0
+  // FIXME: The cache is currently broken!
   if (Entry) return Entry;
-  
+#endif
+
   const llvm::Type *Ty = getTypes().ConvertType(D->getType());
   
   // Check to see if the function already exists.