[cfe-commits] r120688 - in /cfe/trunk/lib: Basic/FileManager.cpp Basic/FileSystemStatCache.cpp CodeGen/CGDecl.cpp

Chris Lattner sabre at nondot.org
Wed Dec 1 20:27:30 PST 2010


Author: lattner
Date: Wed Dec  1 22:27:29 2010
New Revision: 120688

URL: http://llvm.org/viewvc/llvm-project?rev=120688&view=rev
Log:
attempt to fix a buildbot failure, apparently apache fails to build.

Modified:
    cfe/trunk/lib/Basic/FileManager.cpp
    cfe/trunk/lib/Basic/FileSystemStatCache.cpp
    cfe/trunk/lib/CodeGen/CGDecl.cpp

Modified: cfe/trunk/lib/Basic/FileManager.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/FileManager.cpp?rev=120688&r1=120687&r2=120688&view=diff
==============================================================================
--- cfe/trunk/lib/Basic/FileManager.cpp (original)
+++ cfe/trunk/lib/Basic/FileManager.cpp Wed Dec  1 22:27:29 2010
@@ -434,7 +434,7 @@
 }
 
 /// getStatValue - Get the 'stat' information for the specified path, using the
-/// cache to accellerate it if possible.  This returns true if the path does not
+/// cache to accelerate it if possible.  This returns true if the path does not
 /// exist or false if it exists.
 ///
 /// The isForDir member indicates whether this is a directory lookup or not.

Modified: cfe/trunk/lib/Basic/FileSystemStatCache.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/FileSystemStatCache.cpp?rev=120688&r1=120687&r2=120688&view=diff
==============================================================================
--- cfe/trunk/lib/Basic/FileSystemStatCache.cpp (original)
+++ cfe/trunk/lib/Basic/FileSystemStatCache.cpp Wed Dec  1 22:27:29 2010
@@ -29,7 +29,7 @@
 #endif
 
 /// FileSystemStatCache::get - Get the 'stat' information for the specified
-/// path, using the cache to accellerate it if possible.  This returns true if
+/// path, using the cache to accelerate it if possible.  This returns true if
 /// the path does not exist or false if it exists.
 ///
 /// If FileDescriptor is non-null, then this lookup should only return success

Modified: cfe/trunk/lib/CodeGen/CGDecl.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGDecl.cpp?rev=120688&r1=120687&r2=120688&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGDecl.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGDecl.cpp Wed Dec  1 22:27:29 2010
@@ -291,8 +291,7 @@
   // FIXME: It is really dangerous to store this in the map; if anyone
   // RAUW's the GV uses of this constant will be invalid.
   const llvm::Type *LTy = CGM.getTypes().ConvertTypeForMem(D.getType());
-  const llvm::Type *LPtrTy =
-    llvm::PointerType::get(LTy, D.getType().getAddressSpace());
+  const llvm::Type *LPtrTy = LTy->getPointerTo(D.getType().getAddressSpace());
   DMEntry = llvm::ConstantExpr::getBitCast(GV, LPtrTy);
 
   // Emit global variable debug descriptor for static vars.
@@ -815,6 +814,8 @@
                              getContext().getTypeSizeInChars(Ty).getQuantity());
       
       const llvm::Type *BP = llvm::Type::getInt8PtrTy(VMContext);
+      if (Loc->getType() != BP)
+        Loc = Builder.CreateBitCast(Loc, BP, "tmp");
       
       llvm::Value *NotVolatile = Builder.getFalse();
 
@@ -823,14 +824,14 @@
       if (shouldUseMemSetPlusStoresToInitialize(Init, 
                       CGM.getTargetData().getTypeAllocSize(Init->getType()))) {
         const llvm::Type *BP = llvm::Type::getInt8PtrTy(VMContext);
-        llvm::Value *MemSetDest = Loc;
-        if (MemSetDest->getType() != BP)
-          MemSetDest = Builder.CreateBitCast(MemSetDest, BP, "tmp");
         
         Builder.CreateCall5(CGM.getMemSetFn(BP, SizeVal->getType()),
-                            MemSetDest, Builder.getInt8(0), SizeVal, AlignVal,
+                            Loc, Builder.getInt8(0), SizeVal, AlignVal,
                             NotVolatile);
-        emitStoresForInitAfterMemset(Init, Loc, Builder);
+        if (!Init->isNullValue()) {
+          Loc = Builder.CreateBitCast(Loc, Init->getType()->getPointerTo());
+          emitStoresForInitAfterMemset(Init, Loc, Builder);
+        }
         
       } else {
         // Otherwise, create a temporary global with the initializer then 
@@ -846,10 +847,6 @@
         if (SrcPtr->getType() != BP)
           SrcPtr = Builder.CreateBitCast(SrcPtr, BP, "tmp");
 
-        const llvm::Type *BP = llvm::Type::getInt8PtrTy(VMContext);
-        if (Loc->getType() != BP)
-          Loc = Builder.CreateBitCast(Loc, BP, "tmp");
-        
         Builder.CreateCall5(CGM.getMemCpyFn(Loc->getType(), SrcPtr->getType(),
                                             SizeVal->getType()),
                             Loc, SrcPtr, SizeVal, AlignVal, NotVolatile);





More information about the cfe-commits mailing list