Let me play with it a bit (I did not read the code, I just was tracking down the linkage error).
Michael > On Oct 20, 2015, at 12:07 AM, Chandler Carruth <chandl...@google.com> wrote: > > Is it possible to add a unittest that exercises this extension point in-tree? > For example the way I did for AA extension hooks? > > On Mon, Oct 19, 2015 at 9:00 PM Michael Gottesman via cfe-commits > <cfe-commits@lists.llvm.org <mailto:cfe-commits@lists.llvm.org>> wrote: >> On Oct 19, 2015, at 4:40 PM, Michael Gottesman via cfe-commits >> <cfe-commits@lists.llvm.org <mailto:cfe-commits@lists.llvm.org>> wrote: >> >>> >>> On Oct 15, 2015, at 8:29 AM, Benjamin Kramer via cfe-commits >>> <cfe-commits@lists.llvm.org <mailto:cfe-commits@lists.llvm.org>> wrote: >>> >>> Author: d0k >>> Date: Thu Oct 15 10:29:40 2015 >>> New Revision: 250418 >>> >>> URL: http://llvm.org/viewvc/llvm-project?rev=250418&view=rev >>> <http://llvm.org/viewvc/llvm-project?rev=250418&view=rev> >>> Log: >>> [CodeGen] Remove dead code. NFC. >>> >>> Modified: >>> cfe/trunk/lib/CodeGen/CGBuiltin.cpp >>> cfe/trunk/lib/CodeGen/CGCall.cpp >>> cfe/trunk/lib/CodeGen/CGCleanup.cpp >>> cfe/trunk/lib/CodeGen/CGDebugInfo.cpp >>> cfe/trunk/lib/CodeGen/CGDebugInfo.h >>> cfe/trunk/lib/CodeGen/CGObjC.cpp >>> cfe/trunk/lib/CodeGen/CGObjCMac.cpp >>> cfe/trunk/lib/CodeGen/CGVTables.h >>> cfe/trunk/lib/CodeGen/CodeGenABITypes.cpp >>> cfe/trunk/lib/CodeGen/CodeGenFunction.h >>> cfe/trunk/lib/CodeGen/CodeGenModule.cpp >>> cfe/trunk/lib/CodeGen/CodeGenModule.h >>> cfe/trunk/lib/CodeGen/CodeGenPGO.h >>> cfe/trunk/lib/CodeGen/EHScopeStack.h >>> cfe/trunk/lib/CodeGen/MicrosoftCXXABI.cpp >>> >>> Modified: cfe/trunk/lib/CodeGen/CGBuiltin.cpp >>> URL: >>> http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGBuiltin.cpp?rev=250418&r1=250417&r2=250418&view=diff >>> >>> <http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGBuiltin.cpp?rev=250418&r1=250417&r2=250418&view=diff> >>> ============================================================================== >>> --- cfe/trunk/lib/CodeGen/CGBuiltin.cpp (original) >>> +++ cfe/trunk/lib/CodeGen/CGBuiltin.cpp Thu Oct 15 10:29:40 2015 >>> @@ -4106,15 +4106,6 @@ Value *CodeGenFunction::vectorWrapScalar >>> return Op; >>> } >>> >>> -Value *CodeGenFunction::vectorWrapScalar8(Value *Op) { >>> - llvm::Type *VTy = llvm::VectorType::get(Int8Ty, 8); >>> - Op = Builder.CreateBitCast(Op, Int8Ty); >>> - Value *V = UndefValue::get(VTy); >>> - llvm::Constant *CI = ConstantInt::get(SizeTy, 0); >>> - Op = Builder.CreateInsertElement(V, Op, CI); >>> - return Op; >>> -} >>> - >>> Value *CodeGenFunction::EmitAArch64BuiltinExpr(unsigned BuiltinID, >>> const CallExpr *E) { >>> unsigned HintID = static_cast<unsigned>(-1); >>> >>> Modified: cfe/trunk/lib/CodeGen/CGCall.cpp >>> URL: >>> http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGCall.cpp?rev=250418&r1=250417&r2=250418&view=diff >>> >>> <http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGCall.cpp?rev=250418&r1=250417&r2=250418&view=diff> >>> ============================================================================== >>> --- cfe/trunk/lib/CodeGen/CGCall.cpp (original) >>> +++ cfe/trunk/lib/CodeGen/CGCall.cpp Thu Oct 15 10:29:40 2015 >>> @@ -3038,12 +3038,6 @@ CodeGenFunction::EmitRuntimeCallOrInvoke >>> return callSite; >>> } >>> >>> -llvm::CallSite >>> -CodeGenFunction::EmitCallOrInvoke(llvm::Value *Callee, >>> - const Twine &Name) { >>> - return EmitCallOrInvoke(Callee, None, Name); >>> -} >>> - >>> /// Emits a call or invoke instruction to the given function, depending >>> /// on the current state of the EH stack. >>> llvm::CallSite >>> >>> Modified: cfe/trunk/lib/CodeGen/CGCleanup.cpp >>> URL: >>> http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGCleanup.cpp?rev=250418&r1=250417&r2=250418&view=diff >>> >>> <http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGCleanup.cpp?rev=250418&r1=250417&r2=250418&view=diff> >>> ============================================================================== >>> --- cfe/trunk/lib/CodeGen/CGCleanup.cpp (original) >>> +++ cfe/trunk/lib/CodeGen/CGCleanup.cpp Thu Oct 15 10:29:40 2015 >>> @@ -167,23 +167,6 @@ EHScopeStack::getInnermostActiveNormalCl >>> return stable_end(); >>> } >>> >>> -EHScopeStack::stable_iterator EHScopeStack::getInnermostActiveEHScope() >>> const { >>> - for (stable_iterator si = getInnermostEHScope(), se = stable_end(); >>> - si != se; ) { >>> - // Skip over inactive cleanups. >>> - EHCleanupScope *cleanup = dyn_cast<EHCleanupScope>(&*find(si)); >>> - if (cleanup && !cleanup->isActive()) { >>> - si = cleanup->getEnclosingEHScope(); >>> - continue; >>> - } >>> - >>> - // All other scopes are always active. >>> - return si; >>> - } >>> - >>> - return stable_end(); >>> -} >>> - >>> >>> void *EHScopeStack::pushCleanup(CleanupKind Kind, size_t Size) { >>> char *Buffer = allocate(EHCleanupScope::getSizeForCleanupSize(Size)); >>> >>> Modified: cfe/trunk/lib/CodeGen/CGDebugInfo.cpp >>> URL: >>> http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGDebugInfo.cpp?rev=250418&r1=250417&r2=250418&view=diff >>> >>> <http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGDebugInfo.cpp?rev=250418&r1=250417&r2=250418&view=diff> >>> ============================================================================== >>> --- cfe/trunk/lib/CodeGen/CGDebugInfo.cpp (original) >>> +++ cfe/trunk/lib/CodeGen/CGDebugInfo.cpp Thu Oct 15 10:29:40 2015 >>> @@ -2159,30 +2159,6 @@ llvm::DIType *CGDebugInfo::getOrCreateTy >>> return Res; >>> } >>> >>> -unsigned CGDebugInfo::Checksum(const ObjCInterfaceDecl *ID) { >>> - // The assumption is that the number of ivars can only increase >>> - // monotonically, so it is safe to just use their current number as >>> - // a checksum. >>> - unsigned Sum = 0; >>> - for (const ObjCIvarDecl *Ivar = ID->all_declared_ivar_begin(); >>> - Ivar != nullptr; Ivar = Ivar->getNextIvar()) >>> - ++Sum; >>> - >>> - return Sum; >>> -} >>> - >>> -ObjCInterfaceDecl *CGDebugInfo::getObjCInterfaceDecl(QualType Ty) { >>> - switch (Ty->getTypeClass()) { >>> - case Type::ObjCObjectPointer: >>> - return getObjCInterfaceDecl( >>> - cast<ObjCObjectPointerType>(Ty)->getPointeeType()); >>> - case Type::ObjCInterface: >>> - return cast<ObjCInterfaceType>(Ty)->getDecl(); >>> - default: >>> - return nullptr; >>> - } >>> -} >>> - >>> llvm::DIModule *CGDebugInfo::getParentModuleOrNull(const Decl *D) { >>> // A forward declaration inside a module header does not belong to the >>> module. >>> if (isa<RecordDecl>(D) && !cast<RecordDecl>(D)->getDefinition()) >>> >>> Modified: cfe/trunk/lib/CodeGen/CGDebugInfo.h >>> URL: >>> http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGDebugInfo.h?rev=250418&r1=250417&r2=250418&view=diff >>> >>> <http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGDebugInfo.h?rev=250418&r1=250417&r2=250418&view=diff> >>> ============================================================================== >>> --- cfe/trunk/lib/CodeGen/CGDebugInfo.h (original) >>> +++ cfe/trunk/lib/CodeGen/CGDebugInfo.h Thu Oct 15 10:29:40 2015 >>> @@ -135,12 +135,6 @@ class CGDebugInfo { >>> NamespaceAliasCache; >>> llvm::DenseMap<const Decl *, llvm::TypedTrackingMDRef<llvm::DIDerivedType>> >>> StaticDataMemberCache; >>> - >>> - /// Helper functions for getOrCreateType. >>> - /// @{ >>> - /// Currently the checksum of an interface includes the number of >>> - /// ivars and property accessors. >>> - unsigned Checksum(const ObjCInterfaceDecl *InterfaceDecl); >>> llvm::DIType *CreateType(const BuiltinType *Ty); >>> llvm::DIType *CreateType(const ComplexType *Ty); >>> llvm::DIType *CreateQualifiedType(QualType Ty, llvm::DIFile *Fg); >>> @@ -199,11 +193,8 @@ class CGDebugInfo { >>> llvm::DIType *getOrCreateVTablePtrType(llvm::DIFile *F); >>> /// \return namespace descriptor for the given namespace decl. >>> llvm::DINamespace *getOrCreateNameSpace(const NamespaceDecl *N); >>> - llvm::DIType *getOrCreateTypeDeclaration(QualType PointeeTy, >>> llvm::DIFile *F); >>> llvm::DIType *CreatePointerLikeType(llvm::dwarf::Tag Tag, const Type *Ty, >>> QualType PointeeTy, llvm::DIFile *F); >>> - >>> - llvm::Value *getCachedInterfaceTypeOrNull(const QualType Ty); >>> llvm::DIType *getOrCreateStructPtrType(StringRef Name, llvm::DIType >>> *&Cache); >>> >>> /// A helper function to create a subprogram for a single member >>> @@ -435,10 +426,6 @@ private: >>> /// Create type metadata for a source language type. >>> llvm::DIType *CreateTypeNode(QualType Ty, llvm::DIFile *Fg); >>> >>> - /// Return the underlying ObjCInterfaceDecl if \arg Ty is an >>> - /// ObjCInterface or a pointer to one. >>> - ObjCInterfaceDecl *getObjCInterfaceDecl(QualType Ty); >>> - >>> /// Create new member and increase Offset by FType's size. >>> llvm::DIType *CreateMemberType(llvm::DIFile *Unit, QualType FType, >>> StringRef Name, uint64_t *Offset); >>> @@ -587,12 +574,6 @@ public: >>> return ApplyDebugLocation(CGF, true, SourceLocation()); >>> } >>> >>> - /// \brief Apply TemporaryLocation if it is valid. Otherwise set the >>> IRBuilder >>> - /// to not attach debug locations. >>> - static ApplyDebugLocation >>> - CreateDefaultEmpty(CodeGenFunction &CGF, SourceLocation >>> TemporaryLocation) { >>> - return ApplyDebugLocation(CGF, true, TemporaryLocation); >>> - } >>> }; >>> >>> } // namespace CodeGen >>> >>> Modified: cfe/trunk/lib/CodeGen/CGObjC.cpp >>> URL: >>> http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGObjC.cpp?rev=250418&r1=250417&r2=250418&view=diff >>> >>> <http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGObjC.cpp?rev=250418&r1=250417&r2=250418&view=diff> >>> ============================================================================== >>> --- cfe/trunk/lib/CodeGen/CGObjC.cpp (original) >>> +++ cfe/trunk/lib/CodeGen/CGObjC.cpp Thu Oct 15 10:29:40 2015 >>> @@ -1410,22 +1410,6 @@ void CodeGenFunction::GenerateObjCCtorDt >>> FinishFunction(); >>> } >>> >>> -bool CodeGenFunction::IndirectObjCSetterArg(const CGFunctionInfo &FI) { >>> - CGFunctionInfo::const_arg_iterator it = FI.arg_begin(); >>> - it++; it++; >>> - const ABIArgInfo &AI = it->info; >>> - // FIXME. Is this sufficient check? >>> - return (AI.getKind() == ABIArgInfo::Indirect); >>> -} >>> - >>> -bool CodeGenFunction::IvarTypeWithAggrGCObjects(QualType Ty) { >>> - if (CGM.getLangOpts().getGC() == LangOptions::NonGC) >>> - return false; >>> - if (const RecordType *FDTTy = Ty.getTypePtr()->getAs<RecordType>()) >>> - return FDTTy->getDecl()->hasObjectMember(); >>> - return false; >>> -} >>> - >>> llvm::Value *CodeGenFunction::LoadObjCSelf() { >>> VarDecl *Self = cast<ObjCMethodDecl>(CurFuncDecl)->getSelfDecl(); >>> DeclRefExpr DRE(Self, /*is enclosing local*/ (CurFuncDecl != CurCodeDecl), >>> @@ -1745,13 +1729,6 @@ void CodeGenFunction::EmitObjCAtSynchron >>> CGM.getObjCRuntime().EmitSynchronizedStmt(*this, S); >>> } >>> >>> -/// Produce the code for a CK_ARCProduceObject. Just does a >>> -/// primitive retain. >>> -llvm::Value *CodeGenFunction::EmitObjCProduceObject(QualType type, >>> - llvm::Value *value) { >>> - return EmitARCRetain(type, value); >>> -} >>> - >>> namespace { >>> struct CallObjCRelease final : EHScopeStack::Cleanup { >>> CallObjCRelease(llvm::Value *object) : object(object) {} >>> @@ -2187,14 +2164,6 @@ CodeGenFunction::EmitARCRetainAutoreleas >>> "objc_retainAutorelease"); >>> } >>> >>> -/// i8* \@objc_loadWeak(i8** %addr) >>> -/// Essentially objc_autorelease(objc_loadWeakRetained(addr)). >>> -llvm::Value *CodeGenFunction::EmitARCLoadWeak(Address addr) { >>> - return emitARCLoadOperation(*this, addr, >>> - CGM.getARCEntrypoints().objc_loadWeak, >>> - "objc_loadWeak"); >>> -} >>> - >>> /// i8* \@objc_loadWeakRetained(i8** %addr) >>> llvm::Value *CodeGenFunction::EmitARCLoadWeakRetained(Address addr) { >>> return emitARCLoadOperation(*this, addr, >>> >>> Modified: cfe/trunk/lib/CodeGen/CGObjCMac.cpp >>> URL: >>> http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGObjCMac.cpp?rev=250418&r1=250417&r2=250418&view=diff >>> >>> <http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGObjCMac.cpp?rev=250418&r1=250417&r2=250418&view=diff> >>> ============================================================================== >>> --- cfe/trunk/lib/CodeGen/CGObjCMac.cpp (original) >>> +++ cfe/trunk/lib/CodeGen/CGObjCMac.cpp Thu Oct 15 10:29:40 2015 >>> @@ -659,9 +659,6 @@ public: >>> // MessageRefCPtrTy - clang type for struct _message_ref_t* >>> QualType MessageRefCPtrTy; >>> >>> - // MessengerTy - Type of the messenger (shown as IMP above) >>> - llvm::FunctionType *MessengerTy; >>> - >>> // SuperMessageRefTy - LLVM for: >>> // struct _super_message_ref_t { >>> // SUPER_IMP messenger; >>> >>> Modified: cfe/trunk/lib/CodeGen/CGVTables.h >>> URL: >>> http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGVTables.h?rev=250418&r1=250417&r2=250418&view=diff >>> >>> <http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGVTables.h?rev=250418&r1=250417&r2=250418&view=diff> >>> ============================================================================== >>> --- cfe/trunk/lib/CodeGen/CGVTables.h (original) >>> +++ cfe/trunk/lib/CodeGen/CGVTables.h Thu Oct 15 10:29:40 2015 >>> @@ -85,10 +85,6 @@ public: >>> uint64_t getSecondaryVirtualPointerIndex(const CXXRecordDecl *RD, >>> BaseSubobject Base); >>> >>> - /// getAddressPoint - Get the address point of the given subobject in the >>> - /// class decl. >>> - uint64_t getAddressPoint(BaseSubobject Base, const CXXRecordDecl *RD); >>> - >>> /// GenerateConstructionVTable - Generate a construction vtable for the >>> given >>> /// base subobject. >>> llvm::GlobalVariable * >>> >>> Modified: cfe/trunk/lib/CodeGen/CodeGenABITypes.cpp >>> URL: >>> http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CodeGenABITypes.cpp?rev=250418&r1=250417&r2=250418&view=diff >>> >>> <http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CodeGenABITypes.cpp?rev=250418&r1=250417&r2=250418&view=diff> >>> ============================================================================== >>> --- cfe/trunk/lib/CodeGen/CodeGenABITypes.cpp (original) >>> +++ cfe/trunk/lib/CodeGen/CodeGenABITypes.cpp Thu Oct 15 10:29:40 2015 >>> @@ -36,35 +36,3 @@ CodeGenABITypes::CodeGenABITypes(ASTCont >>> // Explicitly out-of-line because ~CodeGenModule() is private but >>> // CodeGenABITypes.h is part of clang's API. >>> CodeGenABITypes::~CodeGenABITypes() = default; >>> - >>> -const CGFunctionInfo & >>> -CodeGenABITypes::arrangeObjCMessageSendSignature(const ObjCMethodDecl *MD, >>> - QualType receiverType) { >>> - return CGM->getTypes().arrangeObjCMessageSendSignature(MD, receiverType); >>> -} >>> - >>> -const CGFunctionInfo & >>> -CodeGenABITypes::arrangeFreeFunctionType(CanQual<FunctionProtoType> Ty) { >>> - return CGM->getTypes().arrangeFreeFunctionType(Ty); >>> -} >>> - >>> -const CGFunctionInfo & >>> -CodeGenABITypes::arrangeFreeFunctionType(CanQual<FunctionNoProtoType> Ty) { >>> - return CGM->getTypes().arrangeFreeFunctionType(Ty); >>> -} >>> - >>> -const CGFunctionInfo & >>> -CodeGenABITypes::arrangeCXXMethodType(const CXXRecordDecl *RD, >>> - const FunctionProtoType *FTP) { >>> - return CGM->getTypes().arrangeCXXMethodType(RD, FTP); >>> -} >>> - >>> -const CGFunctionInfo & >>> -CodeGenABITypes::arrangeFreeFunctionCall(CanQualType returnType, >>> - ArrayRef<CanQualType> argTypes, >>> - FunctionType::ExtInfo info, >>> - RequiredArgs args) { >>> - return CGM->getTypes().arrangeLLVMFunctionInfo( >>> - returnType, /*IsInstanceMethod=*/false, /*IsChainCall=*/false, >>> argTypes, >>> - info, args); >>> -} >> >> This code in CodeGenABITypes.cpp is not dead. It is intended to be used by >> external clients (so it appears to be dead = /) and is the only >> implementation of these methods for CodeGenABITypes. So if external clients >> try to use these methods, a linker error will result (defeating the purpose >> of providing this API). >> >> Can you revert just the changes in CodeGenABITypes.cpp? >> >> How did you determine that this was dead (maybe I can slap some sort of >> warning removal on it so it won't come up again or at least a large comment). > > (I am happy to make the change as well. Forgot to add that). > > Michael > >> >> Thanks! >> Michael >> >>> >>> Modified: cfe/trunk/lib/CodeGen/CodeGenFunction.h >>> URL: >>> http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CodeGenFunction.h?rev=250418&r1=250417&r2=250418&view=diff >>> >>> <http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CodeGenFunction.h?rev=250418&r1=250417&r2=250418&view=diff> >>> ============================================================================== >>> --- cfe/trunk/lib/CodeGen/CodeGenFunction.h (original) >>> +++ cfe/trunk/lib/CodeGen/CodeGenFunction.h Thu Oct 15 10:29:40 2015 >>> @@ -250,10 +250,6 @@ public: >>> ~CGCapturedStmtRAII() { CGF.CapturedStmtInfo = PrevCapturedStmtInfo; } >>> }; >>> >>> - /// BoundsChecking - Emit run-time bounds checks. Higher values mean >>> - /// potentially higher performance penalties. >>> - unsigned char BoundsChecking; >>> - >>> /// \brief Sanitizers enabled for this function. >>> SanitizerSet SanOpts; >>> >>> @@ -1237,8 +1233,6 @@ public: >>> void generateObjCSetterBody(const ObjCImplementationDecl *classImpl, >>> const ObjCPropertyImplDecl *propImpl, >>> llvm::Constant *AtomicHelperFn); >>> - bool IndirectObjCSetterArg(const CGFunctionInfo &FI); >>> - bool IvarTypeWithAggrGCObjects(QualType Ty); >>> >>> >>> //===--------------------------------------------------------------------===// >>> // Block Bits >>> @@ -1247,10 +1241,6 @@ public: >>> llvm::Value *EmitBlockLiteral(const BlockExpr *); >>> llvm::Value *EmitBlockLiteral(const CGBlockInfo &Info); >>> static void destroyBlockInfos(CGBlockInfo *info); >>> - llvm::Constant *BuildDescriptorBlockDecl(const BlockExpr *, >>> - const CGBlockInfo &Info, >>> - llvm::StructType *, >>> - llvm::Constant *BlockVarLayout); >>> >>> llvm::Function *GenerateBlockFunction(GlobalDecl GD, >>> const CGBlockInfo &Info, >>> @@ -1276,9 +1266,6 @@ public: >>> llvm::Value *ptr); >>> >>> Address LoadBlockStruct(); >>> - >>> - void AllocateBlockCXXThisPointer(const CXXThisExpr *E); >>> - void AllocateBlockDecl(const DeclRefExpr *E); >>> Address GetAddrOfBlockDecl(const VarDecl *var, bool ByRef); >>> >>> /// BuildBlockByrefAddress - Computes the location of the >>> @@ -1627,10 +1614,6 @@ public: >>> AggValueSlot::IsNotAliased); >>> } >>> >>> - /// CreateInAllocaTmp - Create a temporary memory object for the given >>> - /// aggregate type. >>> - AggValueSlot CreateInAllocaTmp(QualType T, const Twine &Name = >>> "inalloca"); >>> - >>> /// Emit a cast to void* in the appropriate address space. >>> llvm::Value *EmitCastToVoidPtr(llvm::Value *value); >>> >>> @@ -1711,10 +1694,6 @@ public: >>> QualType EltTy, bool isVolatile=false, >>> bool isAssignment = false); >>> >>> - /// StartBlock - Start new block named N. If insert block is a dummy >>> block >>> - /// then reuse it. >>> - void StartBlock(const char *N); >>> - >>> /// GetAddrOfLocalVar - Return the address of a local variable. >>> Address GetAddrOfLocalVar(const VarDecl *VD) { >>> auto it = LocalDeclMap.find(VD); >>> @@ -1811,14 +1790,6 @@ public: >>> return CXXStructorImplicitParamValue; >>> } >>> >>> - /// LoadCXXStructorImplicitParam - Load the implicit parameter >>> - /// for a constructor/destructor. >>> - llvm::Value *LoadCXXStructorImplicitParam() { >>> - assert(CXXStructorImplicitParamValue && >>> - "no implicit argument value for this function"); >>> - return CXXStructorImplicitParamValue; >>> - } >>> - >>> /// GetAddressOfBaseOfCompleteClass - Convert the given pointer to a >>> /// complete class to the given direct base. >>> Address >>> @@ -2549,7 +2520,6 @@ public: >>> // Note: only available for agg return types >>> LValue EmitVAArgExprLValue(const VAArgExpr *E); >>> LValue EmitDeclRefLValue(const DeclRefExpr *E); >>> - LValue EmitReadRegister(const VarDecl *VD); >>> LValue EmitStringLiteralLValue(const StringLiteral *E); >>> LValue EmitObjCEncodeExprLValue(const ObjCEncodeExpr *E); >>> LValue EmitPredefinedLValue(const PredefinedExpr *E); >>> @@ -2677,8 +2647,6 @@ public: >>> llvm::CallSite EmitCallOrInvoke(llvm::Value *Callee, >>> ArrayRef<llvm::Value *> Args, >>> const Twine &Name = ""); >>> - llvm::CallSite EmitCallOrInvoke(llvm::Value *Callee, >>> - const Twine &Name = ""); >>> llvm::CallSite EmitRuntimeCallOrInvoke(llvm::Value *callee, >>> ArrayRef<llvm::Value*> args, >>> const Twine &name = ""); >>> @@ -2765,8 +2733,6 @@ public: >>> bool negateForRightShift); >>> llvm::Value *EmitNeonRShiftImm(llvm::Value *Vec, llvm::Value *Amt, >>> llvm::Type *Ty, bool usgn, const char >>> *name); >>> - // Helper functions for EmitAArch64BuiltinExpr. >>> - llvm::Value *vectorWrapScalar8(llvm::Value *Op); >>> llvm::Value *vectorWrapScalar16(llvm::Value *Op); >>> llvm::Value *EmitAArch64BuiltinExpr(unsigned BuiltinID, const CallExpr *E); >>> >>> @@ -2800,7 +2766,6 @@ public: >>> // ARC primitives. >>> void EmitARCInitWeak(Address addr, llvm::Value *value); >>> void EmitARCDestroyWeak(Address addr); >>> - llvm::Value *EmitARCLoadWeak(Address addr); >>> llvm::Value *EmitARCLoadWeakRetained(Address addr); >>> llvm::Value *EmitARCStoreWeak(Address addr, llvm::Value *value, bool >>> ignored); >>> void EmitARCCopyWeak(Address dst, Address src); >>> @@ -2827,8 +2792,6 @@ public: >>> EmitARCStoreStrong(const BinaryOperator *e, bool ignored); >>> >>> llvm::Value *EmitObjCThrowOperand(const Expr *expr); >>> - >>> - llvm::Value *EmitObjCProduceObject(QualType T, llvm::Value *Ptr); >>> llvm::Value *EmitObjCConsumeObject(QualType T, llvm::Value *Ptr); >>> llvm::Value *EmitObjCExtendObjectLifetime(QualType T, llvm::Value *Ptr); >>> >>> @@ -2881,11 +2844,6 @@ public: >>> /// aggregate type into a temporary LValue. >>> LValue EmitAggExprToLValue(const Expr *E); >>> >>> - /// EmitGCMemmoveCollectable - Emit special API for structs with object >>> - /// pointers. >>> - void EmitGCMemmoveCollectable(llvm::Value *DestPtr, llvm::Value *SrcPtr, >>> - QualType Ty); >>> - >>> /// EmitExtendGCLifetime - Given a pointer to an Objective-C object, >>> /// make sure it survives garbage collection until this point. >>> void EmitExtendGCLifetime(llvm::Value *object); >>> >>> Modified: cfe/trunk/lib/CodeGen/CodeGenModule.cpp >>> URL: >>> http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CodeGenModule.cpp?rev=250418&r1=250417&r2=250418&view=diff >>> >>> <http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CodeGenModule.cpp?rev=250418&r1=250417&r2=250418&view=diff> >>> ============================================================================== >>> --- cfe/trunk/lib/CodeGen/CodeGenModule.cpp (original) >>> +++ cfe/trunk/lib/CodeGen/CodeGenModule.cpp Thu Oct 15 10:29:40 2015 >>> @@ -489,12 +489,6 @@ llvm::MDNode *CodeGenModule::getTBAAStru >>> return TBAA->getTBAAStructInfo(QTy); >>> } >>> >>> -llvm::MDNode *CodeGenModule::getTBAAStructTypeInfo(QualType QTy) { >>> - if (!TBAA) >>> - return nullptr; >>> - return TBAA->getTBAAStructTypeInfo(QTy); >>> -} >>> - >>> llvm::MDNode *CodeGenModule::getTBAAStructTagInfo(QualType BaseTy, >>> llvm::MDNode *AccessN, >>> uint64_t O) { >>> >>> Modified: cfe/trunk/lib/CodeGen/CodeGenModule.h >>> URL: >>> http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CodeGenModule.h?rev=250418&r1=250417&r2=250418&view=diff >>> >>> <http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CodeGenModule.h?rev=250418&r1=250417&r2=250418&view=diff> >>> ============================================================================== >>> --- cfe/trunk/lib/CodeGen/CodeGenModule.h (original) >>> +++ cfe/trunk/lib/CodeGen/CodeGenModule.h Thu Oct 15 10:29:40 2015 >>> @@ -643,8 +643,6 @@ public: >>> llvm::MDNode *getTBAAInfo(QualType QTy); >>> llvm::MDNode *getTBAAInfoForVTablePtr(); >>> llvm::MDNode *getTBAAStructInfo(QualType QTy); >>> - /// Return the MDNode in the type DAG for the given struct type. >>> - llvm::MDNode *getTBAAStructTypeInfo(QualType QTy); >>> /// Return the path-aware tag for given base type, access node and offset. >>> llvm::MDNode *getTBAAStructTagInfo(QualType BaseTy, llvm::MDNode *AccessN, >>> uint64_t O); >>> @@ -991,9 +989,6 @@ public: >>> >>> void EmitVTable(CXXRecordDecl *Class); >>> >>> - /// Emit the RTTI descriptors for the builtin types. >>> - void EmitFundamentalRTTIDescriptors(); >>> - >>> /// \brief Appends Opts to the "Linker Options" metadata value. >>> void AppendLinkerOptions(StringRef Opts); >>> >>> @@ -1073,13 +1068,6 @@ public: >>> /// are emitted lazily. >>> void EmitGlobal(GlobalDecl D); >>> >>> - bool >>> - HasTrivialDestructorBody(ASTContext &Context, >>> - const CXXRecordDecl *BaseClassDecl, >>> - const CXXRecordDecl *MostDerivedClassDecl); >>> - bool >>> - FieldHasTrivialDestructorBody(ASTContext &Context, const FieldDecl >>> *Field); >>> - >>> bool TryEmitDefinitionAsAlias(GlobalDecl Alias, GlobalDecl Target, >>> bool InEveryTU); >>> bool TryEmitBaseDestructorAsAlias(const CXXDestructorDecl *D); >>> @@ -1192,9 +1180,6 @@ private: >>> /// as a LLVM constructor or destructor array. >>> void EmitCtorList(const CtorList &Fns, const char *GlobalName); >>> >>> - /// Emit the RTTI descriptors for the given type. >>> - void EmitFundamentalRTTIDescriptor(QualType Type); >>> - >>> /// Emit any needed decls for which code generation was deferred. >>> void EmitDeferred(); >>> >>> >>> Modified: cfe/trunk/lib/CodeGen/CodeGenPGO.h >>> URL: >>> http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CodeGenPGO.h?rev=250418&r1=250417&r2=250418&view=diff >>> >>> <http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CodeGenPGO.h?rev=250418&r1=250417&r2=250418&view=diff> >>> ============================================================================== >>> --- cfe/trunk/lib/CodeGen/CodeGenPGO.h (original) >>> +++ cfe/trunk/lib/CodeGen/CodeGenPGO.h Thu Oct 15 10:29:40 2015 >>> @@ -99,7 +99,6 @@ private: >>> llvm::Function *Fn); >>> void loadRegionCounts(llvm::IndexedInstrProfReader *PGOReader, >>> bool IsInMainFile); >>> - void emitCounterVariables(); >>> void emitCounterRegionMapping(const Decl *D); >>> >>> public: >>> >>> Modified: cfe/trunk/lib/CodeGen/EHScopeStack.h >>> URL: >>> http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/EHScopeStack.h?rev=250418&r1=250417&r2=250418&view=diff >>> >>> <http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/EHScopeStack.h?rev=250418&r1=250417&r2=250418&view=diff> >>> ============================================================================== >>> --- cfe/trunk/lib/CodeGen/EHScopeStack.h (original) >>> +++ cfe/trunk/lib/CodeGen/EHScopeStack.h Thu Oct 15 10:29:40 2015 >>> @@ -365,7 +365,6 @@ public: >>> return InnermostEHScope; >>> } >>> >>> - stable_iterator getInnermostActiveEHScope() const; >>> >>> /// An unstable reference to a scope-stack depth. Invalidated by >>> /// pushes but not pops. >>> @@ -396,9 +395,6 @@ public: >>> /// to the EH stack. >>> iterator find(stable_iterator save) const; >>> >>> - /// Removes the cleanup pointed to by the given stable_iterator. >>> - void removeCleanup(stable_iterator save); >>> - >>> /// Add a branch fixup to the current cleanup scope. >>> BranchFixup &addBranchFixup() { >>> assert(hasNormalCleanups() && "adding fixup in scope without cleanups"); >>> >>> Modified: cfe/trunk/lib/CodeGen/MicrosoftCXXABI.cpp >>> URL: >>> http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/MicrosoftCXXABI.cpp?rev=250418&r1=250417&r2=250418&view=diff >>> >>> <http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/MicrosoftCXXABI.cpp?rev=250418&r1=250417&r2=250418&view=diff> >>> ============================================================================== >>> --- cfe/trunk/lib/CodeGen/MicrosoftCXXABI.cpp (original) >>> +++ cfe/trunk/lib/CodeGen/MicrosoftCXXABI.cpp Thu Oct 15 10:29:40 2015 >>> @@ -46,7 +46,7 @@ public: >>> : CGCXXABI(CGM), BaseClassDescriptorType(nullptr), >>> ClassHierarchyDescriptorType(nullptr), >>> CompleteObjectLocatorType(nullptr), CatchableTypeType(nullptr), >>> - ThrowInfoType(nullptr), CatchHandlerTypeType(nullptr) {} >>> + ThrowInfoType(nullptr) {} >>> >>> bool HasThisReturn(GlobalDecl GD) const override; >>> bool hasMostDerivedReturn(GlobalDecl GD) const override; >>> @@ -534,14 +534,6 @@ private: >>> return llvm::Constant::getAllOnesValue(CGM.IntTy); >>> } >>> >>> - llvm::Constant *getConstantOrZeroInt(llvm::Constant *C) { >>> - return C ? C : getZeroInt(); >>> - } >>> - >>> - llvm::Value *getValueOrZeroInt(llvm::Value *C) { >>> - return C ? C : getZeroInt(); >>> - } >>> - >>> CharUnits getVirtualFunctionPrologueThisAdjustment(GlobalDecl GD); >>> >>> void >>> @@ -659,18 +651,6 @@ public: >>> >>> void emitCXXStructor(const CXXMethodDecl *MD, StructorType Type) override; >>> >>> - llvm::StructType *getCatchHandlerTypeType() { >>> - if (!CatchHandlerTypeType) { >>> - llvm::Type *FieldTypes[] = { >>> - CGM.IntTy, // Flags >>> - CGM.Int8PtrTy, // TypeDescriptor >>> - }; >>> - CatchHandlerTypeType = llvm::StructType::create( >>> - CGM.getLLVMContext(), FieldTypes, "eh.CatchHandlerType"); >>> - } >>> - return CatchHandlerTypeType; >>> - } >>> - >>> llvm::StructType *getCatchableTypeType() { >>> if (CatchableTypeType) >>> return CatchableTypeType; >>> @@ -786,7 +766,6 @@ private: >>> llvm::StructType *CatchableTypeType; >>> llvm::DenseMap<uint32_t, llvm::StructType *> CatchableTypeArrayTypeMap; >>> llvm::StructType *ThrowInfoType; >>> - llvm::StructType *CatchHandlerTypeType; >>> }; >>> >>> } >>> >>> >>> _______________________________________________ >>> cfe-commits mailing list >>> cfe-commits@lists.llvm.org <mailto:cfe-commits@lists.llvm.org> >>> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits >>> <http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits> >> >> _______________________________________________ >> cfe-commits mailing list >> cfe-commits@lists.llvm.org <mailto:cfe-commits@lists.llvm.org> >> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits >> <http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits>_______________________________________________ > cfe-commits mailing list > cfe-commits@lists.llvm.org <mailto:cfe-commits@lists.llvm.org> > http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits > <http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits>
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits