From 581e255b1f3c46db6c2de9765a51c6c5c7a2d62a Mon Sep 17 00:00:00 2001 From: Filipe Cabecinhas Date: Tue, 2 Jun 2015 21:25:00 +0000 Subject: [PATCH] clang-format a few functions. NFC git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238865 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/IR/AsmWriter.cpp | 10 ++++------ lib/IR/LLVMContext.cpp | 8 ++++---- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/lib/IR/AsmWriter.cpp b/lib/IR/AsmWriter.cpp index 1089cb58218..86bcd658185 100644 --- a/lib/IR/AsmWriter.cpp +++ b/lib/IR/AsmWriter.cpp @@ -2221,9 +2221,8 @@ void AssemblyWriter::printNamedMDNode(const NamedMDNode *NMD) { if (Name.empty()) { Out << " "; } else { - if (isalpha(static_cast(Name[0])) || - Name[0] == '-' || Name[0] == '$' || - Name[0] == '.' || Name[0] == '_') + if (isalpha(static_cast(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(const NamedMDNode *NMD) { } 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 << ""; @@ -2248,7 +2248,6 @@ void AssemblyWriter::printNamedMDNode(const NamedMDNode *NMD) { Out << "}\n"; } - static void PrintLinkage(GlobalValue::LinkageTypes LT, formatted_raw_ostream &Out) { switch (LT) { @@ -2268,7 +2267,6 @@ static void PrintLinkage(GlobalValue::LinkageTypes LT, } } - static void PrintVisibility(GlobalValue::VisibilityTypes Vis, formatted_raw_ostream &Out) { switch (Vis) { diff --git a/lib/IR/LLVMContext.cpp b/lib/IR/LLVMContext.cpp index 44c45326c12..e8bf442b3e1 100644 --- a/lib/IR/LLVMContext.cpp +++ b/lib/IR/LLVMContext.cpp @@ -240,15 +240,15 @@ void LLVMContext::emitError(unsigned LocCookie, const Twine &ErrorStr) { // 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; } -- 2.34.1