From owner-svn-src-vendor@FreeBSD.ORG Mon Feb 9 01:44:15 2015 Return-Path: Delivered-To: svn-src-vendor@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8ECB2784; Mon, 9 Feb 2015 01:44:15 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7619CE05; Mon, 9 Feb 2015 01:44:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t191iFgu037513; Mon, 9 Feb 2015 01:44:15 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t191iBbd037490; Mon, 9 Feb 2015 01:44:11 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201502090144.t191iBbd037490@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Mon, 9 Feb 2015 01:44:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r278425 - in vendor/lldb/dist: include/lldb include/lldb/API include/lldb/Breakpoint include/lldb/Core include/lldb/DataFormatters include/lldb/Expression include/lldb/Host include/lldb... X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Feb 2015 01:44:15 -0000 Author: emaste Date: Mon Feb 9 01:44:09 2015 New Revision: 278425 URL: https://svnweb.freebsd.org/changeset/base/278425 Log: Import LLDB as of upstream SVN 228549 (git 39760838) Added: vendor/lldb/dist/include/lldb/API/SBLaunchInfo.h (contents, props changed) vendor/lldb/dist/include/lldb/Core/FormatEntity.h (contents, props changed) vendor/lldb/dist/include/lldb/Host/StringConvert.h (contents, props changed) vendor/lldb/dist/include/lldb/Host/common/ vendor/lldb/dist/include/lldb/Host/common/NativeBreakpoint.h - copied unchanged from r278424, vendor/lldb/dist/source/Host/common/NativeBreakpoint.h vendor/lldb/dist/include/lldb/Host/common/NativeBreakpointList.h - copied unchanged from r278424, vendor/lldb/dist/source/Host/common/NativeBreakpointList.h vendor/lldb/dist/include/lldb/Host/common/NativeProcessProtocol.h - copied, changed from r278424, vendor/lldb/dist/source/Host/common/NativeProcessProtocol.h vendor/lldb/dist/include/lldb/Host/common/NativeRegisterContext.h - copied, changed from r278424, vendor/lldb/dist/include/lldb/Target/NativeRegisterContext.h vendor/lldb/dist/include/lldb/Host/common/NativeRegisterContextRegisterInfo.h - copied, changed from r278424, vendor/lldb/dist/include/lldb/Target/NativeRegisterContextRegisterInfo.h vendor/lldb/dist/include/lldb/Host/common/NativeThreadProtocol.h - copied, changed from r278424, vendor/lldb/dist/source/Host/common/NativeThreadProtocol.h vendor/lldb/dist/include/lldb/Host/common/NativeWatchpointList.h (contents, props changed) vendor/lldb/dist/include/lldb/Host/common/SoftwareBreakpoint.h - copied unchanged from r278424, vendor/lldb/dist/source/Host/common/SoftwareBreakpoint.h vendor/lldb/dist/include/lldb/Interpreter/OptionValueFormatEntity.h (contents, props changed) vendor/lldb/dist/source/API/SBLaunchInfo.cpp (contents, props changed) vendor/lldb/dist/source/Core/FormatEntity.cpp (contents, props changed) vendor/lldb/dist/source/Host/common/NativeRegisterContext.cpp - copied, changed from r278424, vendor/lldb/dist/source/Target/NativeRegisterContext.cpp vendor/lldb/dist/source/Host/common/NativeRegisterContextRegisterInfo.cpp - copied, changed from r278424, vendor/lldb/dist/source/Target/NativeRegisterContextRegisterInfo.cpp vendor/lldb/dist/source/Host/common/NativeWatchpointList.cpp (contents, props changed) vendor/lldb/dist/source/Host/common/StringConvert.cpp (contents, props changed) vendor/lldb/dist/source/Interpreter/OptionValueFormatEntity.cpp (contents, props changed) vendor/lldb/dist/source/Plugins/Process/POSIX/CrashReason.cpp (contents, props changed) vendor/lldb/dist/source/Plugins/Process/POSIX/CrashReason.h (contents, props changed) Deleted: vendor/lldb/dist/include/lldb/Target/NativeRegisterContext.h vendor/lldb/dist/include/lldb/Target/NativeRegisterContextRegisterInfo.h vendor/lldb/dist/source/Host/common/NativeBreakpoint.h vendor/lldb/dist/source/Host/common/NativeBreakpointList.h vendor/lldb/dist/source/Host/common/NativeProcessProtocol.h vendor/lldb/dist/source/Host/common/NativeThreadProtocol.h vendor/lldb/dist/source/Host/common/SoftwareBreakpoint.h vendor/lldb/dist/source/Target/NativeRegisterContext.cpp vendor/lldb/dist/source/Target/NativeRegisterContextRegisterInfo.cpp Modified: vendor/lldb/dist/include/lldb/API/SBPlatform.h vendor/lldb/dist/include/lldb/API/SBTarget.h vendor/lldb/dist/include/lldb/API/SBType.h vendor/lldb/dist/include/lldb/Breakpoint/Breakpoint.h vendor/lldb/dist/include/lldb/Breakpoint/BreakpointLocation.h vendor/lldb/dist/include/lldb/Breakpoint/StoppointLocation.h vendor/lldb/dist/include/lldb/Core/ArchSpec.h vendor/lldb/dist/include/lldb/Core/Broadcaster.h vendor/lldb/dist/include/lldb/Core/Connection.h vendor/lldb/dist/include/lldb/Core/ConnectionMachPort.h vendor/lldb/dist/include/lldb/Core/ConnectionSharedMemory.h vendor/lldb/dist/include/lldb/Core/Debugger.h vendor/lldb/dist/include/lldb/Core/Disassembler.h vendor/lldb/dist/include/lldb/Core/Mangled.h vendor/lldb/dist/include/lldb/Core/Module.h vendor/lldb/dist/include/lldb/Core/RegularExpression.h vendor/lldb/dist/include/lldb/Core/ValueObject.h vendor/lldb/dist/include/lldb/Core/ValueObjectSyntheticFilter.h vendor/lldb/dist/include/lldb/DataFormatters/TypeSummary.h vendor/lldb/dist/include/lldb/Expression/ASTResultSynthesizer.h vendor/lldb/dist/include/lldb/Expression/ASTStructExtractor.h vendor/lldb/dist/include/lldb/Expression/IRExecutionUnit.h vendor/lldb/dist/include/lldb/Host/File.h vendor/lldb/dist/include/lldb/Host/Host.h vendor/lldb/dist/include/lldb/Host/PipeBase.h vendor/lldb/dist/include/lldb/Host/Socket.h vendor/lldb/dist/include/lldb/Host/SocketAddress.h vendor/lldb/dist/include/lldb/Host/posix/ConnectionFileDescriptorPosix.h vendor/lldb/dist/include/lldb/Host/posix/PipePosix.h vendor/lldb/dist/include/lldb/Interpreter/Args.h vendor/lldb/dist/include/lldb/Interpreter/CommandInterpreter.h vendor/lldb/dist/include/lldb/Interpreter/OptionGroupPlatform.h vendor/lldb/dist/include/lldb/Interpreter/OptionValue.h vendor/lldb/dist/include/lldb/Interpreter/OptionValueProperties.h vendor/lldb/dist/include/lldb/Interpreter/OptionValueRegex.h vendor/lldb/dist/include/lldb/Interpreter/OptionValues.h vendor/lldb/dist/include/lldb/Interpreter/ScriptInterpreter.h vendor/lldb/dist/include/lldb/Interpreter/ScriptInterpreterPython.h vendor/lldb/dist/include/lldb/Symbol/ClangASTType.h vendor/lldb/dist/include/lldb/Symbol/ObjectFile.h vendor/lldb/dist/include/lldb/Symbol/SymbolContext.h vendor/lldb/dist/include/lldb/Target/FileAction.h vendor/lldb/dist/include/lldb/Target/LanguageRuntime.h vendor/lldb/dist/include/lldb/Target/ObjCLanguageRuntime.h vendor/lldb/dist/include/lldb/Target/Platform.h vendor/lldb/dist/include/lldb/Target/Process.h vendor/lldb/dist/include/lldb/Utility/AnsiTerminal.h vendor/lldb/dist/include/lldb/Utility/ProcessStructReader.h vendor/lldb/dist/include/lldb/lldb-enumerations.h vendor/lldb/dist/include/lldb/lldb-forward.h vendor/lldb/dist/source/API/SBInstruction.cpp vendor/lldb/dist/source/API/SBInstructionList.cpp vendor/lldb/dist/source/API/SBPlatform.cpp vendor/lldb/dist/source/API/SBStream.cpp vendor/lldb/dist/source/API/SBTarget.cpp vendor/lldb/dist/source/API/SBThread.cpp vendor/lldb/dist/source/API/SBType.cpp vendor/lldb/dist/source/API/SBTypeCategory.cpp vendor/lldb/dist/source/API/SBValue.cpp vendor/lldb/dist/source/Breakpoint/Breakpoint.cpp vendor/lldb/dist/source/Breakpoint/BreakpointLocation.cpp vendor/lldb/dist/source/Breakpoint/StoppointLocation.cpp vendor/lldb/dist/source/Commands/CommandObjectBreakpoint.cpp vendor/lldb/dist/source/Commands/CommandObjectDisassemble.cpp vendor/lldb/dist/source/Commands/CommandObjectExpression.cpp vendor/lldb/dist/source/Commands/CommandObjectFrame.cpp vendor/lldb/dist/source/Commands/CommandObjectGUI.cpp vendor/lldb/dist/source/Commands/CommandObjectHelp.cpp vendor/lldb/dist/source/Commands/CommandObjectHelp.h vendor/lldb/dist/source/Commands/CommandObjectLog.cpp vendor/lldb/dist/source/Commands/CommandObjectMemory.cpp vendor/lldb/dist/source/Commands/CommandObjectPlatform.cpp vendor/lldb/dist/source/Commands/CommandObjectProcess.cpp vendor/lldb/dist/source/Commands/CommandObjectSource.cpp vendor/lldb/dist/source/Commands/CommandObjectTarget.cpp vendor/lldb/dist/source/Commands/CommandObjectThread.cpp vendor/lldb/dist/source/Commands/CommandObjectWatchpoint.cpp vendor/lldb/dist/source/Core/Address.cpp vendor/lldb/dist/source/Core/ArchSpec.cpp vendor/lldb/dist/source/Core/Broadcaster.cpp vendor/lldb/dist/source/Core/ConnectionMachPort.cpp vendor/lldb/dist/source/Core/ConnectionSharedMemory.cpp vendor/lldb/dist/source/Core/ConstString.cpp vendor/lldb/dist/source/Core/Debugger.cpp vendor/lldb/dist/source/Core/Disassembler.cpp vendor/lldb/dist/source/Core/Error.cpp vendor/lldb/dist/source/Core/IOHandler.cpp vendor/lldb/dist/source/Core/Log.cpp vendor/lldb/dist/source/Core/Mangled.cpp vendor/lldb/dist/source/Core/Module.cpp vendor/lldb/dist/source/Core/RegisterValue.cpp vendor/lldb/dist/source/Core/RegularExpression.cpp vendor/lldb/dist/source/Core/Scalar.cpp vendor/lldb/dist/source/Core/StreamFile.cpp vendor/lldb/dist/source/Core/Value.cpp vendor/lldb/dist/source/Core/ValueObject.cpp vendor/lldb/dist/source/Core/ValueObjectConstResult.cpp vendor/lldb/dist/source/Core/ValueObjectDynamicValue.cpp vendor/lldb/dist/source/Core/ValueObjectMemory.cpp vendor/lldb/dist/source/Core/ValueObjectSyntheticFilter.cpp vendor/lldb/dist/source/Core/ValueObjectVariable.cpp vendor/lldb/dist/source/DataFormatters/CXXFormatterFunctions.cpp vendor/lldb/dist/source/DataFormatters/FormatManager.cpp vendor/lldb/dist/source/DataFormatters/LibCxx.cpp vendor/lldb/dist/source/DataFormatters/LibCxxInitializerList.cpp vendor/lldb/dist/source/DataFormatters/LibCxxVector.cpp vendor/lldb/dist/source/DataFormatters/TypeSummary.cpp vendor/lldb/dist/source/DataFormatters/TypeSynthetic.cpp vendor/lldb/dist/source/Expression/ASTResultSynthesizer.cpp vendor/lldb/dist/source/Expression/ASTStructExtractor.cpp vendor/lldb/dist/source/Expression/ClangExpressionParser.cpp vendor/lldb/dist/source/Expression/ClangModulesDeclVendor.cpp vendor/lldb/dist/source/Expression/ExpressionSourceCode.cpp vendor/lldb/dist/source/Expression/IRExecutionUnit.cpp vendor/lldb/dist/source/Expression/IRForTarget.cpp vendor/lldb/dist/source/Expression/Materializer.cpp vendor/lldb/dist/source/Host/common/Editline.cpp vendor/lldb/dist/source/Host/common/File.cpp vendor/lldb/dist/source/Host/common/FileSpec.cpp vendor/lldb/dist/source/Host/common/Host.cpp vendor/lldb/dist/source/Host/common/HostInfoBase.cpp vendor/lldb/dist/source/Host/common/NativeBreakpoint.cpp vendor/lldb/dist/source/Host/common/NativeBreakpointList.cpp vendor/lldb/dist/source/Host/common/NativeProcessProtocol.cpp vendor/lldb/dist/source/Host/common/NativeThreadProtocol.cpp vendor/lldb/dist/source/Host/common/Socket.cpp vendor/lldb/dist/source/Host/common/SocketAddress.cpp vendor/lldb/dist/source/Host/common/SoftwareBreakpoint.cpp vendor/lldb/dist/source/Host/common/ThreadLauncher.cpp vendor/lldb/dist/source/Host/posix/ConnectionFileDescriptorPosix.cpp vendor/lldb/dist/source/Host/posix/PipePosix.cpp vendor/lldb/dist/source/Interpreter/Args.cpp vendor/lldb/dist/source/Interpreter/CommandHistory.cpp vendor/lldb/dist/source/Interpreter/CommandInterpreter.cpp vendor/lldb/dist/source/Interpreter/CommandObjectRegexCommand.cpp vendor/lldb/dist/source/Interpreter/OptionGroupPlatform.cpp vendor/lldb/dist/source/Interpreter/OptionGroupValueObjectDisplay.cpp vendor/lldb/dist/source/Interpreter/OptionValue.cpp vendor/lldb/dist/source/Interpreter/OptionValueArray.cpp vendor/lldb/dist/source/Interpreter/OptionValueFileSpecLIst.cpp vendor/lldb/dist/source/Interpreter/OptionValuePathMappings.cpp vendor/lldb/dist/source/Interpreter/OptionValueProperties.cpp vendor/lldb/dist/source/Interpreter/OptionValueRegex.cpp vendor/lldb/dist/source/Interpreter/OptionValueSInt64.cpp vendor/lldb/dist/source/Interpreter/OptionValueUInt64.cpp vendor/lldb/dist/source/Interpreter/Property.cpp vendor/lldb/dist/source/Interpreter/ScriptInterpreterPython.cpp vendor/lldb/dist/source/Plugins/ABI/MacOSX-arm/ABIMacOSX_arm.cpp vendor/lldb/dist/source/Plugins/ABI/MacOSX-arm64/ABIMacOSX_arm64.cpp vendor/lldb/dist/source/Plugins/ABI/MacOSX-i386/ABIMacOSX_i386.cpp vendor/lldb/dist/source/Plugins/ABI/SysV-ppc/ABISysV_ppc.cpp vendor/lldb/dist/source/Plugins/ABI/SysV-ppc64/ABISysV_ppc64.cpp vendor/lldb/dist/source/Plugins/ABI/SysV-x86_64/ABISysV_x86_64.cpp vendor/lldb/dist/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.cpp vendor/lldb/dist/source/Plugins/DynamicLoader/POSIX-DYLD/DYLDRendezvous.cpp vendor/lldb/dist/source/Plugins/DynamicLoader/POSIX-DYLD/DYLDRendezvous.h vendor/lldb/dist/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp vendor/lldb/dist/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.cpp vendor/lldb/dist/source/Plugins/Platform/POSIX/PlatformPOSIX.cpp vendor/lldb/dist/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.cpp vendor/lldb/dist/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.h vendor/lldb/dist/source/Plugins/Process/FreeBSD/ProcessMonitor.cpp vendor/lldb/dist/source/Plugins/Process/FreeBSD/ProcessMonitor.h vendor/lldb/dist/source/Plugins/Process/POSIX/POSIXStopInfo.cpp vendor/lldb/dist/source/Plugins/Process/POSIX/POSIXStopInfo.h vendor/lldb/dist/source/Plugins/Process/POSIX/ProcessMessage.cpp vendor/lldb/dist/source/Plugins/Process/POSIX/ProcessMessage.h vendor/lldb/dist/source/Plugins/Process/POSIX/ProcessPOSIX.cpp vendor/lldb/dist/source/Plugins/Process/POSIX/RegisterContextPOSIXProcessMonitor_powerpc.cpp vendor/lldb/dist/source/Plugins/Process/POSIX/RegisterContextPOSIXProcessMonitor_powerpc.h vendor/lldb/dist/source/Plugins/Process/Utility/DynamicRegisterInfo.cpp vendor/lldb/dist/source/Plugins/Process/Utility/RegisterContextFreeBSD_powerpc.cpp vendor/lldb/dist/source/Plugins/Process/Utility/RegisterContextLLDB.cpp vendor/lldb/dist/source/Plugins/Process/Utility/RegisterContextLinux_i386.cpp vendor/lldb/dist/source/Plugins/Process/Utility/RegisterContextLinux_i386.h vendor/lldb/dist/source/Plugins/Process/Utility/RegisterContextLinux_x86_64.cpp vendor/lldb/dist/source/Plugins/Process/Utility/RegisterContextLinux_x86_64.h vendor/lldb/dist/source/Plugins/Process/Utility/RegisterContextPOSIX_powerpc.cpp vendor/lldb/dist/source/Plugins/Process/Utility/RegisterContextPOSIX_powerpc.h vendor/lldb/dist/source/Plugins/Process/Utility/RegisterContext_powerpc.h vendor/lldb/dist/source/Plugins/Process/Utility/RegisterInfoInterface.h vendor/lldb/dist/source/Plugins/Process/Utility/RegisterInfos_powerpc.h vendor/lldb/dist/source/Plugins/Process/Utility/lldb-x86-register-enums.h vendor/lldb/dist/source/Plugins/Process/elf-core/ProcessElfCore.cpp vendor/lldb/dist/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_powerpc.cpp vendor/lldb/dist/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_powerpc.h vendor/lldb/dist/source/Plugins/Process/elf-core/ThreadElfCore.cpp vendor/lldb/dist/source/Plugins/Process/elf-core/ThreadElfCore.h vendor/lldb/dist/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp vendor/lldb/dist/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.h vendor/lldb/dist/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp vendor/lldb/dist/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h vendor/lldb/dist/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServer.cpp vendor/lldb/dist/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServer.h vendor/lldb/dist/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp vendor/lldb/dist/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp vendor/lldb/dist/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp vendor/lldb/dist/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp vendor/lldb/dist/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h vendor/lldb/dist/source/Plugins/UnwindAssembly/InstEmulation/UnwindAssemblyInstEmulation.cpp vendor/lldb/dist/source/Symbol/ClangASTContext.cpp vendor/lldb/dist/source/Symbol/ClangASTType.cpp vendor/lldb/dist/source/Symbol/CompactUnwindInfo.cpp vendor/lldb/dist/source/Symbol/SymbolContext.cpp vendor/lldb/dist/source/Symbol/Type.cpp vendor/lldb/dist/source/Symbol/Variable.cpp vendor/lldb/dist/source/Target/ExecutionContext.cpp vendor/lldb/dist/source/Target/LanguageRuntime.cpp vendor/lldb/dist/source/Target/ObjCLanguageRuntime.cpp vendor/lldb/dist/source/Target/Platform.cpp vendor/lldb/dist/source/Target/Process.cpp vendor/lldb/dist/source/Target/ProcessLaunchInfo.cpp vendor/lldb/dist/source/Target/StackFrame.cpp vendor/lldb/dist/source/Target/StopInfo.cpp vendor/lldb/dist/source/Target/TargetList.cpp vendor/lldb/dist/source/Target/Thread.cpp vendor/lldb/dist/source/Target/ThreadPlanTracer.cpp vendor/lldb/dist/source/Target/UnixSignals.cpp vendor/lldb/dist/source/Utility/StringExtractorGDBRemote.cpp vendor/lldb/dist/source/Utility/StringExtractorGDBRemote.h vendor/lldb/dist/source/Utility/UriParser.cpp vendor/lldb/dist/source/Utility/UriParser.h vendor/lldb/dist/tools/compact-unwind/compact-unwind-dumper.c vendor/lldb/dist/tools/lldb-mi/Driver.cpp vendor/lldb/dist/tools/lldb-mi/Driver.h vendor/lldb/dist/tools/lldb-mi/MICmdArgValConsume.cpp vendor/lldb/dist/tools/lldb-mi/MICmdCmd.h vendor/lldb/dist/tools/lldb-mi/MICmdCmdBreak.cpp vendor/lldb/dist/tools/lldb-mi/MICmdCmdBreak.h vendor/lldb/dist/tools/lldb-mi/MICmdCmdData.cpp vendor/lldb/dist/tools/lldb-mi/MICmdCmdData.h vendor/lldb/dist/tools/lldb-mi/MICmdCmdExec.cpp vendor/lldb/dist/tools/lldb-mi/MICmdCmdExec.h vendor/lldb/dist/tools/lldb-mi/MICmdCmdFile.cpp vendor/lldb/dist/tools/lldb-mi/MICmdCmdGdbInfo.cpp vendor/lldb/dist/tools/lldb-mi/MICmdCmdMiscellanous.cpp vendor/lldb/dist/tools/lldb-mi/MICmdCmdMiscellanous.h vendor/lldb/dist/tools/lldb-mi/MICmdCmdStack.cpp vendor/lldb/dist/tools/lldb-mi/MICmdCmdStack.h vendor/lldb/dist/tools/lldb-mi/MICmdCmdTarget.cpp vendor/lldb/dist/tools/lldb-mi/MICmdCmdThread.cpp vendor/lldb/dist/tools/lldb-mi/MICmdCmdVar.cpp vendor/lldb/dist/tools/lldb-mi/MICmdCmdVar.h vendor/lldb/dist/tools/lldb-mi/MICmnLLDBBroadcaster.h vendor/lldb/dist/tools/lldb-mi/MICmnLLDBDebugSessionInfo.cpp vendor/lldb/dist/tools/lldb-mi/MICmnLLDBDebugSessionInfo.h vendor/lldb/dist/tools/lldb-mi/MICmnLLDBDebugSessionInfoVarObj.h vendor/lldb/dist/tools/lldb-mi/MICmnLLDBDebugger.cpp vendor/lldb/dist/tools/lldb-mi/MICmnLLDBDebugger.h vendor/lldb/dist/tools/lldb-mi/MICmnLLDBDebuggerHandleEvents.cpp vendor/lldb/dist/tools/lldb-mi/MICmnLLDBProxySBValue.cpp vendor/lldb/dist/tools/lldb-mi/MICmnLLDBProxySBValue.h vendor/lldb/dist/tools/lldb-mi/MICmnLLDBUtilSBValue.cpp vendor/lldb/dist/tools/lldb-mi/MICmnLLDBUtilSBValue.h vendor/lldb/dist/tools/lldb-mi/MICmnLog.cpp vendor/lldb/dist/tools/lldb-mi/MICmnResources.cpp vendor/lldb/dist/tools/lldb-mi/MICmnResources.h vendor/lldb/dist/tools/lldb-mi/MIDriver.cpp vendor/lldb/dist/tools/lldb-mi/MIDriverBase.cpp vendor/lldb/dist/tools/lldb-mi/MIDriverBase.h vendor/lldb/dist/tools/lldb-mi/MIDriverMain.cpp vendor/lldb/dist/tools/lldb-mi/MIDriverMgr.cpp vendor/lldb/dist/tools/lldb-mi/MIDriverMgr.h vendor/lldb/dist/tools/lldb-mi/MIReadMe.txt Added: vendor/lldb/dist/include/lldb/API/SBLaunchInfo.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/lldb/dist/include/lldb/API/SBLaunchInfo.h Mon Feb 9 01:44:09 2015 (r278425) @@ -0,0 +1,186 @@ +//===-- SBLaunchInfo.h ------------------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#ifndef LLDB_SBLaunchInfo_h_ +#define LLDB_SBLaunchInfo_h_ + +#include "lldb/API/SBDefines.h" + +namespace lldb { + +class SBPlatform; +class SBTarget; + +class SBLaunchInfo +{ +public: + SBLaunchInfo (const char **argv); + + ~SBLaunchInfo(); + + lldb::pid_t + GetProcessID(); + + uint32_t + GetUserID(); + + uint32_t + GetGroupID(); + + bool + UserIDIsValid (); + + bool + GroupIDIsValid (); + + void + SetUserID (uint32_t uid); + + void + SetGroupID (uint32_t gid); + + SBFileSpec + GetExecutableFile (); + + //---------------------------------------------------------------------- + /// Set the executable file that will be used to launch the process and + /// optionally set it as the first argument in the argument vector. + /// + /// This only needs to be specified if clients wish to carefully control + /// the exact path will be used to launch a binary. If you create a + /// target with a symlink, that symlink will get resolved in the target + /// and the resolved path will get used to launch the process. Calling + /// this function can help you still launch your process using the + /// path of your choice. + /// + /// If this function is not called prior to launching with + /// SBTarget::Launch(...), the target will use the resolved executable + /// path that was used to create the target. + /// + /// @param[in] exe_file + /// The override path to use when launching the executable. + /// + /// @param[in] add_as_first_arg + /// If true, then the path will be inserted into the argument vector + /// prior to launching. Otherwise the argument vector will be left + /// alone. + //---------------------------------------------------------------------- + void + SetExecutableFile (SBFileSpec exe_file, bool add_as_first_arg); + + + //---------------------------------------------------------------------- + /// Get the listener that will be used to receive process events. + /// + /// If no listener has been set via a call to + /// SBLaunchInfo::SetListener(), then an invalid SBListener will be + /// returned (SBListener::IsValid() will return false). If a listener + /// has been set, then the valid listener object will be returned. + //---------------------------------------------------------------------- + SBListener + GetListener (); + + //---------------------------------------------------------------------- + /// Set the listener that will be used to receive process events. + /// + /// By default the SBDebugger, which has a listener, that the SBTarget + /// belongs to will listen for the process events. Calling this function + /// allows a different listener to be used to listen for process events. + //---------------------------------------------------------------------- + void + SetListener (SBListener &listener); + + uint32_t + GetNumArguments (); + + const char * + GetArgumentAtIndex (uint32_t idx); + + void + SetArguments (const char **argv, bool append); + + uint32_t + GetNumEnvironmentEntries (); + + const char * + GetEnvironmentEntryAtIndex (uint32_t idx); + + void + SetEnvironmentEntries (const char **envp, bool append); + + void + Clear (); + + const char * + GetWorkingDirectory () const; + + void + SetWorkingDirectory (const char *working_dir); + + uint32_t + GetLaunchFlags (); + + void + SetLaunchFlags (uint32_t flags); + + const char * + GetProcessPluginName (); + + void + SetProcessPluginName (const char *plugin_name); + + const char * + GetShell (); + + void + SetShell (const char * path); + + uint32_t + GetResumeCount (); + + void + SetResumeCount (uint32_t c); + + bool + AddCloseFileAction (int fd); + + bool + AddDuplicateFileAction (int fd, int dup_fd); + + bool + AddOpenFileAction (int fd, const char *path, bool read, bool write); + + bool + AddSuppressFileAction (int fd, bool read, bool write); + + void + SetLaunchEventData (const char *data); + + const char * + GetLaunchEventData () const; + + bool + GetDetachOnError() const; + + void + SetDetachOnError(bool enable); + +protected: + friend class SBPlatform; + friend class SBTarget; + + lldb_private::ProcessLaunchInfo & + ref (); + + ProcessLaunchInfoSP m_opaque_sp; +}; + +} // namespace lldb + +#endif // LLDB_SBLaunchInfo_h_ Modified: vendor/lldb/dist/include/lldb/API/SBPlatform.h ============================================================================== --- vendor/lldb/dist/include/lldb/API/SBPlatform.h Sun Feb 8 23:09:01 2015 (r278424) +++ vendor/lldb/dist/include/lldb/API/SBPlatform.h Mon Feb 9 01:44:09 2015 (r278425) @@ -12,11 +12,15 @@ #include "lldb/API/SBDefines.h" +#include + struct PlatformConnectOptions; struct PlatformShellCommand; namespace lldb { + class SBLaunchInfo; + class SBPlatformConnectOptions { public: @@ -171,6 +175,12 @@ namespace lldb { Run (SBPlatformShellCommand &shell_command); SBError + Launch (SBLaunchInfo &launch_info); + + SBError + Kill (const lldb::pid_t pid); + + SBError MakeDirectory (const char *path, uint32_t file_permissions = eFilePermissionsDirectoryDefault); uint32_t @@ -190,6 +200,9 @@ namespace lldb { void SetSP (const lldb::PlatformSP& platform_sp); + SBError + ExecuteConnected (const std::function& func); + lldb::PlatformSP m_opaque_sp; }; Modified: vendor/lldb/dist/include/lldb/API/SBTarget.h ============================================================================== --- vendor/lldb/dist/include/lldb/API/SBTarget.h Sun Feb 8 23:09:01 2015 (r278424) +++ vendor/lldb/dist/include/lldb/API/SBTarget.h Mon Feb 9 01:44:09 2015 (r278425) @@ -15,6 +15,7 @@ #include "lldb/API/SBBroadcaster.h" #include "lldb/API/SBFileSpec.h" #include "lldb/API/SBFileSpecList.h" +#include "lldb/API/SBLaunchInfo.h" #include "lldb/API/SBSymbolContextList.h" #include "lldb/API/SBType.h" #include "lldb/API/SBValue.h" @@ -24,166 +25,6 @@ namespace lldb { class SBPlatform; -class SBLaunchInfo -{ -public: - SBLaunchInfo (const char **argv); - - ~SBLaunchInfo(); - - uint32_t - GetUserID(); - - uint32_t - GetGroupID(); - - bool - UserIDIsValid (); - - bool - GroupIDIsValid (); - - void - SetUserID (uint32_t uid); - - void - SetGroupID (uint32_t gid); - - SBFileSpec - GetExecutableFile (); - - //---------------------------------------------------------------------- - /// Set the executable file that will be used to launch the process and - /// optionally set it as the first argument in the argument vector. - /// - /// This only needs to be specified if clients wish to carefully control - /// the exact path will be used to launch a binary. If you create a - /// target with a symlink, that symlink will get resolved in the target - /// and the resolved path will get used to launch the process. Calling - /// this function can help you still launch your process using the - /// path of your choice. - /// - /// If this function is not called prior to launching with - /// SBTarget::Launch(...), the target will use the resolved executable - /// path that was used to create the target. - /// - /// @param[in] exe_file - /// The override path to use when launching the executable. - /// - /// @param[in] add_as_first_arg - /// If true, then the path will be inserted into the argument vector - /// prior to launching. Otherwise the argument vector will be left - /// alone. - //---------------------------------------------------------------------- - void - SetExecutableFile (SBFileSpec exe_file, bool add_as_first_arg); - - - //---------------------------------------------------------------------- - /// Get the listener that will be used to receive process events. - /// - /// If no listener has been set via a call to - /// SBLaunchInfo::SetListener(), then an invalid SBListener will be - /// returned (SBListener::IsValid() will return false). If a listener - /// has been set, then the valid listener object will be returned. - //---------------------------------------------------------------------- - SBListener - GetListener (); - - //---------------------------------------------------------------------- - /// Set the listener that will be used to receive process events. - /// - /// By default the SBDebugger, which has a listener, that the SBTarget - /// belongs to will listen for the process events. Calling this function - /// allows a different listener to be used to listen for process events. - //---------------------------------------------------------------------- - void - SetListener (SBListener &listener); - - uint32_t - GetNumArguments (); - - const char * - GetArgumentAtIndex (uint32_t idx); - - void - SetArguments (const char **argv, bool append); - - uint32_t - GetNumEnvironmentEntries (); - - const char * - GetEnvironmentEntryAtIndex (uint32_t idx); - - void - SetEnvironmentEntries (const char **envp, bool append); - - void - Clear (); - - const char * - GetWorkingDirectory () const; - - void - SetWorkingDirectory (const char *working_dir); - - uint32_t - GetLaunchFlags (); - - void - SetLaunchFlags (uint32_t flags); - - const char * - GetProcessPluginName (); - - void - SetProcessPluginName (const char *plugin_name); - - const char * - GetShell (); - - void - SetShell (const char * path); - - uint32_t - GetResumeCount (); - - void - SetResumeCount (uint32_t c); - - bool - AddCloseFileAction (int fd); - - bool - AddDuplicateFileAction (int fd, int dup_fd); - - bool - AddOpenFileAction (int fd, const char *path, bool read, bool write); - - bool - AddSuppressFileAction (int fd, bool read, bool write); - - void - SetLaunchEventData (const char *data); - - const char * - GetLaunchEventData () const; - - bool - GetDetachOnError() const; - - void - SetDetachOnError(bool enable); - -protected: - friend class SBTarget; - - lldb_private::ProcessLaunchInfo & - ref (); - - ProcessLaunchInfoSP m_opaque_sp; -}; - class SBAttachInfo { public: Modified: vendor/lldb/dist/include/lldb/API/SBType.h ============================================================================== --- vendor/lldb/dist/include/lldb/API/SBType.h Sun Feb 8 23:09:01 2015 (r278424) +++ vendor/lldb/dist/include/lldb/API/SBType.h Mon Feb 9 01:44:09 2015 (r278425) @@ -153,6 +153,9 @@ public: IsArrayType (); bool + IsVectorType (); + + bool IsTypedefType (); lldb::SBType @@ -175,6 +178,9 @@ public: lldb::SBType GetArrayElementType (); + + lldb::SBType + GetVectorElementType (); lldb::SBType GetCanonicalType(); Modified: vendor/lldb/dist/include/lldb/Breakpoint/Breakpoint.h ============================================================================== --- vendor/lldb/dist/include/lldb/Breakpoint/Breakpoint.h Sun Feb 8 23:09:01 2015 (r278424) +++ vendor/lldb/dist/include/lldb/Breakpoint/Breakpoint.h Mon Feb 9 01:44:09 2015 (r278425) @@ -714,6 +714,19 @@ protected: bool IgnoreCountShouldStop (); + void + IncrementHitCount() + { + m_hit_count++; + } + + void + DecrementHitCount() + { + assert (m_hit_count > 0); + m_hit_count--; + } + private: // This one should only be used by Target to copy breakpoints from target to target - primarily from the dummy // target to prime new targets. @@ -733,7 +746,10 @@ private: BreakpointLocationList m_locations; // The list of locations currently found for this breakpoint. std::string m_kind_description; bool m_resolve_indirect_symbols; - + uint32_t m_hit_count; // Number of times this breakpoint/watchpoint has been hit. This is kept + // separately from the locations hit counts, since locations can go away when + // their backing library gets unloaded, and we would lose hit counts. + void SendBreakpointChangedEvent (lldb::BreakpointEventType eventKind); Modified: vendor/lldb/dist/include/lldb/Breakpoint/BreakpointLocation.h ============================================================================== --- vendor/lldb/dist/include/lldb/Breakpoint/BreakpointLocation.h Sun Feb 8 23:09:01 2015 (r278424) +++ vendor/lldb/dist/include/lldb/Breakpoint/BreakpointLocation.h Mon Feb 9 01:44:09 2015 (r278425) @@ -390,6 +390,7 @@ protected: friend class BreakpointSite; friend class BreakpointLocationList; friend class Process; + friend class StopInfoBreakpoint; //------------------------------------------------------------------ /// Set the breakpoint site for this location to \a bp_site_sp. @@ -417,6 +418,9 @@ private: void BumpHitCount(); + void + UndoBumpHitCount(); + //------------------------------------------------------------------ // Constructors and Destructors Modified: vendor/lldb/dist/include/lldb/Breakpoint/StoppointLocation.h ============================================================================== --- vendor/lldb/dist/include/lldb/Breakpoint/StoppointLocation.h Sun Feb 8 23:09:01 2015 (r278424) +++ vendor/lldb/dist/include/lldb/Breakpoint/StoppointLocation.h Mon Feb 9 01:44:09 2015 (r278425) @@ -134,6 +134,9 @@ protected: ++m_hit_count; } + void + DecrementHitCount (); + private: //------------------------------------------------------------------ // For StoppointLocation only Modified: vendor/lldb/dist/include/lldb/Core/ArchSpec.h ============================================================================== --- vendor/lldb/dist/include/lldb/Core/ArchSpec.h Sun Feb 8 23:09:01 2015 (r278424) +++ vendor/lldb/dist/include/lldb/Core/ArchSpec.h Mon Feb 9 01:44:09 2015 (r278425) @@ -277,6 +277,21 @@ public: } //------------------------------------------------------------------ + /// Merges fields from another ArchSpec into this ArchSpec. + /// + /// This will use the supplied ArchSpec to fill in any fields of + /// the triple in this ArchSpec which were unspecified. This can + /// be used to refine a generic ArchSpec with a more specific one. + /// For example, if this ArchSpec's triple is something like + /// i386-unknown-unknown-unknown, and we have a triple which is + /// x64-pc-windows-msvc, then merging that triple into this one + /// will result in the triple i386-pc-windows-msvc. + /// + //------------------------------------------------------------------ + void + MergeFrom(const ArchSpec &other); + + //------------------------------------------------------------------ /// Sets this ArchSpec according to the given architecture name. /// /// The architecture name can be one of the generic system default Modified: vendor/lldb/dist/include/lldb/Core/Broadcaster.h ============================================================================== --- vendor/lldb/dist/include/lldb/Core/Broadcaster.h Sun Feb 8 23:09:01 2015 (r278424) +++ vendor/lldb/dist/include/lldb/Core/Broadcaster.h Mon Feb 9 01:44:09 2015 (r278425) @@ -419,12 +419,7 @@ public: HijackBroadcaster (Listener *listener, uint32_t event_mask = UINT32_MAX); bool - IsHijackedForEvent (uint32_t event_mask) - { - if (m_hijacking_listeners.size() > 0) - return (event_mask & m_hijacking_masks.back()) != 0; - return false; - } + IsHijackedForEvent (uint32_t event_mask); //------------------------------------------------------------------ /// Restore the state of the Broadcaster from a previous hijack attempt. Modified: vendor/lldb/dist/include/lldb/Core/Connection.h ============================================================================== --- vendor/lldb/dist/include/lldb/Core/Connection.h Sun Feb 8 23:09:01 2015 (r278424) +++ vendor/lldb/dist/include/lldb/Core/Connection.h Mon Feb 9 01:44:09 2015 (r278425) @@ -12,6 +12,7 @@ // C Includes // C++ Includes +#include // Other libraries and framework includes // Project includes #include "lldb/lldb-private.h" @@ -133,13 +134,13 @@ public: /// /// Subclasses must override this function. /// - /// @param[in] src - /// A source buffer that must be at least \a src_len bytes + /// @param[in] dst + /// A desination buffer that must be at least \a dst_len bytes /// long. /// - /// @param[in] src_len + /// @param[in] dst_len /// The number of bytes to attempt to write, and also the - /// number of bytes are currently available in \a src. + /// number of bytes are currently available in \a dst. /// /// @param[out] error_ptr /// A pointer to an error object that should be given an @@ -150,7 +151,18 @@ public: /// The number of bytes actually Written. //------------------------------------------------------------------ virtual size_t - Write (const void *buffer, size_t length, lldb::ConnectionStatus &status, Error *error_ptr) = 0; + Write (const void *dst, size_t dst_len, lldb::ConnectionStatus &status, Error *error_ptr) = 0; + + //------------------------------------------------------------------ + /// Returns a URI that describes this connection object + /// + /// Subclasses may override this function. + /// + /// @return + /// Returns URI or an empty string if disconnecteds + //------------------------------------------------------------------ + virtual std::string + GetURI() = 0; private: //------------------------------------------------------------------ Modified: vendor/lldb/dist/include/lldb/Core/ConnectionMachPort.h ============================================================================== --- vendor/lldb/dist/include/lldb/Core/ConnectionMachPort.h Sun Feb 8 23:09:01 2015 (r278424) +++ vendor/lldb/dist/include/lldb/Core/ConnectionMachPort.h Mon Feb 9 01:44:09 2015 (r278425) @@ -56,6 +56,9 @@ public: lldb::ConnectionStatus &status, lldb_private::Error *error_ptr); + virtual std::string + GetURI(); + lldb::ConnectionStatus BootstrapCheckIn (const char *port_name, lldb_private::Error *error_ptr); @@ -83,6 +86,7 @@ protected: mach_port_t m_port; private: + std::string m_uri; DISALLOW_COPY_AND_ASSIGN (ConnectionMachPort); Modified: vendor/lldb/dist/include/lldb/Core/ConnectionSharedMemory.h ============================================================================== --- vendor/lldb/dist/include/lldb/Core/ConnectionSharedMemory.h Sun Feb 8 23:09:01 2015 (r278424) +++ vendor/lldb/dist/include/lldb/Core/ConnectionSharedMemory.h Mon Feb 9 01:44:09 2015 (r278425) @@ -53,6 +53,9 @@ public: virtual size_t Write (const void *src, size_t src_len, lldb::ConnectionStatus &status, Error *error_ptr); + virtual std::string + GetURI(); + lldb::ConnectionStatus Open (bool create, const char *name, size_t size, Error *error_ptr); Modified: vendor/lldb/dist/include/lldb/Core/Debugger.h ============================================================================== --- vendor/lldb/dist/include/lldb/Core/Debugger.h Sun Feb 8 23:09:01 2015 (r278424) +++ vendor/lldb/dist/include/lldb/Core/Debugger.h Mon Feb 9 01:44:09 2015 (r278425) @@ -19,6 +19,7 @@ #include "lldb/lldb-public.h" #include "lldb/Core/Broadcaster.h" #include "lldb/Core/Communication.h" +#include "lldb/Core/FormatEntity.h" #include "lldb/Core/IOHandler.h" #include "lldb/Core/Listener.h" #include "lldb/Core/SourceManager.h" @@ -158,8 +159,6 @@ public: // To get the target's source manager, call GetSourceManager on the target instead. SourceManager & GetSourceManager (); - -public: lldb::TargetSP GetSelectedTarget () @@ -224,6 +223,12 @@ public: ConstString GetTopIOHandlerControlSequence(char ch); + const char * + GetIOHandlerCommandPrefix(); + + const char * + GetIOHandlerHelpPrologue(); + bool HideTopIOHandler(); @@ -243,15 +248,7 @@ public: GetDebuggerAtIndex (size_t index); static bool - FormatPrompt (const char *format, - const SymbolContext *sc, - const ExecutionContext *exe_ctx, - const Address *addr, - Stream &s, - ValueObject* valobj = NULL); - - static bool - FormatDisassemblerAddress (const char *format, + FormatDisassemblerAddress (const FormatEntity::Entry *format, const SymbolContext *sc, const SymbolContext *prev_sc, const ExecutionContext *exe_ctx, @@ -296,13 +293,13 @@ public: bool GetAutoConfirm () const; - const char * + const FormatEntity::Entry * GetDisassemblyFormat() const; - const char * + const FormatEntity::Entry * GetFrameFormat() const; - const char * + const FormatEntity::Entry * GetThreadFormat() const; lldb::ScriptLanguage @@ -352,7 +349,6 @@ public: bool GetNotifyVoid () const; - const ConstString & GetInstanceName() Modified: vendor/lldb/dist/include/lldb/Core/Disassembler.h ============================================================================== --- vendor/lldb/dist/include/lldb/Core/Disassembler.h Sun Feb 8 23:09:01 2015 (r278424) +++ vendor/lldb/dist/include/lldb/Core/Disassembler.h Mon Feb 9 01:44:09 2015 (r278425) @@ -117,7 +117,7 @@ public: /// the InstructionList. /// Only needed if show_address is true. /// - /// @param[in] disassembly_addr_format_spec + /// @param[in] disassembly_addr_format /// The format specification for how addresses are printed. /// Only needed if show_address is true. //------------------------------------------------------------------ @@ -130,7 +130,7 @@ public: const ExecutionContext* exe_ctx, const SymbolContext *sym_ctx, const SymbolContext *prev_sym_ctx, - const char *disassembly_addr_format_spec); + const FormatEntity::Entry *disassembly_addr_format); virtual bool DoesBranch () = 0; @@ -457,7 +457,7 @@ protected: //------------------------------------------------------------------ // Classes that inherit from Disassembler can see and modify these //------------------------------------------------------------------ - const ArchSpec m_arch; + ArchSpec m_arch; InstructionList m_instruction_list; lldb::addr_t m_base_addr; std::string m_flavor; Added: vendor/lldb/dist/include/lldb/Core/FormatEntity.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/lldb/dist/include/lldb/Core/FormatEntity.h Mon Feb 9 01:44:09 2015 (r278425) @@ -0,0 +1,260 @@ +//===-- FormatEntity.h ------------------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#ifndef liblldb_FormatEntity_h_ +#define liblldb_FormatEntity_h_ +#if defined(__cplusplus) + +#include +#include + +#include "lldb/lldb-private.h" +#include "lldb/Core/Error.h" + +namespace llvm +{ + class StringRef; +} + +namespace lldb_private +{ + class FormatEntity + { + public: + struct Entry + { + enum class Type { + Invalid, + ParentNumber, + ParentString, + InsertString, + Root, + String, + Scope, + Variable, + VariableSynthetic, + ScriptVariable, + ScriptVariableSynthetic, + AddressLoad, + AddressFile, + AddressLoadOrFile, + ProcessID, + ProcessFile, + ScriptProcess, + ThreadID, + ThreadProtocolID, + ThreadIndexID, + ThreadName, + ThreadQueue, + ThreadStopReason, + ThreadReturnValue, + ThreadCompletedExpression, + ScriptThread, + ThreadInfo, + TargetArch, + ScriptTarget, + ModuleFile, + File, + FrameIndex, + FrameRegisterPC, + FrameRegisterSP, + FrameRegisterFP, + FrameRegisterFlags, + FrameRegisterByName, + ScriptFrame, + FunctionID, + FunctionDidChange, + FunctionInitialFunction, + FunctionName, + FunctionNameWithArgs, + FunctionNameNoArgs, + FunctionAddrOffset, + FunctionAddrOffsetConcrete, + FunctionLineOffset, + FunctionPCOffset, + LineEntryFile, + LineEntryLineNumber, + LineEntryStartAddress, + LineEntryEndAddress, + CurrentPCArrow + }; + + enum FormatType + { + None, + UInt32, + UInt64, + CString + }; + + struct Definition + { + const char *name; + const char *string; // Insert this exact string into the output + Entry::Type type; + FormatType format_type; // uint32_t, uint64_t, cstr, or anything that can be formatted by printf or lldb::Format + uint64_t data; + uint32_t num_children; + Definition *children; // An array of "num_children" Definition entries, + bool keep_separator; + }; + + Entry (Type t = Type::Invalid, + const char *s = NULL, + const char *f = NULL) : + string (s ? s : ""), + printf_format (f ? f : ""), + children (), + definition (NULL), + type (t), + fmt (lldb::eFormatDefault), + number (0), + deref (false) + { + } + + Entry (llvm::StringRef s); + Entry (char ch); + + void + AppendChar (char ch); + + void + AppendText (const llvm::StringRef &s); + + void + AppendText (const char *cstr); + + void + AppendEntry (const Entry &&entry) + { + children.push_back(entry); + } + + void + Clear () + { + string.clear(); + printf_format.clear(); + children.clear(); + definition = NULL; + type = Type::Invalid; + fmt = lldb::eFormatDefault; + number = 0; + deref = false; + } + + static const char * + TypeToCString (Type t); + + void + Dump (Stream &s, int depth = 0) const; + + bool + operator == (const Entry &rhs) const + { + if (string != rhs.string) + return false; + if (printf_format != rhs.printf_format) + return false; + const size_t n = children.size(); + const size_t m = rhs.children.size(); + for (size_t i=0; i < std::min(n, m); ++i) + { + if (!(children[i] == rhs.children[i])) + return false; + } + if (children != rhs.children) + return false; + if (definition != rhs.definition) + return false; + if (type != rhs.type) + return false; + if (fmt != rhs.fmt) + return false; + if (deref != rhs.deref) + return false; + return true; + } + + std::string string; + std::string printf_format; + std::vector children; + Definition *definition; + Type type; + lldb::Format fmt; + lldb::addr_t number; + bool deref; + }; + + static bool + Format (const Entry &entry, + Stream &s, + const SymbolContext *sc, + const ExecutionContext *exe_ctx, + const Address *addr, + ValueObject* valobj, + bool function_changed, + bool initial_function); + + static bool + FormatStringRef (const llvm::StringRef &format, + Stream &s, + const SymbolContext *sc, + const ExecutionContext *exe_ctx, + const Address *addr, + ValueObject* valobj, + bool function_changed, + bool initial_function); + + static bool + FormatCString (const char *format, + Stream &s, + const SymbolContext *sc, + const ExecutionContext *exe_ctx, + const Address *addr, + ValueObject* valobj, + bool function_changed, + bool initial_function); + + static Error + Parse (const llvm::StringRef &format, Entry &entry); + + static Error + ExtractVariableInfo (llvm::StringRef &format_str, + llvm::StringRef &variable_name, + llvm::StringRef &variable_format); + + static size_t + AutoComplete (const char *s, + int match_start_point, + int max_return_elements, + bool &word_complete, + StringList &matches); + + //---------------------------------------------------------------------- + // Format the current elements into the stream \a s. + // + // The root element will be stripped off and the format str passed in + // will be either an empty string (print a description of this object), + // or contain a . separated series like a domain name that identifies + // further sub elements to display. + //---------------------------------------------------------------------- + static bool + FormatFileSpec (const FileSpec &file, Stream &s, llvm::StringRef elements, llvm::StringRef element_format); + protected: + + static Error + ParseInternal (llvm::StringRef &format, Entry &parent_entry, uint32_t depth); + + }; + +} +#endif // #if defined(__cplusplus) +#endif // liblldb_FormatEntity_h_ Modified: vendor/lldb/dist/include/lldb/Core/Mangled.h ============================================================================== --- vendor/lldb/dist/include/lldb/Core/Mangled.h Sun Feb 8 23:09:01 2015 (r278424) +++ vendor/lldb/dist/include/lldb/Core/Mangled.h Mon Feb 9 01:44:09 2015 (r278425) @@ -290,6 +290,25 @@ public: void SetValue (const ConstString &name); + //---------------------------------------------------------------------- + /// Get the language only if it is definitive what the language is from + /// the mangling. + /// + /// For a mangled name to have a language it must have both a mangled + /// and a demangled name and it must be definitive from the mangling + /// what the language is. + /// + /// Standard C function names will return eLanguageTypeUnknown because + /// they aren't mangled and it isn't clear what language the name + /// represents (there will be no mangled name). + /// + /// @return *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-vendor@FreeBSD.ORG Mon Feb 9 01:45:06 2015 Return-Path: Delivered-To: svn-src-vendor@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DEA4D8BD; Mon, 9 Feb 2015 01:45:06 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B1A4AE0B; Mon, 9 Feb 2015 01:45:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t191j6ri037747; Mon, 9 Feb 2015 01:45:06 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t191j6p3037746; Mon, 9 Feb 2015 01:45:06 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201502090145.t191j6p3037746@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Mon, 9 Feb 2015 01:45:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r278426 - vendor/lldb/lldb-r228549 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Feb 2015 01:45:07 -0000 Author: emaste Date: Mon Feb 9 01:45:06 2015 New Revision: 278426 URL: https://svnweb.freebsd.org/changeset/base/278426 Log: Tag trimmed lldb r228549 Added: vendor/lldb/lldb-r228549/ - copied from r278425, vendor/lldb/dist/ From owner-svn-src-vendor@FreeBSD.ORG Tue Feb 10 07:45:48 2015 Return-Path: Delivered-To: svn-src-vendor@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 54BE5349; Tue, 10 Feb 2015 07:45:48 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3AB45122; Tue, 10 Feb 2015 07:45:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1A7jmLX039845; Tue, 10 Feb 2015 07:45:48 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1A7jiso039826; Tue, 10 Feb 2015 07:45:44 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201502100745.t1A7jiso039826@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Tue, 10 Feb 2015 07:45:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r278497 - in vendor/compiler-rt/dist: . cmake cmake/Modules include include/sanitizer lib/asan lib/asan/scripts lib/asan/tests lib/builtins lib/dfsan lib/lsan lib/msan lib/msan/tests li... X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Feb 2015 07:45:48 -0000 Author: dim Date: Tue Feb 10 07:45:43 2015 New Revision: 278497 URL: https://svnweb.freebsd.org/changeset/base/278497 Log: Import compiler-rt trunk r228651. https://llvm.org/svn/llvm-project/compiler-rt/trunk@228651 Added: vendor/compiler-rt/dist/include/sanitizer/coverage_interface.h (contents, props changed) vendor/compiler-rt/dist/lib/asan/asan_activation_flags.inc (contents, props changed) vendor/compiler-rt/dist/lib/asan/asan_allocator.cc (contents, props changed) vendor/compiler-rt/dist/lib/asan/asan_flags.cc (contents, props changed) vendor/compiler-rt/dist/lib/asan/asan_flags.inc (contents, props changed) vendor/compiler-rt/dist/lib/dfsan/dfsan_flags.inc (contents, props changed) vendor/compiler-rt/dist/lib/lsan/lsan_flags.inc (contents, props changed) vendor/compiler-rt/dist/lib/msan/msan_flags.inc (contents, props changed) vendor/compiler-rt/dist/lib/msan/msan_poisoning.cc (contents, props changed) vendor/compiler-rt/dist/lib/msan/msan_poisoning.h (contents, props changed) vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_flag_parser.cc (contents, props changed) vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_flag_parser.h (contents, props changed) vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_flags.inc (contents, props changed) vendor/compiler-rt/dist/lib/tsan/rtl/tsan_flags.inc (contents, props changed) vendor/compiler-rt/dist/lib/ubsan/ubsan_flags.inc (contents, props changed) vendor/compiler-rt/dist/test/asan/TestCases/Darwin/address-range-limit.mm vendor/compiler-rt/dist/test/asan/TestCases/Darwin/crashlog-stacktraces.c (contents, props changed) vendor/compiler-rt/dist/test/asan/TestCases/Darwin/dyld_insert_libraries_remove.cc (contents, props changed) vendor/compiler-rt/dist/test/asan/TestCases/Darwin/linked-only.cc (contents, props changed) vendor/compiler-rt/dist/test/asan/TestCases/Darwin/mixing-global-constructors.cc (contents, props changed) vendor/compiler-rt/dist/test/asan/TestCases/Linux/coverage-direct-activation.cc (contents, props changed) vendor/compiler-rt/dist/test/asan/TestCases/Linux/coverage-reset.cc (contents, props changed) vendor/compiler-rt/dist/test/asan/TestCases/Linux/nohugepage_test.cc (contents, props changed) vendor/compiler-rt/dist/test/asan/TestCases/Linux/quarantine_size_mb.cc (contents, props changed) vendor/compiler-rt/dist/test/asan/TestCases/Linux/stack-overflow-sigbus.cc (contents, props changed) vendor/compiler-rt/dist/test/asan/TestCases/Windows/iostream_sbo.cc (contents, props changed) vendor/compiler-rt/dist/test/asan/TestCases/Windows/shadow_mapping_failure.cc (contents, props changed) vendor/compiler-rt/dist/test/asan/TestCases/Windows/thread_suspended.cc (contents, props changed) vendor/compiler-rt/dist/test/asan/TestCases/asan_options-help.cc (contents, props changed) vendor/compiler-rt/dist/test/msan/origin-store-long.cc (contents, props changed) vendor/compiler-rt/dist/test/msan/realloc-large-origin.cc (contents, props changed) vendor/compiler-rt/dist/test/msan/realloc-origin.cc (contents, props changed) vendor/compiler-rt/dist/test/sanitizer_common/TestCases/Linux/hard_rss_limit_mb_test.cc (contents, props changed) vendor/compiler-rt/dist/test/sanitizer_common/TestCases/Linux/sanitizer_set_death_callback_test.cc (contents, props changed) vendor/compiler-rt/dist/test/sanitizer_common/TestCases/Linux/sched_getparam.cc (contents, props changed) vendor/compiler-rt/dist/test/sanitizer_common/TestCases/Linux/soft_rss_limit_mb_test.cc (contents, props changed) vendor/compiler-rt/dist/test/sanitizer_common/TestCases/options-help.cc (contents, props changed) vendor/compiler-rt/dist/test/sanitizer_common/TestCases/options-include.cc (contents, props changed) vendor/compiler-rt/dist/test/sanitizer_common/TestCases/options-invalid.cc (contents, props changed) vendor/compiler-rt/dist/test/tsan/annotate_happens_before.cc (contents, props changed) vendor/compiler-rt/dist/test/tsan/java_volatile.cc (contents, props changed) vendor/compiler-rt/dist/test/tsan/real_deadlock_detector_stress_test.cc (contents, props changed) vendor/compiler-rt/dist/test/tsan/restore_stack.cc (contents, props changed) vendor/compiler-rt/dist/test/tsan/signal_reset.cc (contents, props changed) vendor/compiler-rt/dist/test/tsan/signal_thread.cc (contents, props changed) vendor/compiler-rt/dist/test/tsan/stack_sync_reuse.cc (contents, props changed) vendor/compiler-rt/dist/test/tsan/test.h (contents, props changed) vendor/compiler-rt/dist/test/ubsan/TestCases/Misc/coverage-levels.cc (contents, props changed) Deleted: vendor/compiler-rt/dist/lib/asan/asan_allocator2.cc vendor/compiler-rt/dist/make/platform/darwin_fat.mk vendor/compiler-rt/dist/test/tsan/process_sleep.h Modified: vendor/compiler-rt/dist/CMakeLists.txt vendor/compiler-rt/dist/cmake/Modules/AddCompilerRT.cmake vendor/compiler-rt/dist/cmake/Modules/CompilerRTCompile.cmake vendor/compiler-rt/dist/cmake/config-ix.cmake vendor/compiler-rt/dist/include/CMakeLists.txt vendor/compiler-rt/dist/include/sanitizer/asan_interface.h vendor/compiler-rt/dist/include/sanitizer/common_interface_defs.h vendor/compiler-rt/dist/include/sanitizer/msan_interface.h vendor/compiler-rt/dist/lib/asan/CMakeLists.txt vendor/compiler-rt/dist/lib/asan/asan_activation.cc vendor/compiler-rt/dist/lib/asan/asan_activation.h vendor/compiler-rt/dist/lib/asan/asan_allocator.h vendor/compiler-rt/dist/lib/asan/asan_debugging.cc vendor/compiler-rt/dist/lib/asan/asan_fake_stack.cc vendor/compiler-rt/dist/lib/asan/asan_flags.h vendor/compiler-rt/dist/lib/asan/asan_globals.cc vendor/compiler-rt/dist/lib/asan/asan_init_version.h vendor/compiler-rt/dist/lib/asan/asan_interceptors.cc vendor/compiler-rt/dist/lib/asan/asan_internal.h vendor/compiler-rt/dist/lib/asan/asan_linux.cc vendor/compiler-rt/dist/lib/asan/asan_mac.cc vendor/compiler-rt/dist/lib/asan/asan_malloc_mac.cc vendor/compiler-rt/dist/lib/asan/asan_mapping.h vendor/compiler-rt/dist/lib/asan/asan_poisoning.cc vendor/compiler-rt/dist/lib/asan/asan_poisoning.h vendor/compiler-rt/dist/lib/asan/asan_report.cc vendor/compiler-rt/dist/lib/asan/asan_rtl.cc vendor/compiler-rt/dist/lib/asan/asan_stack.cc vendor/compiler-rt/dist/lib/asan/asan_stack.h vendor/compiler-rt/dist/lib/asan/scripts/asan_device_setup vendor/compiler-rt/dist/lib/asan/scripts/asan_symbolize.py vendor/compiler-rt/dist/lib/asan/tests/CMakeLists.txt vendor/compiler-rt/dist/lib/asan/tests/asan_interface_test.cc vendor/compiler-rt/dist/lib/asan/tests/asan_noinst_test.cc vendor/compiler-rt/dist/lib/asan/tests/asan_test.cc vendor/compiler-rt/dist/lib/builtins/CMakeLists.txt vendor/compiler-rt/dist/lib/builtins/atomic.c vendor/compiler-rt/dist/lib/builtins/clear_cache.c vendor/compiler-rt/dist/lib/builtins/gcc_personality_v0.c vendor/compiler-rt/dist/lib/builtins/int_types.h vendor/compiler-rt/dist/lib/dfsan/CMakeLists.txt vendor/compiler-rt/dist/lib/dfsan/dfsan.cc vendor/compiler-rt/dist/lib/dfsan/dfsan.h vendor/compiler-rt/dist/lib/dfsan/dfsan_custom.cc vendor/compiler-rt/dist/lib/lsan/lsan.cc vendor/compiler-rt/dist/lib/lsan/lsan_allocator.cc vendor/compiler-rt/dist/lib/lsan/lsan_common.cc vendor/compiler-rt/dist/lib/lsan/lsan_common.h vendor/compiler-rt/dist/lib/msan/CMakeLists.txt vendor/compiler-rt/dist/lib/msan/msan.cc vendor/compiler-rt/dist/lib/msan/msan.h vendor/compiler-rt/dist/lib/msan/msan_allocator.cc vendor/compiler-rt/dist/lib/msan/msan_flags.h vendor/compiler-rt/dist/lib/msan/msan_interceptors.cc vendor/compiler-rt/dist/lib/msan/msan_linux.cc vendor/compiler-rt/dist/lib/msan/msan_report.cc vendor/compiler-rt/dist/lib/msan/msan_thread.cc vendor/compiler-rt/dist/lib/msan/tests/CMakeLists.txt vendor/compiler-rt/dist/lib/msan/tests/msan_test.cc vendor/compiler-rt/dist/lib/profile/InstrProfilingFile.c vendor/compiler-rt/dist/lib/sanitizer_common/CMakeLists.txt vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_allocator.cc vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_allocator.h vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_allocator_internal.h vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_common.cc vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_common.h vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_common_interceptors.inc vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_common_libcdep.cc vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_coverage_libcdep.cc vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_coverage_mapping_libcdep.cc vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_deadlock_detector.h vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_flags.cc vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_flags.h vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_internal_defs.h vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_libc.cc vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_libc.h vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_linux.cc vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_linux_libcdep.cc vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_list.h vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_mac.cc vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_mac.h vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_mutex.h vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_platform_interceptors.h vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_platform_limits_posix.cc vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_platform_limits_posix.h vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_posix.cc vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_posix_libcdep.cc vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_quarantine.h vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_stackdepot.cc vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_stacktrace.cc vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_stacktrace.h vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_stacktrace_libcdep.cc vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_symbolizer_libbacktrace.cc vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_symbolizer_libbacktrace.h vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_symbolizer_posix_libcdep.cc vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_unwind_posix_libcdep.cc vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_win.cc vendor/compiler-rt/dist/lib/sanitizer_common/scripts/check_lint.sh vendor/compiler-rt/dist/lib/sanitizer_common/scripts/sancov.py vendor/compiler-rt/dist/lib/sanitizer_common/tests/CMakeLists.txt vendor/compiler-rt/dist/lib/sanitizer_common/tests/sanitizer_allocator_test.cc vendor/compiler-rt/dist/lib/sanitizer_common/tests/sanitizer_deadlock_detector_test.cc vendor/compiler-rt/dist/lib/sanitizer_common/tests/sanitizer_flags_test.cc vendor/compiler-rt/dist/lib/sanitizer_common/tests/sanitizer_libc_test.cc vendor/compiler-rt/dist/lib/sanitizer_common/tests/sanitizer_printf_test.cc vendor/compiler-rt/dist/lib/sanitizer_common/tests/sanitizer_procmaps_test.cc vendor/compiler-rt/dist/lib/sanitizer_common/tests/sanitizer_test_utils.h vendor/compiler-rt/dist/lib/tsan/CMakeLists.txt vendor/compiler-rt/dist/lib/tsan/Makefile.old vendor/compiler-rt/dist/lib/tsan/check_analyze.sh vendor/compiler-rt/dist/lib/tsan/dd/dd_rtl.cc vendor/compiler-rt/dist/lib/tsan/go/build.bat vendor/compiler-rt/dist/lib/tsan/go/buildgo.sh vendor/compiler-rt/dist/lib/tsan/go/tsan_go.cc vendor/compiler-rt/dist/lib/tsan/rtl/Makefile.old vendor/compiler-rt/dist/lib/tsan/rtl/tsan_clock.cc vendor/compiler-rt/dist/lib/tsan/rtl/tsan_defs.h vendor/compiler-rt/dist/lib/tsan/rtl/tsan_flags.cc vendor/compiler-rt/dist/lib/tsan/rtl/tsan_flags.h vendor/compiler-rt/dist/lib/tsan/rtl/tsan_interceptors.cc vendor/compiler-rt/dist/lib/tsan/rtl/tsan_interface.cc vendor/compiler-rt/dist/lib/tsan/rtl/tsan_interface.h vendor/compiler-rt/dist/lib/tsan/rtl/tsan_interface_java.cc vendor/compiler-rt/dist/lib/tsan/rtl/tsan_interface_java.h vendor/compiler-rt/dist/lib/tsan/rtl/tsan_mman.cc vendor/compiler-rt/dist/lib/tsan/rtl/tsan_mman.h vendor/compiler-rt/dist/lib/tsan/rtl/tsan_mutex.cc vendor/compiler-rt/dist/lib/tsan/rtl/tsan_mutex.h vendor/compiler-rt/dist/lib/tsan/rtl/tsan_platform.h vendor/compiler-rt/dist/lib/tsan/rtl/tsan_platform_linux.cc vendor/compiler-rt/dist/lib/tsan/rtl/tsan_platform_mac.cc vendor/compiler-rt/dist/lib/tsan/rtl/tsan_rtl.cc vendor/compiler-rt/dist/lib/tsan/rtl/tsan_rtl.h vendor/compiler-rt/dist/lib/tsan/rtl/tsan_rtl_report.cc vendor/compiler-rt/dist/lib/tsan/rtl/tsan_rtl_thread.cc vendor/compiler-rt/dist/lib/tsan/tests/CMakeLists.txt vendor/compiler-rt/dist/lib/tsan/tests/rtl/tsan_string.cc vendor/compiler-rt/dist/lib/tsan/tests/unit/tsan_clock_test.cc vendor/compiler-rt/dist/lib/tsan/tests/unit/tsan_mman_test.cc vendor/compiler-rt/dist/lib/tsan/tests/unit/tsan_mutex_test.cc vendor/compiler-rt/dist/lib/ubsan/CMakeLists.txt vendor/compiler-rt/dist/lib/ubsan/ubsan_flags.cc vendor/compiler-rt/dist/lib/ubsan/ubsan_flags.h vendor/compiler-rt/dist/lib/ubsan/ubsan_init.cc vendor/compiler-rt/dist/lib/ubsan/ubsan_type_hash.cc vendor/compiler-rt/dist/make/platform/clang_darwin.mk vendor/compiler-rt/dist/make/platform/darwin_bni.mk vendor/compiler-rt/dist/test/asan/CMakeLists.txt vendor/compiler-rt/dist/test/asan/TestCases/Android/coverage-android.cc vendor/compiler-rt/dist/test/asan/TestCases/Android/lit.local.cfg vendor/compiler-rt/dist/test/asan/TestCases/Darwin/dyld_insert_libraries_reexec.cc vendor/compiler-rt/dist/test/asan/TestCases/Darwin/interception-in-shared-lib-test.cc vendor/compiler-rt/dist/test/asan/TestCases/Darwin/interface_symbols_darwin.c vendor/compiler-rt/dist/test/asan/TestCases/Darwin/suppressions-darwin.cc vendor/compiler-rt/dist/test/asan/TestCases/Linux/asan_preload_test-2.cc vendor/compiler-rt/dist/test/asan/TestCases/Linux/coverage-caller-callee-total-count.cc vendor/compiler-rt/dist/test/asan/TestCases/Linux/coverage-direct-large.cc vendor/compiler-rt/dist/test/asan/TestCases/Linux/coverage-direct.cc vendor/compiler-rt/dist/test/asan/TestCases/Linux/coverage-disabled.cc vendor/compiler-rt/dist/test/asan/TestCases/Linux/coverage-levels.cc vendor/compiler-rt/dist/test/asan/TestCases/Linux/coverage-maybe-open-file.cc vendor/compiler-rt/dist/test/asan/TestCases/Linux/coverage-module-unloaded.cc vendor/compiler-rt/dist/test/asan/TestCases/Linux/coverage-sandboxing.cc vendor/compiler-rt/dist/test/asan/TestCases/Linux/coverage-tracing.cc vendor/compiler-rt/dist/test/asan/TestCases/Linux/coverage.cc vendor/compiler-rt/dist/test/asan/TestCases/Linux/malloc-in-qsort.cc vendor/compiler-rt/dist/test/asan/TestCases/Linux/overflow-in-qsort.cc vendor/compiler-rt/dist/test/asan/TestCases/Linux/sized_delete_test.cc vendor/compiler-rt/dist/test/asan/TestCases/Linux/stack-trace-dlclose.cc vendor/compiler-rt/dist/test/asan/TestCases/Posix/asan-symbolize-sanity-test.cc vendor/compiler-rt/dist/test/asan/TestCases/Posix/init-order-dlopen.cc vendor/compiler-rt/dist/test/asan/TestCases/Posix/large_allocator_unpoisons_on_free.cc vendor/compiler-rt/dist/test/asan/TestCases/Posix/shared-lib-test.cc vendor/compiler-rt/dist/test/asan/TestCases/Posix/start-deactivated.cc vendor/compiler-rt/dist/test/asan/TestCases/Posix/tsd_dtor_leak.cc vendor/compiler-rt/dist/test/asan/TestCases/allocator_returns_null.cc vendor/compiler-rt/dist/test/asan/TestCases/deep_call_stack.cc vendor/compiler-rt/dist/test/asan/TestCases/default_options.cc vendor/compiler-rt/dist/test/asan/TestCases/dlclose-test.cc vendor/compiler-rt/dist/test/asan/TestCases/interception_failure_test.cc vendor/compiler-rt/dist/test/asan/TestCases/log-path_test.cc vendor/compiler-rt/dist/test/asan/TestCases/stack-overflow.cc vendor/compiler-rt/dist/test/asan/TestCases/suppressions-function.cc vendor/compiler-rt/dist/test/asan/TestCases/suppressions-interceptor.cc vendor/compiler-rt/dist/test/asan/TestCases/suppressions-library.cc vendor/compiler-rt/dist/test/asan/TestCases/zero_page_pc.cc vendor/compiler-rt/dist/test/asan/Unit/lit.site.cfg.in vendor/compiler-rt/dist/test/asan/android_commands/android_run.py vendor/compiler-rt/dist/test/asan/lit.cfg vendor/compiler-rt/dist/test/builtins/Unit/clear_cache_test.c vendor/compiler-rt/dist/test/builtins/Unit/enable_execute_stack_test.c vendor/compiler-rt/dist/test/lit.common.configured.in vendor/compiler-rt/dist/test/lsan/TestCases/ignore_object.cc vendor/compiler-rt/dist/test/lsan/TestCases/ignore_object_errors.cc vendor/compiler-rt/dist/test/lsan/TestCases/leak_check_at_exit.cc vendor/compiler-rt/dist/test/lsan/TestCases/leak_check_before_thread_started.cc vendor/compiler-rt/dist/test/lsan/TestCases/suppressions_file.cc vendor/compiler-rt/dist/test/msan/msan_print_shadow.cc vendor/compiler-rt/dist/test/msan/select_float_origin.cc vendor/compiler-rt/dist/test/msan/use-after-free.cc vendor/compiler-rt/dist/test/profile/instrprof-basic.c vendor/compiler-rt/dist/test/profile/instrprof-reset-counters.c vendor/compiler-rt/dist/test/profile/instrprof-set-filename.c vendor/compiler-rt/dist/test/profile/instrprof-without-libc.c vendor/compiler-rt/dist/test/profile/instrprof-write-file-atexit-explicitly.c vendor/compiler-rt/dist/test/profile/instrprof-write-file-only.c vendor/compiler-rt/dist/test/profile/instrprof-write-file.c vendor/compiler-rt/dist/test/tsan/CMakeLists.txt vendor/compiler-rt/dist/test/tsan/aligned_vs_unaligned_race.cc vendor/compiler-rt/dist/test/tsan/atomic_free.cc vendor/compiler-rt/dist/test/tsan/atomic_free2.cc vendor/compiler-rt/dist/test/tsan/atomic_norace.cc vendor/compiler-rt/dist/test/tsan/atomic_race.cc vendor/compiler-rt/dist/test/tsan/atomic_stack.cc vendor/compiler-rt/dist/test/tsan/benign_race.cc vendor/compiler-rt/dist/test/tsan/blacklist2.cc vendor/compiler-rt/dist/test/tsan/cond_cancel.c vendor/compiler-rt/dist/test/tsan/cond_race.cc vendor/compiler-rt/dist/test/tsan/deadlock_detector_stress_test.cc vendor/compiler-rt/dist/test/tsan/deep_stack1.cc vendor/compiler-rt/dist/test/tsan/fd_close_norace.cc vendor/compiler-rt/dist/test/tsan/fd_location.cc vendor/compiler-rt/dist/test/tsan/fd_pipe_race.cc vendor/compiler-rt/dist/test/tsan/fd_stdout_race.cc vendor/compiler-rt/dist/test/tsan/fork_deadlock.cc vendor/compiler-rt/dist/test/tsan/fork_multithreaded.cc vendor/compiler-rt/dist/test/tsan/free_race.c vendor/compiler-rt/dist/test/tsan/global_race.cc vendor/compiler-rt/dist/test/tsan/global_race2.cc vendor/compiler-rt/dist/test/tsan/global_race3.cc vendor/compiler-rt/dist/test/tsan/halt_on_error.cc vendor/compiler-rt/dist/test/tsan/ignore_free.cc vendor/compiler-rt/dist/test/tsan/ignore_lib0.cc vendor/compiler-rt/dist/test/tsan/ignore_lib1.cc vendor/compiler-rt/dist/test/tsan/ignore_lib2.cc vendor/compiler-rt/dist/test/tsan/ignore_lib3.cc vendor/compiler-rt/dist/test/tsan/ignore_malloc.cc vendor/compiler-rt/dist/test/tsan/ignore_race.cc vendor/compiler-rt/dist/test/tsan/inlined_memcpy_race.cc vendor/compiler-rt/dist/test/tsan/inlined_memcpy_race2.cc vendor/compiler-rt/dist/test/tsan/java.h vendor/compiler-rt/dist/test/tsan/java_finalizer.cc vendor/compiler-rt/dist/test/tsan/java_lock.cc vendor/compiler-rt/dist/test/tsan/java_lock_move.cc vendor/compiler-rt/dist/test/tsan/java_lock_rec.cc vendor/compiler-rt/dist/test/tsan/java_lock_rec_race.cc vendor/compiler-rt/dist/test/tsan/java_move_overlap.cc vendor/compiler-rt/dist/test/tsan/java_move_overlap_race.cc vendor/compiler-rt/dist/test/tsan/java_race_move.cc vendor/compiler-rt/dist/test/tsan/java_rwlock.cc vendor/compiler-rt/dist/test/tsan/load_shared_lib.cc vendor/compiler-rt/dist/test/tsan/malloc_stack.cc vendor/compiler-rt/dist/test/tsan/map32bit.cc vendor/compiler-rt/dist/test/tsan/memcpy_race.cc vendor/compiler-rt/dist/test/tsan/mop_with_offset.cc vendor/compiler-rt/dist/test/tsan/mop_with_offset2.cc vendor/compiler-rt/dist/test/tsan/mutex_cycle2.c vendor/compiler-rt/dist/test/tsan/mutexset1.cc vendor/compiler-rt/dist/test/tsan/mutexset2.cc vendor/compiler-rt/dist/test/tsan/mutexset3.cc vendor/compiler-rt/dist/test/tsan/mutexset4.cc vendor/compiler-rt/dist/test/tsan/mutexset5.cc vendor/compiler-rt/dist/test/tsan/mutexset6.cc vendor/compiler-rt/dist/test/tsan/mutexset7.cc vendor/compiler-rt/dist/test/tsan/mutexset8.cc vendor/compiler-rt/dist/test/tsan/pthread_atfork_deadlock.c vendor/compiler-rt/dist/test/tsan/race_on_barrier.c vendor/compiler-rt/dist/test/tsan/race_on_mutex.c vendor/compiler-rt/dist/test/tsan/race_on_mutex2.c vendor/compiler-rt/dist/test/tsan/race_on_puts.cc vendor/compiler-rt/dist/test/tsan/race_on_read.cc vendor/compiler-rt/dist/test/tsan/race_on_speculative_load.cc vendor/compiler-rt/dist/test/tsan/race_on_write.cc vendor/compiler-rt/dist/test/tsan/race_with_finished_thread.cc vendor/compiler-rt/dist/test/tsan/signal_errno.cc vendor/compiler-rt/dist/test/tsan/signal_malloc.cc vendor/compiler-rt/dist/test/tsan/signal_recursive.cc vendor/compiler-rt/dist/test/tsan/signal_sync.cc vendor/compiler-rt/dist/test/tsan/signal_write.cc vendor/compiler-rt/dist/test/tsan/simple_race.c vendor/compiler-rt/dist/test/tsan/simple_race.cc vendor/compiler-rt/dist/test/tsan/simple_stack.c vendor/compiler-rt/dist/test/tsan/simple_stack2.cc vendor/compiler-rt/dist/test/tsan/sleep_sync.cc vendor/compiler-rt/dist/test/tsan/sleep_sync2.cc vendor/compiler-rt/dist/test/tsan/stack_race.cc vendor/compiler-rt/dist/test/tsan/stack_race2.cc vendor/compiler-rt/dist/test/tsan/suppress_same_address.cc vendor/compiler-rt/dist/test/tsan/suppressions_global.cc vendor/compiler-rt/dist/test/tsan/suppressions_race.cc vendor/compiler-rt/dist/test/tsan/suppressions_race2.cc vendor/compiler-rt/dist/test/tsan/thread_detach.c vendor/compiler-rt/dist/test/tsan/thread_leak3.c vendor/compiler-rt/dist/test/tsan/thread_leak4.c vendor/compiler-rt/dist/test/tsan/thread_leak5.c vendor/compiler-rt/dist/test/tsan/thread_name.cc vendor/compiler-rt/dist/test/tsan/thread_name2.cc vendor/compiler-rt/dist/test/tsan/tiny_race.c vendor/compiler-rt/dist/test/tsan/tls_race.cc vendor/compiler-rt/dist/test/tsan/tls_race2.cc vendor/compiler-rt/dist/test/tsan/unaligned_norace.cc vendor/compiler-rt/dist/test/tsan/unaligned_race.cc vendor/compiler-rt/dist/test/tsan/vptr_harmful_race.cc vendor/compiler-rt/dist/test/tsan/vptr_harmful_race2.cc vendor/compiler-rt/dist/test/tsan/vptr_harmful_race3.cc vendor/compiler-rt/dist/test/tsan/vptr_harmful_race4.cc vendor/compiler-rt/dist/test/tsan/write_in_reader_lock.cc vendor/compiler-rt/dist/test/ubsan/TestCases/Float/cast-overflow.cpp vendor/compiler-rt/dist/test/ubsan/TestCases/Integer/no-recover.cpp vendor/compiler-rt/dist/test/ubsan/TestCases/Misc/nonnull-arg.cpp vendor/compiler-rt/dist/test/ubsan/TestCases/TypeCheck/misaligned.cpp vendor/compiler-rt/dist/test/ubsan/TestCases/TypeCheck/vptr-virtual-base.cpp vendor/compiler-rt/dist/test/ubsan/TestCases/TypeCheck/vptr.cpp vendor/compiler-rt/dist/unittests/lit.common.unit.configured.in Modified: vendor/compiler-rt/dist/CMakeLists.txt ============================================================================== --- vendor/compiler-rt/dist/CMakeLists.txt Tue Feb 10 07:35:16 2015 (r278496) +++ vendor/compiler-rt/dist/CMakeLists.txt Tue Feb 10 07:45:43 2015 (r278497) @@ -104,7 +104,8 @@ else() # Get some LLVM variables from LLVMConfig. include("${LLVM_CMAKE_PATH}/LLVMConfig.cmake") - set(LLVM_LIBRARY_OUTPUT_INTDIR ${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/lib) + set(LLVM_LIBRARY_OUTPUT_INTDIR + ${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/lib${LLVM_LIBDIR_SUFFIX}) # Find Python interpreter. set(Python_ADDITIONAL_VERSIONS 2.7 2.6 2.5) @@ -162,29 +163,6 @@ set(COMPILER_RT_BINARY_DIR ${CMAKE_CURRE # Setup custom SDK sysroots. set(COMPILER_RT_LINUX_SDK_SYSROOT ${COMPILER_RT_SOURCE_DIR}/SDKs/linux) -# Detect whether the current target platform is 32-bit or 64-bit, and setup -# the correct commandline flags needed to attempt to target 32-bit and 64-bit. -if (NOT CMAKE_SIZEOF_VOID_P EQUAL 4 AND - NOT CMAKE_SIZEOF_VOID_P EQUAL 8) - message(FATAL_ERROR "Please use architecture with 4 or 8 byte pointers.") -endif() -if (NOT MSVC) - set(TARGET_64_BIT_CFLAGS "-m64") - set(TARGET_32_BIT_CFLAGS "-m32") -else() - set(TARGET_64_BIT_CFLAGS "") - set(TARGET_32_BIT_CFLAGS "") -endif() - -function(get_target_flags_for_arch arch out_var) - list(FIND COMPILER_RT_SUPPORTED_ARCH ${arch} ARCH_INDEX) - if(ARCH_INDEX EQUAL -1) - message(FATAL_ERROR "Unsupported architecture: ${arch}") - else() - set(${out_var} ${TARGET_${arch}_CFLAGS} PARENT_SCOPE) - endif() -endfunction() - # We support running instrumented tests when we're not cross compiling # and target a UNIX-like system or Windows. # We can run tests on Android even when we are cross-compiling. @@ -199,17 +177,12 @@ option(COMPILER_RT_DEBUG "Build runtimes # COMPILER_RT_DEBUG_PYBOOL is used by lit.common.configured.in. pythonize_bool(COMPILER_RT_DEBUG) -# We have to support both static and dynamic/shared runtime on Windows. -# Android only works with dynamic runtime. -if(WIN32 OR ANDROID) -option(COMPILER_RT_BUILD_SHARED_ASAN "Build shared version of AddressSanitizer runtime" ON) -else() -option(COMPILER_RT_BUILD_SHARED_ASAN "Build shared version of AddressSanitizer runtime" OFF) -endif() - #================================ # Setup Compiler Flags #================================ +include(CheckIncludeFile) +check_include_file(unwind.h HAVE_UNWIND_H) + include(config-ix) if(MSVC) @@ -238,6 +211,7 @@ append_list_if(COMPILER_RT_HAS_FUNWIND_T append_list_if(COMPILER_RT_HAS_FNO_STACK_PROTECTOR_FLAG -fno-stack-protector SANITIZER_COMMON_CFLAGS) append_list_if(COMPILER_RT_HAS_FVISIBILITY_HIDDEN_FLAG -fvisibility=hidden SANITIZER_COMMON_CFLAGS) append_list_if(COMPILER_RT_HAS_FNO_FUNCTION_SECTIONS_FLAG -fno-function-sections SANITIZER_COMMON_CFLAGS) +append_list_if(COMPILER_RT_HAS_FNO_LTO_FLAG -fno-lto SANITIZER_COMMON_CFLAGS) if(MSVC) # Replace the /MD[d] flags with /MT. @@ -257,14 +231,28 @@ if(MSVC) append_list_if(COMPILER_RT_HAS_GS_FLAG /GS- SANITIZER_COMMON_CFLAGS) endif() +append_list_if(COMPILER_RT_DEBUG -DSANITIZER_DEBUG=1 SANITIZER_COMMON_CFLAGS) + # Build with optimization, unless we're in debug mode. If we're using MSVC, # always respect the optimization flags set by CMAKE_BUILD_TYPE instead. if(NOT COMPILER_RT_DEBUG AND NOT MSVC) list(APPEND SANITIZER_COMMON_CFLAGS -O3) endif() +# Determine if we should restrict stack frame sizes. +# Stack frames on PowerPC and in debug biuld can be much larger than +# anticipated. +# FIXME: Fix all sanitizers and add -Wframe-larger-than to +# SANITIZER_COMMON_FLAGS +if(COMPILER_RT_HAS_WFRAME_LARGER_THAN_FLAG AND NOT COMPILER_RT_DEBUG + AND NOT ${LLVM_NATIVE_ARCH} STREQUAL "PowerPC") + set(SANITIZER_LIMIT_FRAME_SIZE TRUE) +else() + set(SANITIZER_LIMIT_FRAME_SIZE FALSE) +endif() + # Build sanitizer runtimes with debug info. -if(COMPILER_RT_HAS_GLINE_TABLES_ONLY_FLAG) +if(COMPILER_RT_HAS_GLINE_TABLES_ONLY_FLAG AND NOT COMPILER_RT_DEBUG) list(APPEND SANITIZER_COMMON_CFLAGS -gline-tables-only) elseif(COMPILER_RT_HAS_G_FLAG) list(APPEND SANITIZER_COMMON_CFLAGS -g) @@ -283,12 +271,27 @@ append_list_if(COMPILER_RT_HAS_WD4391_FL append_list_if(COMPILER_RT_HAS_WD4722_FLAG /wd4722 SANITIZER_COMMON_CFLAGS) append_list_if(COMPILER_RT_HAS_WD4800_FLAG /wd4800 SANITIZER_COMMON_CFLAGS) if(APPLE) - # Obtain the iOS Simulator SDK path from xcodebuild. - execute_process( - COMMAND xcodebuild -version -sdk iphonesimulator Path - OUTPUT_VARIABLE IOSSIM_SDK_DIR - OUTPUT_STRIP_TRAILING_WHITESPACE - ) + macro(find_darwin_sdk_dir var sdk_name) + # Let's first try the internal SDK, otherwise use the public SDK. + execute_process( + COMMAND xcodebuild -version -sdk ${sdk_name}.internal Path + OUTPUT_VARIABLE ${var} + OUTPUT_STRIP_TRAILING_WHITESPACE + ERROR_FILE /dev/null + ) + if(${var} STREQUAL "") + execute_process( + COMMAND xcodebuild -version -sdk ${sdk_name} Path + OUTPUT_VARIABLE ${var} + OUTPUT_STRIP_TRAILING_WHITESPACE + ERROR_FILE /dev/null + ) + endif() + endmacro() + + find_darwin_sdk_dir(OSX_SDK_DIR macosx) + find_darwin_sdk_dir(IOSSIM_SDK_DIR iphonesimulator) + string(REGEX MATCH "-mmacosx-version-min=" MACOSX_VERSION_MIN_FLAG "${CMAKE_CXX_FLAGS}") set(SANITIZER_COMMON_SUPPORTED_DARWIN_OS osx) @@ -298,10 +301,12 @@ if(APPLE) set(SANITIZER_MIN_OSX_VERSION 10.7) set(CMAKE_OSX_DEPLOYMENT_TARGET "") # We're setting the flag manually below. - set(DARWIN_osx_CFLAGS -mmacosx-version-min=${SANITIZER_MIN_OSX_VERSION}) + set(DARWIN_osx_CFLAGS -mmacosx-version-min=${SANITIZER_MIN_OSX_VERSION} + -isysroot ${OSX_SDK_DIR} -stdlib=libc++) set(DARWIN_iossim_CFLAGS -mios-simulator-version-min=7.0 -isysroot ${IOSSIM_SDK_DIR}) - set(DARWIN_osx_LINKFLAGS) + set(DARWIN_osx_LINKFLAGS -mmacosx-version-min=${SANITIZER_MIN_OSX_VERSION} + -isysroot ${OSX_SDK_DIR} -stdlib=libc++) set(DARWIN_iossim_LINKFLAGS -Wl,-ios_simulator_version_min,7.0.0 -mios-simulator-version-min=7.0 Modified: vendor/compiler-rt/dist/cmake/Modules/AddCompilerRT.cmake ============================================================================== --- vendor/compiler-rt/dist/cmake/Modules/AddCompilerRT.cmake Tue Feb 10 07:35:16 2015 (r278496) +++ vendor/compiler-rt/dist/cmake/Modules/AddCompilerRT.cmake Tue Feb 10 07:45:43 2015 (r278497) @@ -131,10 +131,11 @@ set(COMPILER_RT_GTEST_CFLAGS -I${COMPILER_RT_GTEST_PATH} ) +append_list_if(COMPILER_RT_DEBUG -DSANITIZER_DEBUG=1 COMPILER_RT_TEST_CFLAGS) + if(MSVC) # clang doesn't support exceptions on Windows yet. - list(APPEND COMPILER_RT_TEST_CFLAGS - -D_HAS_EXCEPTIONS=0) + list(APPEND COMPILER_RT_TEST_CFLAGS -D_HAS_EXCEPTIONS=0) # We should teach clang to understand "#pragma intrinsic", see PR19898. list(APPEND COMPILER_RT_TEST_CFLAGS -Wno-undefined-inline) @@ -156,12 +157,20 @@ endif() # using specified link flags. Make executable a part of provided # test_suite. # add_compiler_rt_test( +# SUBDIR # OBJECTS # DEPS # LINK_FLAGS ) macro(add_compiler_rt_test test_suite test_name) - parse_arguments(TEST "OBJECTS;DEPS;LINK_FLAGS" "" ${ARGN}) - set(output_bin "${CMAKE_CURRENT_BINARY_DIR}/${test_name}") + parse_arguments(TEST "SUBDIR;OBJECTS;DEPS;LINK_FLAGS" "" ${ARGN}) + if(TEST_SUBDIR) + set(output_bin "${CMAKE_CURRENT_BINARY_DIR}/${TEST_SUBDIR}/${test_name}") + else() + set(output_bin "${CMAKE_CURRENT_BINARY_DIR}/${test_name}") + endif() + if(MSVC) + set(output_bin "${output_bin}.exe") + endif() # Use host compiler in a standalone build, and just-built Clang otherwise. if(NOT COMPILER_RT_STANDALONE_BUILD) list(APPEND TEST_DEPS clang) Modified: vendor/compiler-rt/dist/cmake/Modules/CompilerRTCompile.cmake ============================================================================== --- vendor/compiler-rt/dist/cmake/Modules/CompilerRTCompile.cmake Tue Feb 10 07:35:16 2015 (r278496) +++ vendor/compiler-rt/dist/cmake/Modules/CompilerRTCompile.cmake Tue Feb 10 07:45:43 2015 (r278497) @@ -9,7 +9,7 @@ macro(clang_compile object_file source) parse_arguments(SOURCE "CFLAGS;DEPS" "" ${ARGN}) get_filename_component(source_rpath ${source} REALPATH) if(NOT COMPILER_RT_STANDALONE_BUILD) - list(APPEND SOURCE_DEPS clang) + list(APPEND SOURCE_DEPS clang compiler-rt-headers) endif() if (TARGET CompilerRTUnitTestCheckCxx) list(APPEND SOURCE_DEPS CompilerRTUnitTestCheckCxx) Modified: vendor/compiler-rt/dist/cmake/config-ix.cmake ============================================================================== --- vendor/compiler-rt/dist/cmake/config-ix.cmake Tue Feb 10 07:35:16 2015 (r278496) +++ vendor/compiler-rt/dist/cmake/config-ix.cmake Tue Feb 10 07:45:43 2015 (r278497) @@ -1,6 +1,7 @@ include(CheckCXXCompilerFlag) include(CheckLibraryExists) include(CheckSymbolExists) +include(TestBigEndian) # CodeGen options. check_cxx_compiler_flag(-fPIC COMPILER_RT_HAS_FPIC_FLAG) @@ -16,6 +17,8 @@ check_cxx_compiler_flag(-ffreestanding check_cxx_compiler_flag("-Werror -fno-function-sections" COMPILER_RT_HAS_FNO_FUNCTION_SECTIONS_FLAG) check_cxx_compiler_flag(-std=c++11 COMPILER_RT_HAS_STD_CXX11_FLAG) check_cxx_compiler_flag(-ftls-model=initial-exec COMPILER_RT_HAS_FTLS_MODEL_INITIAL_EXEC) +check_cxx_compiler_flag(-fno-lto COMPILER_RT_HAS_FNO_LTO_FLAG) +check_cxx_compiler_flag(-msse3 COMPILER_RT_HAS_MSSE3_FLAG) check_cxx_compiler_flag(/GR COMPILER_RT_HAS_GR_FLAG) check_cxx_compiler_flag(/GS COMPILER_RT_HAS_GS_FLAG) @@ -26,7 +29,7 @@ check_cxx_compiler_flag(/Oy COMPILER_RT_ check_cxx_compiler_flag(-gline-tables-only COMPILER_RT_HAS_GLINE_TABLES_ONLY_FLAG) check_cxx_compiler_flag(-g COMPILER_RT_HAS_G_FLAG) check_cxx_compiler_flag(/Zi COMPILER_RT_HAS_Zi_FLAG) - + # Warnings. check_cxx_compiler_flag(-Wall COMPILER_RT_HAS_WALL_FLAG) check_cxx_compiler_flag(-Werror COMPILER_RT_HAS_WERROR_FLAG) @@ -120,6 +123,13 @@ macro(detect_target_arch) endif() endmacro() +# Detect whether the current target platform is 32-bit or 64-bit, and setup +# the correct commandline flags needed to attempt to target 32-bit and 64-bit. +if (NOT CMAKE_SIZEOF_VOID_P EQUAL 4 AND + NOT CMAKE_SIZEOF_VOID_P EQUAL 8) + message(FATAL_ERROR "Please use architecture with 4 or 8 byte pointers.") +endif() + # Generate the COMPILER_RT_SUPPORTED_ARCH list. if(ANDROID) # Can't rely on LLVM_NATIVE_ARCH in cross-compilation. @@ -128,28 +138,34 @@ if(ANDROID) set(COMPILER_RT_OS_SUFFIX "-android") else() if("${LLVM_NATIVE_ARCH}" STREQUAL "X86") - if (NOT MSVC) - test_target_arch(x86_64 ${TARGET_64_BIT_CFLAGS}) + if(NOT MSVC) + test_target_arch(x86_64 "-m64") + test_target_arch(i386 "-m32") + else() + test_target_arch(i386 "") endif() - test_target_arch(i386 ${TARGET_32_BIT_CFLAGS}) elseif("${LLVM_NATIVE_ARCH}" STREQUAL "PowerPC") - test_target_arch(powerpc64 ${TARGET_64_BIT_CFLAGS}) - test_target_arch(powerpc64le ${TARGET_64_BIT_CFLAGS}) + TEST_BIG_ENDIAN(HOST_IS_BIG_ENDIAN) + if(HOST_IS_BIG_ENDIAN) + test_target_arch(powerpc64 "-m64") + else() + test_target_arch(powerpc64le "-m64") + endif() elseif("${LLVM_NATIVE_ARCH}" STREQUAL "Mips") if("${COMPILER_RT_TEST_TARGET_ARCH}" MATCHES "mipsel|mips64el") # regex for mipsel, mips64el - test_target_arch(mipsel ${TARGET_32_BIT_CFLAGS}) - test_target_arch(mips64el ${TARGET_64_BIT_CFLAGS}) + test_target_arch(mipsel "-m32") + test_target_arch(mips64el "-m64") else() - test_target_arch(mips ${TARGET_32_BIT_CFLAGS}) - test_target_arch(mips64 ${TARGET_64_BIT_CFLAGS}) + test_target_arch(mips "-m32") + test_target_arch(mips64 "-m64") endif() elseif("${COMPILER_RT_TEST_TARGET_ARCH}" MATCHES "arm") test_target_arch(arm "-march=armv7-a") elseif("${COMPILER_RT_TEST_TARGET_ARCH}" MATCHES "aarch32") test_target_arch(aarch32 "-march=armv8-a") elseif("${COMPILER_RT_TEST_TARGET_ARCH}" MATCHES "aarch64") - test_target_arch(aarch64 "-march=aarch64") + test_target_arch(aarch64 "-march=armv8-a") endif() set(COMPILER_RT_OS_SUFFIX "") endif() @@ -168,7 +184,16 @@ function(filter_available_targets out_va set(${out_var} ${archs} PARENT_SCOPE) endfunction() -# Arhcitectures supported by compiler-rt libraries. +function(get_target_flags_for_arch arch out_var) + list(FIND COMPILER_RT_SUPPORTED_ARCH ${arch} ARCH_INDEX) + if(ARCH_INDEX EQUAL -1) + message(FATAL_ERROR "Unsupported architecture: ${arch}") + else() + set(${out_var} ${TARGET_${arch}_CFLAGS} PARENT_SCOPE) + endif() +endfunction() + +# Architectures supported by compiler-rt libraries. filter_available_targets(SANITIZER_COMMON_SUPPORTED_ARCH x86_64 i386 i686 powerpc64 powerpc64le arm aarch64 mips mips64 mipsel mips64el) filter_available_targets(ASAN_SUPPORTED_ARCH @@ -183,7 +208,7 @@ filter_available_targets(MSAN_SUPPORTED_ filter_available_targets(PROFILE_SUPPORTED_ARCH x86_64 i386 i686 arm mips mips64 mipsel mips64el aarch64 powerpc64 powerpc64le) filter_available_targets(TSAN_SUPPORTED_ARCH x86_64) -filter_available_targets(UBSAN_SUPPORTED_ARCH x86_64 i386 i686 arm aarch64 mips mipsel) +filter_available_targets(UBSAN_SUPPORTED_ARCH x86_64 i386 i686 arm aarch64 mips mipsel mips64 mips64el) if(ANDROID) set(OS_NAME "Android") @@ -205,6 +230,12 @@ else() set(COMPILER_RT_HAS_ASAN FALSE) endif() +if (OS_NAME MATCHES "Linux|FreeBSD|Windows") + set(COMPILER_RT_ASAN_HAS_STATIC_RUNTIME TRUE) +else() + set(COMPILER_RT_ASAN_HAS_STATIC_RUNTIME FALSE) +endif() + # TODO: Add builtins support. if (COMPILER_RT_HAS_SANITIZER_COMMON AND DFSAN_SUPPORTED_ARCH AND Modified: vendor/compiler-rt/dist/include/CMakeLists.txt ============================================================================== --- vendor/compiler-rt/dist/include/CMakeLists.txt Tue Feb 10 07:35:16 2015 (r278496) +++ vendor/compiler-rt/dist/include/CMakeLists.txt Tue Feb 10 07:45:43 2015 (r278497) @@ -2,6 +2,7 @@ set(SANITIZER_HEADERS sanitizer/allocator_interface.h sanitizer/asan_interface.h sanitizer/common_interface_defs.h + sanitizer/coverage_interface.h sanitizer/dfsan_interface.h sanitizer/linux_syscall_hooks.h sanitizer/lsan_interface.h Modified: vendor/compiler-rt/dist/include/sanitizer/asan_interface.h ============================================================================== --- vendor/compiler-rt/dist/include/sanitizer/asan_interface.h Tue Feb 10 07:35:16 2015 (r278496) +++ vendor/compiler-rt/dist/include/sanitizer/asan_interface.h Tue Feb 10 07:45:43 2015 (r278497) @@ -114,8 +114,7 @@ extern "C" { // Returns the old value. int __asan_set_error_exit_code(int exit_code); - // Sets the callback to be called right before death on error. - // Passing 0 will unset the callback. + // Deprecated. Call __sanitizer_set_death_callback instead. void __asan_set_death_callback(void (*callback)(void)); void __asan_set_error_report_callback(void (*callback)(const char*)); Modified: vendor/compiler-rt/dist/include/sanitizer/common_interface_defs.h ============================================================================== --- vendor/compiler-rt/dist/include/sanitizer/common_interface_defs.h Tue Feb 10 07:35:16 2015 (r278496) +++ vendor/compiler-rt/dist/include/sanitizer/common_interface_defs.h Tue Feb 10 07:45:43 2015 (r278497) @@ -62,18 +62,6 @@ extern "C" { void __sanitizer_unaligned_store32(void *p, uint32_t x); void __sanitizer_unaligned_store64(void *p, uint64_t x); - // Initialize coverage. - void __sanitizer_cov_init(); - // Record and dump coverage info. - void __sanitizer_cov_dump(); - // Open .sancov.packed in the coverage directory and return the file - // descriptor. Returns -1 on failure, or if coverage dumping is disabled. - // This is intended for use by sandboxing code. - intptr_t __sanitizer_maybe_open_cov_file(const char *name); - // Get the number of total unique covered entities (blocks, edges, calls). - // This can be useful for coverage-directed in-process fuzzers. - uintptr_t __sanitizer_get_total_unique_coverage(); - // Annotate the current state of a contiguous container, such as // std::vector, std::string or similar. // A contiguous container is a container that keeps all of its elements @@ -120,6 +108,9 @@ extern "C" { // Print the stack trace leading to this call. Useful for debugging user code. void __sanitizer_print_stack_trace(); + // Sets the callback to be called right before death on error. + // Passing 0 will unset the callback. + void __sanitizer_set_death_callback(void (*callback)(void)); #ifdef __cplusplus } // extern "C" #endif Added: vendor/compiler-rt/dist/include/sanitizer/coverage_interface.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/compiler-rt/dist/include/sanitizer/coverage_interface.h Tue Feb 10 07:45:43 2015 (r278497) @@ -0,0 +1,46 @@ +//===-- sanitizer/coverage_interface.h --------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// Public interface for sanitizer coverage. +//===----------------------------------------------------------------------===// + +#ifndef SANITIZER_COVERAG_INTERFACE_H +#define SANITIZER_COVERAG_INTERFACE_H + +#include + +#ifdef __cplusplus +extern "C" { +#endif + + // Initialize coverage. + void __sanitizer_cov_init(); + // Record and dump coverage info. + void __sanitizer_cov_dump(); + // Open .sancov.packed in the coverage directory and return the file + // descriptor. Returns -1 on failure, or if coverage dumping is disabled. + // This is intended for use by sandboxing code. + intptr_t __sanitizer_maybe_open_cov_file(const char *name); + // Get the number of total unique covered entities (blocks, edges, calls). + // This can be useful for coverage-directed in-process fuzzers. + uintptr_t __sanitizer_get_total_unique_coverage(); + + // Reset the basic-block (edge) coverage to the initial state. + // Useful for in-process fuzzing to start collecting coverage from scratch. + // Experimental, will likely not work for multi-threaded process. + void __sanitizer_reset_coverage(); + // Set *data to the array of covered PCs and return the size of that array. + // Some of the entries in *data will be zero. + uintptr_t __sanitizer_get_coverage_guards(uintptr_t **data); + +#ifdef __cplusplus +} // extern "C" +#endif + +#endif // SANITIZER_COVERAG_INTERFACE_H Modified: vendor/compiler-rt/dist/include/sanitizer/msan_interface.h ============================================================================== --- vendor/compiler-rt/dist/include/sanitizer/msan_interface.h Tue Feb 10 07:35:16 2015 (r278496) +++ vendor/compiler-rt/dist/include/sanitizer/msan_interface.h Tue Feb 10 07:45:43 2015 (r278497) @@ -38,7 +38,9 @@ extern "C" { contents). */ void __msan_unpoison_string(const volatile char *a); - /* Make memory region fully uninitialized (without changing its contents). */ + /* Make memory region fully uninitialized (without changing its contents). + This is a legacy interface that does not update origin information. Use + __msan_allocated_memory() instead. */ void __msan_poison(const volatile void *a, size_t size); /* Make memory region partially uninitialized (without changing its contents). Modified: vendor/compiler-rt/dist/lib/asan/CMakeLists.txt ============================================================================== --- vendor/compiler-rt/dist/lib/asan/CMakeLists.txt Tue Feb 10 07:35:16 2015 (r278496) +++ vendor/compiler-rt/dist/lib/asan/CMakeLists.txt Tue Feb 10 07:45:43 2015 (r278497) @@ -1,10 +1,11 @@ # Build for the AddressSanitizer runtime support library. set(ASAN_SOURCES - asan_allocator2.cc + asan_allocator.cc asan_activation.cc asan_debugging.cc asan_fake_stack.cc + asan_flags.cc asan_globals.cc asan_interceptors.cc asan_linux.cc @@ -64,8 +65,8 @@ if(APPLE) add_compiler_rt_darwin_object_library(RTAsan ${os} ARCH ${ASAN_SUPPORTED_ARCH} SOURCES ${ASAN_SOURCES} ${ASAN_CXX_SOURCES} - CFLAGS ${ASAN_CFLAGS} - DEFS ${ASAN_COMMON_DEFINITIONS}) + CFLAGS ${ASAN_DYNAMIC_CFLAGS} + DEFS ${ASAN_DYNAMIC_DEFINITIONS}) endforeach() else() foreach(arch ${ASAN_SUPPORTED_ARCH}) @@ -78,12 +79,10 @@ else() add_compiler_rt_object_library(RTAsan_preinit ${arch} SOURCES ${ASAN_PREINIT_SOURCES} CFLAGS ${ASAN_CFLAGS} DEFS ${ASAN_COMMON_DEFINITIONS}) - if (COMPILER_RT_BUILD_SHARED_ASAN) - add_compiler_rt_object_library(RTAsan_dynamic ${arch} - SOURCES ${ASAN_SOURCES} ${ASAN_CXX_SOURCES} - CFLAGS ${ASAN_DYNAMIC_CFLAGS} - DEFS ${ASAN_DYNAMIC_DEFINITIONS}) - endif() + add_compiler_rt_object_library(RTAsan_dynamic ${arch} + SOURCES ${ASAN_SOURCES} ${ASAN_CXX_SOURCES} + CFLAGS ${ASAN_DYNAMIC_CFLAGS} + DEFS ${ASAN_DYNAMIC_DEFINITIONS}) endforeach() endif() @@ -97,8 +96,8 @@ if(APPLE) $ $ $ - CFLAGS ${ASAN_CFLAGS} - DEFS ${ASAN_COMMON_DEFINITIONS}) + CFLAGS ${ASAN_DYNAMIC_CFLAGS} + DEFS ${ASAN_DYNAMIC_DEFINITIONS}) add_dependencies(asan clang_rt.asan_${os}_dynamic) endforeach() else() @@ -128,28 +127,25 @@ else() DEFS ${ASAN_COMMON_DEFINITIONS}) add_dependencies(asan clang_rt.asan_cxx-${arch}) - if (COMPILER_RT_BUILD_SHARED_ASAN) - add_compiler_rt_runtime(clang_rt.asan-preinit-${arch} ${arch} STATIC - SOURCES $ - CFLAGS ${ASAN_CFLAGS} - DEFS ${ASAN_COMMON_DEFINITIONS}) - add_dependencies(asan clang_rt.asan-preinit-${arch}) + add_compiler_rt_runtime(clang_rt.asan-preinit-${arch} ${arch} STATIC + SOURCES $ + CFLAGS ${ASAN_CFLAGS} + DEFS ${ASAN_COMMON_DEFINITIONS}) + add_dependencies(asan clang_rt.asan-preinit-${arch}) - if (WIN32) - set(SHARED_ASAN_NAME clang_rt.asan_dynamic-${arch}${COMPILER_RT_OS_SUFFIX}) - else() - set(SHARED_ASAN_NAME clang_rt.asan-${arch}${COMPILER_RT_OS_SUFFIX}) - endif() - - add_compiler_rt_runtime(clang_rt.asan-dynamic-${arch} ${arch} SHARED - OUTPUT_NAME ${SHARED_ASAN_NAME} - SOURCES $ - ${ASAN_COMMON_RUNTIME_OBJECTS} - CFLAGS ${ASAN_DYNAMIC_CFLAGS} - DEFS ${ASAN_DYNAMIC_DEFINITIONS}) - target_link_libraries(clang_rt.asan-dynamic-${arch} ${ASAN_DYNAMIC_LIBS}) - add_dependencies(asan clang_rt.asan-dynamic-${arch}) + if (WIN32) + set(SHARED_ASAN_NAME clang_rt.asan_dynamic-${arch}${COMPILER_RT_OS_SUFFIX}) + else() + set(SHARED_ASAN_NAME clang_rt.asan-${arch}${COMPILER_RT_OS_SUFFIX}) endif() + add_compiler_rt_runtime(clang_rt.asan-dynamic-${arch} ${arch} SHARED + OUTPUT_NAME ${SHARED_ASAN_NAME} + SOURCES $ + ${ASAN_COMMON_RUNTIME_OBJECTS} + CFLAGS ${ASAN_DYNAMIC_CFLAGS} + DEFS ${ASAN_DYNAMIC_DEFINITIONS}) + target_link_libraries(clang_rt.asan-dynamic-${arch} ${ASAN_DYNAMIC_LIBS}) + add_dependencies(asan clang_rt.asan-dynamic-${arch}) if (UNIX AND NOT ${arch} STREQUAL "i386" AND NOT ${arch} STREQUAL "i686") add_sanitizer_rt_symbols(clang_rt.asan_cxx-${arch}) Modified: vendor/compiler-rt/dist/lib/asan/asan_activation.cc ============================================================================== --- vendor/compiler-rt/dist/lib/asan/asan_activation.cc Tue Feb 10 07:35:16 2015 (r278496) +++ vendor/compiler-rt/dist/lib/asan/asan_activation.cc Tue Feb 10 07:45:43 2015 (r278497) @@ -16,40 +16,106 @@ #include "asan_allocator.h" #include "asan_flags.h" #include "asan_internal.h" +#include "asan_poisoning.h" +#include "asan_stack.h" #include "sanitizer_common/sanitizer_flags.h" namespace __asan { static struct AsanDeactivatedFlags { - int quarantine_size; - int max_redzone; + AllocatorOptions allocator_options; int malloc_context_size; bool poison_heap; - bool alloc_dealloc_mismatch; - bool allocator_may_return_null; + bool coverage; + const char *coverage_dir; + + void RegisterActivationFlags(FlagParser *parser, Flags *f, CommonFlags *cf) { +#define ASAN_ACTIVATION_FLAG(Type, Name) \ + RegisterFlag(parser, #Name, "", &f->Name); +#define COMMON_ACTIVATION_FLAG(Type, Name) \ + RegisterFlag(parser, #Name, "", &cf->Name); +#include "asan_activation_flags.inc" +#undef ASAN_ACTIVATION_FLAG +#undef COMMON_ACTIVATION_FLAG + + RegisterIncludeFlag(parser, cf); + } + + void OverrideFromActivationFlags() { + Flags f; + CommonFlags cf; + FlagParser parser; + RegisterActivationFlags(&parser, &f, &cf); + + // Copy the current activation flags. + allocator_options.CopyTo(&f, &cf); + cf.malloc_context_size = malloc_context_size; + f.poison_heap = poison_heap; + cf.coverage = coverage; + cf.coverage_dir = coverage_dir; + cf.verbosity = Verbosity(); + cf.help = false; // this is activation-specific help + + // Check if activation flags need to be overriden. + if (const char *env = GetEnv("ASAN_ACTIVATION_OPTIONS")) { + parser.ParseString(env); + } + + // Override from getprop asan.options. + char buf[100]; + GetExtraActivationFlags(buf, sizeof(buf)); + parser.ParseString(buf); + + SetVerbosity(cf.verbosity); + + if (Verbosity()) ReportUnrecognizedFlags(); + + if (cf.help) parser.PrintFlagDescriptions(); + + allocator_options.SetFrom(&f, &cf); + malloc_context_size = cf.malloc_context_size; + poison_heap = f.poison_heap; + coverage = cf.coverage; + coverage_dir = cf.coverage_dir; + } + + void Print() { + Report( + "quarantine_size_mb %d, max_redzone %d, poison_heap %d, " + "malloc_context_size %d, alloc_dealloc_mismatch %d, " + "allocator_may_return_null %d, coverage %d, coverage_dir %s\n", + allocator_options.quarantine_size_mb, allocator_options.max_redzone, + poison_heap, malloc_context_size, + allocator_options.alloc_dealloc_mismatch, + allocator_options.may_return_null, coverage, coverage_dir); + } } asan_deactivated_flags; static bool asan_is_deactivated; -void AsanStartDeactivated() { +void AsanDeactivate() { + CHECK(!asan_is_deactivated); VReport(1, "Deactivating ASan\n"); - // Save flag values. - asan_deactivated_flags.quarantine_size = flags()->quarantine_size; - asan_deactivated_flags.max_redzone = flags()->max_redzone; - asan_deactivated_flags.poison_heap = flags()->poison_heap; - asan_deactivated_flags.malloc_context_size = - common_flags()->malloc_context_size; - asan_deactivated_flags.alloc_dealloc_mismatch = - flags()->alloc_dealloc_mismatch; - asan_deactivated_flags.allocator_may_return_null = - common_flags()->allocator_may_return_null; - - flags()->quarantine_size = 0; - flags()->max_redzone = 16; - flags()->poison_heap = false; - common_flags()->malloc_context_size = 0; - flags()->alloc_dealloc_mismatch = false; - common_flags()->allocator_may_return_null = true; + + // Stash runtime state. + GetAllocatorOptions(&asan_deactivated_flags.allocator_options); + asan_deactivated_flags.malloc_context_size = GetMallocContextSize(); + asan_deactivated_flags.poison_heap = CanPoisonMemory(); + asan_deactivated_flags.coverage = common_flags()->coverage; + asan_deactivated_flags.coverage_dir = common_flags()->coverage_dir; + + // Deactivate the runtime. + SetCanPoisonMemory(false); + SetMallocContextSize(1); + ReInitializeCoverage(false, nullptr); + + AllocatorOptions disabled = asan_deactivated_flags.allocator_options; + disabled.quarantine_size_mb = 0; + disabled.min_redzone = 16; // Redzone must be at least 16 bytes long. + disabled.max_redzone = 16; + disabled.alloc_dealloc_mismatch = false; + disabled.may_return_null = true; + ReInitializeAllocator(disabled); asan_is_deactivated = true; } @@ -58,31 +124,19 @@ void AsanActivate() { if (!asan_is_deactivated) return; VReport(1, "Activating ASan\n"); - // Restore flag values. - // FIXME: this is not atomic, and there may be other threads alive. - flags()->quarantine_size = asan_deactivated_flags.quarantine_size; - flags()->max_redzone = asan_deactivated_flags.max_redzone; - flags()->poison_heap = asan_deactivated_flags.poison_heap; - common_flags()->malloc_context_size = - asan_deactivated_flags.malloc_context_size; - flags()->alloc_dealloc_mismatch = - asan_deactivated_flags.alloc_dealloc_mismatch; - common_flags()->allocator_may_return_null = - asan_deactivated_flags.allocator_may_return_null; - - ParseExtraActivationFlags(); + asan_deactivated_flags.OverrideFromActivationFlags(); - ReInitializeAllocator(); + SetCanPoisonMemory(asan_deactivated_flags.poison_heap); + SetMallocContextSize(asan_deactivated_flags.malloc_context_size); + ReInitializeCoverage(asan_deactivated_flags.coverage, + asan_deactivated_flags.coverage_dir); + ReInitializeAllocator(asan_deactivated_flags.allocator_options); asan_is_deactivated = false; - VReport( - 1, - "quarantine_size %d, max_redzone %d, poison_heap %d, " - "malloc_context_size %d, alloc_dealloc_mismatch %d, " - "allocator_may_return_null %d\n", - flags()->quarantine_size, flags()->max_redzone, flags()->poison_heap, - common_flags()->malloc_context_size, flags()->alloc_dealloc_mismatch, - common_flags()->allocator_may_return_null); + if (Verbosity()) { + Report("Activated with flags:\n"); + asan_deactivated_flags.Print(); + } } } // namespace __asan Modified: vendor/compiler-rt/dist/lib/asan/asan_activation.h ============================================================================== --- vendor/compiler-rt/dist/lib/asan/asan_activation.h Tue Feb 10 07:35:16 2015 (r278496) +++ vendor/compiler-rt/dist/lib/asan/asan_activation.h Tue Feb 10 07:45:43 2015 (r278497) @@ -16,7 +16,7 @@ #define ASAN_ACTIVATION_H namespace __asan { -void AsanStartDeactivated(); +void AsanDeactivate(); void AsanActivate(); } // namespace __asan Added: vendor/compiler-rt/dist/lib/asan/asan_activation_flags.inc ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/compiler-rt/dist/lib/asan/asan_activation_flags.inc Tue Feb 10 07:45:43 2015 (r278497) @@ -0,0 +1,35 @@ +//===-- asan_activation_flags.inc -------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// A subset of ASan (and common) runtime flags supported at activation time. +// +//===----------------------------------------------------------------------===// +#ifndef ASAN_ACTIVATION_FLAG +# error "Define ASAN_ACTIVATION_FLAG prior to including this file!" +#endif + +#ifndef COMMON_ACTIVATION_FLAG +# error "Define COMMON_ACTIVATION_FLAG prior to including this file!" +#endif + +// ASAN_ACTIVATION_FLAG(Type, Name) +// See COMMON_FLAG in sanitizer_flags.inc for more details. + +ASAN_ACTIVATION_FLAG(int, redzone) +ASAN_ACTIVATION_FLAG(int, max_redzone) +ASAN_ACTIVATION_FLAG(int, quarantine_size_mb) +ASAN_ACTIVATION_FLAG(bool, alloc_dealloc_mismatch) +ASAN_ACTIVATION_FLAG(bool, poison_heap) + +COMMON_ACTIVATION_FLAG(bool, allocator_may_return_null) +COMMON_ACTIVATION_FLAG(int, malloc_context_size) +COMMON_ACTIVATION_FLAG(bool, coverage) +COMMON_ACTIVATION_FLAG(const char *, coverage_dir) +COMMON_ACTIVATION_FLAG(int, verbosity) +COMMON_ACTIVATION_FLAG(bool, help) Added: vendor/compiler-rt/dist/lib/asan/asan_allocator.cc ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/compiler-rt/dist/lib/asan/asan_allocator.cc Tue Feb 10 07:45:43 2015 (r278497) @@ -0,0 +1,909 @@ +//===-- asan_allocator.cc -------------------------------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// This file is a part of AddressSanitizer, an address sanity checker. +// +// Implementation of ASan's memory allocator, 2-nd version. +// This variant uses the allocator from sanitizer_common, i.e. the one shared +// with ThreadSanitizer and MemorySanitizer. +// +//===----------------------------------------------------------------------===// +#include "asan_allocator.h" + +#include "asan_mapping.h" +#include "asan_poisoning.h" +#include "asan_report.h" +#include "asan_stack.h" +#include "asan_thread.h" +#include "sanitizer_common/sanitizer_allocator_interface.h" +#include "sanitizer_common/sanitizer_flags.h" +#include "sanitizer_common/sanitizer_internal_defs.h" +#include "sanitizer_common/sanitizer_list.h" +#include "sanitizer_common/sanitizer_stackdepot.h" +#include "sanitizer_common/sanitizer_quarantine.h" +#include "lsan/lsan_common.h" + +namespace __asan { + +// Valid redzone sizes are 16, 32, 64, ... 2048, so we encode them in 3 bits. +// We use adaptive redzones: for larger allocation larger redzones are used. +static u32 RZLog2Size(u32 rz_log) { + CHECK_LT(rz_log, 8); + return 16 << rz_log; +} + +static u32 RZSize2Log(u32 rz_size) { + CHECK_GE(rz_size, 16); + CHECK_LE(rz_size, 2048); + CHECK(IsPowerOfTwo(rz_size)); + u32 res = Log2(rz_size) - 4; + CHECK_EQ(rz_size, RZLog2Size(res)); + return res; +} + +static AsanAllocator &get_allocator(); + +// The memory chunk allocated from the underlying allocator looks like this: +// L L L L L L H H U U U U U U R R +// L -- left redzone words (0 or more bytes) +// H -- ChunkHeader (16 bytes), which is also a part of the left redzone. +// U -- user memory. +// R -- right redzone (0 or more bytes) +// ChunkBase consists of ChunkHeader and other bytes that overlap with user +// memory. + +// If the left redzone is greater than the ChunkHeader size we store a magic +// value in the first uptr word of the memory block and store the address of +// ChunkBase in the next uptr. +// M B L L L L L L L L L H H U U U U U U +// | ^ +// ---------------------| +// M -- magic value kAllocBegMagic +// B -- address of ChunkHeader pointing to the first 'H' +static const uptr kAllocBegMagic = 0xCC6E96B9; + +struct ChunkHeader { + // 1-st 8 bytes. + u32 chunk_state : 8; // Must be first. + u32 alloc_tid : 24; + + u32 free_tid : 24; + u32 from_memalign : 1; + u32 alloc_type : 2; + u32 rz_log : 3; + u32 lsan_tag : 2; + // 2-nd 8 bytes + // This field is used for small sizes. For large sizes it is equal to + // SizeClassMap::kMaxSize and the actual size is stored in the + // SecondaryAllocator's metadata. + u32 user_requested_size; + u32 alloc_context_id; +}; + +struct ChunkBase : ChunkHeader { + // Header2, intersects with user memory. + u32 free_context_id; +}; + +static const uptr kChunkHeaderSize = sizeof(ChunkHeader); +static const uptr kChunkHeader2Size = sizeof(ChunkBase) - kChunkHeaderSize; +COMPILER_CHECK(kChunkHeaderSize == 16); +COMPILER_CHECK(kChunkHeader2Size <= 16); + +// Every chunk of memory allocated by this allocator can be in one of 3 states: +// CHUNK_AVAILABLE: the chunk is in the free list and ready to be allocated. +// CHUNK_ALLOCATED: the chunk is allocated and not yet freed. +// CHUNK_QUARANTINE: the chunk was freed and put into quarantine zone. +enum { + CHUNK_AVAILABLE = 0, // 0 is the default value even if we didn't set it. + CHUNK_ALLOCATED = 2, + CHUNK_QUARANTINE = 3 +}; + +struct AsanChunk: ChunkBase { + uptr Beg() { return reinterpret_cast(this) + kChunkHeaderSize; } + uptr UsedSize(bool locked_version = false) { + if (user_requested_size != SizeClassMap::kMaxSize) + return user_requested_size; + return *reinterpret_cast( + get_allocator().GetMetaData(AllocBeg(locked_version))); + } + void *AllocBeg(bool locked_version = false) { + if (from_memalign) { + if (locked_version) + return get_allocator().GetBlockBeginFastLocked( + reinterpret_cast(this)); + return get_allocator().GetBlockBegin(reinterpret_cast(this)); + } + return reinterpret_cast(Beg() - RZLog2Size(rz_log)); + } + bool AddrIsInside(uptr addr, bool locked_version = false) { + return (addr >= Beg()) && (addr < Beg() + UsedSize(locked_version)); + } +}; + +struct QuarantineCallback { + explicit QuarantineCallback(AllocatorCache *cache) + : cache_(cache) { + } + + void Recycle(AsanChunk *m) { + CHECK_EQ(m->chunk_state, CHUNK_QUARANTINE); + atomic_store((atomic_uint8_t*)m, CHUNK_AVAILABLE, memory_order_relaxed); + CHECK_NE(m->alloc_tid, kInvalidTid); + CHECK_NE(m->free_tid, kInvalidTid); + PoisonShadow(m->Beg(), + RoundUpTo(m->UsedSize(), SHADOW_GRANULARITY), + kAsanHeapLeftRedzoneMagic); + void *p = reinterpret_cast(m->AllocBeg()); + if (p != m) { + uptr *alloc_magic = reinterpret_cast(p); + CHECK_EQ(alloc_magic[0], kAllocBegMagic); + // Clear the magic value, as allocator internals may overwrite the + // contents of deallocated chunk, confusing GetAsanChunk lookup. + alloc_magic[0] = 0; + CHECK_EQ(alloc_magic[1], reinterpret_cast(m)); + } + + // Statistics. + AsanStats &thread_stats = GetCurrentThreadStats(); + thread_stats.real_frees++; + thread_stats.really_freed += m->UsedSize(); + + get_allocator().Deallocate(cache_, p); + } + + void *Allocate(uptr size) { + return get_allocator().Allocate(cache_, size, 1, false); + } + + void Deallocate(void *p) { + get_allocator().Deallocate(cache_, p); + } + + AllocatorCache *cache_; +}; + +typedef Quarantine AsanQuarantine; +typedef AsanQuarantine::Cache QuarantineCache; + +void AsanMapUnmapCallback::OnMap(uptr p, uptr size) const { + PoisonShadow(p, size, kAsanHeapLeftRedzoneMagic); + // Statistics. + AsanStats &thread_stats = GetCurrentThreadStats(); + thread_stats.mmaps++; + thread_stats.mmaped += size; +} +void AsanMapUnmapCallback::OnUnmap(uptr p, uptr size) const { + PoisonShadow(p, size, 0); + // We are about to unmap a chunk of user memory. + // Mark the corresponding shadow memory as not needed. + FlushUnneededASanShadowMemory(p, size); + // Statistics. + AsanStats &thread_stats = GetCurrentThreadStats(); + thread_stats.munmaps++; + thread_stats.munmaped += size; +} + +// We can not use THREADLOCAL because it is not supported on some of the +// platforms we care about (OSX 10.6, Android). +// static THREADLOCAL AllocatorCache cache; +AllocatorCache *GetAllocatorCache(AsanThreadLocalMallocStorage *ms) { + CHECK(ms); + return &ms->allocator_cache; +} + +QuarantineCache *GetQuarantineCache(AsanThreadLocalMallocStorage *ms) { + CHECK(ms); + CHECK_LE(sizeof(QuarantineCache), sizeof(ms->quarantine_cache)); + return reinterpret_cast(ms->quarantine_cache); +} + +void AllocatorOptions::SetFrom(const Flags *f, const CommonFlags *cf) { + quarantine_size_mb = f->quarantine_size_mb; + min_redzone = f->redzone; + max_redzone = f->max_redzone; + may_return_null = cf->allocator_may_return_null; + alloc_dealloc_mismatch = f->alloc_dealloc_mismatch; +} + +void AllocatorOptions::CopyTo(Flags *f, CommonFlags *cf) { + f->quarantine_size_mb = quarantine_size_mb; + f->redzone = min_redzone; + f->max_redzone = max_redzone; + cf->allocator_may_return_null = may_return_null; + f->alloc_dealloc_mismatch = alloc_dealloc_mismatch; +} + +struct Allocator { + static const uptr kMaxAllowedMallocSize = + FIRST_32_SECOND_64(3UL << 30, 64UL << 30); + static const uptr kMaxThreadLocalQuarantine = + FIRST_32_SECOND_64(1 << 18, 1 << 20); + + AsanAllocator allocator; + AsanQuarantine quarantine; + StaticSpinMutex fallback_mutex; + AllocatorCache fallback_allocator_cache; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-vendor@FreeBSD.ORG Tue Feb 10 07:46:26 2015 Return-Path: Delivered-To: svn-src-vendor@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C1A7F46E; Tue, 10 Feb 2015 07:46:26 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 92F8912D; Tue, 10 Feb 2015 07:46:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1A7kQjW040028; Tue, 10 Feb 2015 07:46:26 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1A7kQ6C040027; Tue, 10 Feb 2015 07:46:26 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201502100746.t1A7kQ6C040027@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Tue, 10 Feb 2015 07:46:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r278498 - vendor/compiler-rt/compiler-rt-r228651 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Feb 2015 07:46:26 -0000 Author: dim Date: Tue Feb 10 07:46:25 2015 New Revision: 278498 URL: https://svnweb.freebsd.org/changeset/base/278498 Log: Tag compiler-rt trunk r228651. Added: vendor/compiler-rt/compiler-rt-r228651/ - copied from r278497, vendor/compiler-rt/dist/ From owner-svn-src-vendor@FreeBSD.ORG Sat Feb 14 12:17:51 2015 Return-Path: Delivered-To: svn-src-vendor@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4B7903B1; Sat, 14 Feb 2015 12:17:51 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 323BE9E8; Sat, 14 Feb 2015 12:17:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1ECHpk3023663; Sat, 14 Feb 2015 12:17:51 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1ECHhdX023572; Sat, 14 Feb 2015 12:17:43 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201502141217.t1ECHhdX023572@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 14 Feb 2015 12:17:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r278752 - in vendor/llvm/dist: cmake/modules docs include/llvm/CodeGen include/llvm/IR lib/Analysis lib/Analysis/IPA lib/Bitcode/Reader lib/CodeGen lib/CodeGen/AsmPrinter lib/CodeGen/Se... X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Feb 2015 12:17:51 -0000 Author: dim Date: Sat Feb 14 12:17:42 2015 New Revision: 278752 URL: https://svnweb.freebsd.org/changeset/base/278752 Log: Vendor import of llvm RELEASE_360/rc3 tag r229040 (effectively, 3.6.0 RC3): https://llvm.org/svn/llvm-project/llvm/tags/RELEASE_360/rc3@229040 Added: vendor/llvm/dist/test/Bindings/llvm-c/Inputs/ vendor/llvm/dist/test/Bindings/llvm-c/Inputs/invalid.ll.bc (contents, props changed) vendor/llvm/dist/test/Bindings/llvm-c/invalid-bitcode.test vendor/llvm/dist/test/CodeGen/AArch64/setcc-type-mismatch.ll vendor/llvm/dist/test/CodeGen/ARM/setcc-type-mismatch.ll vendor/llvm/dist/test/CodeGen/PowerPC/vsel-prom.ll vendor/llvm/dist/test/CodeGen/R600/endcf-loop-header.ll vendor/llvm/dist/test/CodeGen/R600/tti-unroll-prefs.ll vendor/llvm/dist/test/CodeGen/X86/constant-combines.ll vendor/llvm/dist/test/CodeGen/X86/sse-unaligned-mem-feature.ll vendor/llvm/dist/test/DebugInfo/location-verifier.ll vendor/llvm/dist/test/Linker/distinct-cycles.ll vendor/llvm/dist/test/MC/ARM/pr22395-2.s (contents, props changed) vendor/llvm/dist/test/Transforms/Inline/inline-indirect.ll vendor/llvm/dist/test/Transforms/MemCpyOpt/callslot_aa.ll vendor/llvm/dist/test/Transforms/SLPVectorizer/X86/bad_types.ll vendor/llvm/dist/test/Transforms/Util/combine-alias-scope-metadata.ll vendor/llvm/dist/test/tools/gold/no-map-whole-file.ll Deleted: vendor/llvm/dist/test/CodeGen/ARM/vector-load.ll vendor/llvm/dist/test/CodeGen/ARM/vector-store.ll vendor/llvm/dist/test/CodeGen/X86/2010-01-07-UAMemFeature.ll vendor/llvm/dist/test/CodeGen/X86/seh-basic.ll vendor/llvm/dist/test/CodeGen/X86/seh-safe-div.ll Modified: vendor/llvm/dist/cmake/modules/AddLLVM.cmake vendor/llvm/dist/docs/ReleaseNotes.rst vendor/llvm/dist/include/llvm/CodeGen/MachineModuleInfo.h vendor/llvm/dist/include/llvm/CodeGen/RegAllocPBQP.h vendor/llvm/dist/include/llvm/IR/Metadata.h vendor/llvm/dist/lib/Analysis/IPA/InlineCost.cpp vendor/llvm/dist/lib/Analysis/TypeBasedAliasAnalysis.cpp vendor/llvm/dist/lib/Bitcode/Reader/BitReader.cpp vendor/llvm/dist/lib/CodeGen/AsmPrinter/EHStreamer.cpp vendor/llvm/dist/lib/CodeGen/AsmPrinter/EHStreamer.h vendor/llvm/dist/lib/CodeGen/AsmPrinter/Win64Exception.cpp vendor/llvm/dist/lib/CodeGen/AsmPrinter/Win64Exception.h vendor/llvm/dist/lib/CodeGen/MachineModuleInfo.cpp vendor/llvm/dist/lib/CodeGen/Passes.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/DAGCombiner.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h vendor/llvm/dist/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp vendor/llvm/dist/lib/IR/DebugInfo.cpp vendor/llvm/dist/lib/IR/Metadata.cpp vendor/llvm/dist/lib/IR/Type.cpp vendor/llvm/dist/lib/MC/MCSectionCOFF.cpp vendor/llvm/dist/lib/MC/WinCOFFObjectWriter.cpp vendor/llvm/dist/lib/Support/regcomp.c vendor/llvm/dist/lib/Target/AArch64/AArch64ISelLowering.cpp vendor/llvm/dist/lib/Target/ARM/ARMBaseInstrInfo.cpp vendor/llvm/dist/lib/Target/ARM/ARMISelLowering.cpp vendor/llvm/dist/lib/Target/ARM/AsmParser/ARMAsmParser.cpp vendor/llvm/dist/lib/Target/PowerPC/PPCInstrInfo.td vendor/llvm/dist/lib/Target/R600/AMDGPUTargetTransformInfo.cpp vendor/llvm/dist/lib/Target/R600/SIAnnotateControlFlow.cpp vendor/llvm/dist/lib/Target/R600/SIRegisterInfo.cpp vendor/llvm/dist/lib/Target/X86/X86.td vendor/llvm/dist/lib/Target/X86/X86AsmPrinter.cpp vendor/llvm/dist/lib/Target/X86/X86ISelLowering.cpp vendor/llvm/dist/lib/Target/X86/X86InstrFragmentsSIMD.td vendor/llvm/dist/lib/Target/X86/X86Subtarget.cpp vendor/llvm/dist/lib/Target/X86/X86Subtarget.h vendor/llvm/dist/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp vendor/llvm/dist/lib/Transforms/Instrumentation/AddressSanitizer.cpp vendor/llvm/dist/lib/Transforms/Instrumentation/InstrProfiling.cpp vendor/llvm/dist/lib/Transforms/Instrumentation/MemorySanitizer.cpp vendor/llvm/dist/lib/Transforms/Scalar/EarlyCSE.cpp vendor/llvm/dist/lib/Transforms/Scalar/MemCpyOptimizer.cpp vendor/llvm/dist/lib/Transforms/Utils/Local.cpp vendor/llvm/dist/lib/Transforms/Utils/ValueMapper.cpp vendor/llvm/dist/lib/Transforms/Vectorize/SLPVectorizer.cpp vendor/llvm/dist/test/CodeGen/ARM/Windows/read-only-data.ll vendor/llvm/dist/test/CodeGen/ARM/Windows/structors.ll vendor/llvm/dist/test/CodeGen/ARM/alloc-no-stack-realign.ll vendor/llvm/dist/test/CodeGen/ARM/memcpy-inline.ll vendor/llvm/dist/test/CodeGen/ARM/sub-cmp-peephole.ll vendor/llvm/dist/test/CodeGen/X86/coff-comdat.ll vendor/llvm/dist/test/CodeGen/X86/dllexport-x86_64.ll vendor/llvm/dist/test/CodeGen/X86/dllexport.ll vendor/llvm/dist/test/CodeGen/X86/fold-vex.ll vendor/llvm/dist/test/CodeGen/X86/global-sections.ll vendor/llvm/dist/test/CodeGen/X86/pr15267.ll vendor/llvm/dist/test/CodeGen/X86/pshufb-mask-comments.ll vendor/llvm/dist/test/CodeGen/X86/win_cst_pool.ll vendor/llvm/dist/test/DebugInfo/COFF/asm.ll vendor/llvm/dist/test/DebugInfo/COFF/multifile.ll vendor/llvm/dist/test/DebugInfo/COFF/multifunction.ll vendor/llvm/dist/test/DebugInfo/COFF/simple.ll vendor/llvm/dist/test/DebugInfo/COFF/tail-call-without-lexical-scopes.ll vendor/llvm/dist/test/DebugInfo/X86/coff_debug_info_type.ll vendor/llvm/dist/test/Instrumentation/MemorySanitizer/atomics.ll vendor/llvm/dist/test/MC/COFF/bss_section.ll vendor/llvm/dist/test/MC/COFF/const-gv-with-rel-init.ll vendor/llvm/dist/test/MC/COFF/diff.s vendor/llvm/dist/test/MC/COFF/global_ctors_dtors.ll vendor/llvm/dist/test/MC/COFF/initialised-data.ll vendor/llvm/dist/test/MC/COFF/section-passthru-flags.s vendor/llvm/dist/test/MC/COFF/weak-symbol.ll vendor/llvm/dist/test/Transforms/EarlyCSE/basic.ll vendor/llvm/dist/test/Transforms/InstCombine/loadstore-metadata.ll vendor/llvm/dist/test/Transforms/LoopStrengthReduce/ARM/ivchain-ARM.ll vendor/llvm/dist/tools/gold/gold-plugin.cpp Modified: vendor/llvm/dist/cmake/modules/AddLLVM.cmake ============================================================================== --- vendor/llvm/dist/cmake/modules/AddLLVM.cmake Sat Feb 14 11:47:40 2015 (r278751) +++ vendor/llvm/dist/cmake/modules/AddLLVM.cmake Sat Feb 14 12:17:42 2015 (r278752) @@ -334,11 +334,6 @@ function(llvm_add_library name) PREFIX "" ) endif() - if (MSVC) - set_target_properties(${name} - PROPERTIES - IMPORT_SUFFIX ".imp") - endif () endif() if(ARG_MODULE OR ARG_SHARED) Modified: vendor/llvm/dist/docs/ReleaseNotes.rst ============================================================================== --- vendor/llvm/dist/docs/ReleaseNotes.rst Sat Feb 14 11:47:40 2015 (r278751) +++ vendor/llvm/dist/docs/ReleaseNotes.rst Sat Feb 14 12:17:42 2015 (r278752) @@ -391,7 +391,8 @@ During this release the MIPS target has compiler has gained support for MIPS-II and MIPS-III; become ABI-compatible with GCC for big and little endian O32, N32, and N64; and is now able to compile the Linux kernel for 32-bit targets. Additionally, LLD now supports -microMIPS for the O32 ABI on little endian targets. +microMIPS for the O32 ABI on little endian targets, and code generation for +microMIPS is almost completely passing the test-suite. ABI ^^^ Modified: vendor/llvm/dist/include/llvm/CodeGen/MachineModuleInfo.h ============================================================================== --- vendor/llvm/dist/include/llvm/CodeGen/MachineModuleInfo.h Sat Feb 14 11:47:40 2015 (r278751) +++ vendor/llvm/dist/include/llvm/CodeGen/MachineModuleInfo.h Sat Feb 14 12:17:42 2015 (r278752) @@ -66,7 +66,6 @@ struct LandingPadInfo { MachineBasicBlock *LandingPadBlock; // Landing pad block. SmallVector BeginLabels; // Labels prior to invoke. SmallVector EndLabels; // Labels after invoke. - SmallVector ClauseLabels; // Labels for each clause. MCSymbol *LandingPadLabel; // Label at beginning of landing pad. const Function *Personality; // Personality function. std::vector TypeIds; // List of type ids (filters negative) @@ -331,11 +330,6 @@ public: /// void addCleanup(MachineBasicBlock *LandingPad); - /// Add a clause for a landing pad. Returns a new label for the clause. This - /// is used by EH schemes that have more than one landing pad. In this case, - /// each clause gets its own basic block. - MCSymbol *addClauseForLandingPad(MachineBasicBlock *LandingPad); - /// getTypeIDFor - Return the type id for the specified typeinfo. This is /// function wide. unsigned getTypeIDFor(const GlobalValue *TI); Modified: vendor/llvm/dist/include/llvm/CodeGen/RegAllocPBQP.h ============================================================================== --- vendor/llvm/dist/include/llvm/CodeGen/RegAllocPBQP.h Sat Feb 14 11:47:40 2015 (r278751) +++ vendor/llvm/dist/include/llvm/CodeGen/RegAllocPBQP.h Sat Feb 14 12:17:42 2015 (r278752) @@ -248,7 +248,7 @@ public: void setReductionState(ReductionState RS) { this->RS = RS; } void handleAddEdge(const MatrixMetadata& MD, bool Transpose) { - DeniedOpts += Transpose ? MD.getWorstCol() : MD.getWorstRow(); + DeniedOpts += Transpose ? MD.getWorstRow() : MD.getWorstCol(); const bool* UnsafeOpts = Transpose ? MD.getUnsafeCols() : MD.getUnsafeRows(); for (unsigned i = 0; i < NumOpts; ++i) @@ -256,7 +256,7 @@ public: } void handleRemoveEdge(const MatrixMetadata& MD, bool Transpose) { - DeniedOpts -= Transpose ? MD.getWorstCol() : MD.getWorstRow(); + DeniedOpts -= Transpose ? MD.getWorstRow() : MD.getWorstCol(); const bool* UnsafeOpts = Transpose ? MD.getUnsafeCols() : MD.getUnsafeRows(); for (unsigned i = 0; i < NumOpts; ++i) Modified: vendor/llvm/dist/include/llvm/IR/Metadata.h ============================================================================== --- vendor/llvm/dist/include/llvm/IR/Metadata.h Sat Feb 14 11:47:40 2015 (r278751) +++ vendor/llvm/dist/include/llvm/IR/Metadata.h Sat Feb 14 12:17:42 2015 (r278752) @@ -693,6 +693,7 @@ public: static AAMDNodes getMostGenericAA(const AAMDNodes &A, const AAMDNodes &B); static MDNode *getMostGenericFPMath(MDNode *A, MDNode *B); static MDNode *getMostGenericRange(MDNode *A, MDNode *B); + static MDNode *getMostGenericAliasScope(MDNode *A, MDNode *B); }; /// \brief Uniquable metadata node. Modified: vendor/llvm/dist/lib/Analysis/IPA/InlineCost.cpp ============================================================================== --- vendor/llvm/dist/lib/Analysis/IPA/InlineCost.cpp Sat Feb 14 11:47:40 2015 (r278751) +++ vendor/llvm/dist/lib/Analysis/IPA/InlineCost.cpp Sat Feb 14 12:17:42 2015 (r278752) @@ -52,7 +52,7 @@ class CallAnalyzer : public InstVisitor< const TargetTransformInfo &TTI; /// The cache of @llvm.assume intrinsics. - AssumptionCache &AC; + AssumptionCacheTracker *ACT; // The called function. Function &F; @@ -146,8 +146,8 @@ class CallAnalyzer : public InstVisitor< public: CallAnalyzer(const DataLayout *DL, const TargetTransformInfo &TTI, - AssumptionCache &AC, Function &Callee, int Threshold) - : DL(DL), TTI(TTI), AC(AC), F(Callee), Threshold(Threshold), Cost(0), + AssumptionCacheTracker *ACT, Function &Callee, int Threshold) + : DL(DL), TTI(TTI), ACT(ACT), F(Callee), Threshold(Threshold), Cost(0), IsCallerRecursive(false), IsRecursiveCall(false), ExposesReturnsTwice(false), HasDynamicAlloca(false), ContainsNoDuplicateCall(false), HasReturn(false), HasIndirectBr(false), @@ -783,7 +783,7 @@ bool CallAnalyzer::visitCallSite(CallSit // during devirtualization and so we want to give it a hefty bonus for // inlining, but cap that bonus in the event that inlining wouldn't pan // out. Pretend to inline the function, with a custom threshold. - CallAnalyzer CA(DL, TTI, AC, *F, InlineConstants::IndirectCallThreshold); + CallAnalyzer CA(DL, TTI, ACT, *F, InlineConstants::IndirectCallThreshold); if (CA.analyzeCall(CS)) { // We were able to inline the indirect call! Subtract the cost from the // bonus we want to apply, but don't go below zero. @@ -1110,7 +1110,7 @@ bool CallAnalyzer::analyzeCall(CallSite // the ephemeral values multiple times (and they're completely determined by // the callee, so this is purely duplicate work). SmallPtrSet EphValues; - CodeMetrics::collectEphemeralValues(&F, &AC, EphValues); + CodeMetrics::collectEphemeralValues(&F, &ACT->getAssumptionCache(F), EphValues); // The worklist of live basic blocks in the callee *after* inlining. We avoid // adding basic blocks of the callee which can be proven to be dead for this @@ -1310,7 +1310,7 @@ InlineCost InlineCostAnalysis::getInline << "...\n"); CallAnalyzer CA(Callee->getDataLayout(), *TTI, - ACT->getAssumptionCache(*Callee), *Callee, Threshold); + ACT, *Callee, Threshold); bool ShouldInline = CA.analyzeCall(CS); DEBUG(CA.dump()); Modified: vendor/llvm/dist/lib/Analysis/TypeBasedAliasAnalysis.cpp ============================================================================== --- vendor/llvm/dist/lib/Analysis/TypeBasedAliasAnalysis.cpp Sat Feb 14 11:47:40 2015 (r278751) +++ vendor/llvm/dist/lib/Analysis/TypeBasedAliasAnalysis.cpp Sat Feb 14 12:17:42 2015 (r278752) @@ -623,8 +623,8 @@ void Instruction::getAAMetadata(AAMDNode N.TBAA = getMetadata(LLVMContext::MD_tbaa); if (Merge) - N.Scope = - MDNode::intersect(N.Scope, getMetadata(LLVMContext::MD_alias_scope)); + N.Scope = MDNode::getMostGenericAliasScope( + N.Scope, getMetadata(LLVMContext::MD_alias_scope)); else N.Scope = getMetadata(LLVMContext::MD_alias_scope); Modified: vendor/llvm/dist/lib/Bitcode/Reader/BitReader.cpp ============================================================================== --- vendor/llvm/dist/lib/Bitcode/Reader/BitReader.cpp Sat Feb 14 11:47:40 2015 (r278751) +++ vendor/llvm/dist/lib/Bitcode/Reader/BitReader.cpp Sat Feb 14 12:17:42 2015 (r278752) @@ -9,9 +9,11 @@ #include "llvm-c/BitReader.h" #include "llvm/Bitcode/ReaderWriter.h" +#include "llvm/IR/DiagnosticPrinter.h" #include "llvm/IR/LLVMContext.h" #include "llvm/IR/Module.h" #include "llvm/Support/MemoryBuffer.h" +#include "llvm/Support/raw_ostream.h" #include #include @@ -30,11 +32,20 @@ LLVMBool LLVMParseBitcodeInContext(LLVMC LLVMMemoryBufferRef MemBuf, LLVMModuleRef *OutModule, char **OutMessage) { - ErrorOr ModuleOrErr = - parseBitcodeFile(unwrap(MemBuf)->getMemBufferRef(), *unwrap(ContextRef)); - if (std::error_code EC = ModuleOrErr.getError()) { - if (OutMessage) - *OutMessage = strdup(EC.message().c_str()); + MemoryBufferRef Buf = unwrap(MemBuf)->getMemBufferRef(); + LLVMContext &Ctx = *unwrap(ContextRef); + + std::string Message; + raw_string_ostream Stream(Message); + DiagnosticPrinterRawOStream DP(Stream); + + ErrorOr ModuleOrErr = parseBitcodeFile( + Buf, Ctx, [&](const DiagnosticInfo &DI) { DI.print(DP); }); + if (ModuleOrErr.getError()) { + if (OutMessage) { + Stream.flush(); + *OutMessage = strdup(Message.c_str()); + } *OutModule = wrap((Module*)nullptr); return 1; } Modified: vendor/llvm/dist/lib/CodeGen/AsmPrinter/EHStreamer.cpp ============================================================================== --- vendor/llvm/dist/lib/CodeGen/AsmPrinter/EHStreamer.cpp Sat Feb 14 11:47:40 2015 (r278751) +++ vendor/llvm/dist/lib/CodeGen/AsmPrinter/EHStreamer.cpp Sat Feb 14 12:17:42 2015 (r278752) @@ -121,8 +121,7 @@ computeActionsTable(const SmallVectorImp for (unsigned J = NumShared, M = TypeIds.size(); J != M; ++J) { int TypeID = TypeIds[J]; assert(-1 - TypeID < (int)FilterOffsets.size() && "Unknown filter id!"); - int ValueForTypeID = - isFilterEHSelector(TypeID) ? FilterOffsets[-1 - TypeID] : TypeID; + int ValueForTypeID = TypeID < 0 ? FilterOffsets[-1 - TypeID] : TypeID; unsigned SizeTypeID = getSLEB128Size(ValueForTypeID); int NextAction = SizeAction ? -(SizeAction + SizeTypeID) : 0; @@ -270,14 +269,14 @@ computeCallSiteTable(SmallVectorImplLandingPadLabel, FirstActions[P.PadIndex] }; // Try to merge with the previous call-site. SJLJ doesn't do this if (PreviousIsInvoke && !IsSJLJ) { CallSiteEntry &Prev = CallSites.back(); - if (Site.LPad == Prev.LPad && Site.Action == Prev.Action) { + if (Site.PadLabel == Prev.PadLabel && Site.Action == Prev.Action) { // Extend the range of the previous entry. Prev.EndLabel = Site.EndLabel; continue; @@ -577,15 +576,15 @@ void EHStreamer::emitExceptionTable() { // Offset of the landing pad, counted in 16-byte bundles relative to the // @LPStart address. - if (!S.LPad) { + if (!S.PadLabel) { if (VerboseAsm) Asm->OutStreamer.AddComment(" has no landing pad"); Asm->OutStreamer.EmitIntValue(0, 4/*size*/); } else { if (VerboseAsm) Asm->OutStreamer.AddComment(Twine(" jumps to ") + - S.LPad->LandingPadLabel->getName()); - Asm->EmitLabelDifference(S.LPad->LandingPadLabel, EHFuncBeginSym, 4); + S.PadLabel->getName()); + Asm->EmitLabelDifference(S.PadLabel, EHFuncBeginSym, 4); } // Offset of the first associated action record, relative to the start of @@ -682,7 +681,7 @@ void EHStreamer::emitTypeInfos(unsigned unsigned TypeID = *I; if (VerboseAsm) { --Entry; - if (isFilterEHSelector(TypeID)) + if (TypeID != 0) Asm->OutStreamer.AddComment("FilterInfo " + Twine(Entry)); } Modified: vendor/llvm/dist/lib/CodeGen/AsmPrinter/EHStreamer.h ============================================================================== --- vendor/llvm/dist/lib/CodeGen/AsmPrinter/EHStreamer.h Sat Feb 14 11:47:40 2015 (r278751) +++ vendor/llvm/dist/lib/CodeGen/AsmPrinter/EHStreamer.h Sat Feb 14 12:17:42 2015 (r278752) @@ -23,8 +23,6 @@ class MachineModuleInfo; class MachineInstr; class MachineFunction; class AsmPrinter; -class MCSymbol; -class MCSymbolRefExpr; template class SmallVectorImpl; @@ -62,11 +60,11 @@ protected: /// Structure describing an entry in the call-site table. struct CallSiteEntry { // The 'try-range' is BeginLabel .. EndLabel. - MCSymbol *BeginLabel; // Null indicates the start of the function. - MCSymbol *EndLabel; // Null indicates the end of the function. + MCSymbol *BeginLabel; // zero indicates the start of the function. + MCSymbol *EndLabel; // zero indicates the end of the function. - // LPad contains the landing pad start labels. - const LandingPadInfo *LPad; // Null indicates that there is no landing pad. + // The landing pad starts at PadLabel. + MCSymbol *PadLabel; // zero indicates that there is no landing pad. unsigned Action; }; @@ -114,13 +112,6 @@ protected: virtual void emitTypeInfos(unsigned TTypeEncoding); - // Helpers for for identifying what kind of clause an EH typeid or selector - // corresponds to. Negative selectors are for filter clauses, the zero - // selector is for cleanups, and positive selectors are for catch clauses. - static bool isFilterEHSelector(int Selector) { return Selector < 0; } - static bool isCleanupEHSelector(int Selector) { return Selector == 0; } - static bool isCatchEHSelector(int Selector) { return Selector > 0; } - public: EHStreamer(AsmPrinter *A); virtual ~EHStreamer(); Modified: vendor/llvm/dist/lib/CodeGen/AsmPrinter/Win64Exception.cpp ============================================================================== --- vendor/llvm/dist/lib/CodeGen/AsmPrinter/Win64Exception.cpp Sat Feb 14 11:47:40 2015 (r278751) +++ vendor/llvm/dist/lib/CodeGen/AsmPrinter/Win64Exception.cpp Sat Feb 14 12:17:42 2015 (r278752) @@ -99,156 +99,9 @@ void Win64Exception::endFunction(const M if (shouldEmitPersonality) { Asm->OutStreamer.PushSection(); - - // Emit an UNWIND_INFO struct describing the prologue. Asm->OutStreamer.EmitWinEHHandlerData(); - - // Emit either MSVC-compatible tables or the usual Itanium-style LSDA after - // the UNWIND_INFO struct. - if (Asm->MAI->getExceptionHandlingType() == ExceptionHandling::MSVC) { - const Function *Per = MMI->getPersonalities()[MMI->getPersonalityIndex()]; - if (Per->getName() == "__C_specific_handler") - emitCSpecificHandlerTable(); - else - report_fatal_error(Twine("unexpected personality function: ") + - Per->getName()); - } else { - emitExceptionTable(); - } - + emitExceptionTable(); Asm->OutStreamer.PopSection(); } Asm->OutStreamer.EmitWinCFIEndProc(); } - -const MCSymbolRefExpr *Win64Exception::createImageRel32(const MCSymbol *Value) { - return MCSymbolRefExpr::Create(Value, MCSymbolRefExpr::VK_COFF_IMGREL32, - Asm->OutContext); -} - -/// Emit the language-specific data that __C_specific_handler expects. This -/// handler lives in the x64 Microsoft C runtime and allows catching or cleaning -/// up after faults with __try, __except, and __finally. The typeinfo values -/// are not really RTTI data, but pointers to filter functions that return an -/// integer (1, 0, or -1) indicating how to handle the exception. For __finally -/// blocks and other cleanups, the landing pad label is zero, and the filter -/// function is actually a cleanup handler with the same prototype. A catch-all -/// entry is modeled with a null filter function field and a non-zero landing -/// pad label. -/// -/// Possible filter function return values: -/// EXCEPTION_EXECUTE_HANDLER (1): -/// Jump to the landing pad label after cleanups. -/// EXCEPTION_CONTINUE_SEARCH (0): -/// Continue searching this table or continue unwinding. -/// EXCEPTION_CONTINUE_EXECUTION (-1): -/// Resume execution at the trapping PC. -/// -/// Inferred table structure: -/// struct Table { -/// int NumEntries; -/// struct Entry { -/// imagerel32 LabelStart; -/// imagerel32 LabelEnd; -/// imagerel32 FilterOrFinally; // Zero means catch-all. -/// imagerel32 LabelLPad; // Zero means __finally. -/// } Entries[NumEntries]; -/// }; -void Win64Exception::emitCSpecificHandlerTable() { - const std::vector &PadInfos = MMI->getLandingPads(); - - // Simplifying assumptions for first implementation: - // - Cleanups are not implemented. - // - Filters are not implemented. - - // The Itanium LSDA table sorts similar landing pads together to simplify the - // actions table, but we don't need that. - SmallVector LandingPads; - LandingPads.reserve(PadInfos.size()); - for (const auto &LP : PadInfos) - LandingPads.push_back(&LP); - - // Compute label ranges for call sites as we would for the Itanium LSDA, but - // use an all zero action table because we aren't using these actions. - SmallVector FirstActions; - FirstActions.resize(LandingPads.size()); - SmallVector CallSites; - computeCallSiteTable(CallSites, LandingPads, FirstActions); - - MCSymbol *EHFuncBeginSym = - Asm->GetTempSymbol("eh_func_begin", Asm->getFunctionNumber()); - MCSymbol *EHFuncEndSym = - Asm->GetTempSymbol("eh_func_end", Asm->getFunctionNumber()); - - // Emit the number of table entries. - unsigned NumEntries = 0; - for (const CallSiteEntry &CSE : CallSites) { - if (!CSE.LPad) - continue; // Ignore gaps. - for (int Selector : CSE.LPad->TypeIds) { - // Ignore C++ filter clauses in SEH. - // FIXME: Implement cleanup clauses. - if (isCatchEHSelector(Selector)) - ++NumEntries; - } - } - Asm->OutStreamer.EmitIntValue(NumEntries, 4); - - // Emit the four-label records for each call site entry. The table has to be - // sorted in layout order, and the call sites should already be sorted. - for (const CallSiteEntry &CSE : CallSites) { - // Ignore gaps. Unlike the Itanium model, unwinding through a frame without - // an EH table entry will propagate the exception rather than terminating - // the program. - if (!CSE.LPad) - continue; - const LandingPadInfo *LPad = CSE.LPad; - - // Compute the label range. We may reuse the function begin and end labels - // rather than forming new ones. - const MCExpr *Begin = - createImageRel32(CSE.BeginLabel ? CSE.BeginLabel : EHFuncBeginSym); - const MCExpr *End; - if (CSE.EndLabel) { - // The interval is half-open, so we have to add one to include the return - // address of the last invoke in the range. - End = MCBinaryExpr::CreateAdd(createImageRel32(CSE.EndLabel), - MCConstantExpr::Create(1, Asm->OutContext), - Asm->OutContext); - } else { - End = createImageRel32(EHFuncEndSym); - } - - // These aren't really type info globals, they are actually pointers to - // filter functions ordered by selector. The zero selector is used for - // cleanups, so slot zero corresponds to selector 1. - const std::vector &SelectorToFilter = MMI->getTypeInfos(); - - // Do a parallel iteration across typeids and clause labels, skipping filter - // clauses. - assert(LPad->TypeIds.size() == LPad->ClauseLabels.size()); - for (size_t I = 0, E = LPad->TypeIds.size(); I < E; ++I) { - // AddLandingPadInfo stores the clauses in reverse, but there is a FIXME - // to change that. - int Selector = LPad->TypeIds[E - I - 1]; - MCSymbol *ClauseLabel = LPad->ClauseLabels[I]; - - // Ignore C++ filter clauses in SEH. - // FIXME: Implement cleanup clauses. - if (!isCatchEHSelector(Selector)) - continue; - - Asm->OutStreamer.EmitValue(Begin, 4); - Asm->OutStreamer.EmitValue(End, 4); - if (isCatchEHSelector(Selector)) { - assert(unsigned(Selector - 1) < SelectorToFilter.size()); - const GlobalValue *TI = SelectorToFilter[Selector - 1]; - if (TI) // Emit the filter function pointer. - Asm->OutStreamer.EmitValue(createImageRel32(Asm->getSymbol(TI)), 4); - else // Otherwise, this is a "catch i8* null", or catch all. - Asm->OutStreamer.EmitIntValue(0, 4); - } - Asm->OutStreamer.EmitValue(createImageRel32(ClauseLabel), 4); - } - } -} Modified: vendor/llvm/dist/lib/CodeGen/AsmPrinter/Win64Exception.h ============================================================================== --- vendor/llvm/dist/lib/CodeGen/AsmPrinter/Win64Exception.h Sat Feb 14 11:47:40 2015 (r278751) +++ vendor/llvm/dist/lib/CodeGen/AsmPrinter/Win64Exception.h Sat Feb 14 12:17:42 2015 (r278752) @@ -29,10 +29,6 @@ class Win64Exception : public EHStreamer /// Per-function flag to indicate if frame moves info should be emitted. bool shouldEmitMoves; - void emitCSpecificHandlerTable(); - - const MCSymbolRefExpr *createImageRel32(const MCSymbol *Value); - public: //===--------------------------------------------------------------------===// // Main entry points. Modified: vendor/llvm/dist/lib/CodeGen/MachineModuleInfo.cpp ============================================================================== --- vendor/llvm/dist/lib/CodeGen/MachineModuleInfo.cpp Sat Feb 14 11:47:40 2015 (r278751) +++ vendor/llvm/dist/lib/CodeGen/MachineModuleInfo.cpp Sat Feb 14 12:17:42 2015 (r278752) @@ -452,14 +452,6 @@ void MachineModuleInfo::addCleanup(Machi LP.TypeIds.push_back(0); } -MCSymbol * -MachineModuleInfo::addClauseForLandingPad(MachineBasicBlock *LandingPad) { - MCSymbol *ClauseLabel = Context.CreateTempSymbol(); - LandingPadInfo &LP = getOrCreateLandingPadInfo(LandingPad); - LP.ClauseLabels.push_back(ClauseLabel); - return ClauseLabel; -} - /// TidyLandingPads - Remap landing pad labels and remove any deleted landing /// pads. void MachineModuleInfo::TidyLandingPads(DenseMap *LPMap) { Modified: vendor/llvm/dist/lib/CodeGen/Passes.cpp ============================================================================== --- vendor/llvm/dist/lib/CodeGen/Passes.cpp Sat Feb 14 11:47:40 2015 (r278751) +++ vendor/llvm/dist/lib/CodeGen/Passes.cpp Sat Feb 14 12:17:42 2015 (r278752) @@ -449,9 +449,9 @@ void TargetPassConfig::addPassesToHandle case ExceptionHandling::DwarfCFI: case ExceptionHandling::ARM: case ExceptionHandling::ItaniumWinEH: - case ExceptionHandling::MSVC: // FIXME: Needs preparation. addPass(createDwarfEHPass(TM)); break; + case ExceptionHandling::MSVC: // FIXME: Add preparation. case ExceptionHandling::None: addPass(createLowerInvokePass()); Modified: vendor/llvm/dist/lib/CodeGen/SelectionDAG/DAGCombiner.cpp ============================================================================== --- vendor/llvm/dist/lib/CodeGen/SelectionDAG/DAGCombiner.cpp Sat Feb 14 11:47:40 2015 (r278751) +++ vendor/llvm/dist/lib/CodeGen/SelectionDAG/DAGCombiner.cpp Sat Feb 14 12:17:42 2015 (r278752) @@ -6544,19 +6544,15 @@ SDValue DAGCombiner::visitBITCAST(SDNode // If the input is a constant, let getNode fold it. if (isa(N0) || isa(N0)) { - SDValue Res = DAG.getNode(ISD::BITCAST, SDLoc(N), VT, N0); - if (Res.getNode() != N) { - if (!LegalOperations || - TLI.isOperationLegal(Res.getNode()->getOpcode(), VT)) - return Res; - - // Folding it resulted in an illegal node, and it's too late to - // do that. Clean up the old node and forego the transformation. - // Ideally this won't happen very often, because instcombine - // and the earlier dagcombine runs (where illegal nodes are - // permitted) should have folded most of them already. - deleteAndRecombine(Res.getNode()); - } + // If we can't allow illegal operations, we need to check that this is just + // a fp -> int or int -> conversion and that the resulting operation will + // be legal. + if (!LegalOperations || + (isa(N0) && VT.isFloatingPoint() && !VT.isVector() && + TLI.isOperationLegal(ISD::ConstantFP, VT)) || + (isa(N0) && VT.isInteger() && !VT.isVector() && + TLI.isOperationLegal(ISD::Constant, VT))) + return DAG.getNode(ISD::BITCAST, SDLoc(N), VT, N0); } // (conv (conv x, t1), t2) -> (conv x, t2) Modified: vendor/llvm/dist/lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp ============================================================================== --- vendor/llvm/dist/lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp Sat Feb 14 11:47:40 2015 (r278751) +++ vendor/llvm/dist/lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp Sat Feb 14 12:17:42 2015 (r278752) @@ -390,7 +390,8 @@ SDValue VectorLegalizer::Promote(SDValue if (Op.getOperand(j) .getValueType() .getVectorElementType() - .isFloatingPoint()) + .isFloatingPoint() && + NVT.isVector() && NVT.getVectorElementType().isFloatingPoint()) Operands[j] = DAG.getNode(ISD::FP_EXTEND, dl, NVT, Op.getOperand(j)); else Operands[j] = DAG.getNode(ISD::BITCAST, dl, NVT, Op.getOperand(j)); @@ -399,8 +400,9 @@ SDValue VectorLegalizer::Promote(SDValue } Op = DAG.getNode(Op.getOpcode(), dl, NVT, Operands); - if (VT.isFloatingPoint() || - (VT.isVector() && VT.getVectorElementType().isFloatingPoint())) + if ((VT.isFloatingPoint() && NVT.isFloatingPoint()) || + (VT.isVector() && VT.getVectorElementType().isFloatingPoint() && + NVT.isVector() && NVT.getVectorElementType().isFloatingPoint())) return DAG.getNode(ISD::FP_ROUND, dl, VT, Op, DAG.getIntPtrConstant(0)); else return DAG.getNode(ISD::BITCAST, dl, VT, Op); @@ -554,9 +556,9 @@ SDValue VectorLegalizer::ExpandLoad(SDVa BitOffset += SrcEltBits; if (BitOffset >= WideBits) { WideIdx++; - Offset -= WideBits; - if (Offset > 0) { - ShAmt = DAG.getConstant(SrcEltBits - Offset, + BitOffset -= WideBits; + if (BitOffset > 0) { + ShAmt = DAG.getConstant(SrcEltBits - BitOffset, TLI.getShiftAmountTy(WideVT)); Hi = DAG.getNode(ISD::SHL, dl, WideVT, LoadVals[WideIdx], ShAmt); Hi = DAG.getNode(ISD::AND, dl, WideVT, Hi, SrcEltBitMask); Modified: vendor/llvm/dist/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp ============================================================================== --- vendor/llvm/dist/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp Sat Feb 14 11:47:40 2015 (r278751) +++ vendor/llvm/dist/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp Sat Feb 14 12:17:42 2015 (r278752) @@ -2071,14 +2071,10 @@ void SelectionDAGBuilder::visitLandingPa // Get the two live-in registers as SDValues. The physregs have already been // copied into virtual registers. SDValue Ops[2]; - if (FuncInfo.ExceptionPointerVirtReg) { - Ops[0] = DAG.getZExtOrTrunc( - DAG.getCopyFromReg(DAG.getEntryNode(), getCurSDLoc(), - FuncInfo.ExceptionPointerVirtReg, TLI.getPointerTy()), - getCurSDLoc(), ValueVTs[0]); - } else { - Ops[0] = DAG.getConstant(0, TLI.getPointerTy()); - } + Ops[0] = DAG.getZExtOrTrunc( + DAG.getCopyFromReg(DAG.getEntryNode(), getCurSDLoc(), + FuncInfo.ExceptionPointerVirtReg, TLI.getPointerTy()), + getCurSDLoc(), ValueVTs[0]); Ops[1] = DAG.getZExtOrTrunc( DAG.getCopyFromReg(DAG.getEntryNode(), getCurSDLoc(), FuncInfo.ExceptionSelectorVirtReg, TLI.getPointerTy()), @@ -2090,27 +2086,6 @@ void SelectionDAGBuilder::visitLandingPa setValue(&LP, Res); } -unsigned -SelectionDAGBuilder::visitLandingPadClauseBB(GlobalValue *ClauseGV, - MachineBasicBlock *LPadBB) { - SDValue Chain = getControlRoot(); - - // Get the typeid that we will dispatch on later. - const TargetLowering &TLI = DAG.getTargetLoweringInfo(); - const TargetRegisterClass *RC = TLI.getRegClassFor(TLI.getPointerTy()); - unsigned VReg = FuncInfo.MF->getRegInfo().createVirtualRegister(RC); - unsigned TypeID = DAG.getMachineFunction().getMMI().getTypeIDFor(ClauseGV); - SDValue Sel = DAG.getConstant(TypeID, TLI.getPointerTy()); - Chain = DAG.getCopyToReg(Chain, getCurSDLoc(), VReg, Sel); - - // Branch to the main landing pad block. - MachineBasicBlock *ClauseMBB = FuncInfo.MBB; - ClauseMBB->addSuccessor(LPadBB); - DAG.setRoot(DAG.getNode(ISD::BR, getCurSDLoc(), MVT::Other, Chain, - DAG.getBasicBlock(LPadBB))); - return VReg; -} - /// handleSmallSwitchCaseRange - Emit a series of specific tests (suitable for /// small case ranges). bool SelectionDAGBuilder::handleSmallSwitchRange(CaseRec& CR, Modified: vendor/llvm/dist/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h ============================================================================== --- vendor/llvm/dist/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h Sat Feb 14 11:47:40 2015 (r278751) +++ vendor/llvm/dist/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h Sat Feb 14 12:17:42 2015 (r278752) @@ -713,8 +713,6 @@ public: void visitJumpTable(JumpTable &JT); void visitJumpTableHeader(JumpTable &JT, JumpTableHeader &JTH, MachineBasicBlock *SwitchBB); - unsigned visitLandingPadClauseBB(GlobalValue *ClauseGV, - MachineBasicBlock *LPadMBB); private: // These all get lowered before this pass. Modified: vendor/llvm/dist/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp ============================================================================== --- vendor/llvm/dist/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Sat Feb 14 11:47:40 2015 (r278751) +++ vendor/llvm/dist/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Sat Feb 14 12:17:42 2015 (r278752) @@ -19,7 +19,6 @@ #include "llvm/Analysis/AliasAnalysis.h" #include "llvm/Analysis/BranchProbabilityInfo.h" #include "llvm/Analysis/CFG.h" -#include "llvm/CodeGen/Analysis.h" #include "llvm/CodeGen/FastISel.h" #include "llvm/CodeGen/FunctionLoweringInfo.h" #include "llvm/CodeGen/GCMetadata.h" @@ -41,7 +40,6 @@ #include "llvm/IR/Intrinsics.h" #include "llvm/IR/LLVMContext.h" #include "llvm/IR/Module.h" -#include "llvm/MC/MCAsmInfo.h" #include "llvm/Support/Compiler.h" #include "llvm/Support/Debug.h" #include "llvm/Support/ErrorHandling.h" @@ -909,8 +907,6 @@ void SelectionDAGISel::DoInstructionSele void SelectionDAGISel::PrepareEHLandingPad() { MachineBasicBlock *MBB = FuncInfo->MBB; - const TargetRegisterClass *PtrRC = TLI->getRegClassFor(TLI->getPointerTy()); - // Add a label to mark the beginning of the landing pad. Deletion of the // landing pad can thus be detected via the MachineModuleInfo. MCSymbol *Label = MF->getMMI().addLandingPad(MBB); @@ -922,66 +918,8 @@ void SelectionDAGISel::PrepareEHLandingP BuildMI(*MBB, FuncInfo->InsertPt, SDB->getCurDebugLoc(), II) .addSym(Label); - if (TM.getMCAsmInfo()->getExceptionHandlingType() == - ExceptionHandling::MSVC) { - // Make virtual registers and a series of labels that fill in values for the - // clauses. - auto &RI = MF->getRegInfo(); - FuncInfo->ExceptionSelectorVirtReg = RI.createVirtualRegister(PtrRC); - - // Get all invoke BBs that will unwind into the clause BBs. - SmallVector InvokeBBs(MBB->pred_begin(), - MBB->pred_end()); - - // Emit separate machine basic blocks with separate labels for each clause - // before the main landing pad block. - const BasicBlock *LLVMBB = MBB->getBasicBlock(); - const LandingPadInst *LPadInst = LLVMBB->getLandingPadInst(); - MachineInstrBuilder SelectorPHI = BuildMI( - *MBB, MBB->begin(), SDB->getCurDebugLoc(), TII->get(TargetOpcode::PHI), - FuncInfo->ExceptionSelectorVirtReg); - for (unsigned I = 0, E = LPadInst->getNumClauses(); I != E; ++I) { - MachineBasicBlock *ClauseBB = MF->CreateMachineBasicBlock(LLVMBB); - MF->insert(MBB, ClauseBB); - - // Add the edge from the invoke to the clause. - for (MachineBasicBlock *InvokeBB : InvokeBBs) - InvokeBB->addSuccessor(ClauseBB); - - // Mark the clause as a landing pad or MI passes will delete it. - ClauseBB->setIsLandingPad(); - - GlobalValue *ClauseGV = ExtractTypeInfo(LPadInst->getClause(I)); - - // Start the BB with a label. - MCSymbol *ClauseLabel = MF->getMMI().addClauseForLandingPad(MBB); - BuildMI(*ClauseBB, ClauseBB->begin(), SDB->getCurDebugLoc(), II) - .addSym(ClauseLabel); - - // Construct a simple BB that defines a register with the typeid constant. - FuncInfo->MBB = ClauseBB; - FuncInfo->InsertPt = ClauseBB->end(); - unsigned VReg = SDB->visitLandingPadClauseBB(ClauseGV, MBB); - CurDAG->setRoot(SDB->getRoot()); - SDB->clear(); - CodeGenAndEmitDAG(); - - // Add the typeid virtual register to the phi in the main landing pad. - SelectorPHI.addReg(VReg).addMBB(ClauseBB); - } - - // Remove the edge from the invoke to the lpad. - for (MachineBasicBlock *InvokeBB : InvokeBBs) - InvokeBB->removeSuccessor(MBB); - - // Restore FuncInfo back to its previous state and select the main landing - // pad block. - FuncInfo->MBB = MBB; - FuncInfo->InsertPt = MBB->end(); - return; - } - // Mark exception register as live in. + const TargetRegisterClass *PtrRC = TLI->getRegClassFor(TLI->getPointerTy()); if (unsigned Reg = TLI->getExceptionPointerRegister()) FuncInfo->ExceptionPointerVirtReg = MBB->addLiveIn(Reg, PtrRC); Modified: vendor/llvm/dist/lib/IR/DebugInfo.cpp ============================================================================== --- vendor/llvm/dist/lib/IR/DebugInfo.cpp Sat Feb 14 11:47:40 2015 (r278751) +++ vendor/llvm/dist/lib/IR/DebugInfo.cpp Sat Feb 14 12:17:42 2015 (r278752) @@ -525,12 +525,15 @@ bool DISubprogram::Verify() const { while ((IA = DL.getInlinedAt())) DL = DebugLoc::getFromDILocation(IA); DL.getScopeAndInlinedAt(Scope, IA); + if (!Scope) + return false; assert(!IA); while (!DIDescriptor(Scope).isSubprogram()) { DILexicalBlockFile D(Scope); Scope = D.isLexicalBlockFile() ? D.getScope() : DebugLoc::getFromDILexicalBlock(Scope).getScope(); + assert(Scope && "lexical block file has no scope"); } if (!DISubprogram(Scope).describes(F)) return false; Modified: vendor/llvm/dist/lib/IR/Metadata.cpp ============================================================================== --- vendor/llvm/dist/lib/IR/Metadata.cpp Sat Feb 14 11:47:40 2015 (r278751) +++ vendor/llvm/dist/lib/IR/Metadata.cpp Sat Feb 14 12:17:42 2015 (r278752) @@ -826,6 +826,28 @@ MDNode *MDNode::intersect(MDNode *A, MDN return getOrSelfReference(A->getContext(), MDs); } +MDNode *MDNode::getMostGenericAliasScope(MDNode *A, MDNode *B) { + if (!A || !B) + return nullptr; + + SmallVector MDs(B->op_begin(), B->op_end()); + for (unsigned i = 0, ie = A->getNumOperands(); i != ie; ++i) { + Metadata *MD = A->getOperand(i); + bool insert = true; + for (unsigned j = 0, je = B->getNumOperands(); j != je; ++j) + if (MD == B->getOperand(j)) { + insert = false; + break; + } + if (insert) + MDs.push_back(MD); + } + + // FIXME: This preserves long-standing behaviour, but is it really the right + // behaviour? Or was that an unintended side-effect of node uniquing? + return getOrSelfReference(A->getContext(), MDs); +} + MDNode *MDNode::getMostGenericFPMath(MDNode *A, MDNode *B) { if (!A || !B) return nullptr; Modified: vendor/llvm/dist/lib/IR/Type.cpp ============================================================================== --- vendor/llvm/dist/lib/IR/Type.cpp Sat Feb 14 11:47:40 2015 (r278751) +++ vendor/llvm/dist/lib/IR/Type.cpp Sat Feb 14 12:17:42 2015 (r278752) @@ -708,9 +708,10 @@ VectorType::VectorType(Type *ElType, uns VectorType *VectorType::get(Type *elementType, unsigned NumElements) { Type *ElementType = const_cast(elementType); assert(NumElements > 0 && "#Elements of a VectorType must be greater than 0"); - assert(isValidElementType(ElementType) && - "Elements of a VectorType must be a primitive type"); - + assert(isValidElementType(ElementType) && "Element type of a VectorType must " + "be an integer, floating point, or " + "pointer type."); + LLVMContextImpl *pImpl = ElementType->getContext().pImpl; VectorType *&Entry = ElementType->getContext().pImpl ->VectorTypes[std::make_pair(ElementType, NumElements)]; Modified: vendor/llvm/dist/lib/MC/MCSectionCOFF.cpp ============================================================================== --- vendor/llvm/dist/lib/MC/MCSectionCOFF.cpp Sat Feb 14 11:47:40 2015 (r278751) +++ vendor/llvm/dist/lib/MC/MCSectionCOFF.cpp Sat Feb 14 12:17:42 2015 (r278752) @@ -47,6 +47,10 @@ void MCSectionCOFF::PrintSwitchToSection } OS << "\t.section\t" << getSectionName() << ",\""; + if (getCharacteristics() & COFF::IMAGE_SCN_CNT_INITIALIZED_DATA) + OS << 'd'; + if (getCharacteristics() & COFF::IMAGE_SCN_CNT_UNINITIALIZED_DATA) + OS << 'b'; if (getCharacteristics() & COFF::IMAGE_SCN_MEM_EXECUTE) OS << 'x'; if (getCharacteristics() & COFF::IMAGE_SCN_MEM_WRITE) @@ -55,10 +59,6 @@ void MCSectionCOFF::PrintSwitchToSection OS << 'r'; else OS << 'y'; - if (getCharacteristics() & COFF::IMAGE_SCN_CNT_INITIALIZED_DATA) - OS << 'd'; - if (getCharacteristics() & COFF::IMAGE_SCN_CNT_UNINITIALIZED_DATA) - OS << 'b'; if (getCharacteristics() & COFF::IMAGE_SCN_LNK_REMOVE) OS << 'n'; if (getCharacteristics() & COFF::IMAGE_SCN_MEM_SHARED) Modified: vendor/llvm/dist/lib/MC/WinCOFFObjectWriter.cpp ============================================================================== --- vendor/llvm/dist/lib/MC/WinCOFFObjectWriter.cpp Sat Feb 14 11:47:40 2015 (r278751) +++ vendor/llvm/dist/lib/MC/WinCOFFObjectWriter.cpp Sat Feb 14 12:17:42 2015 (r278752) @@ -710,17 +710,22 @@ void WinCOFFObjectWriter::RecordRelocati CrossSection = &Symbol.getSection() != &B->getSection(); // Offset of the symbol in the section - int64_t a = Layout.getSymbolOffset(&B_SD); + int64_t OffsetOfB = Layout.getSymbolOffset(&B_SD); - // Offset of the relocation in the section - int64_t b = Layout.getFragmentOffset(Fragment) + Fixup.getOffset(); - - FixedValue = b - a; // In the case where we have SymbA and SymB, we just need to store the delta // between the two symbols. Update FixedValue to account for the delta, and // skip recording the relocation. - if (!CrossSection) + if (!CrossSection) { + int64_t OffsetOfA = Layout.getSymbolOffset(&A_SD); + FixedValue = (OffsetOfA - OffsetOfB) + Target.getConstant(); return; + } + + // Offset of the relocation in the section + int64_t OffsetOfRelocation = + Layout.getFragmentOffset(Fragment) + Fixup.getOffset(); + + FixedValue = OffsetOfRelocation - OffsetOfB; } else { FixedValue = Target.getConstant(); } Modified: vendor/llvm/dist/lib/Support/regcomp.c ============================================================================== --- vendor/llvm/dist/lib/Support/regcomp.c Sat Feb 14 11:47:40 2015 (r278751) +++ vendor/llvm/dist/lib/Support/regcomp.c Sat Feb 14 12:17:42 2015 (r278752) @@ -49,6 +49,14 @@ #include "regcclass.h" #include "regcname.h" +#include "llvm/Config/config.h" +#if HAVE_STDINT_H +#include +#else +/* Pessimistically bound memory use */ +#define SIZE_MAX UINT_MAX +#endif + /* * parse structure, passed up and down to avoid global variables and * other clumsinesses @@ -1069,6 +1077,8 @@ allocset(struct parse *p) p->ncsalloc += CHAR_BIT; nc = p->ncsalloc; + if (nc > SIZE_MAX / sizeof(cset)) + goto nomem; assert(nc % CHAR_BIT == 0); nbytes = nc / CHAR_BIT * css; @@ -1412,6 +1422,11 @@ enlarge(struct parse *p, sopno size) if (p->ssize >= size) return; + if ((unsigned long)size > SIZE_MAX / sizeof(sop)) { + SETERROR(REG_ESPACE); + return; + } + sp = (sop *)realloc(p->strip, size*sizeof(sop)); if (sp == NULL) { SETERROR(REG_ESPACE); @@ -1428,6 +1443,12 @@ static void stripsnug(struct parse *p, struct re_guts *g) { g->nstates = p->slen; + if ((unsigned long)p->slen > SIZE_MAX / sizeof(sop)) { + g->strip = p->strip; + SETERROR(REG_ESPACE); + return; + } + g->strip = (sop *)realloc((char *)p->strip, p->slen * sizeof(sop)); if (g->strip == NULL) { SETERROR(REG_ESPACE); Modified: vendor/llvm/dist/lib/Target/AArch64/AArch64ISelLowering.cpp ============================================================================== --- vendor/llvm/dist/lib/Target/AArch64/AArch64ISelLowering.cpp Sat Feb 14 11:47:40 2015 (r278751) +++ vendor/llvm/dist/lib/Target/AArch64/AArch64ISelLowering.cpp Sat Feb 14 12:17:42 2015 (r278752) @@ -6287,6 +6287,8 @@ static SDValue EmitVectorComparison(SDVa AArch64CC::CondCode CC, bool NoNans, EVT VT, SDLoc dl, SelectionDAG &DAG) { EVT SrcVT = LHS.getValueType(); + assert(VT.getSizeInBits() == SrcVT.getSizeInBits() && + "function only supposed to emit natural comparisons"); BuildVectorSDNode *BVN = dyn_cast(RHS.getNode()); APInt CnstBits(VT.getSizeInBits(), 0); @@ -6381,13 +6383,15 @@ SDValue AArch64TargetLowering::LowerVSET ISD::CondCode CC = cast(Op.getOperand(2))->get(); SDValue LHS = Op.getOperand(0); SDValue RHS = Op.getOperand(1); + EVT CmpVT = LHS.getValueType().changeVectorElementTypeToInteger(); SDLoc dl(Op); if (LHS.getValueType().getVectorElementType().isInteger()) { assert(LHS.getValueType() == RHS.getValueType()); AArch64CC::CondCode AArch64CC = changeIntCCToAArch64CC(CC); - return EmitVectorComparison(LHS, RHS, AArch64CC, false, Op.getValueType(), - dl, DAG); + SDValue Cmp = + EmitVectorComparison(LHS, RHS, AArch64CC, false, CmpVT, dl, DAG); + return DAG.getSExtOrTrunc(Cmp, dl, Op.getValueType()); } assert(LHS.getValueType().getVectorElementType() == MVT::f32 || @@ -6401,19 +6405,21 @@ SDValue AArch64TargetLowering::LowerVSET bool NoNaNs = getTargetMachine().Options.NoNaNsFPMath; SDValue Cmp = - EmitVectorComparison(LHS, RHS, CC1, NoNaNs, Op.getValueType(), dl, DAG); + EmitVectorComparison(LHS, RHS, CC1, NoNaNs, CmpVT, dl, DAG); if (!Cmp.getNode()) return SDValue(); if (CC2 != AArch64CC::AL) { SDValue Cmp2 = - EmitVectorComparison(LHS, RHS, CC2, NoNaNs, Op.getValueType(), dl, DAG); + EmitVectorComparison(LHS, RHS, CC2, NoNaNs, CmpVT, dl, DAG); if (!Cmp2.getNode()) return SDValue(); - Cmp = DAG.getNode(ISD::OR, dl, Cmp.getValueType(), Cmp, Cmp2); + Cmp = DAG.getNode(ISD::OR, dl, CmpVT, Cmp, Cmp2); } + Cmp = DAG.getSExtOrTrunc(Cmp, dl, Op.getValueType()); + if (ShouldInvert) return Cmp = DAG.getNOT(dl, Cmp, Cmp.getValueType()); Modified: vendor/llvm/dist/lib/Target/ARM/ARMBaseInstrInfo.cpp ============================================================================== --- vendor/llvm/dist/lib/Target/ARM/ARMBaseInstrInfo.cpp Sat Feb 14 11:47:40 2015 (r278751) +++ vendor/llvm/dist/lib/Target/ARM/ARMBaseInstrInfo.cpp Sat Feb 14 12:17:42 2015 (r278752) @@ -2400,7 +2400,8 @@ optimizeCompareInstr(MachineInstr *CmpIn else if (MI->getParent() != CmpInstr->getParent() || CmpValue != 0) { // Conservatively refuse to convert an instruction which isn't in the same // BB as the comparison. - // For CMPri, we need to check Sub, thus we can't return here. + // For CMPri w/ CmpValue != 0, a Sub may still be a candidate. + // Thus we cannot return here. if (CmpInstr->getOpcode() == ARM::CMPri || CmpInstr->getOpcode() == ARM::t2CMPri) MI = nullptr; @@ -2479,8 +2480,8 @@ optimizeCompareInstr(MachineInstr *CmpIn case ARM::t2EORrr: case ARM::t2EORri: { // Scan forward for the use of CPSR - // When checking against MI: if it's a conditional code requires - // checking of V bit, then this is not safe to do. + // When checking against MI: if it's a conditional code that requires + // checking of the V bit or C bit, then this is not safe to do. // It is safe to remove CmpInstr if CPSR is redefined or killed. // If we are done with the basic block, we need to check whether CPSR is // live-out. @@ -2547,19 +2548,30 @@ optimizeCompareInstr(MachineInstr *CmpIn OperandsToUpdate.push_back( std::make_pair(&((*I).getOperand(IO - 1)), NewCC)); } - } else + } else { + // No Sub, so this is x = y, z; cmp x, 0. switch (CC) { - default: + case ARMCC::EQ: // Z + case ARMCC::NE: // Z + case ARMCC::MI: // N + case ARMCC::PL: // N + case ARMCC::AL: // none // CPSR can be used multiple times, we should continue. break; - case ARMCC::VS: - case ARMCC::VC: - case ARMCC::GE: - case ARMCC::LT: - case ARMCC::GT: - case ARMCC::LE: + case ARMCC::HS: // C + case ARMCC::LO: // C + case ARMCC::VS: // V + case ARMCC::VC: // V + case ARMCC::HI: // C Z + case ARMCC::LS: // C Z + case ARMCC::GE: // N V + case ARMCC::LT: // N V + case ARMCC::GT: // Z N V + case ARMCC::LE: // Z N V + // The instruction uses the V bit or C bit which is not safe. return false; } + } } } Modified: vendor/llvm/dist/lib/Target/ARM/ARMISelLowering.cpp ============================================================================== --- vendor/llvm/dist/lib/Target/ARM/ARMISelLowering.cpp Sat Feb 14 11:47:40 2015 (r278751) +++ vendor/llvm/dist/lib/Target/ARM/ARMISelLowering.cpp Sat Feb 14 12:17:42 2015 (r278752) @@ -565,7 +565,6 @@ ARMTargetLowering::ARMTargetLowering(con setTargetDAGCombine(ISD::FP_TO_SINT); setTargetDAGCombine(ISD::FP_TO_UINT); setTargetDAGCombine(ISD::FDIV); - setTargetDAGCombine(ISD::LOAD); // It is legal to extload from v4i8 to v4i16 or v4i32. *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-vendor@FreeBSD.ORG Sat Feb 14 12:18:38 2015 Return-Path: Delivered-To: svn-src-vendor@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2C5E14E0; Sat, 14 Feb 2015 12:18:38 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F20089F0; Sat, 14 Feb 2015 12:18:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1ECIbnr023805; Sat, 14 Feb 2015 12:18:37 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1ECIbKR023804; Sat, 14 Feb 2015 12:18:37 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201502141218.t1ECIbKR023804@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 14 Feb 2015 12:18:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r278753 - vendor/llvm/llvm-release_360-r229040 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Feb 2015 12:18:38 -0000 Author: dim Date: Sat Feb 14 12:18:37 2015 New Revision: 278753 URL: https://svnweb.freebsd.org/changeset/base/278753 Log: Tag llvm tags/RELEASE_360/rc3 r229040 (effectively, 3.6.0 RC3). Added: vendor/llvm/llvm-release_360-r229040/ - copied from r278752, vendor/llvm/dist/ From owner-svn-src-vendor@FreeBSD.ORG Sat Feb 14 12:18:55 2015 Return-Path: Delivered-To: svn-src-vendor@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B6652606; Sat, 14 Feb 2015 12:18:55 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9E1229F7; Sat, 14 Feb 2015 12:18:55 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1ECItlZ023904; Sat, 14 Feb 2015 12:18:55 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1ECIngH023875; Sat, 14 Feb 2015 12:18:49 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201502141218.t1ECIngH023875@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 14 Feb 2015 12:18:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r278754 - in vendor/clang/dist: docs include/clang/Basic lib/AST lib/CodeGen lib/Driver lib/Parse lib/Sema lib/Serialization test/CXX/expr/expr.prim/expr.prim.lambda test/CodeGenCUDA te... X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Feb 2015 12:18:55 -0000 Author: dim Date: Sat Feb 14 12:18:48 2015 New Revision: 278754 URL: https://svnweb.freebsd.org/changeset/base/278754 Log: Vendor import of clang RELEASE_360/rc3 tag r229040 (effectively, 3.6.0 RC3): https://llvm.org/svn/llvm-project/cfe/tags/RELEASE_360/rc3@229040 Added: vendor/clang/dist/test/CodeGenCUDA/llvm-used.cu vendor/clang/dist/test/PCH/implicitly-deleted.cpp (contents, props changed) Modified: vendor/clang/dist/docs/ReleaseNotes.rst vendor/clang/dist/include/clang/Basic/DiagnosticGroups.td vendor/clang/dist/include/clang/Basic/DiagnosticParseKinds.td vendor/clang/dist/include/clang/Basic/DiagnosticSemaKinds.td vendor/clang/dist/lib/AST/DeclCXX.cpp vendor/clang/dist/lib/CodeGen/CGClass.cpp vendor/clang/dist/lib/CodeGen/CGExprScalar.cpp vendor/clang/dist/lib/CodeGen/CodeGenModule.cpp vendor/clang/dist/lib/CodeGen/CodeGenModule.h vendor/clang/dist/lib/Driver/Tools.cpp vendor/clang/dist/lib/Parse/ParseExprCXX.cpp vendor/clang/dist/lib/Sema/SemaDecl.cpp vendor/clang/dist/lib/Sema/SemaLookup.cpp vendor/clang/dist/lib/Serialization/ASTWriterDecl.cpp vendor/clang/dist/test/CXX/expr/expr.prim/expr.prim.lambda/p11-1y.cpp vendor/clang/dist/test/CodeGenCXX/ctor-dtor-alias.cpp vendor/clang/dist/test/CodeGenCXX/debug-info-line.cpp vendor/clang/dist/test/Parser/cxx0x-lambda-expressions.cpp vendor/clang/dist/test/Parser/objcxx0x-lambda-expressions.mm vendor/clang/dist/test/SemaCXX/cxx0x-initializer-stdinitializerlist.cpp vendor/clang/dist/test/SemaCXX/lambda-expressions.cpp Modified: vendor/clang/dist/docs/ReleaseNotes.rst ============================================================================== --- vendor/clang/dist/docs/ReleaseNotes.rst Sat Feb 14 12:18:37 2015 (r278753) +++ vendor/clang/dist/docs/ReleaseNotes.rst Sat Feb 14 12:18:48 2015 (r278754) @@ -98,6 +98,8 @@ Windows Support - Basic support for DWARF debug information in COFF files +- Support for Visual C++ '__super' keyword + C Language Changes in Clang --------------------------- @@ -118,10 +120,35 @@ C++ Language Changes in Clang - Clang will put individual ``.init_array/.ctors`` sections in comdats, reducing code duplication and speeding up startup. -C++11 Feature Support +C++17 Feature Support ^^^^^^^^^^^^^^^^^^^^^ -... +Clang has experimental support for some proposed C++1z (tentatively, C++17) +features. This support can be enabled using the `-std=c++1z` flag. + +New in Clang 3.6 is support for: + +- Fold expressions + +- `u8` character literals + +- Nested namespace definitions: `namespace A::B { ... }` as a shorthand for + `namespace A { namespace B { ... } }` + +- Attributes for namespaces and enumerators + +- Constant evaluation for all non-type template arguments + +Note that these features may be changed or removed in future Clang releases +without notice. + +Support for `for (identifier : range)` as a synonym for +`for (auto &&identifier : range)` has been removed as it is no longer currently +considered for C++17. + +For more details on C++ feature support, see +`the C++ status page `_. + Objective-C Language Changes in Clang ------------------------------------- @@ -133,6 +160,19 @@ OpenCL C Language Changes in Clang ... +OpenMP Language Changes in Clang +-------------------------------- + +Clang 3.6 contains codegen for many individual pragmas for OpenMP but combinations are not completed as yet. +We plan to continue codegen code drop aiming for completion for 3.7. Please see this link for up-to-date +`status _` +LLVM’s OpenMP runtime library, originally developed by Intel, has been modified to work on ARM, PowerPC, +as well as X86. The Runtime Library's compatibility with GCC 4.9 is improved +- missed entry points added, Barrier and fork/join code improved, one more type of barrier enabled. +Support for ppc64le architecture is now available and automatically detected when using cmake system. +Using makefile the new "ppc64le" arch type is available. +Contributors to this work include AMD, Argonne National Lab., IBM, Intel, Texas Instruments, University of Houston and many others. + Internal API Changes -------------------- Modified: vendor/clang/dist/include/clang/Basic/DiagnosticGroups.td ============================================================================== --- vendor/clang/dist/include/clang/Basic/DiagnosticGroups.td Sat Feb 14 12:18:37 2015 (r278753) +++ vendor/clang/dist/include/clang/Basic/DiagnosticGroups.td Sat Feb 14 12:18:48 2015 (r278754) @@ -749,3 +749,6 @@ def SerializedDiagnostics : DiagGroup<"s // A warning group for warnings about code that clang accepts when // compiling CUDA C/C++ but which is not compatible with the CUDA spec. def CudaCompat : DiagGroup<"cuda-compat">; + +// A warning group for things that will change semantics in the future. +def FutureCompat : DiagGroup<"future-compat">; Modified: vendor/clang/dist/include/clang/Basic/DiagnosticParseKinds.td ============================================================================== --- vendor/clang/dist/include/clang/Basic/DiagnosticParseKinds.td Sat Feb 14 12:18:37 2015 (r278753) +++ vendor/clang/dist/include/clang/Basic/DiagnosticParseKinds.td Sat Feb 14 12:18:48 2015 (r278754) @@ -802,6 +802,10 @@ def warn_cxx98_compat_lambda : Warning< def err_lambda_missing_parens : Error< "lambda requires '()' before %select{'mutable'|return type|" "attribute specifier}0">; +def warn_init_capture_direct_list_init : Warning< + "direct list initialization of a lambda init-capture will change meaning in " + "a future version of Clang; insert an '=' to avoid a change in behavior">, + InGroup; // Availability attribute def err_expected_version : Error< Modified: vendor/clang/dist/include/clang/Basic/DiagnosticSemaKinds.td ============================================================================== --- vendor/clang/dist/include/clang/Basic/DiagnosticSemaKinds.td Sat Feb 14 12:18:37 2015 (r278753) +++ vendor/clang/dist/include/clang/Basic/DiagnosticSemaKinds.td Sat Feb 14 12:18:48 2015 (r278754) @@ -1635,6 +1635,10 @@ def err_auto_var_init_multiple_expressio def err_auto_var_init_paren_braces : Error< "cannot deduce type for variable %0 with type %1 from " "parenthesized initializer list">; +def warn_auto_var_direct_list_init : Warning< + "direct list initialization of a variable with a deduced type will change " + "meaning in a future version of Clang; insert an '=' to avoid a change in " + "behavior">, InGroup; def err_auto_new_ctor_multiple_expressions : Error< "new expression for type %0 contains multiple constructor arguments">; def err_auto_missing_trailing_return : Error< Modified: vendor/clang/dist/lib/AST/DeclCXX.cpp ============================================================================== --- vendor/clang/dist/lib/AST/DeclCXX.cpp Sat Feb 14 12:18:37 2015 (r278753) +++ vendor/clang/dist/lib/AST/DeclCXX.cpp Sat Feb 14 12:18:48 2015 (r278754) @@ -1693,12 +1693,12 @@ const Type *CXXCtorInitializer::getBaseC } SourceLocation CXXCtorInitializer::getSourceLocation() const { - if (isAnyMemberInitializer()) - return getMemberLocation(); - if (isInClassMemberInitializer()) return getAnyMember()->getLocation(); + if (isAnyMemberInitializer()) + return getMemberLocation(); + if (TypeSourceInfo *TSInfo = Initializee.get()) return TSInfo->getTypeLoc().getLocalSourceRange().getBegin(); Modified: vendor/clang/dist/lib/CodeGen/CGClass.cpp ============================================================================== --- vendor/clang/dist/lib/CodeGen/CGClass.cpp Sat Feb 14 12:18:37 2015 (r278753) +++ vendor/clang/dist/lib/CodeGen/CGClass.cpp Sat Feb 14 12:18:48 2015 (r278754) @@ -544,7 +544,7 @@ static void EmitMemberInitializer(CodeGe CXXCtorInitializer *MemberInit, const CXXConstructorDecl *Constructor, FunctionArgList &Args) { - ApplyDebugLocation Loc(CGF, MemberInit->getMemberLocation()); + ApplyDebugLocation Loc(CGF, MemberInit->getSourceLocation()); assert(MemberInit->isAnyMemberInitializer() && "Must have member initializer!"); assert(MemberInit->getInit() && "Must have initializer!"); @@ -598,7 +598,6 @@ static void EmitMemberInitializer(CodeGe ArrayRef ArrayIndexes; if (MemberInit->getNumArrayIndices()) ArrayIndexes = MemberInit->getArrayIndexes(); - ApplyDebugLocation DL(CGF, MemberInit->getMemberLocation()); CGF.EmitInitializerForField(Field, LHS, MemberInit->getInit(), ArrayIndexes); } Modified: vendor/clang/dist/lib/CodeGen/CGExprScalar.cpp ============================================================================== --- vendor/clang/dist/lib/CodeGen/CGExprScalar.cpp Sat Feb 14 12:18:37 2015 (r278753) +++ vendor/clang/dist/lib/CodeGen/CGExprScalar.cpp Sat Feb 14 12:18:48 2015 (r278754) @@ -3393,11 +3393,12 @@ Value *CodeGenFunction::EmitScalarExpr(c assert(E && hasScalarEvaluationKind(E->getType()) && "Invalid scalar expression to emit"); + bool hasDebugInfo = getDebugInfo(); if (isa(E)) disableDebugInfo(); Value *V = ScalarExprEmitter(*this, IgnoreResultAssign) .Visit(const_cast(E)); - if (isa(E)) + if (isa(E) && hasDebugInfo) enableDebugInfo(); return V; } Modified: vendor/clang/dist/lib/CodeGen/CodeGenModule.cpp ============================================================================== --- vendor/clang/dist/lib/CodeGen/CodeGenModule.cpp Sat Feb 14 12:18:37 2015 (r278753) +++ vendor/clang/dist/lib/CodeGen/CodeGenModule.cpp Sat Feb 14 12:18:48 2015 (r278754) @@ -935,8 +935,8 @@ static void emitUsed(CodeGenModule &CGM, UsedArray.resize(List.size()); for (unsigned i = 0, e = List.size(); i != e; ++i) { UsedArray[i] = - llvm::ConstantExpr::getBitCast(cast(&*List[i]), - CGM.Int8PtrTy); + llvm::ConstantExpr::getPointerBitCastOrAddrSpaceCast( + cast(&*List[i]), CGM.Int8PtrTy); } if (UsedArray.empty()) Modified: vendor/clang/dist/lib/CodeGen/CodeGenModule.h ============================================================================== --- vendor/clang/dist/lib/CodeGen/CodeGenModule.h Sat Feb 14 12:18:37 2015 (r278753) +++ vendor/clang/dist/lib/CodeGen/CodeGenModule.h Sat Feb 14 12:18:48 2015 (r278754) @@ -324,7 +324,7 @@ private: /// referenced. These get code generated when the module is done. struct DeferredGlobal { DeferredGlobal(llvm::GlobalValue *GV, GlobalDecl GD) : GV(GV), GD(GD) {} - llvm::AssertingVH GV; + llvm::TrackingVH GV; GlobalDecl GD; }; std::vector DeferredDeclsToEmit; Modified: vendor/clang/dist/lib/Driver/Tools.cpp ============================================================================== --- vendor/clang/dist/lib/Driver/Tools.cpp Sat Feb 14 12:18:37 2015 (r278753) +++ vendor/clang/dist/lib/Driver/Tools.cpp Sat Feb 14 12:18:48 2015 (r278754) @@ -13,6 +13,7 @@ #include "clang/Basic/LangOptions.h" #include "clang/Basic/ObjCRuntime.h" #include "clang/Basic/Version.h" +#include "clang/Config/config.h" #include "clang/Driver/Action.h" #include "clang/Driver/Compilation.h" #include "clang/Driver/Driver.h" @@ -1538,7 +1539,7 @@ static void AddGoldPlugin(const ToolChai // as gold requires -plugin to come before any -plugin-opt that -Wl might // forward. CmdArgs.push_back("-plugin"); - std::string Plugin = ToolChain.getDriver().Dir + "/../lib/LLVMgold.so"; + std::string Plugin = ToolChain.getDriver().Dir + "/../lib" CLANG_LIBDIR_SUFFIX "/LLVMgold.so"; CmdArgs.push_back(Args.MakeArgString(Plugin)); // Try to pass driver level flags relevant to LTO code generation down to Modified: vendor/clang/dist/lib/Parse/ParseExprCXX.cpp ============================================================================== --- vendor/clang/dist/lib/Parse/ParseExprCXX.cpp Sat Feb 14 12:18:37 2015 (r278753) +++ vendor/clang/dist/lib/Parse/ParseExprCXX.cpp Sat Feb 14 12:18:48 2015 (r278754) @@ -894,11 +894,16 @@ Optional Parser::ParseLambdaIn // to save the necessary state, and restore it later. EnterExpressionEvaluationContext EC(Actions, Sema::PotentiallyEvaluated); - TryConsumeToken(tok::equal); + bool HadEquals = TryConsumeToken(tok::equal); - if (!SkippedInits) + if (!SkippedInits) { + // Warn on constructs that will change meaning when we implement N3922 + if (!HadEquals && Tok.is(tok::l_brace)) { + Diag(Tok, diag::warn_init_capture_direct_list_init) + << FixItHint::CreateInsertion(Tok.getLocation(), "="); + } Init = ParseInitializer(); - else if (Tok.is(tok::l_brace)) { + } else if (Tok.is(tok::l_brace)) { BalancedDelimiterTracker Braces(*this, tok::l_brace); Braces.consumeOpen(); Braces.skipToEnd(); Modified: vendor/clang/dist/lib/Sema/SemaDecl.cpp ============================================================================== --- vendor/clang/dist/lib/Sema/SemaDecl.cpp Sat Feb 14 12:18:37 2015 (r278753) +++ vendor/clang/dist/lib/Sema/SemaDecl.cpp Sat Feb 14 12:18:48 2015 (r278754) @@ -8702,6 +8702,14 @@ void Sema::AddInitializerToDecl(Decl *Re CheckVariableDeclarationType(VDecl); if (VDecl->isInvalidDecl()) return; + + // If all looks well, warn if this is a case that will change meaning when + // we implement N3922. + if (DirectInit && !CXXDirectInit && isa(Init)) { + Diag(Init->getLocStart(), + diag::warn_auto_var_direct_list_init) + << FixItHint::CreateInsertion(Init->getLocStart(), "="); + } } // dllimport cannot be used on variable definitions. Modified: vendor/clang/dist/lib/Sema/SemaLookup.cpp ============================================================================== --- vendor/clang/dist/lib/Sema/SemaLookup.cpp Sat Feb 14 12:18:37 2015 (r278753) +++ vendor/clang/dist/lib/Sema/SemaLookup.cpp Sat Feb 14 12:18:48 2015 (r278754) @@ -2500,8 +2500,18 @@ Sema::SpecialMemberOverloadResult *Sema: // will always be a (possibly implicit) declaration to shadow any others. OverloadCandidateSet OCS(RD->getLocation(), OverloadCandidateSet::CSK_Normal); DeclContext::lookup_result R = RD->lookup(Name); - assert(!R.empty() && - "lookup for a constructor or assignment operator was empty"); + + if (R.empty()) { + // We might have no default constructor because we have a lambda's closure + // type, rather than because there's some other declared constructor. + // Every class has a copy/move constructor, copy/move assignment, and + // destructor. + assert(SM == CXXDefaultConstructor && + "lookup for a constructor or assignment operator was empty"); + Result->setMethod(nullptr); + Result->setKind(SpecialMemberOverloadResult::NoMemberOrDeleted); + return Result; + } // Copy the candidates as our processing of them may load new declarations // from an external source and invalidate lookup_result. Modified: vendor/clang/dist/lib/Serialization/ASTWriterDecl.cpp ============================================================================== --- vendor/clang/dist/lib/Serialization/ASTWriterDecl.cpp Sat Feb 14 12:18:37 2015 (r278753) +++ vendor/clang/dist/lib/Serialization/ASTWriterDecl.cpp Sat Feb 14 12:18:48 2015 (r278754) @@ -370,21 +370,21 @@ void ASTDeclWriter::VisitFunctionDecl(Fu // FunctionDecl's body is handled last at ASTWriterDecl::Visit, // after everything else is written. - Record.push_back(D->getStorageClass()); // FIXME: stable encoding + Record.push_back((int)D->SClass); // FIXME: stable encoding Record.push_back(D->IsInline); - Record.push_back(D->isInlineSpecified()); - Record.push_back(D->isVirtualAsWritten()); - Record.push_back(D->isPure()); - Record.push_back(D->hasInheritedPrototype()); - Record.push_back(D->hasWrittenPrototype()); - Record.push_back(D->isDeletedAsWritten()); - Record.push_back(D->isTrivial()); - Record.push_back(D->isDefaulted()); - Record.push_back(D->isExplicitlyDefaulted()); - Record.push_back(D->hasImplicitReturnZero()); - Record.push_back(D->isConstexpr()); + Record.push_back(D->IsInlineSpecified); + Record.push_back(D->IsVirtualAsWritten); + Record.push_back(D->IsPure); + Record.push_back(D->HasInheritedPrototype); + Record.push_back(D->HasWrittenPrototype); + Record.push_back(D->IsDeleted); + Record.push_back(D->IsTrivial); + Record.push_back(D->IsDefaulted); + Record.push_back(D->IsExplicitlyDefaulted); + Record.push_back(D->HasImplicitReturnZero); + Record.push_back(D->IsConstexpr); Record.push_back(D->HasSkippedBody); - Record.push_back(D->isLateTemplateParsed()); + Record.push_back(D->IsLateTemplateParsed); Record.push_back(D->getLinkageInternal()); Writer.AddSourceLocation(D->getLocEnd(), Record); @@ -1802,7 +1802,7 @@ void ASTWriter::WriteDeclAbbrevs() { Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 1)); // Pure Abv->Add(BitCodeAbbrevOp(0)); // HasInheritedProto Abv->Add(BitCodeAbbrevOp(1)); // HasWrittenProto - Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 1)); // DeletedAsWritten + Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 1)); // Deleted Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 1)); // Trivial Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 1)); // Defaulted Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 1)); // ExplicitlyDefaulted Modified: vendor/clang/dist/test/CXX/expr/expr.prim/expr.prim.lambda/p11-1y.cpp ============================================================================== --- vendor/clang/dist/test/CXX/expr/expr.prim/expr.prim.lambda/p11-1y.cpp Sat Feb 14 12:18:37 2015 (r278753) +++ vendor/clang/dist/test/CXX/expr/expr.prim/expr.prim.lambda/p11-1y.cpp Sat Feb 14 12:18:48 2015 (r278754) @@ -48,7 +48,7 @@ auto bad_init_2 = [a(1, 2)] {}; // expec auto bad_init_3 = [&a(void_fn())] {}; // expected-error {{cannot form a reference to 'void'}} auto bad_init_4 = [a(void_fn())] {}; // expected-error {{has incomplete type 'void'}} auto bad_init_5 = [a(overload_fn)] {}; // expected-error {{cannot deduce type for lambda capture 'a' from initializer of type ' void pack_1(T...t) { (void)[a(t...)] {}; } // expected-error {{initializer missing for lambda capture 'a'}} template void pack_1<>(); // expected-note {{instantiation of}} @@ -61,7 +61,7 @@ auto a = [a(4), b = 5, &c = static_cast< using T = decltype(c); using T = const int &; }; -auto b = [a{0}] {}; // expected-error {{include }} +auto b = [a{0}] {}; // expected-error {{include }} expected-warning {{will change meaning in a future version of Clang}} struct S { S(); S(S&&); }; template struct remove_reference { typedef T type; }; Added: vendor/clang/dist/test/CodeGenCUDA/llvm-used.cu ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/clang/dist/test/CodeGenCUDA/llvm-used.cu Sat Feb 14 12:18:48 2015 (r278754) @@ -0,0 +1,8 @@ +// RUN: %clang_cc1 -emit-llvm %s -o - -fcuda-is-device -triple nvptx64-unknown-unknown | FileCheck %s + + +// Make sure we emit the proper addrspacecast for llvm.used. PR22383 exposed an +// issue where we were generating a bitcast instead of an addrspacecast. + +// CHECK: @llvm.used = appending global [1 x i8*] [i8* addrspacecast (i8 addrspace(1)* bitcast ([0 x i32] addrspace(1)* @a to i8 addrspace(1)*) to i8*)], section "llvm.metadata" +__attribute__((device)) __attribute__((__used__)) int a[] = {}; Modified: vendor/clang/dist/test/CodeGenCXX/ctor-dtor-alias.cpp ============================================================================== --- vendor/clang/dist/test/CodeGenCXX/ctor-dtor-alias.cpp Sat Feb 14 12:18:37 2015 (r278753) +++ vendor/clang/dist/test/CodeGenCXX/ctor-dtor-alias.cpp Sat Feb 14 12:18:48 2015 (r278754) @@ -232,3 +232,14 @@ foo::~foo() {} // CHECK6: @_ZN6test113fooD2Ev = alias {{.*}} @_ZN6test113barD2Ev // CHECK6: @_ZN6test113fooD1Ev = alias {{.*}} @_ZN6test113fooD2Ev } + +namespace test12 { +template +struct foo { + ~foo() { delete this; } +}; + +template class foo<1>; +// CHECK6: @_ZN6test123fooILi1EED1Ev = weak_odr alias {{.*}} @_ZN6test123fooILi1EED2Ev +// CHECK6: define weak_odr void @_ZN6test123fooILi1EED2Ev({{.*}}) {{.*}} comdat($_ZN6test123fooILi1EED5Ev) +} Modified: vendor/clang/dist/test/CodeGenCXX/debug-info-line.cpp ============================================================================== --- vendor/clang/dist/test/CodeGenCXX/debug-info-line.cpp Sat Feb 14 12:18:37 2015 (r278753) +++ vendor/clang/dist/test/CodeGenCXX/debug-info-line.cpp Sat Feb 14 12:18:48 2015 (r278754) @@ -166,6 +166,33 @@ void f13() { F13_IMPL; } +struct f14 { + f14(int); +}; + +// CHECK-LABEL: define +struct f14_use { +// CHECK: call {{.*}}, !dbg [[DBG_F14_CTOR_CALL:![0-9]*]] +#line 1600 + f14 v + = + 1; + f14_use(); +}; + +f14_use::f14_use() = default; + +// CHECK-LABEL: define + +// CHECK-LABEL: define +int f21_a(int = 0); +void f21_b(int = f21_a()); +void f21() { +// CHECK: call {{.*}}f21_b{{.*}}, !dbg [[DBG_F21:![0-9]*]] +#line 2300 + f21_b(); +} + // CHECK: [[DBG_F1]] = !MDLocation(line: 100, // CHECK: [[DBG_FOO_VALUE]] = !MDLocation(line: 200, // CHECK: [[DBG_FOO_REF]] = !MDLocation(line: 202, Added: vendor/clang/dist/test/PCH/implicitly-deleted.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/clang/dist/test/PCH/implicitly-deleted.cpp Sat Feb 14 12:18:48 2015 (r278754) @@ -0,0 +1,18 @@ +// RUN: %clang_cc1 -std=c++11 -x c++-header %s -emit-pch -o %t.pch +// RUN: %clang_cc1 -std=c++11 -x c++ /dev/null -include-pch %t.pch +class move_only { move_only(const move_only&) = delete; move_only(move_only&&); }; +struct sb { + move_only il; + sb(); + sb(sb &&); +}; + +template T make(); +template void doit(decltype(T(make()))*) { T(make()); } +template void doit(...) { T(make()); } +template void later() { doit(0); } + +void fn1() { + sb x; + later(); +} Modified: vendor/clang/dist/test/Parser/cxx0x-lambda-expressions.cpp ============================================================================== --- vendor/clang/dist/test/Parser/cxx0x-lambda-expressions.cpp Sat Feb 14 12:18:37 2015 (r278753) +++ vendor/clang/dist/test/Parser/cxx0x-lambda-expressions.cpp Sat Feb 14 12:18:48 2015 (r278754) @@ -61,7 +61,7 @@ class C { int z; void init_capture() { [n(0)] () mutable -> int { return ++n; }; // expected-warning{{extension}} - [n{0}] { return; }; // expected-error {{}} expected-warning{{extension}} + [n{0}] { return; }; // expected-error {{}} expected-warning{{extension}} expected-warning{{will change meaning in a future version}} [n = 0] { return ++n; }; // expected-error {{captured by copy in a non-mutable}} expected-warning{{extension}} [n = {0}] { return; }; // expected-error {{}} expected-warning{{extension}} [a([&b = z]{})](){}; // expected-warning 2{{extension}} Modified: vendor/clang/dist/test/Parser/objcxx0x-lambda-expressions.mm ============================================================================== --- vendor/clang/dist/test/Parser/objcxx0x-lambda-expressions.mm Sat Feb 14 12:18:37 2015 (r278753) +++ vendor/clang/dist/test/Parser/objcxx0x-lambda-expressions.mm Sat Feb 14 12:18:48 2015 (r278754) @@ -21,7 +21,7 @@ class C { [foo(bar)] () {}; [foo = bar] () {}; - [foo{bar}] () {}; // expected-error {{}} + [foo{bar}] () {}; // expected-error {{}} expected-warning {{will change meaning}} [foo = {bar}] () {}; // expected-error {{}} [foo(bar) baz] () {}; // expected-error {{called object type 'int' is not a function}} Modified: vendor/clang/dist/test/SemaCXX/cxx0x-initializer-stdinitializerlist.cpp ============================================================================== --- vendor/clang/dist/test/SemaCXX/cxx0x-initializer-stdinitializerlist.cpp Sat Feb 14 12:18:37 2015 (r278753) +++ vendor/clang/dist/test/SemaCXX/cxx0x-initializer-stdinitializerlist.cpp Sat Feb 14 12:18:48 2015 (r278754) @@ -117,6 +117,7 @@ void argument_deduction() { void auto_deduction() { auto l = {1, 2, 3, 4}; + auto l2 {1, 2, 3, 4}; // expected-warning {{will change meaning in a future version of Clang}} static_assert(same_type>::value, ""); auto bl = {1, 2.0}; // expected-error {{cannot deduce}} Modified: vendor/clang/dist/test/SemaCXX/lambda-expressions.cpp ============================================================================== --- vendor/clang/dist/test/SemaCXX/lambda-expressions.cpp Sat Feb 14 12:18:37 2015 (r278753) +++ vendor/clang/dist/test/SemaCXX/lambda-expressions.cpp Sat Feb 14 12:18:48 2015 (r278754) @@ -437,3 +437,12 @@ namespace error_in_transform_prototype { f(S()); // expected-note {{requested here}} } } + +namespace PR21857 { + template struct fun : Fn { + fun() = default; + using Fn::operator(); + }; + template fun wrap(Fn fn); + auto x = wrap([](){}); +} From owner-svn-src-vendor@FreeBSD.ORG Sat Feb 14 12:19:36 2015 Return-Path: Delivered-To: svn-src-vendor@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 09D3E72C; Sat, 14 Feb 2015 12:19:36 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CFC349FE; Sat, 14 Feb 2015 12:19:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1ECJZkH024056; Sat, 14 Feb 2015 12:19:35 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1ECJZI2024055; Sat, 14 Feb 2015 12:19:35 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201502141219.t1ECJZI2024055@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 14 Feb 2015 12:19:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r278755 - vendor/clang/clang-release_360-r229040 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Feb 2015 12:19:36 -0000 Author: dim Date: Sat Feb 14 12:19:35 2015 New Revision: 278755 URL: https://svnweb.freebsd.org/changeset/base/278755 Log: Tag clang tags/RELEASE_360/rc3 r229040 (effectively, 3.6.0 RC3). Added: vendor/clang/clang-release_360-r229040/ - copied from r278754, vendor/clang/dist/