Reformat PseudoSourceValue.cpp and PseudoSourceValue.h. NFC.
[oota-llvm.git] / lib / CodeGen / PseudoSourceValue.cpp
index b1c341d3a681bd414f6ec53ee6ab7cff03dde700..5c9bec9aa0e94a27f4e440586be298891e3899e0 100644 (file)
@@ -26,13 +26,15 @@ namespace {
 struct PSVGlobalsTy {
   // PseudoSourceValues are immutable so don't need locking.
   const PseudoSourceValue PSVs[4];
-  sys::Mutex Lock;  // Guards FSValues, but not the values inside it.
+  sys::Mutex Lock; // Guards FSValues, but not the values inside it.
   std::map<int, const PseudoSourceValue *> FSValues;
 
   PSVGlobalsTy() : PSVs() {}
   ~PSVGlobalsTy() {
     for (std::map<int, const PseudoSourceValue *>::iterator
-           I = FSValues.begin(), E = FSValues.end(); I != E; ++I) {
+             I = FSValues.begin(),
+             E = FSValues.end();
+         I != E; ++I) {
       delete I->second;
     }
   }
@@ -40,23 +42,23 @@ struct PSVGlobalsTy {
 
 static ManagedStatic<PSVGlobalsTy> PSVGlobals;
 
-}  // anonymous namespace
-
-const PseudoSourceValue *PseudoSourceValue::getStack()
-{ return &PSVGlobals->PSVs[0]; }
-const PseudoSourceValue *PseudoSourceValue::getGOT()
-{ return &PSVGlobals->PSVs[1]; }
-const PseudoSourceValue *PseudoSourceValue::getJumpTable()
-{ return &PSVGlobals->PSVs[2]; }
-const PseudoSourceValue *PseudoSourceValue::getConstantPool()
-{ return &PSVGlobals->PSVs[3]; }
-
-static const char *const PSVNames[] = {
-  "Stack",
-  "GOT",
-  "JumpTable",
-  "ConstantPool"
-};
+} // anonymous namespace
+
+const PseudoSourceValue *PseudoSourceValue::getStack() {
+  return &PSVGlobals->PSVs[0];
+}
+const PseudoSourceValue *PseudoSourceValue::getGOT() {
+  return &PSVGlobals->PSVs[1];
+}
+const PseudoSourceValue *PseudoSourceValue::getJumpTable() {
+  return &PSVGlobals->PSVs[2];
+}
+const PseudoSourceValue *PseudoSourceValue::getConstantPool() {
+  return &PSVGlobals->PSVs[3];
+}
+
+static const char *const PSVNames[] = {"Stack", "GOT", "JumpTable",
+                                       "ConstantPool"};
 
 PseudoSourceValue::PseudoSourceValue(bool isFixed) : isFixed(isFixed) {}
 
@@ -78,31 +80,26 @@ const PseudoSourceValue *PseudoSourceValue::getFixedStack(int FI) {
 bool PseudoSourceValue::isConstant(const MachineFrameInfo *) const {
   if (this == getStack())
     return false;
-  if (this == getGOT() ||
-      this == getConstantPool() ||
-      this == getJumpTable())
+  if (this == getGOT() || this == getConstantPool() || this == getJumpTable())
     return true;
   llvm_unreachable("Unknown PseudoSourceValue!");
 }
 
 bool PseudoSourceValue::isAliased(const MachineFrameInfo *MFI) const {
-  if (this == getStack() ||
-      this == getGOT() ||
-      this == getConstantPool() ||
+  if (this == getStack() || this == getGOT() || this == getConstantPool() ||
       this == getJumpTable())
     return false;
   llvm_unreachable("Unknown PseudoSourceValue!");
 }
 
 bool PseudoSourceValue::mayAlias(const MachineFrameInfo *MFI) const {
-  if (this == getGOT() ||
-      this == getConstantPool() ||
-      this == getJumpTable())
+  if (this == getGOT() || this == getConstantPool() || this == getJumpTable())
     return false;
   return true;
 }
 
-bool FixedStackPseudoSourceValue::isConstant(const MachineFrameInfo *MFI) const{
+bool FixedStackPseudoSourceValue::isConstant(
+    const MachineFrameInfo *MFI) const {
   return MFI && MFI->isImmutableObjectIndex(FI);
 }