diff options
author | Eli Friedman <eli.friedman@gmail.com> | 2008-05-20 09:21:07 +0000 |
---|---|---|
committer | Eli Friedman <eli.friedman@gmail.com> | 2008-05-20 09:21:07 +0000 |
commit | 3ed1d5f4968274a534922c4ecf9dcecb68768f1b (patch) | |
tree | 409be4d833c5bc081bd01c1969f049810a23e4db /clang/lib/CodeGen/CodeGenModule.cpp | |
parent | 2460b0c9414c9bbee036312b3d99f81dd232a6f3 (diff) | |
download | bcm5719-llvm-3ed1d5f4968274a534922c4ecf9dcecb68768f1b.tar.gz bcm5719-llvm-3ed1d5f4968274a534922c4ecf9dcecb68768f1b.zip |
Disable the function address cache; this doesn't have any ill effects,
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.)
llvm-svn: 51312
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
-rw-r--r-- | clang/lib/CodeGen/CodeGenModule.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp index b234788a08f..7bf1e01b27e 100644 --- a/clang/lib/CodeGen/CodeGenModule.cpp +++ b/clang/lib/CodeGen/CodeGenModule.cpp @@ -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. |