[llvm] r238865 - clang-format a few functions. NFC

Filipe Cabecinhas me at filcab.net
Tue Jun 2 14:25:00 PDT 2015


Author: filcab
Date: Tue Jun  2 16:25:00 2015
New Revision: 238865

URL: http://llvm.org/viewvc/llvm-project?rev=238865&view=rev
Log:
clang-format a few functions. NFC

Modified:
    llvm/trunk/lib/IR/AsmWriter.cpp
    llvm/trunk/lib/IR/LLVMContext.cpp

Modified: llvm/trunk/lib/IR/AsmWriter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/AsmWriter.cpp?rev=238865&r1=238864&r2=238865&view=diff
==============================================================================
--- llvm/trunk/lib/IR/AsmWriter.cpp (original)
+++ llvm/trunk/lib/IR/AsmWriter.cpp Tue Jun  2 16:25:00 2015
@@ -2221,9 +2221,8 @@ void AssemblyWriter::printNamedMDNode(co
   if (Name.empty()) {
     Out << "<empty name> ";
   } else {
-    if (isalpha(static_cast<unsigned char>(Name[0])) ||
-        Name[0] == '-' || Name[0] == '$' ||
-        Name[0] == '.' || Name[0] == '_')
+    if (isalpha(static_cast<unsigned char>(Name[0])) || Name[0] == '-' ||
+        Name[0] == '$' || Name[0] == '.' || Name[0] == '_')
       Out << Name[0];
     else
       Out << '\\' << hexdigit(Name[0] >> 4) << hexdigit(Name[0] & 0x0F);
@@ -2238,7 +2237,8 @@ void AssemblyWriter::printNamedMDNode(co
   }
   Out << " = !{";
   for (unsigned i = 0, e = NMD->getNumOperands(); i != e; ++i) {
-    if (i) Out << ", ";
+    if (i)
+      Out << ", ";
     int Slot = Machine.getMetadataSlot(NMD->getOperand(i));
     if (Slot == -1)
       Out << "<badref>";
@@ -2248,7 +2248,6 @@ void AssemblyWriter::printNamedMDNode(co
   Out << "}\n";
 }
 
-
 static void PrintLinkage(GlobalValue::LinkageTypes LT,
                          formatted_raw_ostream &Out) {
   switch (LT) {
@@ -2268,7 +2267,6 @@ static void PrintLinkage(GlobalValue::Li
   }
 }
 
-
 static void PrintVisibility(GlobalValue::VisibilityTypes Vis,
                             formatted_raw_ostream &Out) {
   switch (Vis) {

Modified: llvm/trunk/lib/IR/LLVMContext.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/LLVMContext.cpp?rev=238865&r1=238864&r2=238865&view=diff
==============================================================================
--- llvm/trunk/lib/IR/LLVMContext.cpp (original)
+++ llvm/trunk/lib/IR/LLVMContext.cpp Tue Jun  2 16:25:00 2015
@@ -240,15 +240,15 @@ void LLVMContext::emitError(unsigned Loc
 // Metadata Kind Uniquing
 //===----------------------------------------------------------------------===//
 
-/// getMDKindID - Return a unique non-zero ID for the specified metadata kind.
+/// Return a unique non-zero ID for the specified metadata kind.
 unsigned LLVMContext::getMDKindID(StringRef Name) const {
   assert(!std::isdigit(Name.front()) &&
          "Named metadata may not start with a digit");
 
   // If this is new, assign it its ID.
-  return pImpl->CustomMDKindNames.insert(std::make_pair(
-                                             Name,
-                                             pImpl->CustomMDKindNames.size()))
+  return pImpl->CustomMDKindNames.insert(
+                                     std::make_pair(
+                                         Name, pImpl->CustomMDKindNames.size()))
       .first->second;
 }
 





More information about the llvm-commits mailing list