Fix a lot of typos, improve (but not necessarily fix) grammaros and reflow some

lines. No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136458 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Nick Lewycky
2011-07-29 03:49:23 +00:00
parent 55ba816883
commit 3bbb6f79b7
2 changed files with 22 additions and 24 deletions

View File

@ -197,7 +197,7 @@ public:
void setAbstractScope() { AbstractScope = true; } void setAbstractScope() { AbstractScope = true; }
bool isAbstractScope() const { return AbstractScope; } bool isAbstractScope() const { return AbstractScope; }
// Depth First Search support to walk and mainpluate DbgScope hierarchy. // Depth First Search support to walk and manipulate DbgScope hierarchy.
unsigned getDFSOut() const { return DFSOut; } unsigned getDFSOut() const { return DFSOut; }
void setDFSOut(unsigned O) { DFSOut = O; } void setDFSOut(unsigned O) { DFSOut = O; }
unsigned getDFSIn() const { return DFSIn; } unsigned getDFSIn() const { return DFSIn; }
@ -920,7 +920,7 @@ void DwarfDebug::constructCompileUnit(const MDNode *N) {
CUMap.insert(std::make_pair(N, NewCU)); CUMap.insert(std::make_pair(N, NewCU));
} }
/// getCompielUnit - Get CompileUnit DIE. /// getCompileUnit - Get CompileUnit DIE.
CompileUnit *DwarfDebug::getCompileUnit(const MDNode *N) const { CompileUnit *DwarfDebug::getCompileUnit(const MDNode *N) const {
assert (N && "Invalid DwarfDebug::getCompileUnit argument!"); assert (N && "Invalid DwarfDebug::getCompileUnit argument!");
DIDescriptor D(N); DIDescriptor D(N);
@ -949,7 +949,7 @@ CompileUnit *DwarfDebug::getCompileUnit(const MDNode *N) const {
return I->second; return I->second;
} }
// Return const exprssion if value is a GEP to access merged global // Return const expression if value is a GEP to access merged global
// constant. e.g. // constant. e.g.
// i8* getelementptr ({ i8, i8, i8, i8 }* @_MergedGlobals, i32 0, i32 0) // i8* getelementptr ({ i8, i8, i8, i8 }* @_MergedGlobals, i32 0, i32 0)
static const ConstantExpr *getMergedGlobalExpr(const Value *V) { static const ConstantExpr *getMergedGlobalExpr(const Value *V) {
@ -963,8 +963,7 @@ static const ConstantExpr *getMergedGlobalExpr(const Value *V) {
return NULL; return NULL;
// Second operand is zero. // Second operand is zero.
const ConstantInt *CI = const ConstantInt *CI = dyn_cast_or_null<ConstantInt>(CE->getOperand(1));
dyn_cast_or_null<ConstantInt>(CE->getOperand(1));
if (!CI || !CI->isZero()) if (!CI || !CI->isZero())
return NULL; return NULL;
@ -1086,13 +1085,13 @@ void DwarfDebug::constructSubprogramDIE(const MDNode *N) {
/// beginModule - Emit all Dwarf sections that should come prior to the /// beginModule - Emit all Dwarf sections that should come prior to the
/// content. Create global DIEs and emit initial debug info sections. /// content. Create global DIEs and emit initial debug info sections.
/// This is inovked by the target AsmPrinter. /// This is invoked by the target AsmPrinter.
void DwarfDebug::beginModule(Module *M) { void DwarfDebug::beginModule(Module *M) {
if (DisableDebugInfoPrinting) if (DisableDebugInfoPrinting)
return; return;
// If module has named metadata anchors then use them, otherwise scan the module // If module has named metadata anchors then use them, otherwise scan the
// using debug info finder to collect debug info. // module using debug info finder to collect debug info.
NamedMDNode *CU_Nodes = M->getNamedMetadata("llvm.dbg.cu"); NamedMDNode *CU_Nodes = M->getNamedMetadata("llvm.dbg.cu");
if (CU_Nodes) { if (CU_Nodes) {
@ -1120,8 +1119,8 @@ void DwarfDebug::beginModule(Module *M) {
DbgFinder.processModule(*M); DbgFinder.processModule(*M);
bool HasDebugInfo = false; bool HasDebugInfo = false;
// Scan all the compile-units to see if there are any marked as the main unit. // Scan all the compile-units to see if there are any marked as the main
// if not, we do not generate debug info. // unit. If not, we do not generate debug info.
for (DebugInfoFinder::iterator I = DbgFinder.compile_unit_begin(), for (DebugInfoFinder::iterator I = DbgFinder.compile_unit_begin(),
E = DbgFinder.compile_unit_end(); I != E; ++I) { E = DbgFinder.compile_unit_end(); I != E; ++I) {
if (DICompileUnit(*I).isMain()) { if (DICompileUnit(*I).isMain()) {
@ -1305,8 +1304,8 @@ DbgVariable *DwarfDebug::findAbstractVariable(DIVariable &DV,
return AbsDbgVariable; return AbsDbgVariable;
} }
/// addCurrentFnArgument - If Var is an current function argument that add /// addCurrentFnArgument - If Var is a current function argument then add
/// it in CurrentFnArguments list. /// it to CurrentFnArguments list.
bool DwarfDebug::addCurrentFnArgument(const MachineFunction *MF, bool DwarfDebug::addCurrentFnArgument(const MachineFunction *MF,
DbgVariable *Var, DbgScope *Scope) { DbgVariable *Var, DbgScope *Scope) {
if (Scope != CurrentFnDbgScope) if (Scope != CurrentFnDbgScope)
@ -1370,7 +1369,7 @@ static bool isDbgValueInDefinedReg(const MachineInstr *MI) {
MI->getOperand(1).isImm() && MI->getOperand(1).getImm() == 0; MI->getOperand(1).isImm() && MI->getOperand(1).getImm() == 0;
} }
/// getDebugLocEntry - Get .debug_loc entry for the instraction range starting /// getDebugLocEntry - Get .debug_loc entry for the instruction range starting
/// at MI. /// at MI.
static DotDebugLocEntry getDebugLocEntry(AsmPrinter *Asm, static DotDebugLocEntry getDebugLocEntry(AsmPrinter *Asm,
const MCSymbol *FLabel, const MCSymbol *FLabel,
@ -1748,12 +1747,12 @@ bool DwarfDebug::extractScopeInformation() {
continue; continue;
} }
// Ignore DBG_VALUE. It does not contribute any instruction in output. // Ignore DBG_VALUE. It does not contribute to any instruction in output.
if (MInsn->isDebugValue()) if (MInsn->isDebugValue())
continue; continue;
if (RangeBeginMI) { if (RangeBeginMI) {
// If we have alread seen a beginning of a instruction range and // If we have already seen a beginning of an instruction range and
// current instruction scope does not match scope of first instruction // current instruction scope does not match scope of first instruction
// in this range then create a new instruction range. // in this range then create a new instruction range.
DEBUG(dbgs() << "Creating new instruction range :\n"); DEBUG(dbgs() << "Creating new instruction range :\n");
@ -2167,8 +2166,7 @@ void DwarfDebug::recordSourceLine(unsigned Line, unsigned Col, const MDNode *S,
Src = GetOrCreateSourceID(Fn, Dir); Src = GetOrCreateSourceID(Fn, Dir);
} }
Asm->OutStreamer.EmitDwarfLocDirective(Src, Line, Col, Flags, Asm->OutStreamer.EmitDwarfLocDirective(Src, Line, Col, Flags, 0, 0, Fn);
0, 0, Fn);
} }
//===----------------------------------------------------------------------===// //===----------------------------------------------------------------------===//
@ -2281,7 +2279,7 @@ void DwarfDebug::EmitSectionLabels() {
EmitSectionSym(Asm, TLOF.getDataSection()); EmitSectionSym(Asm, TLOF.getDataSection());
} }
/// emitDIE - Recusively Emits a debug information entry. /// emitDIE - Recursively emits a debug information entry.
/// ///
void DwarfDebug::emitDIE(DIE *Die) { void DwarfDebug::emitDIE(DIE *Die) {
// Get the abbreviation for this DIE. // Get the abbreviation for this DIE.