From owner-svn-src-vendor@FreeBSD.ORG Thu Jul 2 09:13:32 2009 Return-Path: Delivered-To: svn-src-vendor@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F2CB810656C2 for ; Thu, 2 Jul 2009 09:13:32 +0000 (UTC) (envelope-from eavesdropped@bajart.be) Received: from xowodos.fastwebnet.it (93-36-221-215.ip62.fastwebnet.it [93.36.221.215]) by mx1.freebsd.org (Postfix) with SMTP id 70FF08FC0C for ; Thu, 2 Jul 2009 09:13:31 +0000 (UTC) (envelope-from eavesdropped@bajart.be) Date: Thu, 02 Jul 2009 09:13:31 +0100 To: svn-src-vendor@freebsd.org Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Message-ID: <4ddf25c93299_mHs@nvp.net> From: Buzzell Mederios Subject: Authezntic Tanttra, sexuality, and Sensuality X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.5 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: Thu, 02 Jul 2009 09:13:33 -0000 Authwentic Takntra, sexuality, and Sensuality www. med95. net. Japan mran maeks 37,760 calls to "kind" operators From owner-svn-src-vendor@FreeBSD.ORG Sat Jul 4 13:58:27 2009 Return-Path: Delivered-To: svn-src-vendor@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 40F311065670; Sat, 4 Jul 2009 13:58:27 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2ABE78FC16; Sat, 4 Jul 2009 13:58:27 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n64DwQpU014393; Sat, 4 Jul 2009 13:58:26 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n64DwQFg014366; Sat, 4 Jul 2009 13:58:26 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <200907041358.n64DwQFg014366@svn.freebsd.org> From: Ed Schouten Date: Sat, 4 Jul 2009 13:58:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r195340 - in vendor/llvm/dist: . autoconf cmake docs examples/BrainF examples/Fibonacci examples/HowToUseJIT examples/Kaleidoscope examples/ModuleMaker examples/ParallelJIT include/llvm... X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.5 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, 04 Jul 2009 13:58:27 -0000 Author: ed Date: Sat Jul 4 13:58:26 2009 New Revision: 195340 URL: http://svn.freebsd.org/changeset/base/195340 Log: Import LLVM 74788. Added: vendor/llvm/dist/include/llvm/LLVMContext.h vendor/llvm/dist/include/llvm/System/Errno.h vendor/llvm/dist/include/llvm/Transforms/Utils/SSI.h vendor/llvm/dist/lib/CompilerDriver/BuiltinOptions.cpp vendor/llvm/dist/lib/CompilerDriver/Main.cpp vendor/llvm/dist/lib/System/Errno.cpp vendor/llvm/dist/lib/Target/ARM/Thumb1InstrInfo.cpp vendor/llvm/dist/lib/Target/ARM/Thumb1InstrInfo.h vendor/llvm/dist/lib/Target/ARM/Thumb1RegisterInfo.cpp vendor/llvm/dist/lib/Target/ARM/Thumb1RegisterInfo.h vendor/llvm/dist/lib/Target/ARM/Thumb2InstrInfo.cpp vendor/llvm/dist/lib/Target/ARM/Thumb2InstrInfo.h vendor/llvm/dist/lib/Target/ARM/Thumb2RegisterInfo.cpp vendor/llvm/dist/lib/Target/ARM/Thumb2RegisterInfo.h vendor/llvm/dist/lib/Transforms/Utils/SSI.cpp vendor/llvm/dist/lib/VMCore/LLVMContext.cpp vendor/llvm/dist/lib/VMCore/LLVMContextImpl.h vendor/llvm/dist/test/Analysis/LoopDependenceAnalysis/ vendor/llvm/dist/test/Analysis/LoopDependenceAnalysis/dg.exp vendor/llvm/dist/test/Analysis/LoopDependenceAnalysis/local-array.ll vendor/llvm/dist/test/Analysis/LoopDependenceAnalysis/no-array.ll vendor/llvm/dist/test/Analysis/LoopDependenceAnalysis/siv-strong1.ll vendor/llvm/dist/test/Analysis/LoopDependenceAnalysis/siv-strong2.ll vendor/llvm/dist/test/Analysis/LoopDependenceAnalysis/ziv1.ll vendor/llvm/dist/test/Analysis/LoopDependenceAnalysis/ziv2.ll vendor/llvm/dist/test/CodeGen/ARM/2009-06-30-RegScavengerAssert.ll vendor/llvm/dist/test/CodeGen/ARM/2009-06-30-RegScavengerAssert2.ll vendor/llvm/dist/test/CodeGen/ARM/2009-06-30-RegScavengerAssert3.ll vendor/llvm/dist/test/CodeGen/ARM/2009-06-30-RegScavengerAssert4.ll vendor/llvm/dist/test/CodeGen/ARM/2009-06-30-RegScavengerAssert5.ll vendor/llvm/dist/test/CodeGen/ARM/2009-07-01-CommuteBug.ll vendor/llvm/dist/test/CodeGen/PowerPC/available-externally.ll vendor/llvm/dist/test/CodeGen/Thumb2/thumb2-cmn.ll vendor/llvm/dist/test/CodeGen/Thumb2/thumb2-jumptbl.ll vendor/llvm/dist/test/CodeGen/Thumb2/thumb2-ldr.ll vendor/llvm/dist/test/CodeGen/Thumb2/thumb2-ldr_ext.ll vendor/llvm/dist/test/CodeGen/Thumb2/thumb2-ldr_post.ll vendor/llvm/dist/test/CodeGen/Thumb2/thumb2-ldr_pre.ll vendor/llvm/dist/test/CodeGen/Thumb2/thumb2-ldrb.ll vendor/llvm/dist/test/CodeGen/Thumb2/thumb2-ldrh.ll vendor/llvm/dist/test/CodeGen/Thumb2/thumb2-sbc2.ll vendor/llvm/dist/test/CodeGen/Thumb2/thumb2-str.ll vendor/llvm/dist/test/CodeGen/Thumb2/thumb2-str_post.ll vendor/llvm/dist/test/CodeGen/Thumb2/thumb2-str_pre.ll vendor/llvm/dist/test/CodeGen/Thumb2/thumb2-strb.ll vendor/llvm/dist/test/CodeGen/Thumb2/thumb2-strh.ll vendor/llvm/dist/test/CodeGen/Thumb2/thumb2-sub.ll vendor/llvm/dist/test/CodeGen/Thumb2/thumb2-sub2.ll vendor/llvm/dist/test/CodeGen/Thumb2/thumb2-sub4.ll vendor/llvm/dist/test/CodeGen/Thumb2/thumb2-sub5.ll vendor/llvm/dist/test/CodeGen/Thumb2/thumb2-sxt_rot.ll vendor/llvm/dist/test/CodeGen/Thumb2/thumb2-teq.ll vendor/llvm/dist/test/CodeGen/Thumb2/thumb2-teq2.ll vendor/llvm/dist/test/CodeGen/Thumb2/thumb2-tst.ll vendor/llvm/dist/test/CodeGen/Thumb2/thumb2-tst2.ll vendor/llvm/dist/test/CodeGen/Thumb2/thumb2-uxt_rot.ll vendor/llvm/dist/test/CodeGen/Thumb2/thumb2-uxtb.ll vendor/llvm/dist/test/CodeGen/Thumb2/tls1.ll vendor/llvm/dist/test/CodeGen/Thumb2/tls2.ll vendor/llvm/dist/test/CodeGen/X86/fast-isel-constpool.ll vendor/llvm/dist/test/CodeGen/X86/fast-isel-gv.ll vendor/llvm/dist/test/CodeGen/X86/inline-asm-fpstack3.ll vendor/llvm/dist/test/CodeGen/X86/inline-asm-fpstack4.ll vendor/llvm/dist/test/CodeGen/X86/inline-asm-fpstack5.ll vendor/llvm/dist/test/Feature/mdnode2.ll vendor/llvm/dist/test/Feature/mdnode3.ll vendor/llvm/dist/test/FrontendC++/2009-06-30-ByrefBlock.cpp vendor/llvm/dist/test/MC/AsmParser/directive_align.s vendor/llvm/dist/test/MC/AsmParser/directive_symbol_attrs.s vendor/llvm/dist/test/MC/AsmParser/exprs.s vendor/llvm/dist/test/MC/AsmParser/x86_operands.s vendor/llvm/dist/test/TableGen/ListArgs.td vendor/llvm/dist/test/TableGen/ListArgsSimple.td vendor/llvm/dist/test/Transforms/IndVarSimplify/loop_evaluate9.ll vendor/llvm/dist/test/Transforms/InstCombine/2009-07-02-MaskedIntVector.ll vendor/llvm/dist/test/Transforms/InstCombine/bitcast-scalar-to-vector.ll vendor/llvm/dist/test/Transforms/LoopIndexSplit/non-iv-cmp-operand.ll vendor/llvm/dist/test/Transforms/LoopSimplify/merge-exits.ll vendor/llvm/dist/tools/llvm-mc/AsmExpr.cpp vendor/llvm/dist/tools/llvm-mc/AsmExpr.h vendor/llvm/dist/unittests/VMCore/PassManagerTest.cpp vendor/llvm/dist/utils/crosstool/ARM/README Deleted: vendor/llvm/dist/lib/Target/ARM/ThumbInstrInfo.cpp vendor/llvm/dist/lib/Target/ARM/ThumbInstrInfo.h Modified: vendor/llvm/dist/Makefile.config.in vendor/llvm/dist/Makefile.rules vendor/llvm/dist/autoconf/configure.ac vendor/llvm/dist/cmake/config-ix.cmake vendor/llvm/dist/configure vendor/llvm/dist/docs/CodingStandards.html vendor/llvm/dist/docs/CompilerDriver.html vendor/llvm/dist/docs/FAQ.html vendor/llvm/dist/docs/ReleaseNotes-2.6.html vendor/llvm/dist/docs/TableGenFundamentals.html vendor/llvm/dist/docs/WritingAnLLVMPass.html vendor/llvm/dist/examples/BrainF/BrainF.cpp vendor/llvm/dist/examples/BrainF/BrainF.h vendor/llvm/dist/examples/BrainF/BrainFDriver.cpp vendor/llvm/dist/examples/Fibonacci/fibonacci.cpp vendor/llvm/dist/examples/HowToUseJIT/HowToUseJIT.cpp vendor/llvm/dist/examples/Kaleidoscope/toy.cpp vendor/llvm/dist/examples/ModuleMaker/ModuleMaker.cpp vendor/llvm/dist/examples/ParallelJIT/ParallelJIT.cpp vendor/llvm/dist/include/llvm-c/BitReader.h vendor/llvm/dist/include/llvm-c/Core.h vendor/llvm/dist/include/llvm-c/lto.h vendor/llvm/dist/include/llvm/ADT/APInt.h vendor/llvm/dist/include/llvm/ADT/FoldingSet.h vendor/llvm/dist/include/llvm/ADT/PointerUnion.h vendor/llvm/dist/include/llvm/ADT/Statistic.h vendor/llvm/dist/include/llvm/ADT/Triple.h vendor/llvm/dist/include/llvm/Analysis/DebugInfo.h vendor/llvm/dist/include/llvm/Analysis/Dominators.h vendor/llvm/dist/include/llvm/Analysis/IVUsers.h vendor/llvm/dist/include/llvm/Analysis/LoopDependenceAnalysis.h vendor/llvm/dist/include/llvm/Analysis/LoopInfo.h vendor/llvm/dist/include/llvm/Analysis/ScalarEvolution.h vendor/llvm/dist/include/llvm/Analysis/ScalarEvolutionExpander.h vendor/llvm/dist/include/llvm/Analysis/ScalarEvolutionExpressions.h vendor/llvm/dist/include/llvm/Assembly/Parser.h vendor/llvm/dist/include/llvm/Bitcode/Archive.h vendor/llvm/dist/include/llvm/Bitcode/BitstreamReader.h vendor/llvm/dist/include/llvm/Bitcode/ReaderWriter.h vendor/llvm/dist/include/llvm/CodeGen/AsmPrinter.h vendor/llvm/dist/include/llvm/CodeGen/BinaryObject.h vendor/llvm/dist/include/llvm/CodeGen/LiveIntervalAnalysis.h vendor/llvm/dist/include/llvm/CodeGen/MachineFunction.h vendor/llvm/dist/include/llvm/CodeGen/MachineInstrBuilder.h vendor/llvm/dist/include/llvm/CodeGen/MachineLoopInfo.h vendor/llvm/dist/include/llvm/CodeGen/MachineOperand.h vendor/llvm/dist/include/llvm/CodeGen/RegisterScavenging.h vendor/llvm/dist/include/llvm/CodeGen/SelectionDAG.h vendor/llvm/dist/include/llvm/CodeGen/SelectionDAGNodes.h vendor/llvm/dist/include/llvm/CodeGen/ValueTypes.h vendor/llvm/dist/include/llvm/CodeGen/ValueTypes.td vendor/llvm/dist/include/llvm/CompilerDriver/Main.inc vendor/llvm/dist/include/llvm/Config/config.h.cmake vendor/llvm/dist/include/llvm/Config/config.h.in vendor/llvm/dist/include/llvm/Debugger/Debugger.h vendor/llvm/dist/include/llvm/DerivedTypes.h vendor/llvm/dist/include/llvm/Function.h vendor/llvm/dist/include/llvm/Intrinsics.td vendor/llvm/dist/include/llvm/LinkAllPasses.h vendor/llvm/dist/include/llvm/LinkAllVMCore.h vendor/llvm/dist/include/llvm/Linker.h vendor/llvm/dist/include/llvm/MC/MCContext.h vendor/llvm/dist/include/llvm/MC/MCInst.h vendor/llvm/dist/include/llvm/MC/MCSection.h vendor/llvm/dist/include/llvm/MC/MCStreamer.h vendor/llvm/dist/include/llvm/MC/MCSymbol.h vendor/llvm/dist/include/llvm/MC/MCValue.h vendor/llvm/dist/include/llvm/Module.h vendor/llvm/dist/include/llvm/Pass.h vendor/llvm/dist/include/llvm/Support/SourceMgr.h vendor/llvm/dist/include/llvm/Support/TypeBuilder.h vendor/llvm/dist/include/llvm/Target/TargetCallingConv.td vendor/llvm/dist/include/llvm/Target/TargetELFWriterInfo.h vendor/llvm/dist/include/llvm/Target/TargetLowering.h vendor/llvm/dist/include/llvm/Transforms/Scalar.h vendor/llvm/dist/include/llvm/Transforms/Utils/Cloning.h vendor/llvm/dist/include/llvm/Transforms/Utils/Local.h vendor/llvm/dist/lib/Analysis/DebugInfo.cpp vendor/llvm/dist/lib/Analysis/IPA/Andersens.cpp vendor/llvm/dist/lib/Analysis/LoopDependenceAnalysis.cpp vendor/llvm/dist/lib/Analysis/LoopInfo.cpp vendor/llvm/dist/lib/Analysis/LoopPass.cpp vendor/llvm/dist/lib/Analysis/ScalarEvolution.cpp vendor/llvm/dist/lib/Analysis/ScalarEvolutionExpander.cpp vendor/llvm/dist/lib/Analysis/ValueTracking.cpp vendor/llvm/dist/lib/Archive/Archive.cpp vendor/llvm/dist/lib/Archive/ArchiveInternals.h vendor/llvm/dist/lib/Archive/ArchiveReader.cpp vendor/llvm/dist/lib/Archive/ArchiveWriter.cpp vendor/llvm/dist/lib/AsmParser/LLLexer.cpp vendor/llvm/dist/lib/AsmParser/LLLexer.h vendor/llvm/dist/lib/AsmParser/LLParser.cpp vendor/llvm/dist/lib/AsmParser/LLParser.h vendor/llvm/dist/lib/AsmParser/Parser.cpp vendor/llvm/dist/lib/Bitcode/Reader/BitReader.cpp vendor/llvm/dist/lib/Bitcode/Reader/BitcodeReader.cpp vendor/llvm/dist/lib/Bitcode/Reader/BitcodeReader.h vendor/llvm/dist/lib/CodeGen/AsmPrinter/AsmPrinter.cpp vendor/llvm/dist/lib/CodeGen/AsmPrinter/DwarfDebug.cpp vendor/llvm/dist/lib/CodeGen/AsmPrinter/DwarfDebug.h vendor/llvm/dist/lib/CodeGen/CMakeLists.txt vendor/llvm/dist/lib/CodeGen/ELF.h vendor/llvm/dist/lib/CodeGen/ELFCodeEmitter.cpp vendor/llvm/dist/lib/CodeGen/ELFCodeEmitter.h vendor/llvm/dist/lib/CodeGen/ELFWriter.cpp vendor/llvm/dist/lib/CodeGen/ELFWriter.h vendor/llvm/dist/lib/CodeGen/LiveIntervalAnalysis.cpp vendor/llvm/dist/lib/CodeGen/MachineFunction.cpp vendor/llvm/dist/lib/CodeGen/MachineInstr.cpp vendor/llvm/dist/lib/CodeGen/MachineLoopInfo.cpp vendor/llvm/dist/lib/CodeGen/RegAllocLinearScan.cpp vendor/llvm/dist/lib/CodeGen/RegisterScavenging.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/CMakeLists.txt vendor/llvm/dist/lib/CodeGen/SelectionDAG/FastISel.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/LegalizeTypes.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodesEmit.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/SelectionDAG.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp vendor/llvm/dist/lib/CodeGen/SimpleRegisterCoalescing.cpp vendor/llvm/dist/lib/CodeGen/TargetInstrInfoImpl.cpp vendor/llvm/dist/lib/CodeGen/VirtRegRewriter.cpp vendor/llvm/dist/lib/CompilerDriver/Action.cpp vendor/llvm/dist/lib/CompilerDriver/CompilationGraph.cpp vendor/llvm/dist/lib/CompilerDriver/Makefile vendor/llvm/dist/lib/CompilerDriver/Tool.cpp vendor/llvm/dist/lib/Debugger/Debugger.cpp vendor/llvm/dist/lib/Debugger/ProgramInfo.cpp vendor/llvm/dist/lib/ExecutionEngine/JIT/JIT.cpp vendor/llvm/dist/lib/Linker/LinkArchives.cpp vendor/llvm/dist/lib/Linker/LinkItems.cpp vendor/llvm/dist/lib/Linker/Linker.cpp vendor/llvm/dist/lib/MC/MCAsmStreamer.cpp vendor/llvm/dist/lib/Makefile vendor/llvm/dist/lib/Support/APInt.cpp vendor/llvm/dist/lib/Support/Annotation.cpp vendor/llvm/dist/lib/Support/SourceMgr.cpp vendor/llvm/dist/lib/Support/SystemUtils.cpp vendor/llvm/dist/lib/Support/Triple.cpp vendor/llvm/dist/lib/System/CMakeLists.txt vendor/llvm/dist/lib/System/ThreadLocal.cpp vendor/llvm/dist/lib/System/Unix/Unix.h vendor/llvm/dist/lib/System/Win32/ThreadLocal.inc vendor/llvm/dist/lib/Target/ARM/ARM.h vendor/llvm/dist/lib/Target/ARM/ARMAddressingModes.h vendor/llvm/dist/lib/Target/ARM/ARMCodeEmitter.cpp vendor/llvm/dist/lib/Target/ARM/ARMConstantIslandPass.cpp vendor/llvm/dist/lib/Target/ARM/ARMISelDAGToDAG.cpp vendor/llvm/dist/lib/Target/ARM/ARMISelLowering.cpp vendor/llvm/dist/lib/Target/ARM/ARMISelLowering.h vendor/llvm/dist/lib/Target/ARM/ARMInstrFormats.td vendor/llvm/dist/lib/Target/ARM/ARMInstrInfo.cpp vendor/llvm/dist/lib/Target/ARM/ARMInstrInfo.h vendor/llvm/dist/lib/Target/ARM/ARMInstrInfo.td vendor/llvm/dist/lib/Target/ARM/ARMInstrThumb.td vendor/llvm/dist/lib/Target/ARM/ARMInstrThumb2.td vendor/llvm/dist/lib/Target/ARM/ARMMachineFunctionInfo.h vendor/llvm/dist/lib/Target/ARM/ARMRegisterInfo.cpp vendor/llvm/dist/lib/Target/ARM/ARMRegisterInfo.h vendor/llvm/dist/lib/Target/ARM/ARMSubtarget.h vendor/llvm/dist/lib/Target/ARM/ARMTargetMachine.cpp vendor/llvm/dist/lib/Target/ARM/ARMTargetMachine.h vendor/llvm/dist/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp vendor/llvm/dist/lib/Target/ARM/CMakeLists.txt vendor/llvm/dist/lib/Target/ARM/README.txt vendor/llvm/dist/lib/Target/Alpha/Alpha.h vendor/llvm/dist/lib/Target/Alpha/AlphaISelLowering.cpp vendor/llvm/dist/lib/Target/Alpha/AlphaISelLowering.h vendor/llvm/dist/lib/Target/Alpha/AlphaInstrInfo.cpp vendor/llvm/dist/lib/Target/Alpha/AlphaTargetMachine.cpp vendor/llvm/dist/lib/Target/Alpha/AlphaTargetMachine.h vendor/llvm/dist/lib/Target/Alpha/AsmPrinter/AlphaAsmPrinter.cpp vendor/llvm/dist/lib/Target/Alpha/CMakeLists.txt vendor/llvm/dist/lib/Target/CellSPU/AsmPrinter/SPUAsmPrinter.cpp vendor/llvm/dist/lib/Target/CellSPU/CMakeLists.txt vendor/llvm/dist/lib/Target/CellSPU/SPU.h vendor/llvm/dist/lib/Target/CellSPU/SPUISelLowering.cpp vendor/llvm/dist/lib/Target/CellSPU/SPUISelLowering.h vendor/llvm/dist/lib/Target/CellSPU/SPUInstrInfo.cpp vendor/llvm/dist/lib/Target/CellSPU/SPUTargetMachine.cpp vendor/llvm/dist/lib/Target/CellSPU/SPUTargetMachine.h vendor/llvm/dist/lib/Target/IA64/AsmPrinter/IA64AsmPrinter.cpp vendor/llvm/dist/lib/Target/IA64/CMakeLists.txt vendor/llvm/dist/lib/Target/IA64/IA64.h vendor/llvm/dist/lib/Target/IA64/IA64ISelLowering.cpp vendor/llvm/dist/lib/Target/IA64/IA64ISelLowering.h vendor/llvm/dist/lib/Target/IA64/IA64TargetMachine.cpp vendor/llvm/dist/lib/Target/IA64/IA64TargetMachine.h vendor/llvm/dist/lib/Target/MSP430/MSP430.h vendor/llvm/dist/lib/Target/MSP430/MSP430AsmPrinter.cpp vendor/llvm/dist/lib/Target/MSP430/MSP430ISelLowering.cpp vendor/llvm/dist/lib/Target/MSP430/MSP430ISelLowering.h vendor/llvm/dist/lib/Target/MSP430/MSP430RegisterInfo.cpp vendor/llvm/dist/lib/Target/MSP430/MSP430TargetMachine.cpp vendor/llvm/dist/lib/Target/Mips/AsmPrinter/MipsAsmPrinter.cpp vendor/llvm/dist/lib/Target/Mips/CMakeLists.txt vendor/llvm/dist/lib/Target/Mips/Mips.h vendor/llvm/dist/lib/Target/Mips/MipsISelLowering.cpp vendor/llvm/dist/lib/Target/Mips/MipsISelLowering.h vendor/llvm/dist/lib/Target/Mips/MipsInstrInfo.cpp vendor/llvm/dist/lib/Target/Mips/MipsTargetMachine.cpp vendor/llvm/dist/lib/Target/Mips/MipsTargetMachine.h vendor/llvm/dist/lib/Target/PIC16/PIC16.h vendor/llvm/dist/lib/Target/PIC16/PIC16AsmPrinter.cpp vendor/llvm/dist/lib/Target/PIC16/PIC16AsmPrinter.h vendor/llvm/dist/lib/Target/PIC16/PIC16ISelLowering.cpp vendor/llvm/dist/lib/Target/PIC16/PIC16ISelLowering.h vendor/llvm/dist/lib/Target/PIC16/PIC16InstrInfo.td vendor/llvm/dist/lib/Target/PIC16/PIC16TargetMachine.cpp vendor/llvm/dist/lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp vendor/llvm/dist/lib/Target/PowerPC/CMakeLists.txt vendor/llvm/dist/lib/Target/PowerPC/PPC.h vendor/llvm/dist/lib/Target/PowerPC/PPCCallingConv.td vendor/llvm/dist/lib/Target/PowerPC/PPCCodeEmitter.cpp vendor/llvm/dist/lib/Target/PowerPC/PPCFrameInfo.h vendor/llvm/dist/lib/Target/PowerPC/PPCHazardRecognizers.cpp vendor/llvm/dist/lib/Target/PowerPC/PPCISelLowering.cpp vendor/llvm/dist/lib/Target/PowerPC/PPCISelLowering.h vendor/llvm/dist/lib/Target/PowerPC/PPCInstr64Bit.td vendor/llvm/dist/lib/Target/PowerPC/PPCInstrInfo.cpp vendor/llvm/dist/lib/Target/PowerPC/PPCInstrInfo.td vendor/llvm/dist/lib/Target/PowerPC/PPCJITInfo.cpp vendor/llvm/dist/lib/Target/PowerPC/PPCRegisterInfo.cpp vendor/llvm/dist/lib/Target/PowerPC/PPCRegisterInfo.h vendor/llvm/dist/lib/Target/PowerPC/PPCRegisterInfo.td vendor/llvm/dist/lib/Target/PowerPC/PPCSubtarget.h vendor/llvm/dist/lib/Target/PowerPC/PPCTargetMachine.cpp vendor/llvm/dist/lib/Target/PowerPC/PPCTargetMachine.h vendor/llvm/dist/lib/Target/PowerPC/README.txt vendor/llvm/dist/lib/Target/Sparc/AsmPrinter/SparcAsmPrinter.cpp vendor/llvm/dist/lib/Target/Sparc/CMakeLists.txt vendor/llvm/dist/lib/Target/Sparc/Sparc.h vendor/llvm/dist/lib/Target/Sparc/SparcISelLowering.cpp vendor/llvm/dist/lib/Target/Sparc/SparcISelLowering.h vendor/llvm/dist/lib/Target/Sparc/SparcInstrInfo.cpp vendor/llvm/dist/lib/Target/Sparc/SparcTargetMachine.cpp vendor/llvm/dist/lib/Target/Sparc/SparcTargetMachine.h vendor/llvm/dist/lib/Target/TargetELFWriterInfo.cpp vendor/llvm/dist/lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.cpp vendor/llvm/dist/lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.h vendor/llvm/dist/lib/Target/X86/AsmPrinter/X86AsmPrinter.cpp vendor/llvm/dist/lib/Target/X86/AsmPrinter/X86IntelAsmPrinter.cpp vendor/llvm/dist/lib/Target/X86/AsmPrinter/X86IntelAsmPrinter.h vendor/llvm/dist/lib/Target/X86/CMakeLists.txt vendor/llvm/dist/lib/Target/X86/X86.h vendor/llvm/dist/lib/Target/X86/X86.td vendor/llvm/dist/lib/Target/X86/X86ELFWriterInfo.cpp vendor/llvm/dist/lib/Target/X86/X86ELFWriterInfo.h vendor/llvm/dist/lib/Target/X86/X86FastISel.cpp vendor/llvm/dist/lib/Target/X86/X86FloatingPoint.cpp vendor/llvm/dist/lib/Target/X86/X86ISelLowering.cpp vendor/llvm/dist/lib/Target/X86/X86ISelLowering.h vendor/llvm/dist/lib/Target/X86/X86InstrBuilder.h vendor/llvm/dist/lib/Target/X86/X86InstrInfo.cpp vendor/llvm/dist/lib/Target/X86/X86InstrInfo.td vendor/llvm/dist/lib/Target/X86/X86RegisterInfo.td vendor/llvm/dist/lib/Target/X86/X86Subtarget.h vendor/llvm/dist/lib/Target/X86/X86TargetMachine.cpp vendor/llvm/dist/lib/Target/X86/X86TargetMachine.h vendor/llvm/dist/lib/Target/XCore/XCore.h vendor/llvm/dist/lib/Target/XCore/XCoreAsmPrinter.cpp vendor/llvm/dist/lib/Target/XCore/XCoreISelLowering.cpp vendor/llvm/dist/lib/Target/XCore/XCoreISelLowering.h vendor/llvm/dist/lib/Target/XCore/XCoreTargetMachine.cpp vendor/llvm/dist/lib/Transforms/IPO/GlobalOpt.cpp vendor/llvm/dist/lib/Transforms/IPO/PartialInlining.cpp vendor/llvm/dist/lib/Transforms/IPO/RaiseAllocations.cpp vendor/llvm/dist/lib/Transforms/Scalar/CodeGenPrepare.cpp vendor/llvm/dist/lib/Transforms/Scalar/GVN.cpp vendor/llvm/dist/lib/Transforms/Scalar/IndVarSimplify.cpp vendor/llvm/dist/lib/Transforms/Scalar/InstructionCombining.cpp vendor/llvm/dist/lib/Transforms/Scalar/JumpThreading.cpp vendor/llvm/dist/lib/Transforms/Scalar/LICM.cpp vendor/llvm/dist/lib/Transforms/Scalar/LoopIndexSplit.cpp vendor/llvm/dist/lib/Transforms/Scalar/LoopRotation.cpp vendor/llvm/dist/lib/Transforms/Scalar/LoopStrengthReduce.cpp vendor/llvm/dist/lib/Transforms/Scalar/LoopUnswitch.cpp vendor/llvm/dist/lib/Transforms/Scalar/MemCpyOptimizer.cpp vendor/llvm/dist/lib/Transforms/Scalar/Reassociate.cpp vendor/llvm/dist/lib/Transforms/Scalar/Reg2Mem.cpp vendor/llvm/dist/lib/Transforms/Scalar/SCCP.cpp vendor/llvm/dist/lib/Transforms/Scalar/ScalarReplAggregates.cpp vendor/llvm/dist/lib/Transforms/Scalar/SimplifyCFGPass.cpp vendor/llvm/dist/lib/Transforms/Scalar/SimplifyLibCalls.cpp vendor/llvm/dist/lib/Transforms/Scalar/TailDuplication.cpp vendor/llvm/dist/lib/Transforms/Utils/CMakeLists.txt vendor/llvm/dist/lib/Transforms/Utils/CloneModule.cpp vendor/llvm/dist/lib/Transforms/Utils/LoopSimplify.cpp vendor/llvm/dist/lib/Transforms/Utils/LowerAllocations.cpp vendor/llvm/dist/lib/Transforms/Utils/SimplifyCFG.cpp vendor/llvm/dist/lib/VMCore/AsmWriter.cpp vendor/llvm/dist/lib/VMCore/CMakeLists.txt vendor/llvm/dist/lib/VMCore/Core.cpp vendor/llvm/dist/lib/VMCore/Function.cpp vendor/llvm/dist/lib/VMCore/Module.cpp vendor/llvm/dist/lib/VMCore/PassManager.cpp vendor/llvm/dist/lib/VMCore/Type.cpp vendor/llvm/dist/lib/VMCore/ValueTypes.cpp vendor/llvm/dist/test/CodeGen/ARM/ldr.ll vendor/llvm/dist/test/CodeGen/ARM/sxt_rot.ll vendor/llvm/dist/test/CodeGen/Thumb2/load-global.ll vendor/llvm/dist/test/CodeGen/Thumb2/thumb2-adc.ll vendor/llvm/dist/test/CodeGen/Thumb2/thumb2-add2.ll vendor/llvm/dist/test/CodeGen/Thumb2/thumb2-add5.ll vendor/llvm/dist/test/CodeGen/Thumb2/thumb2-and.ll vendor/llvm/dist/test/CodeGen/Thumb2/thumb2-bic.ll vendor/llvm/dist/test/CodeGen/Thumb2/thumb2-cmp.ll vendor/llvm/dist/test/CodeGen/Thumb2/thumb2-cmp2.ll vendor/llvm/dist/test/CodeGen/Thumb2/thumb2-eor.ll vendor/llvm/dist/test/CodeGen/Thumb2/thumb2-mvn2.ll vendor/llvm/dist/test/CodeGen/Thumb2/thumb2-orn.ll vendor/llvm/dist/test/CodeGen/Thumb2/thumb2-orr.ll vendor/llvm/dist/test/CodeGen/Thumb2/thumb2-rsb.ll vendor/llvm/dist/tools/Makefile vendor/llvm/dist/tools/bugpoint/BugDriver.cpp vendor/llvm/dist/tools/bugpoint/BugDriver.h vendor/llvm/dist/tools/bugpoint/CrashDebugger.cpp vendor/llvm/dist/tools/bugpoint/Miscompilation.cpp vendor/llvm/dist/tools/bugpoint/OptimizerDriver.cpp vendor/llvm/dist/tools/bugpoint/bugpoint.cpp vendor/llvm/dist/tools/gold/gold-plugin.cpp vendor/llvm/dist/tools/llc/llc.cpp vendor/llvm/dist/tools/lli/lli.cpp vendor/llvm/dist/tools/llvm-ar/llvm-ar.cpp vendor/llvm/dist/tools/llvm-as/llvm-as.cpp vendor/llvm/dist/tools/llvm-db/CLIDebugger.cpp vendor/llvm/dist/tools/llvm-db/CLIDebugger.h vendor/llvm/dist/tools/llvm-db/Commands.cpp vendor/llvm/dist/tools/llvm-db/llvm-db.cpp vendor/llvm/dist/tools/llvm-dis/llvm-dis.cpp vendor/llvm/dist/tools/llvm-extract/llvm-extract.cpp vendor/llvm/dist/tools/llvm-ld/llvm-ld.cpp vendor/llvm/dist/tools/llvm-link/llvm-link.cpp vendor/llvm/dist/tools/llvm-mc/AsmLexer.cpp vendor/llvm/dist/tools/llvm-mc/AsmLexer.h vendor/llvm/dist/tools/llvm-mc/AsmParser.cpp vendor/llvm/dist/tools/llvm-mc/AsmParser.h vendor/llvm/dist/tools/llvm-mc/CMakeLists.txt vendor/llvm/dist/tools/llvm-mc/MC-X86Specific.cpp vendor/llvm/dist/tools/llvm-mc/llvm-mc.cpp vendor/llvm/dist/tools/llvm-nm/llvm-nm.cpp vendor/llvm/dist/tools/llvm-prof/llvm-prof.cpp vendor/llvm/dist/tools/llvm-ranlib/llvm-ranlib.cpp vendor/llvm/dist/tools/llvmc/doc/LLVMC-Reference.rst vendor/llvm/dist/tools/llvmc/example/mcc16/plugins/PIC16Base/PIC16Base.td vendor/llvm/dist/tools/llvmc/example/mcc16/plugins/PIC16Base/PluginMain.cpp vendor/llvm/dist/tools/lto/LTOCodeGenerator.cpp vendor/llvm/dist/tools/lto/LTOCodeGenerator.h vendor/llvm/dist/tools/lto/LTOModule.cpp vendor/llvm/dist/tools/lto/LTOModule.h vendor/llvm/dist/tools/lto/Makefile vendor/llvm/dist/tools/lto/lto.cpp vendor/llvm/dist/tools/opt/opt.cpp vendor/llvm/dist/unittests/ADT/APIntTest.cpp vendor/llvm/dist/unittests/ExecutionEngine/JIT/JITEventListenerTest.cpp vendor/llvm/dist/unittests/MC/AsmStreamerTest.cpp vendor/llvm/dist/unittests/VMCore/Makefile vendor/llvm/dist/utils/NewNightlyTest.pl vendor/llvm/dist/utils/TableGen/AsmWriterEmitter.cpp vendor/llvm/dist/utils/TableGen/AsmWriterEmitter.h vendor/llvm/dist/utils/TableGen/CallingConvEmitter.cpp vendor/llvm/dist/utils/TableGen/CallingConvEmitter.h vendor/llvm/dist/utils/TableGen/ClangDiagnosticsEmitter.cpp vendor/llvm/dist/utils/TableGen/ClangDiagnosticsEmitter.h vendor/llvm/dist/utils/TableGen/CodeEmitterGen.cpp vendor/llvm/dist/utils/TableGen/CodeEmitterGen.h vendor/llvm/dist/utils/TableGen/CodeGenDAGPatterns.cpp vendor/llvm/dist/utils/TableGen/CodeGenDAGPatterns.h vendor/llvm/dist/utils/TableGen/CodeGenTarget.cpp vendor/llvm/dist/utils/TableGen/CodeGenTarget.h vendor/llvm/dist/utils/TableGen/DAGISelEmitter.cpp vendor/llvm/dist/utils/TableGen/DAGISelEmitter.h vendor/llvm/dist/utils/TableGen/FastISelEmitter.cpp vendor/llvm/dist/utils/TableGen/FastISelEmitter.h vendor/llvm/dist/utils/TableGen/InstrEnumEmitter.cpp vendor/llvm/dist/utils/TableGen/InstrEnumEmitter.h vendor/llvm/dist/utils/TableGen/InstrInfoEmitter.cpp vendor/llvm/dist/utils/TableGen/InstrInfoEmitter.h vendor/llvm/dist/utils/TableGen/IntrinsicEmitter.cpp vendor/llvm/dist/utils/TableGen/IntrinsicEmitter.h vendor/llvm/dist/utils/TableGen/LLVMCConfigurationEmitter.cpp vendor/llvm/dist/utils/TableGen/LLVMCConfigurationEmitter.h vendor/llvm/dist/utils/TableGen/Record.cpp vendor/llvm/dist/utils/TableGen/Record.h vendor/llvm/dist/utils/TableGen/RegisterInfoEmitter.cpp vendor/llvm/dist/utils/TableGen/RegisterInfoEmitter.h vendor/llvm/dist/utils/TableGen/SubtargetEmitter.cpp vendor/llvm/dist/utils/TableGen/SubtargetEmitter.h vendor/llvm/dist/utils/TableGen/TGLexer.cpp vendor/llvm/dist/utils/TableGen/TGParser.cpp vendor/llvm/dist/utils/TableGen/TGValueTypes.cpp vendor/llvm/dist/utils/TableGen/TableGen.cpp vendor/llvm/dist/utils/TableGen/TableGenBackend.cpp vendor/llvm/dist/utils/TableGen/TableGenBackend.h Modified: vendor/llvm/dist/Makefile.config.in ============================================================================== --- vendor/llvm/dist/Makefile.config.in Sat Jul 4 11:11:21 2009 (r195339) +++ vendor/llvm/dist/Makefile.config.in Sat Jul 4 13:58:26 2009 (r195340) @@ -223,7 +223,7 @@ RDYNAMIC := @RDYNAMIC@ #ENABLE_PROFILING = 1 @ENABLE_PROFILING@ -# When DISABLE_ASSERTIONS is enabled, builds of all of the LLVM code will +# When DISABLE_ASSERTIONS is enabled, builds of all of the LLVM code will # exclude assertion checks, otherwise they are included. #DISABLE_ASSERTIONS = 1 @DISABLE_ASSERTIONS@ @@ -297,3 +297,14 @@ endif # Location of the plugin header file for gold. BINUTILS_INCDIR := @BINUTILS_INCDIR@ + +# When ENABLE_LLVMC_DYNAMIC is enabled, LLVMC will link libCompilerDriver +# dynamically. This is needed to make dynamic plugins work on some targets +# (Windows). +ENABLE_LLVMC_DYNAMIC = 0 +#@ENABLE_LLVMC_DYNAMIC@ + +# When ENABLE_LLVMC_DYNAMIC_PLUGINS is enabled, LLVMC will have dynamic plugin +# support (via the -load option). +ENABLE_LLVMC_DYNAMIC_PLUGINS = 1 +#@ENABLE_LLVMC_DYNAMIC_PLUGINS@ Modified: vendor/llvm/dist/Makefile.rules ============================================================================== --- vendor/llvm/dist/Makefile.rules Sat Jul 4 11:11:21 2009 (r195339) +++ vendor/llvm/dist/Makefile.rules Sat Jul 4 13:58:26 2009 (r195340) @@ -201,15 +201,19 @@ LIBRARYNAME := $(patsubst %,plugin_llvmc CPP.Flags += -DLLVMC_PLUGIN_NAME=$(LLVMC_PLUGIN) REQUIRES_EH := 1 +ifeq ($(ENABLE_LLVMC_DYNAMIC),1) + LD.Flags += -lCompilerDriver +endif + # Build a dynamic library if the user runs `make` directly from the plugin # directory. ifndef LLVMC_BUILTIN_PLUGIN -LOADABLE_MODULE = 1 + LOADABLE_MODULE = 1 endif # TableGen stuff... ifneq ($(BUILT_SOURCES),) -LLVMC_BUILD_AUTOGENERATED_INC=1 + LLVMC_BUILD_AUTOGENERATED_INC=1 endif endif # LLVMC_PLUGIN @@ -217,10 +221,16 @@ endif # LLVMC_PLUGIN ifdef LLVMC_BASED_DRIVER TOOLNAME = $(LLVMC_BASED_DRIVER) -LLVMLIBS = CompilerDriver.a -LINK_COMPONENTS = support system + REQUIRES_EH := 1 +ifeq ($(ENABLE_LLVMC_DYNAMIC),1) + LD.Flags += -lCompilerDriver +else + LLVMLIBS = CompilerDriver.a + LINK_COMPONENTS = support system +endif + # Preprocessor magic that generates references to static variables in built-in # plugins. ifneq ($(LLVMC_BUILTIN_PLUGINS),) @@ -502,8 +512,7 @@ ifeq ($(OS),Darwin) else ifeq ($(OS),Cygwin) SharedLinkOptions=-shared -nostdlib -Wl,--export-all-symbols \ - -Wl,--enable-auto-import -Wl,--enable-auto-image-base \ - -Wl,--enable-runtime-pseudo-relocs + -Wl,--enable-auto-import -Wl,--enable-auto-image-base else SharedLinkOptions=-shared endif Modified: vendor/llvm/dist/autoconf/configure.ac ============================================================================== --- vendor/llvm/dist/autoconf/configure.ac Sat Jul 4 11:11:21 2009 (r195339) +++ vendor/llvm/dist/autoconf/configure.ac Sat Jul 4 13:58:26 2009 (r195340) @@ -240,7 +240,7 @@ case "$llvm_cv_target_arch" in x86_64) LLVM_NATIVE_ARCH="X86" ;; *) LLVM_NATIVE_ARCH="$llvm_cv_target_arch" ;; esac - + dnl Define a substitution, ARCH, for the target architecture AC_SUBST(ARCH,$llvm_cv_target_arch) @@ -453,7 +453,7 @@ for a_target in $TARGETS_TO_BUILD; do fi done -# Build the LLVM_TARGET and LLVM_ASM_PRINTER macro uses for +# Build the LLVM_TARGET and LLVM_ASM_PRINTER macro uses for # Targets.def and AsmPrinters.def. LLVM_ENUM_TARGETS="" LLVM_ENUM_ASM_PRINTERS="" @@ -593,6 +593,35 @@ case "$enableval" in *) AC_MSG_ERROR([Invalid setting for --enable-libffi. Use "yes" or "no"]) ;; esac +dnl Only Windows needs dynamic libCompilerDriver to support plugins. +if test "$llvm_cv_os_type" = "Win32" ; then + llvmc_dynamic="yes" +else + llvmc_dynamic="no" +fi + +dnl --enable-llvmc-dynamic : should LLVMC link libCompilerDriver dynamically? +AC_ARG_ENABLE(llvmc-dynamic,AS_HELP_STRING( +--enable-llvmc-dynamic, +[Link LLVMC dynamically (default is NO, unless on Win32)]),, +enableval=$llvmc_dynamic) +if test ${enableval} = "yes" && test "$ENABLE_PIC" -eq 1 ; then + AC_SUBST(ENABLE_LLVMC_DYNAMIC,[[ENABLE_LLVMC_DYNAMIC=1]]) +else + AC_SUBST(ENABLE_LLVMC_DYNAMIC,[[]]) +fi + +dnl --enable-llvmc-dynamic-plugins : should LLVMC support dynamic plugins? +AC_ARG_ENABLE(llvmc-dynamic-plugins,AS_HELP_STRING( +--enable-llvmc-dynamic-plugins, +[Enable dynamic LLVMC plugins (default is YES)]),, +enableval=yes) +if test ${enableval} = "yes" ; then + AC_SUBST(ENABLE_LLVMC_DYNAMIC_PLUGINS,[[ENABLE_LLVMC_DYNAMIC_PLUGINS=1]]) +else + AC_SUBST(ENABLE_LLVMC_DYNAMIC_PLUGINS,[[]]) +fi + dnl===-----------------------------------------------------------------------=== dnl=== dnl=== SECTION 4: Check for programs we need and that they are the right version @@ -914,7 +943,8 @@ AC_CHECK_FUNCS([backtrace ceilf floorf r AC_CHECK_FUNCS([powf fmodf strtof round ]) AC_CHECK_FUNCS([getpagesize getrusage getrlimit setrlimit gettimeofday ]) AC_CHECK_FUNCS([isatty mkdtemp mkstemp ]) -AC_CHECK_FUNCS([mktemp realpath sbrk setrlimit strdup strerror strerror_r ]) +AC_CHECK_FUNCS([mktemp realpath sbrk setrlimit strdup ]) +AC_CHECK_FUNCS([strerror strerror_r strerror_s ]) AC_CHECK_FUNCS([strtoll strtoq sysconf malloc_zone_statistics ]) AC_CHECK_FUNCS([setjmp longjmp sigsetjmp siglongjmp]) AC_C_PRINTF_A @@ -951,7 +981,7 @@ dnl atomic builtins are required for thr AC_MSG_CHECKING(for GCC atomic builtins) AC_LINK_IFELSE( AC_LANG_SOURCE( - [[int main() { + [[int main() { volatile unsigned long val = 1; __sync_synchronize(); __sync_val_compare_and_swap(&val, 1, 0); Modified: vendor/llvm/dist/cmake/config-ix.cmake ============================================================================== --- vendor/llvm/dist/cmake/config-ix.cmake Sat Jul 4 11:11:21 2009 (r195339) +++ vendor/llvm/dist/cmake/config-ix.cmake Sat Jul 4 13:58:26 2009 (r195340) @@ -44,6 +44,8 @@ check_include_file(windows.h HAVE_WINDOW # library checks include(CheckLibraryExists) check_library_exists(pthread pthread_create "" HAVE_LIBPTHREAD) +check_library_exists(pthread pthread_getspecific "" HAVE_PTHREAD_GETSPECIFIC) +check_library_exists(pthread pthread_rwlock_init "" HAVE_PTHREAD_RWLOCK_INIT) check_library_exists(dl dlopen "" HAVE_LIBDL) # function checks @@ -64,9 +66,10 @@ check_symbol_exists(mallinfo malloc.h HA check_symbol_exists(malloc_zone_statistics malloc/malloc.h HAVE_MALLOC_ZONE_STATISTICS) check_symbol_exists(pthread_mutex_lock pthread.h HAVE_PTHREAD_MUTEX_LOCK) -check_symbol_exists(pthread_rwlock_init pthread.h HAVE_PTHREAD_RWLOCK_INIT) -check_symbol_exists(pthread_getspecific pthread.h HAVE_PTHREAD_GETSPECIFIC) check_symbol_exists(strtoll stdlib.h HAVE_STRTOLL) +check_symbol_exists(strerror string.h HAVE_STRERROR) +check_symbol_exists(strerror_r string.h HAVE_STRERROR_R) +check_symbol_exists(strerror_s string.h HAVE_STRERROR_S) check_symbol_exists(__GLIBC__ stdio.h LLVM_USING_GLIBC) if( LLVM_USING_GLIBC ) Modified: vendor/llvm/dist/configure ============================================================================== --- vendor/llvm/dist/configure Sat Jul 4 11:11:21 2009 (r195339) +++ vendor/llvm/dist/configure Sat Jul 4 13:58:26 2009 (r195340) @@ -31356,9 +31356,119 @@ done +for ac_func in mktemp realpath sbrk setrlimit strdup +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $ac_func + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_$ac_func || defined __stub___$ac_func +choke me +#endif + +int +main () +{ +return $ac_func (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_var=no" +fi + +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + + -for ac_func in mktemp realpath sbrk setrlimit strdup strerror strerror_r +for ac_func in strerror strerror_r strerror_s do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` { echo "$as_me:$LINENO: checking for $ac_func" >&5 Modified: vendor/llvm/dist/docs/CodingStandards.html ============================================================================== --- vendor/llvm/dist/docs/CodingStandards.html Sat Jul 4 11:11:21 2009 (r195339) +++ vendor/llvm/dist/docs/CodingStandards.html Sat Jul 4 13:58:26 2009 (r195340) @@ -50,6 +50,8 @@
  • Do not use 'using namespace std'
  • Provide a virtual method anchor for classes in headers
  • +
  • Don't evaluate end() every time through a + loop
  • Prefer Preincrement
  • Avoid std::endl
  • @@ -661,6 +663,67 @@ increasing link times.

    + + + +
    + +

    Because C++ doesn't have a standard "foreach" loop (though it can be emulated +with macros and may be coming in C++'0x) we end up writing a lot of loops that +manually iterate from begin to end on a variety of containers or through other +data structures. One common mistake is to write a loop in this style:

    + +
    +
    +  BasicBlock *BB = ...
    +  for (BasicBlock::iterator I = BB->begin(); I != BB->end(); ++I)
    +     ... use I ...
    +
    +
    + +

    The problem with this construct is that it evaluates "BB->end()" +every time through the loop. Instead of writing the loop like this, we strongly +prefer loops to be written so that they evaluate it once before the loop starts. +A convenient way to do this is like so:

    + +
    +
    +  BasicBlock *BB = ...
    +  for (BasicBlock::iterator I = BB->begin(), E = BB->end(); I != E; ++I)
    +     ... use I ...
    +
    +
    + +

    The observant may quickly point out that these two loops may have different +semantics: if the container (a basic block in this case) is being mutated, then +"BB->end()" may change its value every time through the loop and the +second loop may not in fact be correct. If you actually do depend on this +behavior, please write the loop in the first form and add a comment indicating +that you did it intentionally.

    + +

    Why do we prefer the second form (when correct)? Writing the loop in the +first form has two problems: First it may be less efficient than evaluating it +at the start of the loop. In this case, the cost is probably minor: a few extra +loads every time through the loop. However, if the base expression is more +complex, then the cost can rise quickly. I've seen loops where the end +expression was actually something like: "SomeMap[x]->end()" and map +lookups really aren't cheap. By writing it in the second form consistently, you +eliminate the issue entirely and don't even have to think about it.

    + +

    The second (even bigger) issue is that writing the loop in the first form +hints to the reader that the loop is mutating the container (a fact that a +comment would handily confirm!). If you write the loop in the second form, it +is immediately obvious without even looking at the body of the loop that the +container isn't being modified, which makes it easier to read the code and +understand what it does.

    + +

    While the second form of the loop is a few extra keystrokes, we do strongly +prefer it.

    + +
    +
    @@ -744,7 +807,7 @@ something.

    Chris Lattner
    LLVM Compiler Infrastructure
    - Last modified: $Date: 2009-03-23 05:53:34 +0100 (Mon, 23 Mar 2009) $ + Last modified: $Date: 2009-06-30 08:27:54 +0200 (Tue, 30 Jun 2009) $ Modified: vendor/llvm/dist/docs/CompilerDriver.html ============================================================================== --- vendor/llvm/dist/docs/CompilerDriver.html Sat Jul 4 11:11:21 2009 (r195339) +++ vendor/llvm/dist/docs/CompilerDriver.html Sat Jul 4 13:58:26 2009 (r195340) @@ -37,6 +37,7 @@ The ReST source lives in the directory '
  • Hooks and environment variables
  • How plugins are loaded
  • Debugging
  • +
  • Conditioning on the executable name
  • @@ -94,9 +95,8 @@ $ llvmc --linker=c++ hello.o $ ./a.out hello -

    By default, LLVMC uses llvm-gcc to compile the source code. It is -also possible to choose the work-in-progress clang compiler with -the -clang option.

    +

    By default, LLVMC uses llvm-gcc to compile the source code. It is also +possible to choose the clang compiler with the -clang option.

    Predefined options

    @@ -633,6 +633,27 @@ be performed at compile-time because the dynamically. When invoked with --check-graph, llvmc doesn't perform any compilation tasks and returns the number of encountered errors as its status code.

    +
    +
    +

    Conditioning on the executable name

    +

    For now, the executable name (the value passed to the driver in argv[0]) is +accessible only in the C++ code (i.e. hooks). Use the following code:

    +
    +namespace llvmc {
    +extern const char* ProgramName;
    +}
    +
    +std::string MyHook() {
    +//...
    +if (strcmp(ProgramName, "mydriver") == 0) {
    +   //...
    +
    +}
    +
    +

    In general, you're encouraged not to make the behaviour dependent on the +executable file name, and use command-line switches instead. See for example how +the Base plugin behaves when it needs to choose the correct linker options +(think g++ vs. gcc).


    @@ -645,7 +666,7 @@ errors as its status code.

    Mikhail Glushenkov
    LLVM Compiler Infrastructure
    -Last modified: $Date: 2009-06-25 20:21:10 +0200 (Thu, 25 Jun 2009) $ +Last modified: $Date: 2009-06-30 02:16:43 +0200 (Tue, 30 Jun 2009) $
    Modified: vendor/llvm/dist/docs/FAQ.html ============================================================================== --- vendor/llvm/dist/docs/FAQ.html Sat Jul 4 11:11:21 2009 (r195339) +++ vendor/llvm/dist/docs/FAQ.html Sat Jul 4 13:58:26 2009 (r195340) @@ -124,6 +124,10 @@
  • What is this "undef" thing that shows up in my code?
  • + +
  • Why does instcombine + simplifycfg turn + a call to a function with a mismatched calling convention into "unreachable"? + Why not make the verifier reject it?
  • @@ -780,6 +784,143 @@ int X() { int i; return i; } value specified for it.

    + + + + +
    +

    This is a common problem run into by authors of front-ends that are using +custom calling conventions: you need to make sure to set the right calling +convention on both the function and on each call to the function. For example, +this code:

    + +
    +define fastcc void @foo() {
    +        ret void
    +}
    +define void @bar() {
    +        call void @foo( )
    +        ret void
    +}
    +
    + +

    Is optimized to:

    + +
    +define fastcc void @foo() {
    +	ret void
    +}
    +define void @bar() {
    +	unreachable
    +}
    +
    + +

    ... with "opt -instcombine -simplifycfg". This often bites people because +"all their code disappears". Setting the calling convention on the caller and +callee is required for indirect calls to work, so people often ask why not make +the verifier reject this sort of thing.

    + +

    The answer is that this code has undefined behavior, but it is not illegal. +If we made it illegal, then every transformation that could potentially create +this would have to ensure that it doesn't, and there is valid code that can +create this sort of construct (in dead code). The sorts of things that can +cause this to happen are fairly contrived, but we still need to accept them. +Here's an example:

    + +
    +define fastcc void @foo() {
    +        ret void
    +}
    +define internal void @bar(void()* %FP, i1 %cond) {
    +        br i1 %cond, label %T, label %F
    +T:  
    +        call void %FP()
    +        ret void
    +F:
    +        call fastcc void %FP()
    +        ret void
    +}
    +define void @test() {
    +        %X = or i1 false, false
    +        call void @bar(void()* @foo, i1 %X)
    +        ret void
    +} 
    +
    + +

    In this example, "test" always passes @foo/false into bar, which ensures that + it is dynamically called with the right calling conv (thus, the code is + perfectly well defined). If you run this through the inliner, you get this + (the explicit "or" is there so that the inliner doesn't dead code eliminate + a bunch of stuff): +

    + +
    +define fastcc void @foo() {
    +	ret void
    +}
    +define void @test() {
    +	%X = or i1 false, false
    +	br i1 %X, label %T.i, label %F.i
    +T.i:
    +	call void @foo()
    +	br label %bar.exit
    +F.i:
    +	call fastcc void @foo()
    +	br label %bar.exit
    +bar.exit:
    +	ret void
    +}
    +
    + +

    Here you can see that the inlining pass made an undefined call to @foo with + the wrong calling convention. We really don't want to make the inliner have + to know about this sort of thing, so it needs to be valid code. In this case, + dead code elimination can trivially remove the undefined code. However, if %X + was an input argument to @test, the inliner would produce this: +

    + +
    +define fastcc void @foo() {
    +	ret void
    +}
    +
    +define void @test(i1 %X) {
    +	br i1 %X, label %T.i, label %F.i
    +T.i:
    +	call void @foo()
    +	br label %bar.exit
    +F.i:
    +	call fastcc void @foo()
    +	br label %bar.exit
    +bar.exit:
    +	ret void
    +}
    +
    + +

    The interesting thing about this is that %X must be false for the +code to be well-defined, but no amount of dead code elimination will be able to +delete the broken call as unreachable. However, since instcombine/simplifycfg +turns the undefined call into unreachable, we end up with a branch on a +condition that goes to unreachable: a branch to unreachable can never happen, so +"-inline -instcombine -simplifycfg" is able to produce:

    + +
    +define fastcc void @foo() {
    +	ret void
    +}
    +define void @test(i1 %X) {
    +F.i:
    +	call fastcc void @foo()
    +	ret void
    +}
    +
    + +
    +
    @@ -790,7 +931,7 @@ int X() { int i; return i; } src="http://www.w3.org/Icons/valid-html401-blue" alt="Valid HTML 4.01"> LLVM Compiler Infrastructure
    - Last modified: $Date: 2009-04-10 22:48:27 +0200 (Fri, 10 Apr 2009) $ + Last modified: $Date: 2009-06-30 19:10:19 +0200 (Tue, 30 Jun 2009) $ Modified: vendor/llvm/dist/docs/ReleaseNotes-2.6.html ============================================================================== --- vendor/llvm/dist/docs/ReleaseNotes-2.6.html Sat Jul 4 11:11:21 2009 (r195339) +++ vendor/llvm/dist/docs/ReleaseNotes-2.6.html Sat Jul 4 13:58:26 2009 (r195340) @@ -419,7 +419,7 @@ it run faster:

    If you're already an LLVM user or developer with out-of-tree changes based -on LLVM 2.4, this section lists some "gotchas" that you may run into upgrading +on LLVM 2.5, this section lists some "gotchas" that you may run into upgrading from the previous release.

      @@ -433,6 +433,13 @@ from the previous release.

      API changes are:

        +
      • LLVM's global uniquing tables for Types and Constants have + been privatized into members of an LLVMContext. A number of APIs + now take an LLVMContext as a parameter. To smooth the transition + for clients that will only ever use a single context, the new + getGlobalContext() API can be used to access a default global + context which can be passed in any and all cases where a context is + required.
      • The getABITypeSize methods are now called getAllocSize.
      @@ -770,7 +777,7 @@ lists.

      src="http://www.w3.org/Icons/valid-html401-blue" alt="Valid HTML 4.01"> LLVM Compiler Infrastructure
      - Last modified: $Date: 2009-06-24 23:26:42 +0200 (Wed, 24 Jun 2009) $ + Last modified: $Date: 2009-07-02 18:48:38 +0200 (Thu, 02 Jul 2009) $ Modified: vendor/llvm/dist/docs/TableGenFundamentals.html ============================================================================== --- vendor/llvm/dist/docs/TableGenFundamentals.html Sat Jul 4 11:11:21 2009 (r195339) +++ vendor/llvm/dist/docs/TableGenFundamentals.html Sat Jul 4 13:58:26 2009 (r195340) @@ -411,7 +411,8 @@ which case the user must specify it expl
      !cast(a)
      A symbol of type type obtained by looking up the string 'a' in the symbol table. If the type of 'a' does not match type, TableGen -aborts with an error.
      +aborts with an error. !cast is a special case in that the argument must +be an object defined by a 'def' construct.
      !nameconcat<type>(a, b)
      Shorthand for !cast(!strconcat(a, b))
      !subst(a, b, c)
      @@ -781,7 +782,7 @@ This should highlight the APIs in Ta Chris Lattner
      LLVM Compiler Infrastructure
      - Last modified: $Date: 2009-06-09 20:31:17 +0200 (Tue, 09 Jun 2009) $ + Last modified: $Date: 2009-06-29 22:05:29 +0200 (Mon, 29 Jun 2009) $ Modified: vendor/llvm/dist/docs/WritingAnLLVMPass.html ============================================================================== --- vendor/llvm/dist/docs/WritingAnLLVMPass.html Sat Jul 4 11:11:21 2009 (r195339) +++ vendor/llvm/dist/docs/WritingAnLLVMPass.html Sat Jul 4 13:58:26 2009 (r195340) @@ -491,10 +491,15 @@ class is the most general of all supercl ModulePass indicates that your pass uses the entire program as a unit, refering to function bodies in no predictable order, or adding and removing functions. Because nothing is known about the behavior of ModulePass -subclasses, no optimization can be done for their execution. A module pass -can use function level passes (e.g. dominators) using getAnalysis interface - getAnalysis<DominatorTree>(Function), if the function pass -does not require any module passes.

      +subclasses, no optimization can be done for their execution.

      + +

      A module pass can use function level passes (e.g. dominators) using +the getAnalysis interface +getAnalysis<DominatorTree>(llvm::Function *) to provide the +function to retrieve analysis result for, if the function pass does not require +any module passes. Note that this can only be done for functions for which the +analysis ran, e.g. in the case of dominators you should only ask for the +DominatorTree for function definitions, not declarations.

      To write a correct ModulePass subclass, derive from ModulePass and overload the runOnModule method with the @@ -1821,7 +1826,7 @@ Despite that, we have kept the LLVM pass Chris Lattner
      The LLVM Compiler Infrastructure
      - Last modified: $Date: 2009-06-15 18:22:49 +0000 (Mon, 15 Jun 2009) $ + Last modified: $Date: 2009-07-02 01:38:44 +0200 (Thu, 02 Jul 2009) $ Modified: vendor/llvm/dist/examples/BrainF/BrainF.cpp ============================================================================== --- vendor/llvm/dist/examples/BrainF/BrainF.cpp Sat Jul 4 11:11:21 2009 (r195339) +++ vendor/llvm/dist/examples/BrainF/BrainF.cpp Sat Jul 4 13:58:26 2009 (r195340) @@ -36,19 +36,20 @@ const char *BrainF::headreg = "head"; const char *BrainF::label = "brainf"; const char *BrainF::testreg = "test"; -Module *BrainF::parse(std::istream *in1, int mem, CompileFlags cf) { +Module *BrainF::parse(std::istream *in1, int mem, CompileFlags cf, + LLVMContext& Context) { in = in1; memtotal = mem; comflag = cf; - header(); + header(Context); readloop(0, 0, 0); delete builder; return module; } -void BrainF::header() { - module = new Module("BrainF"); +void BrainF::header(LLVMContext& C) { + module = new Module("BrainF", C); //Function prototypes Modified: vendor/llvm/dist/examples/BrainF/BrainF.h ============================================================================== --- vendor/llvm/dist/examples/BrainF/BrainF.h Sat Jul 4 11:11:21 2009 (r195339) +++ vendor/llvm/dist/examples/BrainF/BrainF.h Sat Jul 4 13:58:26 2009 (r195340) @@ -15,6 +15,7 @@ #ifndef BRAINF_H #define BRAINF_H +#include "llvm/LLVMContext.h" #include "llvm/Module.h" #include "llvm/Support/IRBuilder.h" @@ -38,7 +39,8 @@ class BrainF { /// containing the resulting code. /// On error, it calls abort. /// The caller must delete the returned module. - Module *parse(std::istream *in1, int mem, CompileFlags cf); + Module *parse(std::istream *in1, int mem, CompileFlags cf, + LLVMContext& C); protected: /// The different symbols in the BrainF language @@ -64,7 +66,7 @@ class BrainF { static const char *testreg; /// Put the brainf function preamble and other fixed pieces of code - void header(); + void header(LLVMContext& C); /// The main loop for parsing. It calls itself recursively /// to handle the depth of nesting of "[]". Modified: vendor/llvm/dist/examples/BrainF/BrainFDriver.cpp ============================================================================== --- vendor/llvm/dist/examples/BrainF/BrainFDriver.cpp Sat Jul 4 11:11:21 2009 (r195339) +++ vendor/llvm/dist/examples/BrainF/BrainFDriver.cpp Sat Jul 4 13:58:26 2009 (r195340) @@ -86,6 +86,8 @@ void addMainFunction(Module *mod) { int main(int argc, char **argv) { cl::ParseCommandLineOptions(argc, argv, " BrainF compiler\n"); + LLVMContext Context; + if (InputFilename == "") { std::cerr<<"Error: You must specify the filename of the program to " "be compiled. Use --help to see the options.\n"; @@ -124,7 +126,7 @@ int main(int argc, char **argv) { //Read the BrainF program BrainF bf; - Module *mod = bf.parse(in, 65536, cf); //64 KiB + Module *mod = bf.parse(in, 65536, cf, Context); //64 KiB if (in != &std::cin) {delete in;} addMainFunction(mod); Modified: vendor/llvm/dist/examples/Fibonacci/fibonacci.cpp ============================================================================== --- vendor/llvm/dist/examples/Fibonacci/fibonacci.cpp Sat Jul 4 11:11:21 2009 (r195339) +++ vendor/llvm/dist/examples/Fibonacci/fibonacci.cpp Sat Jul 4 13:58:26 2009 (r195340) @@ -23,6 +23,7 @@ // //===----------------------------------------------------------------------===// +#include "llvm/LLVMContext.h" #include "llvm/Module.h" #include "llvm/DerivedTypes.h" #include "llvm/Constants.h" @@ -90,8 +91,10 @@ static Function *CreateFibFunction(Modul int main(int argc, char **argv) { int n = argc > 1 ? atol(argv[1]) : 24; + LLVMContext Context; + // Create some module to put our function into it. - Module *M = new Module("test"); + Module *M = new Module("test", Context); // We are about to create the "fib" function: Function *FibF = CreateFibFunction(M); Modified: vendor/llvm/dist/examples/HowToUseJIT/HowToUseJIT.cpp ============================================================================== --- vendor/llvm/dist/examples/HowToUseJIT/HowToUseJIT.cpp Sat Jul 4 11:11:21 2009 (r195339) +++ vendor/llvm/dist/examples/HowToUseJIT/HowToUseJIT.cpp Sat Jul 4 13:58:26 2009 (r195340) @@ -34,6 +34,7 @@ // //===----------------------------------------------------------------------===// +#include "llvm/LLVMContext.h" #include "llvm/Module.h" #include "llvm/Constants.h" #include "llvm/DerivedTypes.h" @@ -50,9 +51,11 @@ using namespace llvm; int main() { InitializeNativeTarget(); + + LLVMContext Context; // Create some module to put our function into it. - Module *M = new Module("test"); + Module *M = new Module("test", Context); // Create the add1 function entry and insert this entry into module M. The // function will have a return type of "int" and take an argument of "int". Modified: vendor/llvm/dist/examples/Kaleidoscope/toy.cpp ============================================================================== --- vendor/llvm/dist/examples/Kaleidoscope/toy.cpp Sat Jul 4 11:11:21 2009 (r195339) +++ vendor/llvm/dist/examples/Kaleidoscope/toy.cpp Sat Jul 4 13:58:26 2009 (r195340) @@ -1,5 +1,6 @@ #include "llvm/DerivedTypes.h" #include "llvm/ExecutionEngine/ExecutionEngine.h" +#include "llvm/LLVMContext.h" #include "llvm/Module.h" #include "llvm/ModuleProvider.h" #include "llvm/PassManager.h" @@ -1083,6 +1084,7 @@ double printd(double X) { int main() { InitializeNativeTarget(); + LLVMContext Context; // Install standard binary operators. // 1 is lowest precedence. @@ -1097,7 +1099,7 @@ int main() { getNextToken(); // Make the module, which holds all the code. - TheModule = new Module("my cool jit"); + TheModule = new Module("my cool jit", Context); // Create the JIT. TheExecutionEngine = ExecutionEngine::create(TheModule); Modified: vendor/llvm/dist/examples/ModuleMaker/ModuleMaker.cpp ============================================================================== --- vendor/llvm/dist/examples/ModuleMaker/ModuleMaker.cpp Sat Jul 4 11:11:21 2009 (r195339) +++ vendor/llvm/dist/examples/ModuleMaker/ModuleMaker.cpp Sat Jul 4 13:58:26 2009 (r195340) @@ -13,6 +13,7 @@ // //===----------------------------------------------------------------------===// +#include "llvm/LLVMContext.h" #include "llvm/Module.h" #include "llvm/DerivedTypes.h" #include "llvm/Constants.h" @@ -22,13 +23,14 @@ using namespace llvm; int main() { + LLVMContext Context; + // Create the "module" or "program" or "translation unit" to hold the // function - Module *M = new Module("test"); + Module *M = new Module("test", Context); // Create the main function: first create the type 'int ()' - FunctionType *FT = FunctionType::get(Type::Int32Ty, std::vector(), - /*not vararg*/false); + FunctionType *FT = FunctionType::get(Type::Int32Ty, /*not vararg*/false); // By passing a module as the last parameter to the Function constructor, // it automatically gets appended to the Module. Modified: vendor/llvm/dist/examples/ParallelJIT/ParallelJIT.cpp ============================================================================== --- vendor/llvm/dist/examples/ParallelJIT/ParallelJIT.cpp Sat Jul 4 11:11:21 2009 (r195339) +++ vendor/llvm/dist/examples/ParallelJIT/ParallelJIT.cpp Sat Jul 4 13:58:26 2009 (r195340) @@ -18,6 +18,7 @@ // same time). This test had assertion errors until I got the locking right. #include +#include "llvm/LLVMContext.h" #include "llvm/Module.h" #include "llvm/Constants.h" #include "llvm/DerivedTypes.h" @@ -232,9 +233,10 @@ void* callFunc( void* param ) int main() { InitializeNativeTarget(); + LLVMContext Context; // Create some module to put our function into it. - Module *M = new Module("test"); + Module *M = new Module("test", Context); Function* add1F = createAdd1( M ); Function* fibF = CreateFibFunction( M ); Modified: vendor/llvm/dist/include/llvm-c/BitReader.h ============================================================================== --- vendor/llvm/dist/include/llvm-c/BitReader.h Sat Jul 4 11:11:21 2009 (r195339) +++ vendor/llvm/dist/include/llvm-c/BitReader.h Sat Jul 4 13:58:26 2009 (r195340) @@ -32,6 +32,10 @@ extern "C" { int LLVMParseBitcode(LLVMMemoryBufferRef MemBuf, LLVMModuleRef *OutModule, char **OutMessage); +int LLVMParseBitcodeInContext(LLVMMemoryBufferRef MemBuf, + LLVMContextRef ContextRef, + LLVMModuleRef *OutModule, char **OutMessage); + /* Reads a module from the specified path, returning via the OutMP parameter a module provider which performs lazy deserialization. Returns 0 on success. Optionally returns a human-readable error message via OutMessage. */ @@ -39,6 +43,11 @@ int LLVMGetBitcodeModuleProvider(LLVMMem LLVMModuleProviderRef *OutMP, char **OutMessage); +int LLVMGetBitcodeModuleProviderInContext(LLVMMemoryBufferRef MemBuf, + LLVMContextRef ContextRef, + LLVMModuleProviderRef *OutMP, + char **OutMessage); + #ifdef __cplusplus } Modified: vendor/llvm/dist/include/llvm-c/Core.h ============================================================================== --- vendor/llvm/dist/include/llvm-c/Core.h Sat Jul 4 11:11:21 2009 (r195339) +++ vendor/llvm/dist/include/llvm-c/Core.h Sat Jul 4 13:58:26 2009 (r195340) @@ -47,6 +47,11 @@ extern "C" { /* Opaque types. */ /** + * The top-level container for all LLVM global data. See the LLVMContext class. + */ +typedef struct LLVMCtxt *LLVMContextRef; + +/** * The top-level container for all other LLVM Intermediate Representation (IR) * objects. See the llvm::Module class. */ @@ -188,9 +193,16 @@ void LLVMDisposeMessage(char *Message); /*===-- Modules -----------------------------------------------------------===*/ +/* Create and destroy contexts. */ +LLVMContextRef LLVMContextCreate(); +LLVMContextRef LLVMGetGlobalContext(); +void LLVMContextDispose(LLVMContextRef C); + /* Create and destroy modules. */ /** See llvm::Module::Module. */ LLVMModuleRef LLVMModuleCreateWithName(const char *ModuleID); +LLVMModuleRef LLVMModuleCreateWithNameInContext(const char *ModuleID, + LLVMContextRef C); /** See llvm::Module::~Module. */ void LLVMDisposeModule(LLVMModuleRef M); @@ -815,6 +827,7 @@ namespace llvm { DEFINE_SIMPLE_CONVERSION_FUNCTIONS(PATypeHolder, LLVMTypeHandleRef ) DEFINE_SIMPLE_CONVERSION_FUNCTIONS(ModuleProvider, LLVMModuleProviderRef) DEFINE_SIMPLE_CONVERSION_FUNCTIONS(MemoryBuffer, LLVMMemoryBufferRef ) + DEFINE_SIMPLE_CONVERSION_FUNCTIONS(LLVMContext, LLVMContextRef ) DEFINE_STDCXX_CONVERSION_FUNCTIONS(PassManagerBase, LLVMPassManagerRef ) #undef DEFINE_STDCXX_CONVERSION_FUNCTIONS Modified: vendor/llvm/dist/include/llvm-c/lto.h ============================================================================== --- vendor/llvm/dist/include/llvm-c/lto.h Sat Jul 4 11:11:21 2009 (r195339) +++ vendor/llvm/dist/include/llvm-c/lto.h Sat Jul 4 13:58:26 2009 (r195340) @@ -16,6 +16,7 @@ #ifndef LTO_H #define LTO_H 1 +#include "llvm-c/Core.h" #include #include @@ -58,7 +59,6 @@ typedef struct LTOModule* lto_mo /** opaque reference to a code generator */ typedef struct LTOCodeGenerator* lto_code_gen_t; - #ifdef __cplusplus extern "C" { #endif @@ -76,7 +76,6 @@ lto_get_version(void); extern const char* lto_get_error_message(void); - /** * Checks if a file is a loadable object file. */ Modified: vendor/llvm/dist/include/llvm/ADT/APInt.h ============================================================================== --- vendor/llvm/dist/include/llvm/ADT/APInt.h Sat Jul 4 11:11:21 2009 (r195339) +++ vendor/llvm/dist/include/llvm/ADT/APInt.h Sat Jul 4 13:58:26 2009 (r195340) @@ -1426,6 +1426,8 @@ inline raw_ostream &operator<<(raw_ostre return OS; } +std::ostream &operator<<(std::ostream &o, const APInt &I); + namespace APIntOps { /// @brief Determine the smaller of two APInts considered to be signed. Modified: vendor/llvm/dist/include/llvm/ADT/FoldingSet.h ============================================================================== --- vendor/llvm/dist/include/llvm/ADT/FoldingSet.h Sat Jul 4 11:11:21 2009 (r195339) +++ vendor/llvm/dist/include/llvm/ADT/FoldingSet.h Sat Jul 4 13:58:26 2009 (r195340) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-vendor@FreeBSD.ORG Sat Jul 4 13:58:55 2009 Return-Path: Delivered-To: svn-src-vendor@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 326021065686; Sat, 4 Jul 2009 13:58:55 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1C5518FC23; Sat, 4 Jul 2009 13:58:55 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n64DwtEv014440; Sat, 4 Jul 2009 13:58:55 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n64DwsCL014431; Sat, 4 Jul 2009 13:58:54 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <200907041358.n64DwsCL014431@svn.freebsd.org> From: Ed Schouten Date: Sat, 4 Jul 2009 13:58:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r195341 - in vendor/clang/dist: include/clang/AST include/clang/Analysis/PathSensitive include/clang/Basic include/clang/CodeGen include/clang/Driver include/clang/Frontend include/clan... X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.5 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, 04 Jul 2009 13:58:55 -0000 Author: ed Date: Sat Jul 4 13:58:54 2009 New Revision: 195341 URL: http://svn.freebsd.org/changeset/base/195341 Log: Import Clang r74788. Added: vendor/clang/dist/test/Analysis/concrete-address.c vendor/clang/dist/test/CXX/temp/temp.fct.spec/temp.arg.explicit/p1.cpp vendor/clang/dist/test/CXX/temp/temp.fct.spec/temp.arg.explicit/p3.cpp vendor/clang/dist/test/CXX/temp/temp.fct.spec/temp.deduct/sfinae-1.cpp vendor/clang/dist/test/CodeGen/stack-protector.c vendor/clang/dist/test/CodeGenCXX/function-template-specialization.cpp vendor/clang/dist/test/Driver/openbsd.c vendor/clang/dist/test/Index/comments.c vendor/clang/dist/test/PCH/pr4489.c vendor/clang/dist/test/Parser/offsetof.c vendor/clang/dist/test/Sema/format-attr-pr4470.c vendor/clang/dist/test/SemaCXX/class-base-member-init.cpp vendor/clang/dist/test/SemaCXX/decltype-overloaded-functions.cpp vendor/clang/dist/test/SemaTemplate/class-template-ctor-initializer.cpp vendor/clang/dist/test/SemaTemplate/recursive-template-instantiation.cpp Modified: vendor/clang/dist/include/clang/AST/ASTContext.h vendor/clang/dist/include/clang/AST/CFG.h vendor/clang/dist/include/clang/AST/Decl.h vendor/clang/dist/include/clang/AST/DeclBase.h vendor/clang/dist/include/clang/AST/DeclCXX.h vendor/clang/dist/include/clang/AST/DeclObjC.h vendor/clang/dist/include/clang/AST/DeclTemplate.h vendor/clang/dist/include/clang/AST/Expr.h vendor/clang/dist/include/clang/AST/ExprCXX.h vendor/clang/dist/include/clang/AST/ExternalASTSource.h vendor/clang/dist/include/clang/AST/NestedNameSpecifier.h vendor/clang/dist/include/clang/AST/PrettyPrinter.h vendor/clang/dist/include/clang/AST/Stmt.h vendor/clang/dist/include/clang/AST/StmtNodes.def vendor/clang/dist/include/clang/AST/Type.h vendor/clang/dist/include/clang/Analysis/PathSensitive/MemRegion.h vendor/clang/dist/include/clang/Analysis/PathSensitive/SVals.h vendor/clang/dist/include/clang/Analysis/PathSensitive/ValueManager.h vendor/clang/dist/include/clang/Basic/DiagnosticDriverKinds.td vendor/clang/dist/include/clang/Basic/DiagnosticSemaKinds.td vendor/clang/dist/include/clang/Basic/LangOptions.h vendor/clang/dist/include/clang/Basic/TargetInfo.h vendor/clang/dist/include/clang/Basic/TokenKinds.def vendor/clang/dist/include/clang/CodeGen/ModuleBuilder.h vendor/clang/dist/include/clang/Driver/Action.h vendor/clang/dist/include/clang/Driver/ArgList.h vendor/clang/dist/include/clang/Driver/Compilation.h vendor/clang/dist/include/clang/Driver/Driver.h vendor/clang/dist/include/clang/Driver/HostInfo.h vendor/clang/dist/include/clang/Driver/Job.h vendor/clang/dist/include/clang/Driver/Options.def vendor/clang/dist/include/clang/Frontend/ASTConsumers.h vendor/clang/dist/include/clang/Frontend/PCHBitCodes.h vendor/clang/dist/include/clang/Frontend/PCHReader.h vendor/clang/dist/include/clang/Frontend/PCHWriter.h vendor/clang/dist/include/clang/Lex/Preprocessor.h vendor/clang/dist/include/clang/Parse/Action.h vendor/clang/dist/include/clang/Parse/Ownership.h vendor/clang/dist/include/clang/Parse/Parser.h vendor/clang/dist/lib/AST/ASTContext.cpp vendor/clang/dist/lib/AST/CFG.cpp vendor/clang/dist/lib/AST/Decl.cpp vendor/clang/dist/lib/AST/DeclBase.cpp vendor/clang/dist/lib/AST/DeclCXX.cpp vendor/clang/dist/lib/AST/DeclObjC.cpp vendor/clang/dist/lib/AST/DeclPrinter.cpp vendor/clang/dist/lib/AST/DeclTemplate.cpp vendor/clang/dist/lib/AST/Expr.cpp vendor/clang/dist/lib/AST/ExprCXX.cpp vendor/clang/dist/lib/AST/ExprConstant.cpp vendor/clang/dist/lib/AST/NestedNameSpecifier.cpp vendor/clang/dist/lib/AST/StmtDumper.cpp vendor/clang/dist/lib/AST/StmtPrinter.cpp vendor/clang/dist/lib/AST/TemplateName.cpp vendor/clang/dist/lib/AST/Type.cpp vendor/clang/dist/lib/Analysis/BasicStore.cpp vendor/clang/dist/lib/Analysis/BugReporter.cpp vendor/clang/dist/lib/Analysis/CFRefCount.cpp vendor/clang/dist/lib/Analysis/CheckDeadStores.cpp vendor/clang/dist/lib/Analysis/CheckObjCDealloc.cpp vendor/clang/dist/lib/Analysis/CheckObjCInstMethSignature.cpp vendor/clang/dist/lib/Analysis/CheckObjCUnusedIVars.cpp vendor/clang/dist/lib/Analysis/Environment.cpp vendor/clang/dist/lib/Analysis/GRExprEngine.cpp vendor/clang/dist/lib/Analysis/GRExprEngineInternalChecks.cpp vendor/clang/dist/lib/Analysis/GRState.cpp vendor/clang/dist/lib/Analysis/LiveVariables.cpp vendor/clang/dist/lib/Analysis/MemRegion.cpp vendor/clang/dist/lib/Analysis/RegionStore.cpp vendor/clang/dist/lib/Analysis/SVals.cpp vendor/clang/dist/lib/Analysis/Store.cpp vendor/clang/dist/lib/Basic/IdentifierTable.cpp vendor/clang/dist/lib/Basic/TargetInfo.cpp vendor/clang/dist/lib/Basic/Targets.cpp vendor/clang/dist/lib/CodeGen/CGBuiltin.cpp vendor/clang/dist/lib/CodeGen/CGCXX.cpp vendor/clang/dist/lib/CodeGen/CGCall.cpp vendor/clang/dist/lib/CodeGen/CGDebugInfo.cpp vendor/clang/dist/lib/CodeGen/CGDecl.cpp vendor/clang/dist/lib/CodeGen/CGExpr.cpp vendor/clang/dist/lib/CodeGen/CGExprAgg.cpp vendor/clang/dist/lib/CodeGen/CGExprConstant.cpp vendor/clang/dist/lib/CodeGen/CGObjC.cpp vendor/clang/dist/lib/CodeGen/CGObjCGNU.cpp vendor/clang/dist/lib/CodeGen/CGObjCMac.cpp vendor/clang/dist/lib/CodeGen/CodeGenFunction.cpp vendor/clang/dist/lib/CodeGen/CodeGenModule.cpp vendor/clang/dist/lib/CodeGen/CodeGenModule.h vendor/clang/dist/lib/CodeGen/CodeGenTypes.cpp vendor/clang/dist/lib/CodeGen/Mangle.cpp vendor/clang/dist/lib/CodeGen/ModuleBuilder.cpp vendor/clang/dist/lib/CodeGen/TargetABIInfo.cpp vendor/clang/dist/lib/Driver/ArgList.cpp vendor/clang/dist/lib/Driver/Compilation.cpp vendor/clang/dist/lib/Driver/Driver.cpp vendor/clang/dist/lib/Driver/HostInfo.cpp vendor/clang/dist/lib/Driver/Job.cpp vendor/clang/dist/lib/Driver/ToolChains.cpp vendor/clang/dist/lib/Driver/ToolChains.h vendor/clang/dist/lib/Driver/Tools.cpp vendor/clang/dist/lib/Driver/Tools.h vendor/clang/dist/lib/Frontend/ASTConsumers.cpp vendor/clang/dist/lib/Frontend/AnalysisConsumer.cpp vendor/clang/dist/lib/Frontend/Backend.cpp vendor/clang/dist/lib/Frontend/DeclXML.cpp vendor/clang/dist/lib/Frontend/InitHeaderSearch.cpp vendor/clang/dist/lib/Frontend/InitPreprocessor.cpp vendor/clang/dist/lib/Frontend/PCHReader.cpp vendor/clang/dist/lib/Frontend/PCHReaderDecl.cpp vendor/clang/dist/lib/Frontend/PCHReaderStmt.cpp vendor/clang/dist/lib/Frontend/PCHWriter.cpp vendor/clang/dist/lib/Frontend/PCHWriterDecl.cpp vendor/clang/dist/lib/Frontend/PCHWriterStmt.cpp vendor/clang/dist/lib/Frontend/ResolveLocation.cpp vendor/clang/dist/lib/Frontend/RewriteBlocks.cpp vendor/clang/dist/lib/Frontend/RewriteObjC.cpp vendor/clang/dist/lib/Lex/Lexer.cpp vendor/clang/dist/lib/Lex/Pragma.cpp vendor/clang/dist/lib/Lex/Preprocessor.cpp vendor/clang/dist/lib/Parse/ParseDecl.cpp vendor/clang/dist/lib/Parse/ParseDeclCXX.cpp vendor/clang/dist/lib/Parse/ParseExpr.cpp vendor/clang/dist/lib/Parse/ParseExprCXX.cpp vendor/clang/dist/lib/Parse/Parser.cpp vendor/clang/dist/lib/Rewrite/Rewriter.cpp vendor/clang/dist/lib/Sema/JumpDiagnostics.cpp vendor/clang/dist/lib/Sema/Sema.cpp vendor/clang/dist/lib/Sema/Sema.h vendor/clang/dist/lib/Sema/SemaAttr.cpp vendor/clang/dist/lib/Sema/SemaChecking.cpp vendor/clang/dist/lib/Sema/SemaDecl.cpp vendor/clang/dist/lib/Sema/SemaDeclAttr.cpp vendor/clang/dist/lib/Sema/SemaDeclCXX.cpp vendor/clang/dist/lib/Sema/SemaDeclObjC.cpp vendor/clang/dist/lib/Sema/SemaExpr.cpp vendor/clang/dist/lib/Sema/SemaExprCXX.cpp vendor/clang/dist/lib/Sema/SemaExprObjC.cpp vendor/clang/dist/lib/Sema/SemaInherit.cpp vendor/clang/dist/lib/Sema/SemaInit.cpp vendor/clang/dist/lib/Sema/SemaLookup.cpp vendor/clang/dist/lib/Sema/SemaOverload.cpp vendor/clang/dist/lib/Sema/SemaStmt.cpp vendor/clang/dist/lib/Sema/SemaTemplate.cpp vendor/clang/dist/lib/Sema/SemaTemplateDeduction.cpp vendor/clang/dist/lib/Sema/SemaTemplateInstantiate.cpp vendor/clang/dist/lib/Sema/SemaTemplateInstantiateDecl.cpp vendor/clang/dist/lib/Sema/SemaTemplateInstantiateExpr.cpp vendor/clang/dist/lib/Sema/SemaType.cpp vendor/clang/dist/test/Analysis/array-struct.c vendor/clang/dist/test/Analysis/misc-ps.m vendor/clang/dist/test/Analysis/stack-addr-ps.c vendor/clang/dist/test/Analysis/xfail_regionstore_wine_crash.c vendor/clang/dist/test/CMakeLists.txt vendor/clang/dist/test/CXX/basic/basic.def.odr/p2-typeid.cpp vendor/clang/dist/test/CodeGen/attributes.c vendor/clang/dist/test/CodeGen/unwind-attr.c vendor/clang/dist/test/Sema/compare.c vendor/clang/dist/test/Sema/ext_vector_casts.c vendor/clang/dist/test/SemaCXX/constructor-initializer.cpp vendor/clang/dist/test/SemaCXX/exception-spec.cpp vendor/clang/dist/test/SemaCXX/member-pointer.cpp vendor/clang/dist/test/SemaTemplate/operator-template.cpp vendor/clang/dist/test/cxx-sections.data vendor/clang/dist/tools/clang-cc/clang-cc.cpp vendor/clang/dist/tools/driver/driver.cpp vendor/clang/dist/tools/index-test/index-test.cpp vendor/clang/dist/utils/test/TestRunner.py vendor/clang/dist/www/analyzer/latest_checker.html.incl vendor/clang/dist/www/cxx_status.html Modified: vendor/clang/dist/include/clang/AST/ASTContext.h ============================================================================== --- vendor/clang/dist/include/clang/AST/ASTContext.h Sat Jul 4 13:58:26 2009 (r195340) +++ vendor/clang/dist/include/clang/AST/ASTContext.h Sat Jul 4 13:58:54 2009 (r195341) @@ -141,10 +141,19 @@ class ASTContext { /// this ASTContext object. LangOptions LangOpts; + /// \brief Whether we have already loaded comment source ranges from an + /// external source. + bool LoadedExternalComments; + /// MallocAlloc/BumpAlloc - The allocator objects used to create AST objects. bool FreeMemory; llvm::MallocAllocator MallocAlloc; llvm::BumpPtrAllocator BumpAlloc; + + /// \brief Mapping from declarations to their comments, once we have + /// already looked up the comment associated with a given declaration. + llvm::DenseMap DeclComments; + public: TargetInfo &Target; IdentifierTable &Idents; @@ -154,6 +163,10 @@ public: llvm::OwningPtr ExternalSource; clang::PrintingPolicy PrintingPolicy; + /// \brief Source ranges for all of the comments in the source file, + /// sorted in order of appearance in the translation unit. + std::vector Comments; + SourceManager& getSourceManager() { return SourceMgr; } const SourceManager& getSourceManager() const { return SourceMgr; } void *Allocate(unsigned Size, unsigned Align = 8) { @@ -178,7 +191,8 @@ public: TranslationUnitDecl *getTranslationUnitDecl() const { return TUDecl; } - + const char *getCommentForDecl(const Decl *D); + // Builtin Types. QualType VoidTy; QualType BoolTy; @@ -351,12 +365,6 @@ public: ObjCProtocolDecl **ProtocolList, unsigned NumProtocols); - /// getObjCQualifiedIdType - Return an ObjCQualifiedIdType for a - /// given 'id' and conforming protocol list. - QualType getObjCQualifiedIdType(ObjCProtocolDecl **ProtocolList, - unsigned NumProtocols); - - /// getTypeOfType - GCC extension. QualType getTypeOfExprType(Expr *e); QualType getTypeOfType(QualType t); Modified: vendor/clang/dist/include/clang/AST/CFG.h ============================================================================== --- vendor/clang/dist/include/clang/AST/CFG.h Sat Jul 4 13:58:26 2009 (r195340) +++ vendor/clang/dist/include/clang/AST/CFG.h Sat Jul 4 13:58:54 2009 (r195341) @@ -17,17 +17,20 @@ #include "llvm/ADT/GraphTraits.h" #include "llvm/Support/Allocator.h" -#include "llvm/Support/raw_ostream.h" #include #include #include +namespace llvm { + class raw_ostream; +} namespace clang { class Stmt; class Expr; class CFG; class PrinterHelper; class BlockEdge; + class LangOptions; /// CFGBlock - Represents a single basic block in a source-level CFG. /// It consists of: @@ -181,9 +184,9 @@ public: unsigned getBlockID() const { return BlockID; } - void dump(const CFG* cfg) const; - void print(llvm::raw_ostream& OS, const CFG* cfg) const; - void printTerminator(llvm::raw_ostream& OS) const; + void dump(const CFG *cfg, const LangOptions &LO) const; + void print(llvm::raw_ostream &OS, const CFG* cfg, const LangOptions &LO) const; + void printTerminator(llvm::raw_ostream &OS, const LangOptions &LO) const; }; @@ -283,9 +286,9 @@ public: // CFG Debugging: Pretty-Printing and Visualization. //===--------------------------------------------------------------------===// - void viewCFG() const; - void print(llvm::raw_ostream& OS) const; - void dump() const; + void viewCFG(const LangOptions &LO) const; + void print(llvm::raw_ostream& OS, const LangOptions &LO) const; + void dump(const LangOptions &LO) const; //===--------------------------------------------------------------------===// // Internal: constructors and data. Modified: vendor/clang/dist/include/clang/AST/Decl.h ============================================================================== --- vendor/clang/dist/include/clang/AST/Decl.h Sat Jul 4 13:58:26 2009 (r195340) +++ vendor/clang/dist/include/clang/AST/Decl.h Sat Jul 4 13:58:54 2009 (r195341) @@ -26,13 +26,19 @@ class Stmt; class CompoundStmt; class StringLiteral; class TemplateArgumentList; +class FunctionTemplateSpecializationInfo; /// TranslationUnitDecl - The top declaration context. class TranslationUnitDecl : public Decl, public DeclContext { - TranslationUnitDecl() + ASTContext &Ctx; + + explicit TranslationUnitDecl(ASTContext &ctx) : Decl(TranslationUnit, 0, SourceLocation()), - DeclContext(TranslationUnit) {} + DeclContext(TranslationUnit), + Ctx(ctx) {} public: + ASTContext &getASTContext() const { return Ctx; } + static TranslationUnitDecl *Create(ASTContext &C); // Implement isa/cast/dyncast/etc. static bool classof(const Decl *D) { return D->getKind() == TranslationUnit; } @@ -621,15 +627,8 @@ public: enum StorageClass { None, Extern, Static, PrivateExtern }; -private: - /// \brief Provides information about a function template specialization, - /// which is a FunctionDecl that has been explicitly specialization or - /// instantiated from a function template. - struct TemplateSpecializationInfo { - FunctionTemplateDecl *Template; - const TemplateArgumentList *TemplateArguments; - }; +private: /// ParamInfo - new[]'d array of pointers to VarDecls for the formal /// parameters of this function. This is null if a prototype or if there are /// no formals. @@ -684,7 +683,8 @@ private: /// the template being specialized and the template arguments involved in /// that specialization. llvm::PointerUnion3 TemplateOrSpecialization; + FunctionTemplateSpecializationInfo*> + TemplateOrSpecialization; protected: FunctionDecl(Kind DK, DeclContext *DC, SourceLocation L, @@ -724,11 +724,11 @@ public: /// function. The variant that accepts a FunctionDecl pointer will /// set that function declaration to the actual declaration /// containing the body (if there is one). - Stmt *getBody(ASTContext &Context, const FunctionDecl *&Definition) const; + Stmt *getBody(const FunctionDecl *&Definition) const; - virtual Stmt *getBody(ASTContext &Context) const { + virtual Stmt *getBody() const { const FunctionDecl* Definition; - return getBody(Context, Definition); + return getBody(Definition); } /// \brief If the function has a body that is immediately available, @@ -809,9 +809,7 @@ public: return PreviousDeclaration; } - void setPreviousDeclaration(FunctionDecl * PrevDecl) { - PreviousDeclaration = PrevDecl; - } + void setPreviousDeclaration(FunctionDecl * PrevDecl); unsigned getBuiltinID(ASTContext &Context) const; @@ -940,27 +938,14 @@ public: /// /// If this function declaration is not a function template specialization, /// returns NULL. - FunctionTemplateDecl *getPrimaryTemplate() const { - if (TemplateSpecializationInfo *Info - = TemplateOrSpecialization.dyn_cast()) { - return Info->Template; - } - return 0; - } + FunctionTemplateDecl *getPrimaryTemplate() const; /// \brief Retrieve the template arguments used to produce this function /// template specialization from the primary template. /// /// If this function declaration is not a function template specialization, /// returns NULL. - const TemplateArgumentList *getTemplateSpecializationArgs() const { - if (TemplateSpecializationInfo *Info - = TemplateOrSpecialization.dyn_cast()) { - return Info->TemplateArguments; - } - return 0; - } - + const TemplateArgumentList *getTemplateSpecializationArgs() const; /// \brief Specify that this function declaration is actually a function /// template specialization. @@ -974,8 +959,17 @@ public: /// function template specialization from the template. void setFunctionTemplateSpecialization(ASTContext &Context, FunctionTemplateDecl *Template, - const TemplateArgumentList *TemplateArgs); - + const TemplateArgumentList *TemplateArgs, + void *InsertPos); + + /// \brief Determine whether this is an explicit specialization of a + /// function template or a member function of a class template. + bool isExplicitSpecialization() const; + + /// \brief Note that this is an explicit specialization of a function template + /// or a member function of a class template. + void setExplicitSpecialization(bool ES); + // Implement isa/cast/dyncast/etc. static bool classof(const Decl *D) { return D->getKind() >= FunctionFirst && D->getKind() <= FunctionLast; @@ -1268,12 +1262,12 @@ public: // enumeration. typedef specific_decl_iterator enumerator_iterator; - enumerator_iterator enumerator_begin(ASTContext &Context) const { - return enumerator_iterator(this->decls_begin(Context)); + enumerator_iterator enumerator_begin() const { + return enumerator_iterator(this->decls_begin()); } - enumerator_iterator enumerator_end(ASTContext &Context) const { - return enumerator_iterator(this->decls_end(Context)); + enumerator_iterator enumerator_end() const { + return enumerator_iterator(this->decls_end()); } /// getIntegerType - Return the integer type this enum decl corresponds to. @@ -1376,17 +1370,17 @@ public: // data members, functions, constructors, destructors, etc. typedef specific_decl_iterator field_iterator; - field_iterator field_begin(ASTContext &Context) const { - return field_iterator(decls_begin(Context)); + field_iterator field_begin() const { + return field_iterator(decls_begin()); } - field_iterator field_end(ASTContext &Context) const { - return field_iterator(decls_end(Context)); + field_iterator field_end() const { + return field_iterator(decls_end()); } // field_empty - Whether there are any fields (non-static data // members) in this record. - bool field_empty(ASTContext &Context) const { - return field_begin(Context) == field_end(Context); + bool field_empty() const { + return field_begin() == field_end(); } /// completeDefinition - Notes that the definition of this type is @@ -1448,8 +1442,8 @@ public: bool IsVariadic() const { return isVariadic; } void setIsVariadic(bool value) { isVariadic = value; } - CompoundStmt *getBody() const { return (CompoundStmt*) Body; } - Stmt *getBody(ASTContext &C) const { return (Stmt*) Body; } + CompoundStmt *getCompoundBody() const { return (CompoundStmt*) Body; } + Stmt *getBody() const { return (Stmt*) Body; } void setBody(CompoundStmt *B) { Body = (Stmt*) B; } // Iterator access to formal parameters. Modified: vendor/clang/dist/include/clang/AST/DeclBase.h ============================================================================== --- vendor/clang/dist/include/clang/AST/DeclBase.h Sat Jul 4 13:58:26 2009 (r195340) +++ vendor/clang/dist/include/clang/AST/DeclBase.h Sat Jul 4 13:58:54 2009 (r195341) @@ -213,6 +213,13 @@ public: const DeclContext *getDeclContext() const { return const_cast(this)->getDeclContext(); } + + TranslationUnitDecl *getTranslationUnitDecl(); + const TranslationUnitDecl *getTranslationUnitDecl() const { + return const_cast(this)->getTranslationUnitDecl(); + } + + ASTContext &getASTContext() const; void setAccess(AccessSpecifier AS) { Access = AS; @@ -225,23 +232,23 @@ public: } bool hasAttrs() const { return HasAttrs; } - void addAttr(ASTContext &Context, Attr *attr); - const Attr *getAttrs(ASTContext &Context) const { + void addAttr(Attr *attr); + const Attr *getAttrs() const { if (!HasAttrs) return 0; // common case, no attributes. - return getAttrsImpl(Context); // Uncommon case, out of line hash lookup. + return getAttrsImpl(); // Uncommon case, out of line hash lookup. } - void swapAttrs(ASTContext &Context, Decl *D); - void invalidateAttrs(ASTContext &Context); + void swapAttrs(Decl *D); + void invalidateAttrs(); - template const T *getAttr(ASTContext &Context) const { - for (const Attr *attr = getAttrs(Context); attr; attr = attr->getNext()) + template const T *getAttr() const { + for (const Attr *attr = getAttrs(); attr; attr = attr->getNext()) if (const T *V = dyn_cast(attr)) return V; return 0; } - template bool hasAttr(ASTContext &Context) const { - return getAttr(Context) != 0; + template bool hasAttr() const { + return getAttr() != 0; } /// setInvalidDecl - Indicates the Decl had a semantic error. This @@ -307,14 +314,14 @@ public: /// getBody - If this Decl represents a declaration for a body of code, /// such as a function or method definition, this method returns the /// top-level Stmt* of that body. Otherwise this method returns null. - virtual Stmt* getBody(ASTContext &Context) const { return 0; } + virtual Stmt* getBody() const { return 0; } /// getCompoundBody - Returns getBody(), dyn_casted to a CompoundStmt. - CompoundStmt* getCompoundBody(ASTContext &Context) const; + CompoundStmt* getCompoundBody() const; /// getBodyRBrace - Gets the right brace of the body, if a body exists. /// This works whether the body is a CompoundStmt or a CXXTryStmt. - SourceLocation getBodyRBrace(ASTContext &Context) const; + SourceLocation getBodyRBrace() const; // global temp stats (until we have a per-module visitor) static void addDeclKind(Kind k); @@ -340,18 +347,16 @@ public: /// Destroy - Call destructors and release memory. virtual void Destroy(ASTContext& C); - void print(llvm::raw_ostream &Out, ASTContext &Context, + void print(llvm::raw_ostream &Out, unsigned Indentation = 0); + void print(llvm::raw_ostream &Out, const PrintingPolicy &Policy, unsigned Indentation = 0); - void print(llvm::raw_ostream &Out, ASTContext &Context, - const PrintingPolicy &Policy, unsigned Indentation = 0); static void printGroup(Decl** Begin, unsigned NumDecls, - llvm::raw_ostream &Out, ASTContext &Context, - const PrintingPolicy &Policy, + llvm::raw_ostream &Out, const PrintingPolicy &Policy, unsigned Indentation = 0); - void dump(ASTContext &Context); + void dump(); private: - const Attr *getAttrsImpl(ASTContext &Context) const; + const Attr *getAttrsImpl() const; }; @@ -454,7 +459,11 @@ public: const DeclContext *getLexicalParent() const { return const_cast(this)->getLexicalParent(); } - + + ASTContext &getParentASTContext() const { + return cast(this)->getASTContext(); + } + bool isFunctionOrMethod() const { switch (DeclKind) { case Decl::Block: @@ -592,9 +601,9 @@ public: /// decls_begin/decls_end - Iterate over the declarations stored in /// this context. - decl_iterator decls_begin(ASTContext &Context) const; - decl_iterator decls_end(ASTContext &Context) const; - bool decls_empty(ASTContext &Context) const; + decl_iterator decls_begin() const; + decl_iterator decls_end() const; + bool decls_empty() const; /// specific_decl_iterator - Iterates over a subrange of /// declarations stored in a DeclContext, providing only those that @@ -750,7 +759,7 @@ public: /// /// If D is also a NamedDecl, it will be made visible within its /// semantic context via makeDeclVisibleInContext. - void addDecl(ASTContext &Context, Decl *D); + void addDecl(Decl *D); /// lookup_iterator - An iterator that provides access to the results /// of looking up a name within this context. @@ -769,8 +778,8 @@ public: /// the declarations with this name, with object, function, member, /// and enumerator names preceding any tag name. Note that this /// routine will not look into parent contexts. - lookup_result lookup(ASTContext &Context, DeclarationName Name); - lookup_const_result lookup(ASTContext &Context, DeclarationName Name) const; + lookup_result lookup(DeclarationName Name); + lookup_const_result lookup(DeclarationName Name) const; /// @brief Makes a declaration visible within this context. /// @@ -786,7 +795,7 @@ public: /// visible from this context, as determined by /// NamedDecl::declarationReplaces, the previous declaration will be /// replaced with D. - void makeDeclVisibleInContext(ASTContext &Context, NamedDecl *D); + void makeDeclVisibleInContext(NamedDecl *D); /// udir_iterator - Iterates through the using-directives stored /// within this context. @@ -794,14 +803,14 @@ public: typedef std::pair udir_iterator_range; - udir_iterator_range getUsingDirectives(ASTContext &Context) const; + udir_iterator_range getUsingDirectives() const; - udir_iterator using_directives_begin(ASTContext &Context) const { - return getUsingDirectives(Context).first; + udir_iterator using_directives_begin() const { + return getUsingDirectives().first; } - udir_iterator using_directives_end(ASTContext &Context) const { - return getUsingDirectives(Context).second; + udir_iterator using_directives_end() const { + return getUsingDirectives().second; } // Low-level accessors @@ -836,11 +845,11 @@ public: #include "clang/AST/DeclNodes.def" private: - void LoadLexicalDeclsFromExternalStorage(ASTContext &Context) const; - void LoadVisibleDeclsFromExternalStorage(ASTContext &Context) const; + void LoadLexicalDeclsFromExternalStorage() const; + void LoadVisibleDeclsFromExternalStorage() const; - void buildLookup(ASTContext &Context, DeclContext *DCtx); - void makeDeclVisibleInContextImpl(ASTContext &Context, NamedDecl *D); + void buildLookup(DeclContext *DCtx); + void makeDeclVisibleInContextImpl(NamedDecl *D); }; inline bool Decl::isTemplateParameter() const { Modified: vendor/clang/dist/include/clang/AST/DeclCXX.h ============================================================================== --- vendor/clang/dist/include/clang/AST/DeclCXX.h Sat Jul 4 13:58:26 2009 (r195340) +++ vendor/clang/dist/include/clang/AST/DeclCXX.h Sat Jul 4 13:58:54 2009 (r195341) @@ -32,6 +32,8 @@ class ClassTemplateSpecializationDecl; class AnyFunctionDecl { NamedDecl *Function; + AnyFunctionDecl(NamedDecl *ND) : Function(ND) { } + public: AnyFunctionDecl(FunctionDecl *FD) : Function(FD) { } AnyFunctionDecl(FunctionTemplateDecl *FTD); @@ -42,6 +44,10 @@ public: /// \brief Retrieve the underlying function or function template. NamedDecl *get() const { return Function; } + + static AnyFunctionDecl getFromNamedDecl(NamedDecl *ND) { + return AnyFunctionDecl(ND); + } }; } // end namespace clang @@ -57,6 +63,22 @@ namespace llvm { }; template<> struct simplify_type< ::clang::AnyFunctionDecl> : public simplify_type {}; + + // Provide PointerLikeTypeTraits for non-cvr pointers. + template<> + class PointerLikeTypeTraits< ::clang::AnyFunctionDecl> { + public: + static inline void *getAsVoidPointer(::clang::AnyFunctionDecl F) { + return F.get(); + } + static inline ::clang::AnyFunctionDecl getFromVoidPointer(void *P) { + return ::clang::AnyFunctionDecl::getFromNamedDecl( + static_cast< ::clang::NamedDecl*>(P)); + } + + enum { NumLowBitsAvailable = 2 }; + }; + } // end namespace llvm namespace clang { @@ -91,24 +113,10 @@ public: static OverloadedFunctionDecl *Create(ASTContext &C, DeclContext *DC, DeclarationName N); - /// addOverload - Add an overloaded function FD to this set of - /// overloaded functions. - void addOverload(FunctionDecl *FD) { - assert((FD->getDeclName() == getDeclName() || - isa(FD) || isa(FD)) && - "Overloaded functions must have the same name"); - Functions.push_back(FD); - - // An overloaded function declaration always has the location of - // the most-recently-added function declaration. - if (FD->getLocation().isValid()) - this->setLocation(FD->getLocation()); - } - - /// addOverload - Add an overloaded function template FTD to this set of - /// overloaded functions. - void addOverload(FunctionTemplateDecl *FTD); - + /// \brief Add a new overloaded function or function template to the set + /// of overloaded function templates. + void addOverload(AnyFunctionDecl F); + function_iterator function_begin() { return Functions.begin(); } function_iterator function_end() { return Functions.end(); } function_const_iterator function_begin() const { return Functions.begin(); } @@ -289,8 +297,11 @@ public: CXXRecordDecl* PrevDecl=0, bool DelayTypeCreation = false); + virtual void Destroy(ASTContext& C); + /// setBases - Sets the base classes of this struct or class. - void setBases(CXXBaseSpecifier const * const *Bases, unsigned NumBases); + void setBases(ASTContext &C, + CXXBaseSpecifier const * const *Bases, unsigned NumBases); /// getNumBases - Retrieves the number of base classes of this /// class. @@ -580,15 +591,20 @@ class CXXBaseOrMemberInitializer { /// Args - The arguments used to initialize the base or member. Expr **Args; unsigned NumArgs; + + /// IdLoc - Location of the id in ctor-initializer list. + SourceLocation IdLoc; public: /// CXXBaseOrMemberInitializer - Creates a new base-class initializer. explicit - CXXBaseOrMemberInitializer(QualType BaseType, Expr **Args, unsigned NumArgs); + CXXBaseOrMemberInitializer(QualType BaseType, Expr **Args, unsigned NumArgs, + SourceLocation L); /// CXXBaseOrMemberInitializer - Creates a new member initializer. explicit - CXXBaseOrMemberInitializer(FieldDecl *Member, Expr **Args, unsigned NumArgs); + CXXBaseOrMemberInitializer(FieldDecl *Member, Expr **Args, unsigned NumArgs, + SourceLocation L); /// ~CXXBaseOrMemberInitializer - Destroy the base or member initializer. ~CXXBaseOrMemberInitializer(); @@ -601,6 +617,10 @@ public: /// arguments. typedef Expr * const * arg_const_iterator; + /// getBaseOrMember - get the generic 'member' representing either the field + /// or a base class. + void* getBaseOrMember() const { return reinterpret_cast(BaseOrMember); } + /// isBaseInitializer - Returns true when this initializer is /// initializing a base class. bool isBaseInitializer() const { return (BaseOrMember & 0x1) != 0; } @@ -641,6 +661,8 @@ public: return 0; } + SourceLocation getSourceLocation() const { return IdLoc; } + /// begin() - Retrieve an iterator to the first initializer argument. arg_iterator begin() { return Args; } /// begin() - Retrieve an iterator to the first initializer argument. @@ -677,16 +699,22 @@ class CXXConstructorDecl : public CXXMet /// @c !Implicit && ImplicitlyDefined. bool ImplicitlyDefined : 1; - /// FIXME: Add support for base and member initializers. - + /// Support for base and member initializers. + /// BaseOrMemberInitializers - The arguments used to initialize the base + /// or member. + CXXBaseOrMemberInitializer **BaseOrMemberInitializers; + unsigned NumBaseOrMemberInitializers; + CXXConstructorDecl(CXXRecordDecl *RD, SourceLocation L, DeclarationName N, QualType T, bool isExplicit, bool isInline, bool isImplicitlyDeclared) : CXXMethodDecl(CXXConstructor, RD, L, N, T, false, isInline), - Explicit(isExplicit), ImplicitlyDefined(false) { + Explicit(isExplicit), ImplicitlyDefined(false), + BaseOrMemberInitializers(0), NumBaseOrMemberInitializers(0) { setImplicit(isImplicitlyDeclared); } - + virtual void Destroy(ASTContext& C); + public: static CXXConstructorDecl *Create(ASTContext &C, CXXRecordDecl *RD, SourceLocation L, DeclarationName N, @@ -702,7 +730,8 @@ public: /// already been defined. bool isImplicitlyDefined(ASTContext &C) const { assert(isThisDeclarationADefinition() && - "Can only get the implicit-definition flag once the constructor has been defined"); + "Can only get the implicit-definition flag once the " + "constructor has been defined"); return ImplicitlyDefined; } @@ -710,10 +739,41 @@ public: /// implicitly defined or not. void setImplicitlyDefined(bool ID) { assert(isThisDeclarationADefinition() && - "Can only set the implicit-definition flag once the constructor has been defined"); + "Can only set the implicit-definition flag once the constructor " + "has been defined"); ImplicitlyDefined = ID; } + /// init_iterator - Iterates through the member/base initializer list. + typedef CXXBaseOrMemberInitializer **init_iterator; + + /// init_const_iterator - Iterates through the memberbase initializer list. + typedef CXXBaseOrMemberInitializer * const * init_const_iterator; + + /// begin() - Retrieve an iterator to the first initializer. + init_iterator begin() { return BaseOrMemberInitializers; } + /// begin() - Retrieve an iterator to the first initializer. + init_const_iterator begin() const { return BaseOrMemberInitializers; } + + /// end() - Retrieve an iterator past the last initializer. + init_iterator end() { + return BaseOrMemberInitializers + NumBaseOrMemberInitializers; + } + /// end() - Retrieve an iterator past the last initializer. + init_const_iterator end() const { + return BaseOrMemberInitializers + NumBaseOrMemberInitializers; + } + + /// getNumArgs - Determine the number of arguments used to + /// initialize the member or base. + unsigned getNumBaseOrMemberInitializers() const { + return NumBaseOrMemberInitializers; + } + + void setBaseOrMemberInitializers(ASTContext &C, + CXXBaseOrMemberInitializer **Initializers, + unsigned NumInitializers); + /// isDefaultConstructor - Whether this constructor is a default /// constructor (C++ [class.ctor]p5), which can be used to /// default-initialize a class of this type. Modified: vendor/clang/dist/include/clang/AST/DeclObjC.h ============================================================================== --- vendor/clang/dist/include/clang/AST/DeclObjC.h Sat Jul 4 13:58:26 2009 (r195340) +++ vendor/clang/dist/include/clang/AST/DeclObjC.h Sat Jul 4 13:58:54 2009 (r195341) @@ -242,10 +242,10 @@ public: return ImplementationControl(DeclImplementation); } - virtual Stmt *getBody(ASTContext &C) const { + virtual Stmt *getBody() const { return (Stmt*) Body; } - CompoundStmt *getBody() { return (CompoundStmt*)Body; } + CompoundStmt *getCompoundBody() { return (CompoundStmt*)Body; } void setBody(Stmt *B) { Body = B; } // Implement isa/cast/dyncast/etc. @@ -291,55 +291,52 @@ public: // Iterator access to properties. typedef specific_decl_iterator prop_iterator; - prop_iterator prop_begin(ASTContext &Context) const { - return prop_iterator(decls_begin(Context)); + prop_iterator prop_begin() const { + return prop_iterator(decls_begin()); } - prop_iterator prop_end(ASTContext &Context) const { - return prop_iterator(decls_end(Context)); + prop_iterator prop_end() const { + return prop_iterator(decls_end()); } // Iterator access to instance/class methods. typedef specific_decl_iterator method_iterator; - method_iterator meth_begin(ASTContext &Context) const { - return method_iterator(decls_begin(Context)); + method_iterator meth_begin() const { + return method_iterator(decls_begin()); } - method_iterator meth_end(ASTContext &Context) const { - return method_iterator(decls_end(Context)); + method_iterator meth_end() const { + return method_iterator(decls_end()); } typedef filtered_decl_iterator instmeth_iterator; - instmeth_iterator instmeth_begin(ASTContext &Context) const { - return instmeth_iterator(decls_begin(Context)); + instmeth_iterator instmeth_begin() const { + return instmeth_iterator(decls_begin()); } - instmeth_iterator instmeth_end(ASTContext &Context) const { - return instmeth_iterator(decls_end(Context)); + instmeth_iterator instmeth_end() const { + return instmeth_iterator(decls_end()); } typedef filtered_decl_iterator classmeth_iterator; - classmeth_iterator classmeth_begin(ASTContext &Context) const { - return classmeth_iterator(decls_begin(Context)); + classmeth_iterator classmeth_begin() const { + return classmeth_iterator(decls_begin()); } - classmeth_iterator classmeth_end(ASTContext &Context) const { - return classmeth_iterator(decls_end(Context)); + classmeth_iterator classmeth_end() const { + return classmeth_iterator(decls_end()); } // Get the local instance/class method declared in this interface. - ObjCMethodDecl *getInstanceMethod(ASTContext &Context, Selector Sel) const; - ObjCMethodDecl *getClassMethod(ASTContext &Context, Selector Sel) const; - ObjCIvarDecl *getIvarDecl(ASTContext &Context, IdentifierInfo *Id) const; - - ObjCMethodDecl * - getMethod(ASTContext &Context, Selector Sel, bool isInstance) const { - return isInstance ? getInstanceMethod(Context, Sel) - : getClassMethod(Context, Sel); + ObjCMethodDecl *getInstanceMethod(Selector Sel) const; + ObjCMethodDecl *getClassMethod(Selector Sel) const; + ObjCIvarDecl *getIvarDecl(IdentifierInfo *Id) const; + + ObjCMethodDecl *getMethod(Selector Sel, bool isInstance) const { + return isInstance ? getInstanceMethod(Sel) : getClassMethod(Sel); } - ObjCPropertyDecl *FindPropertyDeclaration(ASTContext &Context, - IdentifierInfo *PropertyId) const; + ObjCPropertyDecl *FindPropertyDeclaration(IdentifierInfo *PropertyId) const; // Marks the end of the container. SourceLocation getAtEndLoc() const { return AtEndLoc; } @@ -474,19 +471,17 @@ public: return false; } - ObjCIvarDecl *lookupInstanceVariable(ASTContext &Context, - IdentifierInfo *IVarName, + ObjCIvarDecl *lookupInstanceVariable(IdentifierInfo *IVarName, ObjCInterfaceDecl *&ClassDeclared); - ObjCIvarDecl *lookupInstanceVariable(ASTContext &Context, - IdentifierInfo *IVarName) { + ObjCIvarDecl *lookupInstanceVariable(IdentifierInfo *IVarName) { ObjCInterfaceDecl *ClassDeclared; - return lookupInstanceVariable(Context, IVarName, ClassDeclared); + return lookupInstanceVariable(IVarName, ClassDeclared); } // Lookup a method. First, we search locally. If a method isn't // found, we search referenced protocols and class categories. - ObjCMethodDecl *lookupInstanceMethod(ASTContext &Context, Selector Sel); - ObjCMethodDecl *lookupClassMethod(ASTContext &Context, Selector Sel); + ObjCMethodDecl *lookupInstanceMethod(Selector Sel); + ObjCMethodDecl *lookupClassMethod(Selector Sel); ObjCInterfaceDecl *lookupInheritedClass(const IdentifierInfo *ICName); // Location information, modeled after the Stmt API. @@ -648,8 +643,8 @@ public: // Lookup a method. First, we search locally. If a method isn't // found, we search referenced protocols and class categories. - ObjCMethodDecl *lookupInstanceMethod(ASTContext &Context, Selector Sel); - ObjCMethodDecl *lookupClassMethod(ASTContext &Context, Selector Sel); + ObjCMethodDecl *lookupInstanceMethod(Selector Sel); + ObjCMethodDecl *lookupClassMethod(Selector Sel); bool isForwardDecl() const { return isForwardProtoDecl; } void setForwardDecl(bool val) { isForwardProtoDecl = val; } @@ -831,61 +826,57 @@ public: ObjCInterfaceDecl *getClassInterface() { return ClassInterface; } void setClassInterface(ObjCInterfaceDecl *IFace) { ClassInterface = IFace; } - void addInstanceMethod(ASTContext &Context, ObjCMethodDecl *method) { + void addInstanceMethod(ObjCMethodDecl *method) { // FIXME: Context should be set correctly before we get here. method->setLexicalDeclContext(this); - addDecl(Context, method); + addDecl(method); } - void addClassMethod(ASTContext &Context, ObjCMethodDecl *method) { + void addClassMethod(ObjCMethodDecl *method) { // FIXME: Context should be set correctly before we get here. method->setLexicalDeclContext(this); - addDecl(Context, method); + addDecl(method); } // Get the local instance/class method declared in this interface. - ObjCMethodDecl *getInstanceMethod(ASTContext &Context, Selector Sel) const; - ObjCMethodDecl *getClassMethod(ASTContext &Context, Selector Sel) const; - ObjCMethodDecl *getMethod(ASTContext &Context, Selector Sel, - bool isInstance) const { - return isInstance ? getInstanceMethod(Context, Sel) - : getClassMethod(Context, Sel); + ObjCMethodDecl *getInstanceMethod(Selector Sel) const; + ObjCMethodDecl *getClassMethod(Selector Sel) const; + ObjCMethodDecl *getMethod(Selector Sel, bool isInstance) const { + return isInstance ? getInstanceMethod(Sel) + : getClassMethod(Sel); } - void addPropertyImplementation(ASTContext &Context, - ObjCPropertyImplDecl *property); - - ObjCPropertyImplDecl *FindPropertyImplDecl(ASTContext &Context, - IdentifierInfo *propertyId) const; - ObjCPropertyImplDecl *FindPropertyImplIvarDecl(ASTContext &Context, - IdentifierInfo *ivarId) const; + void addPropertyImplementation(ObjCPropertyImplDecl *property); + + ObjCPropertyImplDecl *FindPropertyImplDecl(IdentifierInfo *propertyId) const; + ObjCPropertyImplDecl *FindPropertyImplIvarDecl(IdentifierInfo *ivarId) const; // Iterator access to properties. typedef specific_decl_iterator propimpl_iterator; - propimpl_iterator propimpl_begin(ASTContext &Context) const { - return propimpl_iterator(decls_begin(Context)); + propimpl_iterator propimpl_begin() const { + return propimpl_iterator(decls_begin()); } - propimpl_iterator propimpl_end(ASTContext &Context) const { - return propimpl_iterator(decls_end(Context)); + propimpl_iterator propimpl_end() const { + return propimpl_iterator(decls_end()); } typedef filtered_decl_iterator instmeth_iterator; - instmeth_iterator instmeth_begin(ASTContext &Context) const { - return instmeth_iterator(decls_begin(Context)); + instmeth_iterator instmeth_begin() const { + return instmeth_iterator(decls_begin()); } - instmeth_iterator instmeth_end(ASTContext &Context) const { - return instmeth_iterator(decls_end(Context)); + instmeth_iterator instmeth_end() const { + return instmeth_iterator(decls_end()); } typedef filtered_decl_iterator classmeth_iterator; - classmeth_iterator classmeth_begin(ASTContext &Context) const { - return classmeth_iterator(decls_begin(Context)); + classmeth_iterator classmeth_begin() const { + return classmeth_iterator(decls_begin()); } - classmeth_iterator classmeth_end(ASTContext &Context) const { - return classmeth_iterator(decls_end(Context)); + classmeth_iterator classmeth_end() const { + return classmeth_iterator(decls_end()); } // Location information, modeled after the Stmt API. @@ -1002,17 +993,17 @@ public: void setSuperClass(ObjCInterfaceDecl * superCls) { SuperClass = superCls; } typedef specific_decl_iterator ivar_iterator; - ivar_iterator ivar_begin(ASTContext &Context) const { - return ivar_iterator(decls_begin(Context)); + ivar_iterator ivar_begin() const { + return ivar_iterator(decls_begin()); } - ivar_iterator ivar_end(ASTContext &Context) const { - return ivar_iterator(decls_end(Context)); + ivar_iterator ivar_end() const { + return ivar_iterator(decls_end()); } - unsigned ivar_size(ASTContext &Context) const { - return std::distance(ivar_begin(Context), ivar_end(Context)); + unsigned ivar_size() const { + return std::distance(ivar_begin(), ivar_end()); } - bool ivar_empty(ASTContext &Context) const { - return ivar_begin(Context) == ivar_end(Context); + bool ivar_empty() const { + return ivar_begin() == ivar_end(); } static bool classof(const Decl *D) { Modified: vendor/clang/dist/include/clang/AST/DeclTemplate.h ============================================================================== --- vendor/clang/dist/include/clang/AST/DeclTemplate.h Sat Jul 4 13:58:26 2009 (r195340) +++ vendor/clang/dist/include/clang/AST/DeclTemplate.h Sat Jul 4 13:58:54 2009 (r195341) @@ -100,6 +100,352 @@ public: } }; +/// \brief Represents a template argument within a class template +/// specialization. +class TemplateArgument { + union { + uintptr_t TypeOrValue; + struct { + char Value[sizeof(llvm::APSInt)]; + void *Type; + } Integer; + struct { + TemplateArgument *Args; + unsigned NumArgs; + bool CopyArgs; + } Args; + }; + + /// \brief Location of the beginning of this template argument. + SourceLocation StartLoc; + +public: + /// \brief The type of template argument we're storing. + enum ArgKind { + Null = 0, + /// The template argument is a type. Its value is stored in the + /// TypeOrValue field. + Type = 1, + /// The template argument is a declaration + Declaration = 2, + /// The template argument is an integral value stored in an llvm::APSInt. + Integral = 3, + /// The template argument is a value- or type-dependent expression + /// stored in an Expr*. + Expression = 4, + + /// The template argument is actually a parameter pack. Arguments are stored + /// in the Args struct. + Pack = 5 + } Kind; + + /// \brief Construct an empty, invalid template argument. + TemplateArgument() : TypeOrValue(0), StartLoc(), Kind(Null) { } + + /// \brief Construct a template type argument. + TemplateArgument(SourceLocation Loc, QualType T) : Kind(Type) { + TypeOrValue = reinterpret_cast(T.getAsOpaquePtr()); + StartLoc = Loc; + } + + /// \brief Construct a template argument that refers to a + /// declaration, which is either an external declaration or a + /// template declaration. + TemplateArgument(SourceLocation Loc, Decl *D) : Kind(Declaration) { + // FIXME: Need to be sure we have the "canonical" declaration! + TypeOrValue = reinterpret_cast(D); + StartLoc = Loc; + } + + /// \brief Construct an integral constant template argument. + TemplateArgument(SourceLocation Loc, const llvm::APSInt &Value, + QualType Type) + : Kind(Integral) { + new (Integer.Value) llvm::APSInt(Value); + Integer.Type = Type.getAsOpaquePtr(); + StartLoc = Loc; + } + + /// \brief Construct a template argument that is an expression. + /// + /// This form of template argument only occurs in template argument + /// lists used for dependent types and for expression; it will not + /// occur in a non-dependent, canonical template argument list. + TemplateArgument(Expr *E); + + /// \brief Copy constructor for a template argument. *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-vendor@FreeBSD.ORG Sat Jul 4 13:59:22 2009 Return-Path: Delivered-To: svn-src-vendor@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 70AD7106568A; Sat, 4 Jul 2009 13:59:22 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 454A78FC23; Sat, 4 Jul 2009 13:59:22 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n64DxM7Q014491; Sat, 4 Jul 2009 13:59:22 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n64DxMiL014490; Sat, 4 Jul 2009 13:59:22 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <200907041359.n64DxMiL014490@svn.freebsd.org> From: Ed Schouten Date: Sat, 4 Jul 2009 13:59:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r195342 - vendor/llvm/llvm-r74788 X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.5 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, 04 Jul 2009 13:59:23 -0000 Author: ed Date: Sat Jul 4 13:59:22 2009 New Revision: 195342 URL: http://svn.freebsd.org/changeset/base/195342 Log: Tag LLVM r74788. Added: vendor/llvm/llvm-r74788/ - copied from r195341, vendor/llvm/dist/ From owner-svn-src-vendor@FreeBSD.ORG Sat Jul 4 13:59:43 2009 Return-Path: Delivered-To: svn-src-vendor@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 76D9610656A6; Sat, 4 Jul 2009 13:59:43 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4B87F8FC23; Sat, 4 Jul 2009 13:59:43 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n64DxhWT014535; Sat, 4 Jul 2009 13:59:43 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n64Dxhx8014534; Sat, 4 Jul 2009 13:59:43 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <200907041359.n64Dxhx8014534@svn.freebsd.org> From: Ed Schouten Date: Sat, 4 Jul 2009 13:59:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r195343 - vendor/clang/clang-r74788 X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.5 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, 04 Jul 2009 13:59:44 -0000 Author: ed Date: Sat Jul 4 13:59:43 2009 New Revision: 195343 URL: http://svn.freebsd.org/changeset/base/195343 Log: Tag Clang r74788. Added: vendor/clang/clang-r74788/ - copied from r195342, vendor/clang/dist/