[clang] 5d9de5f - [NFC] Clang-format parts of D126929 and D126100
Vitaly Buka via cfe-commits
cfe-commits at lists.llvm.org
Tue Jun 7 14:09:03 PDT 2022
Author: Mitch Phillips
Date: 2022-06-07T14:08:43-07:00
New Revision: 5d9de5f446601d80ebbe5e281f783912b3585bad
URL: https://github.com/llvm/llvm-project/commit/5d9de5f446601d80ebbe5e281f783912b3585bad
DIFF: https://github.com/llvm/llvm-project/commit/5d9de5f446601d80ebbe5e281f783912b3585bad.diff
LOG: [NFC] Clang-format parts of D126929 and D126100
Added:
Modified:
clang/lib/CodeGen/SanitizerMetadata.cpp
clang/lib/CodeGen/SanitizerMetadata.h
llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
Removed:
################################################################################
diff --git a/clang/lib/CodeGen/SanitizerMetadata.cpp b/clang/lib/CodeGen/SanitizerMetadata.cpp
index 7984d2821279c..cae5e79e724e2 100644
--- a/clang/lib/CodeGen/SanitizerMetadata.cpp
+++ b/clang/lib/CodeGen/SanitizerMetadata.cpp
@@ -22,7 +22,7 @@ using namespace CodeGen;
SanitizerMetadata::SanitizerMetadata(CodeGenModule &CGM) : CGM(CGM) {}
-static bool isAsanHwasanOrMemTag(const SanitizerSet& SS) {
+static bool isAsanHwasanOrMemTag(const SanitizerSet &SS) {
return SS.hasOneOf(SanitizerKind::Address | SanitizerKind::KernelAddress |
SanitizerKind::HWAddress | SanitizerKind::KernelHWAddress |
SanitizerKind::MemTag);
diff --git a/clang/lib/CodeGen/SanitizerMetadata.h b/clang/lib/CodeGen/SanitizerMetadata.h
index a3ddaac0c61c7..753b32c4a0fca 100644
--- a/clang/lib/CodeGen/SanitizerMetadata.h
+++ b/clang/lib/CodeGen/SanitizerMetadata.h
@@ -20,7 +20,7 @@ namespace llvm {
class GlobalVariable;
class Instruction;
class MDNode;
-}
+} // namespace llvm
namespace clang {
class VarDecl;
@@ -34,6 +34,7 @@ class SanitizerMetadata {
void operator=(const SanitizerMetadata &) = delete;
CodeGenModule &CGM;
+
public:
SanitizerMetadata(CodeGenModule &CGM);
void reportGlobal(llvm::GlobalVariable *GV, const VarDecl &D,
@@ -43,10 +44,11 @@ class SanitizerMetadata {
bool IsExcluded = false);
void disableSanitizerForGlobal(llvm::GlobalVariable *GV);
void disableSanitizerForInstruction(llvm::Instruction *I);
+
private:
llvm::MDNode *getLocationMetadata(SourceLocation Loc);
};
-} // end namespace CodeGen
-} // end namespace clang
+} // end namespace CodeGen
+} // end namespace clang
#endif
diff --git a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
index 66445c8346759..4e1729febe57d 100644
--- a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
+++ b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
@@ -1362,9 +1362,7 @@ void ModuleBitcodeWriter::writeModuleInfo() {
GV.getUnnamedAddr() != GlobalValue::UnnamedAddr::None ||
GV.isExternallyInitialized() ||
GV.getDLLStorageClass() != GlobalValue::DefaultStorageClass ||
- GV.hasComdat() ||
- GV.hasAttributes() ||
- GV.isDSOLocal() ||
+ GV.hasComdat() || GV.hasAttributes() || GV.isDSOLocal() ||
GV.hasPartition()) {
Vals.push_back(getEncodedVisibility(GV));
Vals.push_back(getEncodedThreadLocalMode(GV));
More information about the cfe-commits
mailing list