Strip trailing whitespace.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82332 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Analysis/DebugInfo.cpp b/lib/Analysis/DebugInfo.cpp
index 78cbad8..5d275dd 100644
--- a/lib/Analysis/DebugInfo.cpp
+++ b/lib/Analysis/DebugInfo.cpp
@@ -71,7 +71,7 @@
 
 DIDescriptor::DIDescriptor(MDNode *N, unsigned RequiredTag) {
   DbgNode = N;
-  
+
   // If this is non-null, check to see if the Tag matches. If not, set to null.
   if (N && getTag() != RequiredTag) {
     DbgNode = 0;
@@ -84,28 +84,28 @@
   if (DbgNode == 0)
     return Result;
 
-  if (Elt < DbgNode->getNumElements()) 
+  if (Elt < DbgNode->getNumElements())
     if (MDString *MDS = dyn_cast_or_null<MDString>(DbgNode->getElement(Elt))) {
       Result.assign(MDS->begin(), MDS->begin() + MDS->length());
       return Result;
     }
-  
+
   return Result;
 }
 
 uint64_t DIDescriptor::getUInt64Field(unsigned Elt) const {
-  if (DbgNode == 0) 
+  if (DbgNode == 0)
     return 0;
 
   if (Elt < DbgNode->getNumElements())
     if (ConstantInt *CI = dyn_cast<ConstantInt>(DbgNode->getElement(Elt)))
       return CI->getZExtValue();
-  
+
   return 0;
 }
 
 DIDescriptor DIDescriptor::getDescriptorField(unsigned Elt) const {
-  if (DbgNode == 0) 
+  if (DbgNode == 0)
     return DIDescriptor();
 
   if (Elt < DbgNode->getNumElements() && DbgNode->getElement(Elt))
@@ -115,7 +115,7 @@
 }
 
 GlobalVariable *DIDescriptor::getGlobalVariableField(unsigned Elt) const {
-  if (DbgNode == 0) 
+  if (DbgNode == 0)
     return 0;
 
   if (Elt < DbgNode->getNumElements())
@@ -132,7 +132,7 @@
 bool DIDescriptor::isBasicType() const {
   assert (!isNull() && "Invalid descriptor!");
   unsigned Tag = getTag();
-  
+
   return Tag == dwarf::DW_TAG_base_type;
 }
 
@@ -197,7 +197,7 @@
 bool DIDescriptor::isSubprogram() const {
   assert (!isNull() && "Invalid descriptor!");
   unsigned Tag = getTag();
-  
+
   return Tag == dwarf::DW_TAG_subprogram;
 }
 
@@ -210,7 +210,7 @@
   return Tag == dwarf::DW_TAG_variable;
 }
 
-/// isScope - Return true if the specified tag is one of the scope 
+/// isScope - Return true if the specified tag is one of the scope
 /// related tag.
 bool DIDescriptor::isScope() const {
   assert (!isNull() && "Invalid descriptor!");
@@ -273,10 +273,10 @@
 
 /// Verify - Verify that a compile unit is well formed.
 bool DICompileUnit::Verify() const {
-  if (isNull()) 
+  if (isNull())
     return false;
   std::string Res;
-  if (getFilename(Res).empty()) 
+  if (getFilename(Res).empty())
     return false;
   // It is possible that directory and produce string is empty.
   return true;
@@ -284,26 +284,26 @@
 
 /// Verify - Verify that a type descriptor is well formed.
 bool DIType::Verify() const {
-  if (isNull()) 
+  if (isNull())
     return false;
-  if (getContext().isNull()) 
+  if (getContext().isNull())
     return false;
 
   DICompileUnit CU = getCompileUnit();
-  if (!CU.isNull() && !CU.Verify()) 
+  if (!CU.isNull() && !CU.Verify())
     return false;
   return true;
 }
 
 /// Verify - Verify that a composite type descriptor is well formed.
 bool DICompositeType::Verify() const {
-  if (isNull()) 
+  if (isNull())
     return false;
-  if (getContext().isNull()) 
+  if (getContext().isNull())
     return false;
 
   DICompileUnit CU = getCompileUnit();
-  if (!CU.isNull() && !CU.Verify()) 
+  if (!CU.isNull() && !CU.Verify())
     return false;
   return true;
 }
@@ -312,12 +312,12 @@
 bool DISubprogram::Verify() const {
   if (isNull())
     return false;
-  
+
   if (getContext().isNull())
     return false;
 
   DICompileUnit CU = getCompileUnit();
-  if (!CU.Verify()) 
+  if (!CU.Verify())
     return false;
 
   DICompositeType Ty = getType();
@@ -330,12 +330,12 @@
 bool DIGlobalVariable::Verify() const {
   if (isNull())
     return false;
-  
+
   if (getContext().isNull())
     return false;
 
   DICompileUnit CU = getCompileUnit();
-  if (!CU.isNull() && !CU.Verify()) 
+  if (!CU.isNull() && !CU.Verify())
     return false;
 
   DIType Ty = getType();
@@ -352,7 +352,7 @@
 bool DIVariable::Verify() const {
   if (isNull())
     return false;
-  
+
   if (getContext().isNull())
     return false;
 
@@ -420,14 +420,14 @@
 
   // TODO : Print context
   getCompileUnit().dump();
-  errs() << " [" 
-         << getLineNumber() << ", " 
+  errs() << " ["
+         << getLineNumber() << ", "
          << getSizeInBits() << ", "
          << getAlignInBits() << ", "
-         << getOffsetInBits() 
+         << getOffsetInBits()
          << "] ";
 
-  if (isPrivate()) 
+  if (isPrivate())
     errs() << " [private] ";
   else if (isProtected())
     errs() << " [protected] ";
@@ -538,7 +538,7 @@
 //===----------------------------------------------------------------------===//
 
 DIFactory::DIFactory(Module &m)
-  : M(m), VMContext(M.getContext()), StopPointFn(0), FuncStartFn(0), 
+  : M(m), VMContext(M.getContext()), StopPointFn(0), FuncStartFn(0),
     RegionStartFn(0), RegionEndFn(0),
     DeclareFn(0) {
   EmptyStructPtr = PointerType::getUnqual(StructType::get(VMContext));
@@ -554,11 +554,11 @@
 // DIFactory: Primary Constructors
 //===----------------------------------------------------------------------===//
 
-/// GetOrCreateArray - Create an descriptor for an array of descriptors. 
+/// GetOrCreateArray - Create an descriptor for an array of descriptors.
 /// This implicitly uniques the arrays created.
 DIArray DIFactory::GetOrCreateArray(DIDescriptor *Tys, unsigned NumTys) {
   SmallVector<Value*, 16> Elts;
-  
+
   if (NumTys == 0)
     Elts.push_back(llvm::Constant::getNullValue(Type::getInt32Ty(VMContext)));
   else
@@ -576,7 +576,7 @@
     ConstantInt::get(Type::getInt64Ty(VMContext), Lo),
     ConstantInt::get(Type::getInt64Ty(VMContext), Hi)
   };
-  
+
   return DISubrange(MDNode::get(VMContext, &Elts[0], 3));
 }
 
@@ -705,7 +705,7 @@
 /// CreateSubprogram - Create a new descriptor for the specified subprogram.
 /// See comments in DISubprogram for descriptions of these fields.  This
 /// method does not unique the generated descriptors.
-DISubprogram DIFactory::CreateSubprogram(DIDescriptor Context, 
+DISubprogram DIFactory::CreateSubprogram(DIDescriptor Context,
                                          const std::string &Name,
                                          const std::string &DisplayName,
                                          const std::string &LinkageName,
@@ -738,7 +738,7 @@
                                 DICompileUnit CompileUnit,
                                 unsigned LineNo, DIType Type,bool isLocalToUnit,
                                 bool isDefinition, llvm::GlobalVariable *Val) {
-  Value *Elts[] = { 
+  Value *Elts[] = {
     GetTagConstant(dwarf::DW_TAG_variable),
     llvm::Constant::getNullValue(Type::getInt32Ty(VMContext)),
     Context.getNode(),
@@ -792,7 +792,7 @@
 }
 
 /// CreateLocation - Creates a debug info location.
-DILocation DIFactory::CreateLocation(unsigned LineNo, unsigned ColumnNo, 
+DILocation DIFactory::CreateLocation(unsigned LineNo, unsigned ColumnNo,
 				     DIScope S, DILocation OrigLoc) {
   Value *Elts[] = {
     ConstantInt::get(Type::getInt32Ty(VMContext), LineNo),
@@ -812,12 +812,12 @@
 /// inserting it at the end of the specified basic block.
 void DIFactory::InsertStopPoint(DICompileUnit CU, unsigned LineNo,
                                 unsigned ColNo, BasicBlock *BB) {
-  
+
   // Lazily construct llvm.dbg.stoppoint function.
   if (!StopPointFn)
-    StopPointFn = llvm::Intrinsic::getDeclaration(&M, 
+    StopPointFn = llvm::Intrinsic::getDeclaration(&M,
                                               llvm::Intrinsic::dbg_stoppoint);
-  
+
   // Invoke llvm.dbg.stoppoint
   Value *Args[] = {
     ConstantInt::get(llvm::Type::getInt32Ty(VMContext), LineNo),
@@ -833,7 +833,7 @@
   // Lazily construct llvm.dbg.func.start.
   if (!FuncStartFn)
     FuncStartFn = Intrinsic::getDeclaration(&M, Intrinsic::dbg_func_start);
-  
+
   // Call llvm.dbg.func.start which also implicitly sets a stoppoint.
   CallInst::Create(FuncStartFn, SP.getNode(), "", BB);
 }
@@ -864,7 +864,7 @@
 void DIFactory::InsertDeclare(Value *Storage, DIVariable D, BasicBlock *BB) {
   // Cast the storage to a {}* for the call to llvm.dbg.declare.
   Storage = new BitCastInst(Storage, EmptyStructPtr, "", BB);
-  
+
   if (!DeclareFn)
     DeclareFn = Intrinsic::getDeclaration(&M, Intrinsic::dbg_declare);
 
@@ -909,7 +909,7 @@
     }
   }
 }
-    
+
 /// processType - Process DIType.
 void DebugInfoFinder::processType(DIType DT) {
   if (!addType(DT))
@@ -926,12 +926,12 @@
         DIType TypeE = DIType(D.getNode());
         if (!TypeE.isNull())
           processType(TypeE);
-        else 
+        else
           processSubprogram(DISubprogram(D.getNode()));
       }
   } else if (DT.isDerivedType()) {
     DIDerivedType DDT(DT.getNode());
-    if (!DDT.isNull()) 
+    if (!DDT.isNull())
       processType(DDT.getTypeDerivedFrom());
   }
 }
@@ -1006,7 +1006,7 @@
   CUs.push_back(CU.getNode());
   return true;
 }
-    
+
 /// addGlobalVariable - Add global variable into GVs.
 bool DebugInfoFinder::addGlobalVariable(DIGlobalVariable DIG) {
   if (DIG.isNull())
@@ -1023,7 +1023,7 @@
 bool DebugInfoFinder::addSubprogram(DISubprogram SP) {
   if (SP.isNull())
     return false;
-  
+
   if (!NodesSeen.insert(SP.getNode()))
     return false;
 
@@ -1083,7 +1083,7 @@
     NamedMDNode *NMD = M->getNamedMetadata("llvm.dbg.gv");
     if (!NMD)
       return 0;
-    
+
     for (unsigned i = 0, e = NMD->getNumElements(); i != e; ++i) {
       DIGlobalVariable DIG(cast_or_null<MDNode>(NMD->getElement(i)));
       if (DIG.isNull())
@@ -1150,28 +1150,28 @@
     return true;
   }
 
-  /// isValidDebugInfoIntrinsic - Return true if SPI is a valid debug 
+  /// isValidDebugInfoIntrinsic - Return true if SPI is a valid debug
   /// info intrinsic.
-  bool isValidDebugInfoIntrinsic(DbgStopPointInst &SPI, 
+  bool isValidDebugInfoIntrinsic(DbgStopPointInst &SPI,
                                  CodeGenOpt::Level OptLev) {
     return DIDescriptor::ValidDebugInfo(SPI.getContext(), OptLev);
   }
 
-  /// isValidDebugInfoIntrinsic - Return true if FSI is a valid debug 
+  /// isValidDebugInfoIntrinsic - Return true if FSI is a valid debug
   /// info intrinsic.
   bool isValidDebugInfoIntrinsic(DbgFuncStartInst &FSI,
                                  CodeGenOpt::Level OptLev) {
     return DIDescriptor::ValidDebugInfo(FSI.getSubprogram(), OptLev);
   }
 
-  /// isValidDebugInfoIntrinsic - Return true if RSI is a valid debug 
+  /// isValidDebugInfoIntrinsic - Return true if RSI is a valid debug
   /// info intrinsic.
   bool isValidDebugInfoIntrinsic(DbgRegionStartInst &RSI,
                                  CodeGenOpt::Level OptLev) {
     return DIDescriptor::ValidDebugInfo(RSI.getContext(), OptLev);
   }
 
-  /// isValidDebugInfoIntrinsic - Return true if REI is a valid debug 
+  /// isValidDebugInfoIntrinsic - Return true if REI is a valid debug
   /// info intrinsic.
   bool isValidDebugInfoIntrinsic(DbgRegionEndInst &REI,
                                  CodeGenOpt::Level OptLev) {
@@ -1179,14 +1179,14 @@
   }
 
 
-  /// isValidDebugInfoIntrinsic - Return true if DI is a valid debug 
+  /// isValidDebugInfoIntrinsic - Return true if DI is a valid debug
   /// info intrinsic.
   bool isValidDebugInfoIntrinsic(DbgDeclareInst &DI,
                                  CodeGenOpt::Level OptLev) {
     return DIDescriptor::ValidDebugInfo(DI.getVariable(), OptLev);
   }
 
-  /// ExtractDebugLocation - Extract debug location information 
+  /// ExtractDebugLocation - Extract debug location information
   /// from llvm.dbg.stoppoint intrinsic.
   DebugLoc ExtractDebugLocation(DbgStopPointInst &SPI,
                                 DebugLocTracker &DebugLocInfo) {
@@ -1194,7 +1194,7 @@
     Value *Context = SPI.getContext();
 
     // If this location is already tracked then use it.
-    DebugLocTuple Tuple(cast<MDNode>(Context), SPI.getLine(), 
+    DebugLocTuple Tuple(cast<MDNode>(Context), SPI.getLine(),
                         SPI.getColumn());
     DenseMap<DebugLocTuple, unsigned>::iterator II
       = DebugLocInfo.DebugIdMap.find(Tuple);
@@ -1205,11 +1205,11 @@
     unsigned Id = DebugLocInfo.DebugLocations.size();
     DebugLocInfo.DebugLocations.push_back(Tuple);
     DebugLocInfo.DebugIdMap[Tuple] = Id;
-    
+
     return DebugLoc::get(Id);
   }
 
-  /// ExtractDebugLocation - Extract debug location information 
+  /// ExtractDebugLocation - Extract debug location information
   /// from DILocation.
   DebugLoc ExtractDebugLocation(DILocation &Loc,
                                 DebugLocTracker &DebugLocInfo) {
@@ -1228,11 +1228,11 @@
     unsigned Id = DebugLocInfo.DebugLocations.size();
     DebugLocInfo.DebugLocations.push_back(Tuple);
     DebugLocInfo.DebugIdMap[Tuple] = Id;
-    
+
     return DebugLoc::get(Id);
   }
 
-  /// ExtractDebugLocation - Extract debug location information 
+  /// ExtractDebugLocation - Extract debug location information
   /// from llvm.dbg.func_start intrinsic.
   DebugLoc ExtractDebugLocation(DbgFuncStartInst &FSI,
                                 DebugLocTracker &DebugLocInfo) {
@@ -1254,7 +1254,7 @@
     unsigned Id = DebugLocInfo.DebugLocations.size();
     DebugLocInfo.DebugLocations.push_back(Tuple);
     DebugLocInfo.DebugIdMap[Tuple] = Id;
-    
+
     return DebugLoc::get(Id);
   }