1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2025-01-31 20:51:52 +01:00

[Attributor][NFC] Run clang-format on the attributor files (.h/.cpp)

The Attributor files are kept formatted with clang-format, we should try
to keep this state.

llvm-svn: 365984
This commit is contained in:
Johannes Doerfert 2019-07-13 01:09:27 +00:00
parent c70caafbd6
commit fc429f73d6
2 changed files with 8 additions and 15 deletions

View File

@ -693,9 +693,7 @@ struct AANoSync : public AbstractAttribute {
: AbstractAttribute(V, InfoCache) {}
/// See AbstractAttribute::getAttrKind().
Attribute::AttrKind getAttrKind() const override {
return ID;
}
Attribute::AttrKind getAttrKind() const override { return ID; }
static constexpr Attribute::AttrKind ID =
Attribute::AttrKind(Attribute::NoSync);

View File

@ -359,9 +359,7 @@ struct AANoUnwindFunction : AANoUnwind, BooleanState {
/// }
/// See AbstractAttribute::getManifestPosition().
ManifestPosition getManifestPosition() const override {
return MP_FUNCTION;
}
ManifestPosition getManifestPosition() const override { return MP_FUNCTION; }
const std::string getAsStr() const override {
return getAssumed() ? "nounwind" : "may-unwind";
@ -500,9 +498,7 @@ public:
const AbstractState &getState() const override { return *this; }
/// See AbstractAttribute::getManifestPosition().
ManifestPosition getManifestPosition() const override {
return MP_ARGUMENT;
}
ManifestPosition getManifestPosition() const override { return MP_ARGUMENT; }
/// See AbstractAttribute::updateImpl(Attributor &A).
ChangeStatus updateImpl(Attributor &A) override;
@ -742,9 +738,7 @@ struct AANoSyncFunction : AANoSync, BooleanState {
/// }
/// See AbstractAttribute::getManifestPosition().
ManifestPosition getManifestPosition() const override {
return MP_FUNCTION;
}
ManifestPosition getManifestPosition() const override { return MP_FUNCTION; }
const std::string getAsStr() const override {
return getAssumed() ? "nosync" : "may-sync";
@ -767,7 +761,8 @@ struct AANoSyncFunction : AANoSync, BooleanState {
/// Helper function used to determine whether an instruction is volatile.
static bool isVolatile(Instruction *I);
/// Helper function uset to check if intrinsic is volatile (memcpy, memmove, memset).
/// Helper function uset to check if intrinsic is volatile (memcpy, memmove,
/// memset).
static bool isNoSyncIntrinsic(Instruction *I);
};
@ -870,7 +865,7 @@ ChangeStatus AANoSyncFunction::updateImpl(Attributor &A) {
auto *NoSyncAA = A.getAAFor<AANoSyncFunction>(*this, *I);
if (isa<IntrinsicInst>(I) && isNoSyncIntrinsic(I))
continue;
continue;
if (ICS && (!NoSyncAA || !NoSyncAA->isAssumedNoSync()) &&
!ICS.hasFnAttr(Attribute::NoSync)) {
@ -878,7 +873,7 @@ ChangeStatus AANoSyncFunction::updateImpl(Attributor &A) {
return ChangeStatus::CHANGED;
}
if(ICS)
if (ICS)
continue;
if (!isVolatile(I) && !isNonRelaxedAtomic(I))