aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/libs/llvm12/include/llvm/PassAnalysisSupport.h
diff options
context:
space:
mode:
authorshadchin <shadchin@yandex-team.ru>2022-02-10 16:44:30 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:44:30 +0300
commit2598ef1d0aee359b4b6d5fdd1758916d5907d04f (patch)
tree012bb94d777798f1f56ac1cec429509766d05181 /contrib/libs/llvm12/include/llvm/PassAnalysisSupport.h
parent6751af0b0c1b952fede40b19b71da8025b5d8bcf (diff)
downloadydb-2598ef1d0aee359b4b6d5fdd1758916d5907d04f.tar.gz
Restoring authorship annotation for <shadchin@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'contrib/libs/llvm12/include/llvm/PassAnalysisSupport.h')
-rw-r--r--contrib/libs/llvm12/include/llvm/PassAnalysisSupport.h30
1 files changed, 15 insertions, 15 deletions
diff --git a/contrib/libs/llvm12/include/llvm/PassAnalysisSupport.h b/contrib/libs/llvm12/include/llvm/PassAnalysisSupport.h
index 6f0b6dfb26..63e8a90f98 100644
--- a/contrib/libs/llvm12/include/llvm/PassAnalysisSupport.h
+++ b/contrib/libs/llvm12/include/llvm/PassAnalysisSupport.h
@@ -24,12 +24,12 @@
#if !defined(LLVM_PASS_H) || defined(LLVM_PASSANALYSISSUPPORT_H)
#error "Do not include <PassAnalysisSupport.h>; include <Pass.h> instead"
-#endif
+#endif
#ifndef LLVM_PASSANALYSISSUPPORT_H
#define LLVM_PASSANALYSISSUPPORT_H
-#include "llvm/ADT/STLExtras.h"
+#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/SmallVector.h"
#include <cassert>
#include <tuple>
@@ -66,11 +66,11 @@ private:
SmallVector<AnalysisID, 0> Used;
bool PreservesAll = false;
- void pushUnique(VectorType &Set, AnalysisID ID) {
- if (!llvm::is_contained(Set, ID))
- Set.push_back(ID);
- }
-
+ void pushUnique(VectorType &Set, AnalysisID ID) {
+ if (!llvm::is_contained(Set, ID))
+ Set.push_back(ID);
+ }
+
public:
AnalysisUsage() = default;
@@ -93,17 +93,17 @@ public:
///@{
/// Add the specified ID to the set of analyses preserved by this pass.
AnalysisUsage &addPreservedID(const void *ID) {
- pushUnique(Preserved, ID);
+ pushUnique(Preserved, ID);
return *this;
}
AnalysisUsage &addPreservedID(char &ID) {
- pushUnique(Preserved, &ID);
+ pushUnique(Preserved, &ID);
return *this;
}
/// Add the specified Pass class to the set of analyses preserved by this pass.
template<class PassClass>
AnalysisUsage &addPreserved() {
- pushUnique(Preserved, &PassClass::ID);
+ pushUnique(Preserved, &PassClass::ID);
return *this;
}
///@}
@@ -112,17 +112,17 @@ public:
/// Add the specified ID to the set of analyses used by this pass if they are
/// available..
AnalysisUsage &addUsedIfAvailableID(const void *ID) {
- pushUnique(Used, ID);
+ pushUnique(Used, ID);
return *this;
}
AnalysisUsage &addUsedIfAvailableID(char &ID) {
- pushUnique(Used, &ID);
+ pushUnique(Used, &ID);
return *this;
}
/// Add the specified Pass class to the set of analyses used by this pass.
template<class PassClass>
AnalysisUsage &addUsedIfAvailable() {
- pushUnique(Used, &PassClass::ID);
+ pushUnique(Used, &PassClass::ID);
return *this;
}
///@}
@@ -196,7 +196,7 @@ public:
}
/// Return analysis result or null if it doesn't exist.
- Pass *getAnalysisIfAvailable(AnalysisID ID) const;
+ Pass *getAnalysisIfAvailable(AnalysisID ID) const;
private:
/// This keeps track of which passes implements the interfaces that are
@@ -220,7 +220,7 @@ AnalysisType *Pass::getAnalysisIfAvailable() const {
const void *PI = &AnalysisType::ID;
- Pass *ResultPass = Resolver->getAnalysisIfAvailable(PI);
+ Pass *ResultPass = Resolver->getAnalysisIfAvailable(PI);
if (!ResultPass) return nullptr;
// Because the AnalysisType may not be a subclass of pass (for