[llvm] r188769 - Removed trailing whitespace.

Michael Gottesman mgottesman at apple.com
Tue Aug 20 01:46:16 PDT 2013


Author: mgottesman
Date: Tue Aug 20 03:46:16 2013
New Revision: 188769

URL: http://llvm.org/viewvc/llvm-project?rev=188769&view=rev
Log:
Removed trailing whitespace.

Modified:
    llvm/trunk/lib/CodeGen/StackProtector.cpp

Modified: llvm/trunk/lib/CodeGen/StackProtector.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/StackProtector.cpp?rev=188769&r1=188768&r2=188769&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/StackProtector.cpp (original)
+++ llvm/trunk/lib/CodeGen/StackProtector.cpp Tue Aug 20 03:46:16 2013
@@ -66,7 +66,7 @@ namespace {
     unsigned SSPBufferSize;
 
     /// VisitedPHIs - The set of PHI nodes visited when determining
-    /// if a variable's reference has been taken.  This set 
+    /// if a variable's reference has been taken.  This set
     /// is maintained to ensure we don't visit the same PHI node multiple
     /// times.
     SmallPtrSet<const PHINode*, 16> VisitedPHIs;
@@ -245,7 +245,7 @@ bool StackProtector::RequiresStackProtec
           // of size.
           if (Strong)
             return true;
-  
+
           if (const ConstantInt *CI =
                dyn_cast<ConstantInt>(AI->getArraySize())) {
             if (CI->getLimitedValue(SSPBufferSize) >= SSPBufferSize)
@@ -262,7 +262,7 @@ bool StackProtector::RequiresStackProtec
           return true;
 
         if (Strong && HasAddressTaken(AI)) {
-          ++NumAddrTaken; 
+          ++NumAddrTaken;
           return true;
         }
       }
@@ -347,7 +347,7 @@ static bool CreatePrologue(Function *F,
   if (TLI->getStackCookieLocation(AddressSpace, Offset)) {
     Constant *OffsetVal =
       ConstantInt::get(Type::getInt32Ty(RI->getContext()), Offset);
-    
+
     StackGuardVar = ConstantExpr::getIntToPtr(OffsetVal,
                                               PointerType::get(PtrTy,
                                                                AddressSpace));
@@ -357,15 +357,15 @@ static bool CreatePrologue(Function *F,
       ->setVisibility(GlobalValue::HiddenVisibility);
   } else {
     SupportsSelectionDAGSP = true;
-    StackGuardVar = M->getOrInsertGlobal("__stack_chk_guard", PtrTy);    
+    StackGuardVar = M->getOrInsertGlobal("__stack_chk_guard", PtrTy);
   }
-  
+
   BasicBlock &Entry = F->getEntryBlock();
   Instruction *InsPt = &Entry.front();
-  
+
   AI = new AllocaInst(PtrTy, "StackGuardSlot", InsPt);
   LoadInst *LI = new LoadInst(StackGuardVar, "StackGuard", false, InsPt);
-  
+
   Value *Args[] = { LI, AI };
   CallInst::
     Create(Intrinsic::getDeclaration(M, Intrinsic::stackprotector),
@@ -384,7 +384,7 @@ bool StackProtector::InsertStackProtecto
   bool HasPrologue = false;
   bool SupportsSelectionDAGSP = false;
   AllocaInst *AI = 0;           // Place on stack that stores the stack guard.
-  Value *StackGuardVar = 0;  // The stack guard variable.
+  Value *StackGuardVar = 0;     // The stack guard variable.
 
   for (Function::iterator I = F->begin(), E = F->end(); I != E; ) {
     BasicBlock *BB = I++;
@@ -394,8 +394,8 @@ bool StackProtector::InsertStackProtecto
     if (!HasPrologue) {
       HasPrologue = true;
       SupportsSelectionDAGSP = CreatePrologue(F, M, RI, TLI, Trip, AI,
-                                          StackGuardVar);
-    }    
+                                              StackGuardVar);
+    }
 
     if (EnableSelectionDAGSP && !TM->Options.EnableFastISel &&
         SupportsSelectionDAGSP) {
@@ -404,7 +404,7 @@ bool StackProtector::InsertStackProtecto
       Instruction *InsertionPt = 0;
       if (CallInst *CI = FindPotentialTailCall(BB, RI, TLI)) {
         InsertionPt = CI;
-      } else {        
+      } else {
         InsertionPt = RI;
         // At this point we know that BB has a return statement so it *DOES*
         // have a terminator.
@@ -445,25 +445,25 @@ bool StackProtector::InsertStackProtecto
 
       // Create the FailBB. We duplicate the BB every time since the MI tail
       // merge pass will merge together all of the various BB into one including
-      // fail BB generated by the stack protector pseudo instruction. 
+      // fail BB generated by the stack protector pseudo instruction.
       BasicBlock *FailBB = CreateFailBB();
-      
+
       // Split the basic block before the return instruction.
       BasicBlock *NewBB = BB->splitBasicBlock(RI, "SP_return");
-      
+
       // Update the dominator tree if we need to.
       if (DT && DT->isReachableFromEntry(BB)) {
         DT->addNewBlock(NewBB, BB);
         DT->addNewBlock(FailBB, BB);
       }
-      
+
       // Remove default branch instruction to the new BB.
       BB->getTerminator()->eraseFromParent();
-      
+
       // Move the newly created basic block to the point right after the old
       // basic block so that it's in the "fall through" position.
       NewBB->moveAfter(BB);
-      
+
       // Generate the stack protector instructions in the old basic block.
       LoadInst *LI1 = new LoadInst(StackGuardVar, "", false, BB);
       LoadInst *LI2 = new LoadInst(AI, "", true, BB);





More information about the llvm-commits mailing list