From 2bbd4681e311c52b34ab602e2013e516bebe2da6 Mon Sep 17 00:00:00 2001 From: mingmingl Date: Wed, 8 May 2024 14:11:18 -0700 Subject: clang-format --- llvm/include/llvm/ProfileData/InstrProf.h | 6 +++--- llvm/lib/ProfileData/InstrProf.cpp | 7 ++++--- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/llvm/include/llvm/ProfileData/InstrProf.h b/llvm/include/llvm/ProfileData/InstrProf.h index f12ba61..88c7fe4 100644 --- a/llvm/include/llvm/ProfileData/InstrProf.h +++ b/llvm/include/llvm/ProfileData/InstrProf.h @@ -476,7 +476,7 @@ private: // `MD5FuncMap` and `MD5VTableMap`. // TODO: Unify the container type and the lambda function 'mapName' inside // add{Func,VTable}WithName. - DenseMap MD5VTableMap; + DenseMap MD5VTableMap; // A map from function runtime address to function name MD5 hash. // This map is only populated and used by raw instr profile reader. AddrHashMap AddrToMD5Map; @@ -646,7 +646,7 @@ public: /// Return the global variable corresponding to md5 hash. Return nullptr if /// not found. - inline GlobalVariable* getGlobalVariable(uint64_t MD5Hash); + inline GlobalVariable *getGlobalVariable(uint64_t MD5Hash); /// Return the name section data. inline StringRef getNameData() const { return Data; } @@ -727,7 +727,7 @@ Function* InstrProfSymtab::getFunction(uint64_t FuncMD5Hash) { return nullptr; } -GlobalVariable* InstrProfSymtab::getGlobalVariable(uint64_t MD5Hash) { +GlobalVariable *InstrProfSymtab::getGlobalVariable(uint64_t MD5Hash) { if (auto Iter = MD5VTableMap.find(MD5Hash); Iter != MD5VTableMap.end()) return Iter->second; return nullptr; diff --git a/llvm/lib/ProfileData/InstrProf.cpp b/llvm/lib/ProfileData/InstrProf.cpp index 655e6ce..39d275c 100644 --- a/llvm/lib/ProfileData/InstrProf.cpp +++ b/llvm/lib/ProfileData/InstrProf.cpp @@ -481,8 +481,8 @@ Error InstrProfSymtab::create(Module &M, bool InLTO) { if (!G.hasName() || !G.hasMetadata(LLVMContext::MD_type)) continue; if (Error E = addVTableWithName( - G, getIRPGOObjectName(G, InLTO, /* PGONameMetadata */ nullptr))) - return E; + G, getIRPGOObjectName(G, InLTO, /* PGONameMetadata */ nullptr))) + return E; } Sorted = false; @@ -497,7 +497,8 @@ Error InstrProfSymtab::addVTableWithName(GlobalVariable &VTable, return E; bool Inserted = true; - std::tie(std::ignore, Inserted) = MD5VTableMap.try_emplace(GlobalValue::getGUID(Name), &VTable); + std::tie(std::ignore, Inserted) = + MD5VTableMap.try_emplace(GlobalValue::getGUID(Name), &VTable); if (!Inserted) LLVM_DEBUG(dbgs() << "GUID conflict within one module"); return Error::success(); -- cgit v1.1