[llvm] r245024 - [PM/AA] Run clang-format over the ObjCARC Alias Analysis code to
Chandler Carruth via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 13 20:57:01 PDT 2015
Author: chandlerc
Date: Thu Aug 13 22:57:00 2015
New Revision: 245024
URL: http://llvm.org/viewvc/llvm-project?rev=245024&view=rev
Log:
[PM/AA] Run clang-format over the ObjCARC Alias Analysis code to
normalize its formatting before I make more substantial changes.
Modified:
llvm/trunk/lib/Transforms/ObjCARC/ObjCARCAliasAnalysis.cpp
llvm/trunk/lib/Transforms/ObjCARC/ObjCARCAliasAnalysis.h
Modified: llvm/trunk/lib/Transforms/ObjCARC/ObjCARCAliasAnalysis.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/ObjCARC/ObjCARCAliasAnalysis.cpp?rev=245024&r1=245023&r2=245024&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/ObjCARC/ObjCARCAliasAnalysis.cpp (original)
+++ llvm/trunk/lib/Transforms/ObjCARC/ObjCARCAliasAnalysis.cpp Thu Aug 13 22:57:00 2015
@@ -48,8 +48,7 @@ bool ObjCARCAliasAnalysis::doInitializat
return true;
}
-void
-ObjCARCAliasAnalysis::getAnalysisUsage(AnalysisUsage &AU) const {
+void ObjCARCAliasAnalysis::getAnalysisUsage(AnalysisUsage &AU) const {
AU.setPreservesAll();
AliasAnalysis::getAnalysisUsage(AU);
}
Modified: llvm/trunk/lib/Transforms/ObjCARC/ObjCARCAliasAnalysis.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/ObjCARC/ObjCARCAliasAnalysis.h?rev=245024&r1=245023&r2=245024&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/ObjCARC/ObjCARCAliasAnalysis.h (original)
+++ llvm/trunk/lib/Transforms/ObjCARC/ObjCARCAliasAnalysis.h Thu Aug 13 22:57:00 2015
@@ -29,44 +29,42 @@
namespace llvm {
namespace objcarc {
- /// \brief This is a simple alias analysis implementation that uses knowledge
- /// of ARC constructs to answer queries.
- ///
- /// TODO: This class could be generalized to know about other ObjC-specific
- /// tricks. Such as knowing that ivars in the non-fragile ABI are non-aliasing
- /// even though their offsets are dynamic.
- class ObjCARCAliasAnalysis : public ImmutablePass,
- public AliasAnalysis {
- public:
- static char ID; // Class identification, replacement for typeinfo
- ObjCARCAliasAnalysis() : ImmutablePass(ID) {
- initializeObjCARCAliasAnalysisPass(*PassRegistry::getPassRegistry());
- }
+/// \brief This is a simple alias analysis implementation that uses knowledge
+/// of ARC constructs to answer queries.
+///
+/// TODO: This class could be generalized to know about other ObjC-specific
+/// tricks. Such as knowing that ivars in the non-fragile ABI are non-aliasing
+/// even though their offsets are dynamic.
+class ObjCARCAliasAnalysis : public ImmutablePass, public AliasAnalysis {
+public:
+ static char ID; // Class identification, replacement for typeinfo
+ ObjCARCAliasAnalysis() : ImmutablePass(ID) {
+ initializeObjCARCAliasAnalysisPass(*PassRegistry::getPassRegistry());
+ }
- private:
- bool doInitialization(Module &M) override;
+private:
+ bool doInitialization(Module &M) override;
- /// This method is used when a pass implements an analysis interface through
- /// multiple inheritance. If needed, it should override this to adjust the
- /// this pointer as needed for the specified pass info.
- void *getAdjustedAnalysisPointer(const void *PI) override {
- if (PI == &AliasAnalysis::ID)
- return static_cast<AliasAnalysis *>(this);
- return this;
- }
+ /// This method is used when a pass implements an analysis interface through
+ /// multiple inheritance. If needed, it should override this to adjust the
+ /// this pointer as needed for the specified pass info.
+ void *getAdjustedAnalysisPointer(const void *PI) override {
+ if (PI == &AliasAnalysis::ID)
+ return static_cast<AliasAnalysis *>(this);
+ return this;
+ }
- void getAnalysisUsage(AnalysisUsage &AU) const override;
- AliasResult alias(const MemoryLocation &LocA,
- const MemoryLocation &LocB) override;
- bool pointsToConstantMemory(const MemoryLocation &Loc,
- bool OrLocal) override;
- FunctionModRefBehavior getModRefBehavior(ImmutableCallSite CS) override;
- FunctionModRefBehavior getModRefBehavior(const Function *F) override;
- ModRefInfo getModRefInfo(ImmutableCallSite CS,
- const MemoryLocation &Loc) override;
- ModRefInfo getModRefInfo(ImmutableCallSite CS1,
- ImmutableCallSite CS2) override;
- };
+ void getAnalysisUsage(AnalysisUsage &AU) const override;
+ AliasResult alias(const MemoryLocation &LocA,
+ const MemoryLocation &LocB) override;
+ bool pointsToConstantMemory(const MemoryLocation &Loc, bool OrLocal) override;
+ FunctionModRefBehavior getModRefBehavior(ImmutableCallSite CS) override;
+ FunctionModRefBehavior getModRefBehavior(const Function *F) override;
+ ModRefInfo getModRefInfo(ImmutableCallSite CS,
+ const MemoryLocation &Loc) override;
+ ModRefInfo getModRefInfo(ImmutableCallSite CS1,
+ ImmutableCallSite CS2) override;
+};
} // namespace objcarc
} // namespace llvm
More information about the llvm-commits
mailing list