Nuke trailing whitespace.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80145 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Eric Christopher 2009-08-26 21:27:09 +00:00
parent 6009db486e
commit cf29697266

View File

@ -33,7 +33,7 @@ X("machinemoduleinfo", "Module Information");
char MachineModuleInfo::ID = 0; char MachineModuleInfo::ID = 0;
//===----------------------------------------------------------------------===// //===----------------------------------------------------------------------===//
MachineModuleInfo::MachineModuleInfo() MachineModuleInfo::MachineModuleInfo()
: ImmutablePass(&ID) : ImmutablePass(&ID)
, LabelIDList() , LabelIDList()
@ -74,7 +74,7 @@ void MachineModuleInfo::BeginFunction(MachineFunction *MF) {
void MachineModuleInfo::EndFunction() { void MachineModuleInfo::EndFunction() {
// Clean up frame info. // Clean up frame info.
FrameMoves.clear(); FrameMoves.clear();
// Clean up exception info. // Clean up exception info.
LandingPads.clear(); LandingPads.clear();
TypeInfos.clear(); TypeInfos.clear();
@ -114,7 +114,7 @@ LandingPadInfo &MachineModuleInfo::getOrCreateLandingPadInfo
if (LP.LandingPadBlock == LandingPad) if (LP.LandingPadBlock == LandingPad)
return LP; return LP;
} }
LandingPads.push_back(LandingPadInfo(LandingPad)); LandingPads.push_back(LandingPadInfo(LandingPad));
return LandingPads[N]; return LandingPads[N];
} }
@ -133,7 +133,7 @@ void MachineModuleInfo::addInvoke(MachineBasicBlock *LandingPad,
unsigned MachineModuleInfo::addLandingPad(MachineBasicBlock *LandingPad) { unsigned MachineModuleInfo::addLandingPad(MachineBasicBlock *LandingPad) {
unsigned LandingPadLabel = NextLabelID(); unsigned LandingPadLabel = NextLabelID();
LandingPadInfo &LP = getOrCreateLandingPadInfo(LandingPad); LandingPadInfo &LP = getOrCreateLandingPadInfo(LandingPad);
LP.LandingPadLabel = LandingPadLabel; LP.LandingPadLabel = LandingPadLabel;
return LandingPadLabel; return LandingPadLabel;
} }
@ -147,7 +147,7 @@ void MachineModuleInfo::addPersonality(MachineBasicBlock *LandingPad,
for (unsigned i = 0; i < Personalities.size(); ++i) for (unsigned i = 0; i < Personalities.size(); ++i)
if (Personalities[i] == Personality) if (Personalities[i] == Personality)
return; return;
Personalities.push_back(Personality); Personalities.push_back(Personality);
} }
@ -223,7 +223,7 @@ void MachineModuleInfo::TidyLandingPads() {
} }
} }
/// getTypeIDFor - Return the type id for the specified typeinfo. This is /// getTypeIDFor - Return the type id for the specified typeinfo. This is
/// function wide. /// function wide.
unsigned MachineModuleInfo::getTypeIDFor(GlobalVariable *TI) { unsigned MachineModuleInfo::getTypeIDFor(GlobalVariable *TI) {
for (unsigned i = 0, N = TypeInfos.size(); i != N; ++i) for (unsigned i = 0, N = TypeInfos.size(); i != N; ++i)
@ -275,14 +275,14 @@ Function *MachineModuleInfo::getPersonality() const {
/// function. NULL personality function should always get zero index. /// function. NULL personality function should always get zero index.
unsigned MachineModuleInfo::getPersonalityIndex() const { unsigned MachineModuleInfo::getPersonalityIndex() const {
const Function* Personality = NULL; const Function* Personality = NULL;
// Scan landing pads. If there is at least one non-NULL personality - use it. // Scan landing pads. If there is at least one non-NULL personality - use it.
for (unsigned i = 0; i != LandingPads.size(); ++i) for (unsigned i = 0; i != LandingPads.size(); ++i)
if (LandingPads[i].Personality) { if (LandingPads[i].Personality) {
Personality = LandingPads[i].Personality; Personality = LandingPads[i].Personality;
break; break;
} }
for (unsigned i = 0; i < Personalities.size(); ++i) { for (unsigned i = 0; i < Personalities.size(); ++i) {
if (Personalities[i] == Personality) if (Personalities[i] == Personality)
return i; return i;
@ -321,12 +321,12 @@ bool DebugLabelFolder::runOnMachineFunction(MachineFunction &MF) {
// Get machine module info. // Get machine module info.
MachineModuleInfo *MMI = getAnalysisIfAvailable<MachineModuleInfo>(); MachineModuleInfo *MMI = getAnalysisIfAvailable<MachineModuleInfo>();
if (!MMI) return false; if (!MMI) return false;
// Track if change is made. // Track if change is made.
bool MadeChange = false; bool MadeChange = false;
// No prior label to begin. // No prior label to begin.
unsigned PriorLabel = 0; unsigned PriorLabel = 0;
// Iterate through basic blocks. // Iterate through basic blocks.
for (MachineFunction::iterator BB = MF.begin(), E = MF.end(); for (MachineFunction::iterator BB = MF.begin(), E = MF.end();
BB != E; ++BB) { BB != E; ++BB) {
@ -336,7 +336,7 @@ bool DebugLabelFolder::runOnMachineFunction(MachineFunction &MF) {
if (I->isDebugLabel() && !MMI->isDbgLabelUsed(I->getOperand(0).getImm())){ if (I->isDebugLabel() && !MMI->isDbgLabelUsed(I->getOperand(0).getImm())){
// The label ID # is always operand #0, an immediate. // The label ID # is always operand #0, an immediate.
unsigned NextLabel = I->getOperand(0).getImm(); unsigned NextLabel = I->getOperand(0).getImm();
// If there was an immediate prior label. // If there was an immediate prior label.
if (PriorLabel) { if (PriorLabel) {
// Remap the current label to prior label. // Remap the current label to prior label.
@ -354,15 +354,14 @@ bool DebugLabelFolder::runOnMachineFunction(MachineFunction &MF) {
// No consecutive labels. // No consecutive labels.
PriorLabel = 0; PriorLabel = 0;
} }
++I; ++I;
} }
} }
return MadeChange; return MadeChange;
} }
FunctionPass *createDebugLabelFoldingPass() { return new DebugLabelFolder(); } FunctionPass *createDebugLabelFoldingPass() { return new DebugLabelFolder(); }
} }