From: Sanjoy Das Date: Wed, 6 May 2015 02:36:28 +0000 (+0000) Subject: [Statepoint] Clean up Statepoint.h: clang-format. X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b023d06bb0000db887d242eefe20ff5cc0592333;p=platform%2Fupstream%2Fllvm.git [Statepoint] Clean up Statepoint.h: clang-format. llvm-svn: 236565 --- diff --git a/llvm/include/llvm/IR/Statepoint.h b/llvm/include/llvm/IR/Statepoint.h index e3e0701..ee9f7b9 100644 --- a/llvm/include/llvm/IR/Statepoint.h +++ b/llvm/include/llvm/IR/Statepoint.h @@ -52,7 +52,7 @@ class StatepointBase { void *operator new(size_t, unsigned) = delete; void *operator new(size_t s) = delete; - protected: +protected: explicit StatepointBase(InstructionTy *I) : StatepointCS(I) { assert(isStatepoint(I)); } @@ -60,13 +60,11 @@ class StatepointBase { assert(isStatepoint(CS)); } - public: +public: typedef typename CallSiteTy::arg_iterator arg_iterator; /// Return the underlying CallSite. - CallSiteTy getCallSite() { - return StatepointCS; - } + CallSiteTy getCallSite() { return StatepointCS; } /// Return the value actually being called or invoked. ValueTy *getActualCallee() { return StatepointCS.getArgument(0); } @@ -110,9 +108,7 @@ class StatepointBase { return iterator_range(call_args_begin(), call_args_end()); } - typename CallSiteTy::arg_iterator vm_state_begin() { - return call_args_end(); - } + typename CallSiteTy::arg_iterator vm_state_begin() { return call_args_end(); } typename CallSiteTy::arg_iterator vm_state_end() { int Offset = 3 + getNumCallArgs() + 1 + getNumTotalVMSArgs(); assert(Offset <= (int)StatepointCS.arg_size()); @@ -130,9 +126,7 @@ class StatepointBase { return vm_state_begin() + 6; } - typename CallSiteTy::arg_iterator gc_args_begin() { - return vm_state_end(); - } + typename CallSiteTy::arg_iterator gc_args_begin() { return vm_state_end(); } typename CallSiteTy::arg_iterator gc_args_end() { return StatepointCS.arg_end(); } @@ -170,8 +164,7 @@ class StatepointBase { /// A specialization of it's base class for read only access /// to a gc.statepoint. class ImmutableStatepoint - : public StatepointBase { + : public StatepointBase { typedef StatepointBase Base; @@ -196,30 +189,23 @@ public: class GCRelocateOperands { ImmutableCallSite RelocateCS; - public: - GCRelocateOperands(const User* U) : RelocateCS(U) { - assert(isGCRelocate(U)); - } +public: + GCRelocateOperands(const User *U) : RelocateCS(U) { assert(isGCRelocate(U)); } GCRelocateOperands(const Instruction *inst) : RelocateCS(inst) { assert(isGCRelocate(inst)); } - GCRelocateOperands(CallSite CS) : RelocateCS(CS) { - assert(isGCRelocate(CS)); - } + GCRelocateOperands(CallSite CS) : RelocateCS(CS) { assert(isGCRelocate(CS)); } /// Return true if this relocate is tied to the invoke statepoint. /// This includes relocates which are on the unwinding path. bool isTiedToInvoke() const { const Value *Token = RelocateCS.getArgument(0); - return isa(Token) || - isa(Token); + return isa(Token) || isa(Token); } /// Get enclosed relocate intrinsic - ImmutableCallSite getUnderlyingCallSite() { - return RelocateCS; - } + ImmutableCallSite getUnderlyingCallSite() { return RelocateCS; } /// The statepoint with which this gc.relocate is associated. const Instruction *getStatepoint() { @@ -269,8 +255,8 @@ class GCRelocateOperands { template std::vector - StatepointBase:: - getRelocates(ImmutableStatepoint &IS) { +StatepointBase::getRelocates( + ImmutableStatepoint &IS) { std::vector Result; @@ -288,7 +274,7 @@ std::vector // We need to scan thorough exceptional relocations if it is invoke statepoint LandingPadInst *LandingPad = - cast(StatepointCS.getInstruction())->getLandingPadInst(); + cast(StatepointCS.getInstruction())->getLandingPadInst(); // Search for extract value from landingpad instruction to which // gc relocates will be attached @@ -303,7 +289,6 @@ std::vector } return Result; } - } #endif