From: Chandler Carruth Date: Fri, 14 Aug 2015 03:57:00 +0000 (+0000) Subject: [PM/AA] Run clang-format over the ObjCARC Alias Analysis code to X-Git-Url: http://plrg.eecs.uci.edu/git/?p=oota-llvm.git;a=commitdiff_plain;h=41bdb7ca96347b56769dc996aabd23d771a22c39;hp=416c002bf32f02efd8ebb4093c015dba69fedb99 [PM/AA] Run clang-format over the ObjCARC Alias Analysis code to normalize its formatting before I make more substantial changes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@245024 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Transforms/ObjCARC/ObjCARCAliasAnalysis.cpp b/lib/Transforms/ObjCARC/ObjCARCAliasAnalysis.cpp index d34badd4f83..7de4b7f8b9d 100644 --- a/lib/Transforms/ObjCARC/ObjCARCAliasAnalysis.cpp +++ b/lib/Transforms/ObjCARC/ObjCARCAliasAnalysis.cpp @@ -48,8 +48,7 @@ bool ObjCARCAliasAnalysis::doInitialization(Module &M) { return true; } -void -ObjCARCAliasAnalysis::getAnalysisUsage(AnalysisUsage &AU) const { +void ObjCARCAliasAnalysis::getAnalysisUsage(AnalysisUsage &AU) const { AU.setPreservesAll(); AliasAnalysis::getAnalysisUsage(AU); } diff --git a/lib/Transforms/ObjCARC/ObjCARCAliasAnalysis.h b/lib/Transforms/ObjCARC/ObjCARCAliasAnalysis.h index a002e2862f9..5e75c65dd39 100644 --- a/lib/Transforms/ObjCARC/ObjCARCAliasAnalysis.h +++ b/lib/Transforms/ObjCARC/ObjCARCAliasAnalysis.h @@ -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(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(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