Strip trailing whitespace.

llvm-svn: 82332
This commit is contained in:
Daniel Dunbar 2009-09-19 20:40:05 +00:00
parent 86f158ccb6
commit c418d6b106
4 changed files with 122 additions and 122 deletions

View File

@ -44,7 +44,7 @@ namespace llvm {
class LLVMContext;
class DIDescriptor {
protected:
protected:
MDNode *DbgNode;
/// DIDescriptor constructor. If the specified node is non-null, check
@ -112,7 +112,7 @@ namespace llvm {
/// DIArray - This descriptor holds an array of descriptors.
class DIArray : public DIDescriptor {
public:
explicit DIArray(MDNode *N = 0)
explicit DIArray(MDNode *N = 0)
: DIDescriptor(N) {}
unsigned getNumElements() const;
@ -158,14 +158,14 @@ namespace llvm {
const std::string &getProducer(std::string &F) const {
return getStringField(5, F);
}
/// isMain - Each input file is encoded as a separate compile unit in LLVM
/// debugging information output. However, many target specific tool chains
/// prefer to encode only one compile unit in an object file. In this
/// prefer to encode only one compile unit in an object file. In this
/// situation, the LLVM code generator will include debugging information
/// entities in the compile unit that is marked as main compile unit. The
/// entities in the compile unit that is marked as main compile unit. The
/// code generator accepts maximum one main compile unit per module. If a
/// module does not contain any main compile unit then the code generator
/// module does not contain any main compile unit then the code generator
/// will emit multiple compile units in the output object file.
bool isMain() const { return getUnsignedField(6); }
@ -210,7 +210,7 @@ namespace llvm {
};
protected:
DIType(MDNode *N, unsigned Tag)
DIType(MDNode *N, unsigned Tag)
: DIDescriptor(N, Tag) {}
// This ctor is used when the Tag has already been validated by a derived
// ctor.
@ -238,17 +238,17 @@ namespace llvm {
uint64_t getOffsetInBits() const { return getUInt64Field(7); }
unsigned getFlags() const { return getUnsignedField(8); }
bool isPrivate() const {
return (getFlags() & FlagPrivate) != 0;
return (getFlags() & FlagPrivate) != 0;
}
bool isProtected() const {
return (getFlags() & FlagProtected) != 0;
return (getFlags() & FlagProtected) != 0;
}
bool isForwardDecl() const {
return (getFlags() & FlagFwdDecl) != 0;
return (getFlags() & FlagFwdDecl) != 0;
}
// isAppleBlock - Return true if this is the Apple Blocks extension.
bool isAppleBlockExtension() const {
return (getFlags() & FlagAppleBlock) != 0;
return (getFlags() & FlagAppleBlock) != 0;
}
bool isBlockByrefStruct() const {
return (getFlags() & FlagBlockByrefStruct) != 0;
@ -448,8 +448,8 @@ namespace llvm {
/// isBlockByrefVariable - Return true if the variable was declared as
/// a "__block" variable (Apple Blocks).
bool isBlockByrefVariable() const {
return getType().isBlockByrefStruct();
bool isBlockByrefVariable() const {
return getType().isBlockByrefStruct();
}
/// dump - print variable.
@ -461,7 +461,7 @@ namespace llvm {
public:
explicit DILexicalBlock(MDNode *N = 0) {
DbgNode = N;
if (DbgNode && !isLexicalBlock())
if (DbgNode && !isLexicalBlock())
DbgNode = 0;
}
DIScope getContext() const { return getFieldAs<DIScope>(1); }
@ -484,11 +484,11 @@ namespace llvm {
unsigned getColumnNumber() const { return getUnsignedField(1); }
DIScope getScope() const { return getFieldAs<DIScope>(3); }
DILocation getOrigLocation() const { return getFieldAs<DILocation>(4); }
std::string getFilename(std::string &F) const {
return getScope().getFilename(F);
std::string getFilename(std::string &F) const {
return getScope().getFilename(F);
}
std::string getDirectory(std::string &D) const {
return getScope().getDirectory(D);
std::string getDirectory(std::string &D) const {
return getScope().getDirectory(D);
}
};
@ -497,7 +497,7 @@ namespace llvm {
class DIFactory {
Module &M;
LLVMContext& VMContext;
// Cached values for uniquing and faster lookups.
const Type *EmptyStructPtr; // "{}*".
Function *StopPointFn; // llvm.dbg.stoppoint
@ -513,7 +513,7 @@ namespace llvm {
public:
explicit DIFactory(Module &m);
/// 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 GetOrCreateArray(DIDescriptor *Tys, unsigned NumTys);
@ -577,7 +577,7 @@ namespace llvm {
DIGlobalVariable
CreateGlobalVariable(DIDescriptor Context, const std::string &Name,
const std::string &DisplayName,
const std::string &LinkageName,
const std::string &LinkageName,
DICompileUnit CompileUnit,
unsigned LineNo, DIType Type, bool isLocalToUnit,
bool isDefinition, llvm::GlobalVariable *GV);
@ -588,12 +588,12 @@ namespace llvm {
DICompileUnit CompileUnit, unsigned LineNo,
DIType Type);
/// CreateLexicalBlock - This creates a descriptor for a lexical block
/// CreateLexicalBlock - This creates a descriptor for a lexical block
/// with the specified parent context.
DILexicalBlock CreateLexicalBlock(DIDescriptor Context);
/// CreateLocation - Creates a debug info location.
DILocation CreateLocation(unsigned LineNo, unsigned ColumnNo,
DILocation CreateLocation(unsigned LineNo, unsigned ColumnNo,
DIScope S, DILocation OrigLoc);
/// InsertStopPoint - Create a new llvm.dbg.stoppoint intrinsic invocation,
@ -621,10 +621,10 @@ namespace llvm {
};
/// Finds the stoppoint coressponding to this instruction, that is the
/// stoppoint that dominates this instruction
/// stoppoint that dominates this instruction
const DbgStopPointInst *findStopPoint(const Instruction *Inst);
/// Finds the stoppoint corresponding to first real (non-debug intrinsic)
/// Finds the stoppoint corresponding to first real (non-debug intrinsic)
/// instruction in this Basic Block, and returns the stoppoint for it.
const DbgStopPointInst *findBBStopPoint(const BasicBlock *BB);
@ -635,46 +635,46 @@ namespace llvm {
/// Find the debug info descriptor corresponding to this global variable.
Value *findDbgGlobalDeclare(GlobalVariable *V);
bool getLocationInfo(const Value *V, std::string &DisplayName,
bool getLocationInfo(const Value *V, std::string &DisplayName,
std::string &Type, unsigned &LineNo, std::string &File,
std::string &Dir);
std::string &Dir);
/// 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);
/// 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);
/// 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);
/// 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);
/// 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);
/// ExtractDebugLocation - Extract debug location information
/// ExtractDebugLocation - Extract debug location information
/// from llvm.dbg.stoppoint intrinsic.
DebugLoc ExtractDebugLocation(DbgStopPointInst &SPI,
DebugLocTracker &DebugLocInfo);
/// ExtractDebugLocation - Extract debug location information
/// ExtractDebugLocation - Extract debug location information
/// from DILocation.
DebugLoc ExtractDebugLocation(DILocation &Loc,
DebugLocTracker &DebugLocInfo);
/// ExtractDebugLocation - Extract debug location information
/// ExtractDebugLocation - Extract debug location information
/// from llvm.dbg.func_start intrinsic.
DebugLoc ExtractDebugLocation(DbgFuncStartInst &FSI,
DebugLocTracker &DebugLocInfo);
@ -691,7 +691,7 @@ namespace llvm {
/// processModule - Process entire module and collect debug info
/// anchors.
void processModule(Module &M);
private:
/// processType - Process DIType.
void processType(DIType DT);
@ -716,7 +716,7 @@ namespace llvm {
/// addCompileUnit - Add compile unit into CUs.
bool addCompileUnit(DICompileUnit CU);
/// addGlobalVariable - Add global variable into GVs.
bool addGlobalVariable(DIGlobalVariable DIG);

View File

@ -49,7 +49,7 @@ protected:
Callback
};
private:
PointerIntPair<ValueHandleBase**, 2, HandleBaseKind> PrevPair;
ValueHandleBase *Next;
Value *VP;
@ -68,9 +68,9 @@ public:
}
~ValueHandleBase() {
if (isValid(VP))
RemoveFromUseList();
RemoveFromUseList();
}
Value *operator=(Value *RHS) {
if (VP == RHS) return RHS;
if (isValid(VP)) RemoveFromUseList();
@ -86,7 +86,7 @@ public:
if (isValid(VP)) AddToExistingUseList(RHS.getPrevPtr());
return VP;
}
Value *operator->() const { return getValPtr(); }
Value &operator*() const { return *getValPtr(); }
@ -102,22 +102,22 @@ private:
// Callbacks made from Value.
static void ValueIsDeleted(Value *V);
static void ValueIsRAUWd(Value *Old, Value *New);
// Internal implementation details.
ValueHandleBase **getPrevPtr() const { return PrevPair.getPointer(); }
HandleBaseKind getKind() const { return PrevPair.getInt(); }
void setPrevPtr(ValueHandleBase **Ptr) { PrevPair.setPointer(Ptr); }
/// AddToExistingUseList - Add this ValueHandle to the use list for VP,
/// where List is known to point into the existing use list.
void AddToExistingUseList(ValueHandleBase **List);
/// AddToUseList - Add this ValueHandle to the use list for VP.
void AddToUseList();
/// RemoveFromUseList - Remove this ValueHandle from its current use list.
void RemoveFromUseList();
};
/// WeakVH - This is a value handle that tries hard to point to a Value, even
/// across RAUW operations, but will null itself out if the value is destroyed.
/// this is useful for advisory sorts of information, but should not be used as
@ -160,7 +160,7 @@ template<> struct simplify_type<WeakVH> : public simplify_type<const WeakVH> {};
/// AssertingVH's as it moves. This is required because in non-assert mode this
/// class turns into a trivial wrapper around a pointer.
template <typename ValueTy>
class AssertingVH
class AssertingVH
#ifndef NDEBUG
: public ValueHandleBase
#endif

View File

@ -71,7 +71,7 @@ bool DIDescriptor::ValidDebugInfo(MDNode *N, CodeGenOpt::Level OptLevel) {
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 @@ DIDescriptor::getStringField(unsigned Elt, std::string &Result) const {
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 @@ DIDescriptor DIDescriptor::getDescriptorField(unsigned Elt) const {
}
GlobalVariable *DIDescriptor::getGlobalVariableField(unsigned Elt) const {
if (DbgNode == 0)
if (DbgNode == 0)
return 0;
if (Elt < DbgNode->getNumElements())
@ -132,7 +132,7 @@ GlobalVariable *DIDescriptor::getGlobalVariableField(unsigned Elt) const {
bool DIDescriptor::isBasicType() const {
assert (!isNull() && "Invalid descriptor!");
unsigned Tag = getTag();
return Tag == dwarf::DW_TAG_base_type;
}
@ -197,7 +197,7 @@ bool DIDescriptor::isVariable() const {
bool DIDescriptor::isSubprogram() const {
assert (!isNull() && "Invalid descriptor!");
unsigned Tag = getTag();
return Tag == dwarf::DW_TAG_subprogram;
}
@ -210,7 +210,7 @@ bool DIDescriptor::isGlobalVariable() const {
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 @@ void DIDerivedType::replaceAllUsesWith(DIDescriptor &D) {
/// 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 @@ bool DICompileUnit::Verify() const {
/// 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 DICompositeType::Verify() const {
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 DISubprogram::Verify() const {
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 DIGlobalVariable::Verify() const {
bool DIVariable::Verify() const {
if (isNull())
return false;
if (getContext().isNull())
return false;
@ -420,14 +420,14 @@ void DIType::dump() const {
// 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 @@ void DIVariable::dump() const {
//===----------------------------------------------------------------------===//
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 @@ Constant *DIFactory::GetTagConstant(unsigned TAG) {
// 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 @@ DISubrange DIFactory::GetOrCreateSubrange(int64_t Lo, int64_t Hi) {
ConstantInt::get(Type::getInt64Ty(VMContext), Lo),
ConstantInt::get(Type::getInt64Ty(VMContext), Hi)
};
return DISubrange(MDNode::get(VMContext, &Elts[0], 3));
}
@ -705,7 +705,7 @@ DICompositeType DIFactory::CreateCompositeType(unsigned Tag,
/// 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 @@ DIFactory::CreateGlobalVariable(DIDescriptor Context, const std::string &Name,
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 @@ DILexicalBlock DIFactory::CreateLexicalBlock(DIDescriptor Context) {
}
/// 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 @@ DILocation DIFactory::CreateLocation(unsigned LineNo, unsigned ColumnNo,
/// 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 @@ void DIFactory::InsertSubprogramStart(DISubprogram SP, BasicBlock *BB) {
// 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::InsertRegionEnd(DIDescriptor D, BasicBlock *BB) {
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 @@ void DebugInfoFinder::processModule(Module &M) {
}
}
}
/// processType - Process DIType.
void DebugInfoFinder::processType(DIType DT) {
if (!addType(DT))
@ -926,12 +926,12 @@ void DebugInfoFinder::processType(DIType DT) {
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 @@ bool DebugInfoFinder::addCompileUnit(DICompileUnit CU) {
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::addGlobalVariable(DIGlobalVariable DIG) {
bool DebugInfoFinder::addSubprogram(DISubprogram SP) {
if (SP.isNull())
return false;
if (!NodesSeen.insert(SP.getNode()))
return false;
@ -1083,7 +1083,7 @@ namespace llvm {
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 @@ namespace llvm {
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 @@ namespace llvm {
}
/// 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 @@ namespace llvm {
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 @@ namespace llvm {
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 @@ namespace llvm {
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 @@ namespace llvm {
unsigned Id = DebugLocInfo.DebugLocations.size();
DebugLocInfo.DebugLocations.push_back(Tuple);
DebugLocInfo.DebugIdMap[Tuple] = Id;
return DebugLoc::get(Id);
}

View File

@ -150,7 +150,7 @@ class VISIBILITY_HIDDEN DbgScope {
SmallVector<DbgScope *, 4> Scopes; // Scopes defined in scope.
SmallVector<DbgVariable *, 8> Variables;// Variables declared in scope.
SmallVector<DbgConcreteScope *, 8> ConcreteInsts;// Concrete insts of funcs.
// Private state for dump()
mutable unsigned IndentLevel;
public:
@ -232,7 +232,7 @@ DbgScope::~DbgScope() {
DwarfDebug::DwarfDebug(raw_ostream &OS, AsmPrinter *A, const MCAsmInfo *T)
: Dwarf(OS, A, T, "dbg"), ModuleCU(0),
AbbreviationsSet(InitAbbreviationsSetSize), Abbreviations(),
ValuesSet(InitValuesSetSize), Values(), StringPool(),
ValuesSet(InitValuesSetSize), Values(), StringPool(),
SectionSourceLines(), didInitial(false), shouldEmit(false),
FunctionDbgScope(0), DebugTimer(0) {
if (TimePassesIsEnabled)
@ -593,7 +593,7 @@ DIType DwarfDebug::GetBlockByrefType(DIType Ty, std::string Name) {
the variable's Debug Information Entry as its real type. So far, so good.
However now the debugger will expect the variable VarName to have the type
SomeType. So we need the location attribute for the variable to be an
expression that explains to the debugger how to navigate through the
expression that explains to the debugger how to navigate through the
pointers and struct to find the actual variable of type SomeType.
The following function does just that. We start by getting
@ -639,7 +639,7 @@ DIType DwarfDebug::GetBlockByrefType(DIType Ty, std::string Name) {
/// starting location. Add the DWARF information to the die. For
/// more information, read large comment just above here.
///
void DwarfDebug::AddBlockByrefAddress(DbgVariable *&DV, DIE *Die,
void DwarfDebug::AddBlockByrefAddress(DbgVariable *&DV, DIE *Die,
unsigned Attribute,
const MachineLocation &Location) {
const DIVariable &VD = DV->getVariable();
@ -667,7 +667,7 @@ void DwarfDebug::AddBlockByrefAddress(DbgVariable *&DV, DIE *Die,
// Find the __forwarding field and the variable field in the __Block_byref
// struct.
DIArray Fields = blockStruct.getTypeArray();
DIDescriptor varField = DIDescriptor();
DIDescriptor forwardingField = DIDescriptor();
@ -683,19 +683,19 @@ void DwarfDebug::AddBlockByrefAddress(DbgVariable *&DV, DIE *Die,
else if (fieldName == varName)
varField = Element;
}
assert (!varField.isNull() && "Can't find byref variable in Block struct");
assert (!forwardingField.isNull()
assert (!forwardingField.isNull()
&& "Can't find forwarding field in Block struct");
// Get the offsets for the forwarding field and the variable field.
unsigned int forwardingFieldOffset =
unsigned int forwardingFieldOffset =
DIDerivedType(forwardingField.getNode()).getOffsetInBits() >> 3;
unsigned int varFieldOffset =
unsigned int varFieldOffset =
DIDerivedType(varField.getNode()).getOffsetInBits() >> 3;
// Decode the original location, and use that as the start of the
// Decode the original location, and use that as the start of the
// byref variable's location.
unsigned Reg = RI->getDwarfRegNum(Location.getReg(), false);
@ -1393,13 +1393,13 @@ void DwarfDebug::ConstructDefaultDbgScope(MachineFunction *MF) {
StringMap<DIE*>::iterator GI = Globals.find(MF->getFunction()->getName());
if (GI != Globals.end()) {
DIE *SPDie = GI->second;
// Add the function bounds.
AddLabel(SPDie, dwarf::DW_AT_low_pc, dwarf::DW_FORM_addr,
DWLabel("func_begin", SubprogramCount));
AddLabel(SPDie, dwarf::DW_AT_high_pc, dwarf::DW_FORM_addr,
DWLabel("func_end", SubprogramCount));
MachineLocation Location(RI->getFrameRegister(*MF));
AddAddress(SPDie, dwarf::DW_AT_frame_base, Location);
}
@ -1487,7 +1487,7 @@ void DwarfDebug::ConstructCompileUnit(MDNode *N) {
void DwarfDebug::ConstructGlobalVariableDIE(MDNode *N) {
DIGlobalVariable DI_GV(N);
// If debug information is malformed then ignore it.
if (DI_GV.Verify() == false)
return;
@ -1582,7 +1582,7 @@ void DwarfDebug::BeginModule(Module *M, MachineModuleInfo *mmi) {
DebugTimer->stopTimer();
return;
}
// Create DIEs for each of the externally visible global variables.
for (DebugInfoFinder::iterator I = DbgFinder.global_variable_begin(),
E = DbgFinder.global_variable_end(); I != E; ++I)
@ -1904,7 +1904,7 @@ void DwarfDebug::RecordVariable(MDNode *N, unsigned FrameIndex) {
Scope = I->second;
}
}
if (!InlinedVar)
if (!InlinedVar)
Scope = getOrCreateScope(Context);
}
@ -2109,7 +2109,7 @@ void DwarfDebug::EmitInitial() {
didInitial = true;
const TargetLoweringObjectFile &TLOF = Asm->getObjFileLowering();
// Dwarf sections base addresses.
if (MAI->doesDwarfRequireFrameSection()) {
Asm->OutStreamer.SwitchSection(TLOF.getDwarfFrameSection());
@ -2669,7 +2669,7 @@ void DwarfDebug::EmitDebugRanges() {
/// EmitDebugMacInfo - Emit visible names into a debug macinfo section.
///
void DwarfDebug::EmitDebugMacInfo() {
if (const MCSection *LineInfo =
if (const MCSection *LineInfo =
Asm->getObjFileLowering().getDwarfMacroInfoSection()) {
// Start the dwarf macinfo section.
Asm->OutStreamer.SwitchSection(LineInfo);