Re: [PATCH] D52660: [CMake][Fuchsia] Use libc++ ABIv2 for Fuchsia toolchain
We have no such desire. I think we're fine being the test subjects for ABIv2 however. On Fri, Sep 28, 2018, 4:51 PM Louis Dionne via Phabricator < revi...@reviews.llvm.org> wrote: > ldionne added a comment. > > In https://reviews.llvm.org/D52660#1249709, @kristina wrote: > > > LGTM. Can we formalize ABIv2 as stable and make it distinct from > unstable (soon to be ABIv3) or are there are any rough corners still left > before ABIv2 and unstable can split in a feature freeze? I'm not an expert > on libc++ related matters but @ldionne suggested that ABIv2 still wasn't > ready on IRC (unless I misunderstood him). > > > I don't think we've ever had plans to freeze the ABI v2 into something > stable -- this is the first time I hear about it. I'm not saying it does > not make sense, by the way, just that I haven't heard any plans about this. > Does Fuchsia have a desire to stabilize the ABI of libc++? > > > Repository: > rC Clang > > https://reviews.llvm.org/D52660 > > > > ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
r319269 - Reland "Fix vtable not receiving hidden visibility when using push(visibility)"
Author: jakehehrlich Date: Tue Nov 28 16:54:20 2017 New Revision: 319269 URL: http://llvm.org/viewvc/llvm-project?rev=319269&view=rev Log: Reland "Fix vtable not receiving hidden visibility when using push(visibility)" I had to reland this change in order to make the test work on windows This change should resolve https://bugs.llvm.org/show_bug.cgi?id=35022 https://reviews.llvm.org/D39627 Added: cfe/trunk/test/CodeGen/push-hidden-visibility-subclass.cpp Modified: cfe/trunk/lib/CodeGen/CGDecl.cpp cfe/trunk/lib/CodeGen/CGVTT.cpp cfe/trunk/lib/CodeGen/CGVTables.cpp cfe/trunk/lib/CodeGen/CodeGenModule.cpp cfe/trunk/lib/CodeGen/CodeGenModule.h cfe/trunk/lib/CodeGen/ItaniumCXXABI.cpp Modified: cfe/trunk/lib/CodeGen/CGDecl.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGDecl.cpp?rev=319269&r1=319268&r2=319269&view=diff == --- cfe/trunk/lib/CodeGen/CGDecl.cpp (original) +++ cfe/trunk/lib/CodeGen/CGDecl.cpp Tue Nov 28 16:54:20 2017 @@ -240,7 +240,7 @@ llvm::Constant *CodeGenModule::getOrCrea getModule(), LTy, Ty.isConstant(getContext()), Linkage, Init, Name, nullptr, llvm::GlobalVariable::NotThreadLocal, TargetAS); GV->setAlignment(getContext().getDeclAlign(&D).getQuantity()); - setGlobalVisibility(GV, &D); + setGlobalVisibility(GV, &D, ForDefinition); if (supportsCOMDAT() && GV->isWeakForLinker()) GV->setComdat(TheModule.getOrInsertComdat(GV->getName())); Modified: cfe/trunk/lib/CodeGen/CGVTT.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGVTT.cpp?rev=319269&r1=319268&r2=319269&view=diff == --- cfe/trunk/lib/CodeGen/CGVTT.cpp (original) +++ cfe/trunk/lib/CodeGen/CGVTT.cpp Tue Nov 28 16:54:20 2017 @@ -100,7 +100,7 @@ CodeGenVTables::EmitVTTDefinition(llvm:: VTT->setComdat(CGM.getModule().getOrInsertComdat(VTT->getName())); // Set the right visibility. - CGM.setGlobalVisibility(VTT, RD); + CGM.setGlobalVisibility(VTT, RD, ForDefinition); } llvm::GlobalVariable *CodeGenVTables::GetAddrOfVTT(const CXXRecordDecl *RD) { Modified: cfe/trunk/lib/CodeGen/CGVTables.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGVTables.cpp?rev=319269&r1=319268&r2=319269&view=diff == --- cfe/trunk/lib/CodeGen/CGVTables.cpp (original) +++ cfe/trunk/lib/CodeGen/CGVTables.cpp Tue Nov 28 16:54:20 2017 @@ -51,7 +51,7 @@ llvm::Constant *CodeGenModule::GetAddrOf static void setThunkVisibility(CodeGenModule &CGM, const CXXMethodDecl *MD, const ThunkInfo &Thunk, llvm::Function *Fn) { - CGM.setGlobalVisibility(Fn, MD); + CGM.setGlobalVisibility(Fn, MD, ForDefinition); } static void setThunkProperties(CodeGenModule &CGM, const ThunkInfo &Thunk, @@ -730,7 +730,7 @@ CodeGenVTables::GenerateConstructionVTab // Create the variable that will hold the construction vtable. llvm::GlobalVariable *VTable = CGM.CreateOrReplaceCXXRuntimeVariable(Name, VTType, Linkage); - CGM.setGlobalVisibility(VTable, RD); + CGM.setGlobalVisibility(VTable, RD, ForDefinition); // V-tables are always unnamed_addr. VTable->setUnnamedAddr(llvm::GlobalValue::UnnamedAddr::Global); Modified: cfe/trunk/lib/CodeGen/CodeGenModule.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CodeGenModule.cpp?rev=319269&r1=319268&r2=319269&view=diff == --- cfe/trunk/lib/CodeGen/CodeGenModule.cpp (original) +++ cfe/trunk/lib/CodeGen/CodeGenModule.cpp Tue Nov 28 16:54:20 2017 @@ -669,7 +669,8 @@ llvm::ConstantInt *CodeGenModule::getSiz } void CodeGenModule::setGlobalVisibility(llvm::GlobalValue *GV, -const NamedDecl *D) const { +const NamedDecl *D, +ForDefinition_t IsForDefinition) const { // Internal definitions always have default visibility. if (GV->hasLocalLinkage()) { GV->setVisibility(llvm::GlobalValue::DefaultVisibility); @@ -678,7 +679,8 @@ void CodeGenModule::setGlobalVisibility( // Set visibility for definitions. LinkageInfo LV = D->getLinkageAndVisibility(); - if (LV.isVisibilityExplicit() || !GV->hasAvailableExternallyLinkage()) + if (LV.isVisibilityExplicit() || + (IsForDefinition && !GV->hasAvailableExternallyLinkage())) GV->setVisibility(GetLLVMVisibility(LV.getVisibility())); } @@ -1059,7 +1061,7 @@ void CodeGenModule::SetLLVMFunctionAttri void CodeGenModule::SetCommonAttributes(const Decl *D, llvm::GlobalValue *GV) { if (const auto *ND = dyn_cast_or_null(D)) -setGlobalVisibility(GV, ND); +setGlobalVisibility(GV, ND, ForDefinition); else GV->setVisib
r317960 - Add CLANG_DEFAULT_OBJCOPY to allow Clang to use llvm-objcopy for dwarf fission
Author: jakehehrlich Date: Fri Nov 10 17:15:41 2017 New Revision: 317960 URL: http://llvm.org/viewvc/llvm-project?rev=317960&view=rev Log: Add CLANG_DEFAULT_OBJCOPY to allow Clang to use llvm-objcopy for dwarf fission llvm-objcopy is getting to where it can be used in non-trivial ways (such as for dwarf fission in clang). It now supports dwarf fission but this feature hasn't been thoroughly tested yet. This change allows people to optionally build clang to use llvm-objcopy rather than GNU objcopy. By default GNU objcopy is still used so nothing should change. Differential Revision: https://reviews.llvm.org/D39029 Modified: cfe/trunk/CMakeLists.txt cfe/trunk/include/clang/Config/config.h.cmake cfe/trunk/lib/CodeGen/CodeGenModule.cpp cfe/trunk/lib/CodeGen/ItaniumCXXABI.cpp cfe/trunk/lib/Driver/ToolChains/CommonArgs.cpp Modified: cfe/trunk/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/CMakeLists.txt?rev=317960&r1=317959&r2=317960&view=diff == --- cfe/trunk/CMakeLists.txt (original) +++ cfe/trunk/CMakeLists.txt Fri Nov 10 17:15:41 2017 @@ -232,6 +232,9 @@ if (NOT(CLANG_DEFAULT_RTLIB STREQUAL "" "Default runtime library to use (\"libgcc\" or \"compiler-rt\", empty for platform default)" FORCE) endif() +set(CLANG_DEFAULT_OBJCOPY "objcopy" CACHE STRING + "Default objcopy executable to use.") + set(CLANG_DEFAULT_OPENMP_RUNTIME "libomp" CACHE STRING "Default OpenMP runtime used by -fopenmp.") @@ -534,8 +537,8 @@ if (CLANG_ENABLE_BOOTSTRAP) set(NEXT_CLANG_STAGE ${NEXT_CLANG_STAGE}-instrumented) endif() message(STATUS "Setting next clang stage to: ${NEXT_CLANG_STAGE}") - - + + set(STAMP_DIR ${CMAKE_CURRENT_BINARY_DIR}/${NEXT_CLANG_STAGE}-stamps/) set(BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/${NEXT_CLANG_STAGE}-bins/) Modified: cfe/trunk/include/clang/Config/config.h.cmake URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Config/config.h.cmake?rev=317960&r1=317959&r2=317960&view=diff == --- cfe/trunk/include/clang/Config/config.h.cmake (original) +++ cfe/trunk/include/clang/Config/config.h.cmake Fri Nov 10 17:15:41 2017 @@ -17,6 +17,9 @@ /* Default runtime library to use. */ #define CLANG_DEFAULT_RTLIB "${CLANG_DEFAULT_RTLIB}" +/* Default objcopy to use */ +#define CLANG_DEFAULT_OBJCOPY "${CLANG_DEFAULT_OBJCOPY}" + /* Default OpenMP runtime used by -fopenmp. */ #define CLANG_DEFAULT_OPENMP_RUNTIME "${CLANG_DEFAULT_OPENMP_RUNTIME}" Modified: cfe/trunk/lib/CodeGen/CodeGenModule.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CodeGenModule.cpp?rev=317960&r1=317959&r2=317960&view=diff == --- cfe/trunk/lib/CodeGen/CodeGenModule.cpp (original) +++ cfe/trunk/lib/CodeGen/CodeGenModule.cpp Fri Nov 10 17:15:41 2017 @@ -441,7 +441,7 @@ void CodeGenModule::Release() { if (Context.getTargetInfo().getTriple().getArch() == llvm::Triple::x86) getModule().addModuleFlag(llvm::Module::Error, "NumRegisterParameters", CodeGenOpts.NumRegisterParameters); - + if (CodeGenOpts.DwarfVersion) { // We actually want the latest version when there are conflicts. // We can change from Warning to Latest if such mode is supported. @@ -770,7 +770,7 @@ StringRef CodeGenModule::getBlockMangled SmallString<256> Buffer; llvm::raw_svector_ostream Out(Buffer); if (!D) -MangleCtx.mangleGlobalBlock(BD, +MangleCtx.mangleGlobalBlock(BD, dyn_cast_or_null(initializedGlobalDecl.getDecl()), Out); else if (const auto *CD = dyn_cast(D)) MangleCtx.mangleCtorBlock(CD, GD.getCtorType(), BD, Out); @@ -2010,12 +2010,12 @@ bool CodeGenModule::shouldOpportunistica void CodeGenModule::EmitGlobalDefinition(GlobalDecl GD, llvm::GlobalValue *GV) { const auto *D = cast(GD.getDecl()); - PrettyStackTraceDecl CrashInfo(const_cast(D), D->getLocation(), + PrettyStackTraceDecl CrashInfo(const_cast(D), D->getLocation(), Context.getSourceManager(), "Generating code for declaration"); - + if (isa(D)) { -// At -O0, don't generate IR for functions with available_externally +// At -O0, don't generate IR for functions with available_externally // linkage. if (!shouldEmitFunction(GD)) return; @@ -2041,7 +2041,7 @@ void CodeGenModule::EmitGlobalDefinition if (const auto *VD = dyn_cast(D)) return EmitGlobalVarDefinition(VD, !VD->hasDefinition()); - + llvm_unreachable("Invalid argument to EmitGlobalDefinition()"); } @@ -2547,7 +2547,7 @@ CodeGenModule::GetAddrOfGlobal(GlobalDec } llvm::GlobalVariable * -CodeGenModule::CreateOrReplaceCXXRuntimeVariable(StringRef Name, +CodeGenModule::CreateOrReplaceCXXRuntimeVariable(StringRef Name,