diff gen/tollvm.cpp @ 161:3a891cfcd249 trunk

[svn r177] moved variable for interface info type from being local static to being within IRState
author ChristianK
date Sun, 04 May 2008 21:25:48 +0200
parents b77664331d06
children a8cd9bc1021a
line wrap: on
line diff
--- a/gen/tollvm.cpp	Sun May 04 04:35:27 2008 +0200
+++ b/gen/tollvm.cpp	Sun May 04 21:25:48 2008 +0200
@@ -1789,9 +1789,8 @@
 
 const llvm::StructType* DtoInterfaceInfoType()
 {
-    static const llvm::StructType* t = NULL;
-    if (t)
-        return t;
+    if (gIR->interfaceInfoType)
+        return gIR->interfaceInfoType;
 
     // build interface info type
     std::vector<const llvm::Type*> types;
@@ -1808,7 +1807,7 @@
     // int offset
     types.push_back(llvm::Type::Int32Ty);
     // create type
-    t = llvm::StructType::get(types);
+    gIR->interfaceInfoType = llvm::StructType::get(types);
 
-    return t;
+    return gIR->interfaceInfoType;
 }