From 6144c1de6a7674dad94290650e4e14f24d42e421 Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Thu, 16 Sep 2010 17:02:26 +0000 Subject: [PATCH 1/4] Make vendor/llvm/dist exactly the same as upstream's r108428. Some files and directories were already removed in the upstream repository, but were not removed here, when the previous snapshot was imported. Approved by: rpaulo (mentor) --- Xcode/LLVM.xcodeproj/project.pbxproj | 3303 -------- Xcode/README.txt | 1 - autoconf/m4/bison.m4 | 15 - autoconf/m4/cxx_bidi_iterator.m4 | 22 - autoconf/m4/cxx_fwd_iterator.m4 | 22 - autoconf/m4/cxx_namespaces.m4 | 19 - autoconf/m4/cxx_std_iterator.m4 | 26 - autoconf/m4/flex.m4 | 17 - docs/AdvancedGetElementPtr.html | 362 - docs/CommandGuide/llvm-db.pod | 16 - docs/ReleaseNotes-2.6.html | 784 -- docs/tutorial/JITTutorial1.html | 207 - docs/tutorial/JITTutorial2-1.png | Bin 59107 -> 0 bytes docs/tutorial/JITTutorial2.html | 200 - include/llvm/ADT/iterator.cmake | 79 - include/llvm/ADT/iterator.h.in | 76 - include/llvm/Support/DataTypes.h.cmake | 152 - include/llvm/Support/DataTypes.h.in | 147 - mklib | 7517 ----------------- runtime/libprofile/BlockProfiling.c | 45 - runtime/libprofile/FunctionProfiling.c | 42 - .../x86_64-pc-linux-gnu_gcc-4.3.3.supp | 23 - win32/Analysis/Analysis.vcproj | 573 -- win32/Archive/Archive.vcproj | 337 - win32/AsmParser/AsmParser.vcproj | 346 - win32/Bitcode/Bitcode.vcproj | 422 - win32/CBackend/CBackend.vcproj | 325 - win32/CodeGen/CodeGen.vcproj | 849 -- win32/Configure/Configure.vcproj | 319 - win32/ExecutionEngine/ExecutionEngine.vcproj | 429 - win32/Fibonacci/Fibonacci.vcproj | 386 - win32/Linker/Linker.vcproj | 337 - win32/Support/Support.vcproj | 743 -- win32/System/System.vcproj | 462 - win32/TableGen/TableGen.vcproj | 538 -- win32/Target/Target.vcproj | 433 - win32/Transforms/Transforms.vcproj | 759 -- win32/VMCore/VMCore.vcproj | 650 -- win32/bugpoint/bugpoint.vcproj | 429 - win32/clang.sln | 591 -- win32/common.vsprops | 11 - win32/config.h | 30 - win32/dobison.cmd | 29 - win32/doflex.cmd | 20 - win32/llc/llc.vcproj | 385 - win32/lli/lli.vcproj | 385 - win32/llvm-ar/llvm-ar.vcproj | 381 - win32/llvm-as/llvm-as.vcproj | 381 - win32/llvm-bcanalyzer/llvm-bcanalyzer.vcproj | 381 - win32/llvm-dis/llvm-dis.vcproj | 381 - win32/llvm-ld/llvm-ld.vcproj | 385 - win32/llvm-link/llvm-link.vcproj | 381 - win32/llvm-nm/llvm-nm.vcproj | 381 - win32/llvm-prof/llvm-prof.vcproj | 381 - win32/llvm-ranlib/llvm-ranlib.vcproj | 381 - win32/llvm.sln | 719 -- win32/opt/opt.vcproj | 393 - win32/unistd.h | 1 - win32/x86/x86.vcproj | 620 -- 59 files changed, 28029 deletions(-) delete mode 100644 Xcode/LLVM.xcodeproj/project.pbxproj delete mode 100644 Xcode/README.txt delete mode 100644 autoconf/m4/bison.m4 delete mode 100644 autoconf/m4/cxx_bidi_iterator.m4 delete mode 100644 autoconf/m4/cxx_fwd_iterator.m4 delete mode 100644 autoconf/m4/cxx_namespaces.m4 delete mode 100644 autoconf/m4/cxx_std_iterator.m4 delete mode 100644 autoconf/m4/flex.m4 delete mode 100644 docs/AdvancedGetElementPtr.html delete mode 100644 docs/CommandGuide/llvm-db.pod delete mode 100644 docs/ReleaseNotes-2.6.html delete mode 100644 docs/tutorial/JITTutorial1.html delete mode 100644 docs/tutorial/JITTutorial2-1.png delete mode 100644 docs/tutorial/JITTutorial2.html delete mode 100644 include/llvm/ADT/iterator.cmake delete mode 100644 include/llvm/ADT/iterator.h.in delete mode 100644 include/llvm/Support/DataTypes.h.cmake delete mode 100644 include/llvm/Support/DataTypes.h.in delete mode 100755 mklib delete mode 100644 runtime/libprofile/BlockProfiling.c delete mode 100644 runtime/libprofile/FunctionProfiling.c delete mode 100644 utils/valgrind/x86_64-pc-linux-gnu_gcc-4.3.3.supp delete mode 100644 win32/Analysis/Analysis.vcproj delete mode 100644 win32/Archive/Archive.vcproj delete mode 100644 win32/AsmParser/AsmParser.vcproj delete mode 100644 win32/Bitcode/Bitcode.vcproj delete mode 100644 win32/CBackend/CBackend.vcproj delete mode 100644 win32/CodeGen/CodeGen.vcproj delete mode 100644 win32/Configure/Configure.vcproj delete mode 100644 win32/ExecutionEngine/ExecutionEngine.vcproj delete mode 100644 win32/Fibonacci/Fibonacci.vcproj delete mode 100644 win32/Linker/Linker.vcproj delete mode 100644 win32/Support/Support.vcproj delete mode 100644 win32/System/System.vcproj delete mode 100644 win32/TableGen/TableGen.vcproj delete mode 100644 win32/Target/Target.vcproj delete mode 100644 win32/Transforms/Transforms.vcproj delete mode 100644 win32/VMCore/VMCore.vcproj delete mode 100644 win32/bugpoint/bugpoint.vcproj delete mode 100644 win32/clang.sln delete mode 100644 win32/common.vsprops delete mode 100644 win32/config.h delete mode 100755 win32/dobison.cmd delete mode 100755 win32/doflex.cmd delete mode 100644 win32/llc/llc.vcproj delete mode 100644 win32/lli/lli.vcproj delete mode 100644 win32/llvm-ar/llvm-ar.vcproj delete mode 100644 win32/llvm-as/llvm-as.vcproj delete mode 100644 win32/llvm-bcanalyzer/llvm-bcanalyzer.vcproj delete mode 100644 win32/llvm-dis/llvm-dis.vcproj delete mode 100644 win32/llvm-ld/llvm-ld.vcproj delete mode 100644 win32/llvm-link/llvm-link.vcproj delete mode 100644 win32/llvm-nm/llvm-nm.vcproj delete mode 100644 win32/llvm-prof/llvm-prof.vcproj delete mode 100644 win32/llvm-ranlib/llvm-ranlib.vcproj delete mode 100644 win32/llvm.sln delete mode 100644 win32/opt/opt.vcproj delete mode 100644 win32/unistd.h delete mode 100644 win32/x86/x86.vcproj diff --git a/Xcode/LLVM.xcodeproj/project.pbxproj b/Xcode/LLVM.xcodeproj/project.pbxproj deleted file mode 100644 index e2f40f4cba4..00000000000 --- a/Xcode/LLVM.xcodeproj/project.pbxproj +++ /dev/null @@ -1,3303 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 42; - objects = { - -/* Begin PBXAggregateTarget section */ - CF0329BC08D1BE8E0030FD33 /* LLVM full llc */ = { - isa = PBXAggregateTarget; - buildConfigurationList = CF0329C708D1BEC40030FD33 /* Build configuration list for PBXAggregateTarget "LLVM full llc" */; - buildPhases = ( - ); - dependencies = ( - CF0329BE08D1BE970030FD33 /* PBXTargetDependency */, - CF0329C008D1BE9B0030FD33 /* PBXTargetDependency */, - ); - name = "LLVM full llc"; - productName = "LLVM full llc"; - }; - CFDF86D00ADE820000D40A3D /* LLVM full llc release */ = { - isa = PBXAggregateTarget; - buildConfigurationList = CFDF86D50ADE820000D40A3D /* Build configuration list for PBXAggregateTarget "LLVM full llc release" */; - buildPhases = ( - ); - dependencies = ( - CFDF86DA0ADE822100D40A3D /* PBXTargetDependency */, - CFDF86DC0ADE822100D40A3D /* PBXTargetDependency */, - ); - name = "LLVM full llc release"; - productName = "LLVM full llc"; - }; -/* End PBXAggregateTarget section */ - -/* Begin PBXContainerItemProxy section */ - CF0329BD08D1BE970030FD33 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */; - proxyType = 1; - remoteGlobalIDString = CF0329B608D1BE110030FD33; - remoteInfo = "LLVM lib"; - }; - CF0329BF08D1BE9B0030FD33 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */; - proxyType = 1; - remoteGlobalIDString = CF0329BB08D1BE5D0030FD33; - remoteInfo = "LLVM llc"; - }; - CFDF86D90ADE822100D40A3D /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */; - proxyType = 1; - remoteGlobalIDString = CFDF86BD0ADE819D00D40A3D; - remoteInfo = "LLVM lib release"; - }; - CFDF86DB0ADE822100D40A3D /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */; - proxyType = 1; - remoteGlobalIDString = CFDF86C60ADE81D000D40A3D; - remoteInfo = "LLVM llc release"; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXFileReference section */ - 354CF6D10CD299440059AF3E /* DeserializeAPInt.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DeserializeAPInt.cpp; sourceTree = ""; }; - 354CF6D20CD2994D0059AF3E /* SerializeAPInt.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SerializeAPInt.cpp; sourceTree = ""; }; - 35A9CDED0CD0F6AF008ABC1D /* Deserialize.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Deserialize.h; sourceTree = ""; }; - 35A9CDEE0CD0F6AF008ABC1D /* Serialization.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Serialization.h; sourceTree = ""; }; - 35A9CDEF0CD0F6AF008ABC1D /* Serialize.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Serialize.h; sourceTree = ""; }; - 35A9CDF00CD0F6D5008ABC1D /* Deserialize.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Deserialize.cpp; sourceTree = ""; }; - 35A9CDF10CD0F6E1008ABC1D /* Serialize.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Serialize.cpp; sourceTree = ""; }; - 35E98A830CBC2ED300C5CDC1 /* DenseSet.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DenseSet.h; sourceTree = ""; }; - 35E98A840CBC2ED300C5CDC1 /* ImmutableMap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ImmutableMap.h; sourceTree = ""; }; - 35E98A850CBC2ED300C5CDC1 /* ImmutableSet.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ImmutableSet.h; sourceTree = ""; }; - 754221420D171DFC00DDB61B /* MachineLICM.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MachineLICM.cpp; sourceTree = ""; }; - 84115FFE0B66D87400E1293E /* TargetMachOWriterInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = TargetMachOWriterInfo.cpp; sourceTree = ""; }; - 84115FFF0B66D89B00E1293E /* PPCMachOWriterInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = PPCMachOWriterInfo.cpp; sourceTree = ""; }; - 841160000B66D8AC00E1293E /* PPCMachOWriterInfo.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = PPCMachOWriterInfo.h; sourceTree = ""; }; - 8443EF210B66B62D00959964 /* TargetMachOWriterInfo.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = TargetMachOWriterInfo.h; sourceTree = ""; }; - 9F4B0E5E0D0E02580061F270 /* bitreader_ocaml.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bitreader_ocaml.c; sourceTree = ""; }; - 9F4B0E5F0D0E02580061F270 /* llvm_bitreader.ml */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = llvm_bitreader.ml; sourceTree = ""; }; - 9F4B0E600D0E02580061F270 /* llvm_bitreader.mli */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = llvm_bitreader.mli; sourceTree = ""; }; - 9F4B0E8C0D0E05ED0061F270 /* BitReader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = BitReader.cpp; sourceTree = ""; }; - 9F4B0E8D0D0E05ED0061F270 /* DeserializeAPFloat.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DeserializeAPFloat.cpp; sourceTree = ""; }; - 9F502ADB0D1D8CA3007939DF /* executionengine_ocaml.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = executionengine_ocaml.c; sourceTree = ""; }; - 9F502ADC0D1D8CA3007939DF /* llvm_executionengine.ml */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = llvm_executionengine.ml; sourceTree = ""; }; - 9F502ADD0D1D8CA3007939DF /* llvm_executionengine.mli */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = llvm_executionengine.mli; sourceTree = ""; }; - 9F502AEC0D1D8CF8007939DF /* executionengine.ml */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = executionengine.ml; sourceTree = ""; }; - 9F502B090D1D8D8D007939DF /* ExecutionEngineBindings.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ExecutionEngineBindings.cpp; sourceTree = ""; }; - 9F5B90CB0D0CE87100CDFDEA /* StringPool.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = StringPool.cpp; sourceTree = ""; }; - 9F5B90CE0D0CE89300CDFDEA /* AlignOf.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AlignOf.h; sourceTree = ""; }; - 9F5B90CF0D0CE89300CDFDEA /* Registry.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Registry.h; sourceTree = ""; }; - 9F5B90D00D0CE89300CDFDEA /* StringPool.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StringPool.h; sourceTree = ""; }; - 9F5B90E70D0DF19100CDFDEA /* BitReader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BitReader.h; sourceTree = ""; }; - 9F68EB010C77AD02004AA152 /* LoopPass.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = LoopPass.cpp; sourceTree = ""; }; - 9F68EB020C77AD02004AA152 /* MemoryDependenceAnalysis.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = MemoryDependenceAnalysis.cpp; sourceTree = ""; }; - 9F68EB060C77AD2C004AA152 /* BitcodeReader.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = BitcodeReader.cpp; sourceTree = ""; }; - 9F68EB070C77AD2C004AA152 /* BitcodeReader.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = BitcodeReader.h; sourceTree = ""; }; - 9F68EB120C77AD2C004AA152 /* BitcodeWriter.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = BitcodeWriter.cpp; sourceTree = ""; }; - 9F68EB130C77AD2C004AA152 /* BitcodeWriterPass.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = BitcodeWriterPass.cpp; sourceTree = ""; }; - 9F68EB250C77AD2C004AA152 /* ValueEnumerator.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ValueEnumerator.cpp; sourceTree = ""; }; - 9F68EB260C77AD2C004AA152 /* ValueEnumerator.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ValueEnumerator.h; sourceTree = ""; }; - 9F6B2CC00D0F6E56000F00FD /* bitreader.ml */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = bitreader.ml; sourceTree = ""; }; - 9F70401A0D8D732400FD06FF /* llvm_scalar_opts.ml */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = llvm_scalar_opts.ml; path = transforms/scalar/llvm_scalar_opts.ml; sourceTree = ""; }; - 9F70401B0D8D732400FD06FF /* llvm_scalar_opts.mli */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = llvm_scalar_opts.mli; path = transforms/scalar/llvm_scalar_opts.mli; sourceTree = ""; }; - 9F70401E0D8D735E00FD06FF /* scalar_opts_ocaml.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = scalar_opts_ocaml.c; path = transforms/scalar/scalar_opts_ocaml.c; sourceTree = ""; }; - 9F7793460C73BC2000551F9C /* CodeGenPrepare.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CodeGenPrepare.cpp; sourceTree = ""; }; - 9F7793470C73BC2000551F9C /* GVN.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GVN.cpp; sourceTree = ""; }; - 9F7793480C73BC2000551F9C /* GVNPRE.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GVNPRE.cpp; sourceTree = ""; }; - 9F7793490C73BC2000551F9C /* LoopIndexSplit.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LoopIndexSplit.cpp; sourceTree = ""; }; - 9F77934A0C73BC2000551F9C /* LoopRotation.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LoopRotation.cpp; sourceTree = ""; }; - 9F7793500C73BD1500551F9C /* ELFWriter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ELFWriter.h; sourceTree = ""; }; - 9F7793510C73BD1500551F9C /* IfConversion.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IfConversion.cpp; sourceTree = ""; }; - 9F7793520C73BD1500551F9C /* LowerSubregs.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LowerSubregs.cpp; sourceTree = ""; }; - 9F7793530C73BD1500551F9C /* MachOWriter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MachOWriter.h; sourceTree = ""; }; - 9F7793540C73BD1500551F9C /* PostRASchedulerList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PostRASchedulerList.cpp; sourceTree = ""; }; - 9F7793550C73BD1500551F9C /* RegAllocBigBlock.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RegAllocBigBlock.cpp; sourceTree = ""; }; - 9F7793560C73BD1500551F9C /* RegisterScavenging.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RegisterScavenging.cpp; sourceTree = ""; }; - 9F7793570C73BD1500551F9C /* SimpleRegisterCoalescing.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SimpleRegisterCoalescing.cpp; sourceTree = ""; }; - 9F7793770C73C48A00551F9C /* StripDeadPrototypes.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = StripDeadPrototypes.cpp; sourceTree = ""; }; - 9F7793780C73C49A00551F9C /* BasicInliner.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = BasicInliner.cpp; sourceTree = ""; }; - 9F7793790C73C49A00551F9C /* CloneLoop.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CloneLoop.cpp; sourceTree = ""; }; - 9F77937A0C73C49A00551F9C /* InlineCost.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InlineCost.cpp; sourceTree = ""; }; - 9F77937B0C73C4F400551F9C /* AutoUpgrade.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = AutoUpgrade.cpp; path = ../lib/VMCore/AutoUpgrade.cpp; sourceTree = SOURCE_ROOT; }; - 9F77937C0C73C4F400551F9C /* ConstantFold.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ConstantFold.cpp; path = ../lib/VMCore/ConstantFold.cpp; sourceTree = SOURCE_ROOT; }; - 9F77937D0C73C4F400551F9C /* ConstantFold.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ConstantFold.h; path = ../lib/VMCore/ConstantFold.h; sourceTree = SOURCE_ROOT; }; - 9F77937E0C73C53000551F9C /* ParameterAttributes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ParameterAttributes.h; sourceTree = ""; }; - 9F7793800C73C54C00551F9C /* Archive.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Archive.h; sourceTree = ""; }; - 9F7793810C73C54C00551F9C /* BitCodes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BitCodes.h; sourceTree = ""; }; - 9F7793820C73C54C00551F9C /* BitstreamReader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BitstreamReader.h; sourceTree = ""; }; - 9F7793830C73C54C00551F9C /* BitstreamWriter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BitstreamWriter.h; sourceTree = ""; }; - 9F7793840C73C54C00551F9C /* LLVMBitCodes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LLVMBitCodes.h; sourceTree = ""; }; - 9F7793850C73C54C00551F9C /* ReaderWriter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ReaderWriter.h; sourceTree = ""; }; - 9F7793860C73C57100551F9C /* CallingConvLower.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CallingConvLower.h; sourceTree = ""; }; - 9F7793870C73C57100551F9C /* ELFRelocation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ELFRelocation.h; sourceTree = ""; }; - 9F7793880C73C57100551F9C /* FileWriters.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FileWriters.h; sourceTree = ""; }; - 9F7793890C73C57100551F9C /* MachORelocation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MachORelocation.h; sourceTree = ""; }; - 9F77938A0C73C57100551F9C /* RegisterScavenging.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RegisterScavenging.h; sourceTree = ""; }; - 9F7794140C73CB6100551F9C /* Mips.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Mips.h; sourceTree = ""; }; - 9F7794150C73CB6100551F9C /* Mips.td */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Mips.td; sourceTree = ""; }; - 9F7794160C73CB6100551F9C /* MipsAsmPrinter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MipsAsmPrinter.cpp; sourceTree = ""; }; - 9F7794170C73CB6100551F9C /* MipsCallingConv.td */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = MipsCallingConv.td; sourceTree = ""; }; - 9F7794180C73CB6100551F9C /* MipsInstrFormats.td */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = MipsInstrFormats.td; sourceTree = ""; }; - 9F7794190C73CB6100551F9C /* MipsInstrInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MipsInstrInfo.cpp; sourceTree = ""; }; - 9F77941A0C73CB6100551F9C /* MipsInstrInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MipsInstrInfo.h; sourceTree = ""; }; - 9F77941B0C73CB6100551F9C /* MipsInstrInfo.td */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = MipsInstrInfo.td; sourceTree = ""; }; - 9F77941C0C73CB6100551F9C /* MipsISelDAGToDAG.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MipsISelDAGToDAG.cpp; sourceTree = ""; }; - 9F77941D0C73CB6100551F9C /* MipsISelLowering.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MipsISelLowering.cpp; sourceTree = ""; }; - 9F77941E0C73CB6100551F9C /* MipsISelLowering.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MipsISelLowering.h; sourceTree = ""; }; - 9F77941F0C73CB6100551F9C /* MipsMachineFunction.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MipsMachineFunction.h; sourceTree = ""; }; - 9F7794200C73CB6100551F9C /* MipsRegisterInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MipsRegisterInfo.cpp; sourceTree = ""; }; - 9F7794210C73CB6100551F9C /* MipsRegisterInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MipsRegisterInfo.h; sourceTree = ""; }; - 9F7794220C73CB6100551F9C /* MipsRegisterInfo.td */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = MipsRegisterInfo.td; sourceTree = ""; }; - 9F7794230C73CB6100551F9C /* MipsSubtarget.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MipsSubtarget.cpp; sourceTree = ""; }; - 9F7794240C73CB6100551F9C /* MipsSubtarget.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MipsSubtarget.h; sourceTree = ""; }; - 9F7794250C73CB6100551F9C /* MipsTargetAsmInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MipsTargetAsmInfo.cpp; sourceTree = ""; }; - 9F7794260C73CB6100551F9C /* MipsTargetAsmInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MipsTargetAsmInfo.h; sourceTree = ""; }; - 9F7794270C73CB6100551F9C /* MipsTargetMachine.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MipsTargetMachine.cpp; sourceTree = ""; }; - 9F7794280C73CB6100551F9C /* MipsTargetMachine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MipsTargetMachine.h; sourceTree = ""; }; - 9F77942F0C73CB7900551F9C /* MSILWriter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MSILWriter.cpp; sourceTree = ""; }; - 9F7794300C73CB7900551F9C /* MSILWriter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MSILWriter.h; sourceTree = ""; }; - 9F7794880C73D51000551F9C /* MemoryBuffer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MemoryBuffer.h; sourceTree = ""; }; - 9F7794890C73D51000551F9C /* Streams.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Streams.h; sourceTree = ""; }; - 9F7C23E50CB81C2100498408 /* Analysis.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Analysis.h; sourceTree = ""; }; - 9F7C23E60CB81C2B00498408 /* Analysis.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Analysis.cpp; sourceTree = ""; }; - 9F7C240C0CB81ECD00498408 /* analysis_ocaml.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = analysis_ocaml.c; sourceTree = ""; }; - 9F7C240D0CB81ECD00498408 /* llvm_analysis.ml */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = llvm_analysis.ml; sourceTree = ""; }; - 9F7C240E0CB81ECD00498408 /* llvm_analysis.mli */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = llvm_analysis.mli; sourceTree = ""; }; - 9F7C2C4F0CB9496C00498408 /* analysis.ml */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = analysis.ml; sourceTree = ""; }; - 9F7C2C520CB9496C00498408 /* bitwriter.ml */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = bitwriter.ml; sourceTree = ""; }; - 9F7C2C5D0CB9496C00498408 /* vmcore.ml */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = vmcore.ml; sourceTree = ""; }; - 9FA638D90C77B184007F12AE /* AutoUpgrade.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = AutoUpgrade.h; sourceTree = ""; }; - 9FA638DA0C77B184007F12AE /* GlobalAlias.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = GlobalAlias.h; sourceTree = ""; }; - 9FA638DB0C77B1AB007F12AE /* APInt.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = APInt.h; sourceTree = ""; }; - 9FA638DC0C77B1AB007F12AE /* APSInt.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = APSInt.h; sourceTree = ""; }; - 9FA638DD0C77B1AB007F12AE /* BitVector.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = BitVector.h; sourceTree = ""; }; - 9FA638E00C77B1AB007F12AE /* IndexedMap.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = IndexedMap.h; sourceTree = ""; }; - 9FA638E20C77B1AB007F12AE /* SmallPtrSet.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = SmallPtrSet.h; sourceTree = ""; }; - 9FA638E30C77B1AB007F12AE /* SmallSet.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = SmallSet.h; sourceTree = ""; }; - 9FA638E40C77B1AB007F12AE /* StringMap.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = StringMap.h; sourceTree = ""; }; - 9FA638E50C77B203007F12AE /* LoopPass.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = LoopPass.h; sourceTree = ""; }; - 9FA638E60C77B203007F12AE /* MemoryDependenceAnalysis.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = MemoryDependenceAnalysis.h; sourceTree = ""; }; - 9FA638E70C77B222007F12AE /* Disassembler.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Disassembler.h; sourceTree = ""; }; - 9FA638E80C77B231007F12AE /* TargetELFWriterInfo.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = TargetELFWriterInfo.h; sourceTree = ""; }; - 9FA638EA0C77B252007F12AE /* InlinerPass.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = InlinerPass.h; sourceTree = ""; }; - 9FA638EB0C77B26B007F12AE /* BasicInliner.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = BasicInliner.h; sourceTree = ""; }; - 9FA638EC0C77B26B007F12AE /* InlineCost.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = InlineCost.h; sourceTree = ""; }; - 9FD3E5710CA0116100E54D15 /* bitwriter_ocaml.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = bitwriter_ocaml.c; sourceTree = ""; }; - 9FD3E5720CA0116100E54D15 /* llvm_bitwriter.ml */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = llvm_bitwriter.ml; sourceTree = ""; }; - 9FD3E5730CA0116100E54D15 /* llvm_bitwriter.mli */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = llvm_bitwriter.mli; sourceTree = ""; }; - 9FD3E57B0CA0116100E54D15 /* llvm.ml */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = llvm.ml; sourceTree = ""; }; - 9FD3E57C0CA0116100E54D15 /* llvm.mli */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = llvm.mli; sourceTree = ""; }; - 9FD3E57D0CA0116100E54D15 /* llvm_ocaml.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = llvm_ocaml.c; sourceTree = ""; }; - 9FD3E58D0CA0125F00E54D15 /* BitWriter.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = BitWriter.h; sourceTree = ""; }; - 9FD3E58E0CA0125F00E54D15 /* Core.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Core.h; sourceTree = ""; }; - 9FD3E5900CA0129D00E54D15 /* Core.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = Core.cpp; path = ../lib/VMCore/Core.cpp; sourceTree = SOURCE_ROOT; }; - 9FD3E5920CA012B300E54D15 /* BitWriter.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = BitWriter.cpp; sourceTree = ""; }; - 9FE25D900CAB166D005383FC /* APFloat.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = APFloat.h; sourceTree = ""; }; - 9FE25D910CAB166D005383FC /* SparseBitVector.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SparseBitVector.h; sourceTree = ""; }; - 9FE25D920CAB169F005383FC /* RegisterCoalescer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RegisterCoalescer.h; sourceTree = ""; }; - 9FE25D940CAB16FB005383FC /* RegisterCoalescer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RegisterCoalescer.cpp; sourceTree = ""; }; - 9FE25D950CAB1724005383FC /* APFloat.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = APFloat.cpp; sourceTree = ""; }; - 9FE25D960CAB1759005383FC /* TargetCallingConv.td */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = TargetCallingConv.td; sourceTree = ""; }; - 9FE4508B0C77A77000C4FEA4 /* ARMCodeEmitter.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ARMCodeEmitter.cpp; sourceTree = ""; }; - 9FE4508C0C77A77000C4FEA4 /* ARMGenAsmWriter.inc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.pascal; path = ARMGenAsmWriter.inc; sourceTree = ""; }; - 9FE4508D0C77A77000C4FEA4 /* ARMGenDAGISel.inc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.pascal; path = ARMGenDAGISel.inc; sourceTree = ""; }; - 9FE4508E0C77A77100C4FEA4 /* ARMGenInstrInfo.inc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.pascal; path = ARMGenInstrInfo.inc; sourceTree = ""; }; - 9FE4508F0C77A77100C4FEA4 /* ARMGenInstrNames.inc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.pascal; path = ARMGenInstrNames.inc; sourceTree = ""; }; - 9FE450900C77A77100C4FEA4 /* ARMGenRegisterInfo.h.inc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.pascal; path = ARMGenRegisterInfo.h.inc; sourceTree = ""; }; - 9FE450910C77A77100C4FEA4 /* ARMGenRegisterInfo.inc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.pascal; path = ARMGenRegisterInfo.inc; sourceTree = ""; }; - 9FE450920C77A77100C4FEA4 /* ARMGenRegisterNames.inc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.pascal; path = ARMGenRegisterNames.inc; sourceTree = ""; }; - 9FE450930C77A77100C4FEA4 /* ARMGenSubtarget.inc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.pascal; path = ARMGenSubtarget.inc; sourceTree = ""; }; - 9FE450940C77A77100C4FEA4 /* ARMJITInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ARMJITInfo.cpp; sourceTree = ""; }; - 9FE450950C77A77100C4FEA4 /* ARMJITInfo.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ARMJITInfo.h; sourceTree = ""; }; - 9FE450960C77A77100C4FEA4 /* ARMRelocations.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ARMRelocations.h; sourceTree = ""; }; - 9FE450970C77A77100C4FEA4 /* README-Thumb.txt */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = "README-Thumb.txt"; sourceTree = ""; }; - 9FE450980C77A77100C4FEA4 /* README.txt */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = README.txt; sourceTree = ""; }; - 9FE4509A0C77A79C00C4FEA4 /* PPCCallingConv.td */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = PPCCallingConv.td; sourceTree = ""; }; - 9FE4509B0C77A79C00C4FEA4 /* PPCGenCallingConv.inc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.pascal; path = PPCGenCallingConv.inc; sourceTree = ""; }; - 9FE4509C0C77A7BC00C4FEA4 /* README-MMX.txt */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = "README-MMX.txt"; sourceTree = ""; }; - 9FE4509D0C77A7BC00C4FEA4 /* X86CallingConv.td */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = X86CallingConv.td; sourceTree = ""; }; - 9FE4509F0C77A7BC00C4FEA4 /* X86ELFWriterInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = X86ELFWriterInfo.cpp; sourceTree = ""; }; - 9FE450A00C77A7BC00C4FEA4 /* X86ELFWriterInfo.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = X86ELFWriterInfo.h; sourceTree = ""; }; - 9FE450A10C77A7BC00C4FEA4 /* X86GenCallingConv.inc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.pascal; path = X86GenCallingConv.inc; sourceTree = ""; }; - 9FE450A20C77A7BC00C4FEA4 /* X86InstrFormats.td */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = X86InstrFormats.td; sourceTree = ""; }; - 9FE450A50C77AAF000C4FEA4 /* Disassembler.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = Disassembler.cpp; sourceTree = ""; }; - 9FE450A60C77AB3200C4FEA4 /* APInt.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = APInt.cpp; sourceTree = ""; }; - 9FE450A70C77AB3200C4FEA4 /* ConstantRange.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ConstantRange.cpp; sourceTree = ""; }; - 9FE450A80C77AB3200C4FEA4 /* MemoryBuffer.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = MemoryBuffer.cpp; sourceTree = ""; }; - 9FE450A90C77AB3200C4FEA4 /* SmallPtrSet.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = SmallPtrSet.cpp; sourceTree = ""; }; - 9FE450AA0C77AB3200C4FEA4 /* StringMap.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = StringMap.cpp; sourceTree = ""; }; - 9FE450AB0C77AB6100C4FEA4 /* README.txt */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = README.txt; sourceTree = ""; }; - 9FE450AC0C77AB6E00C4FEA4 /* CallingConvLower.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CallingConvLower.cpp; sourceTree = ""; }; - 9FE450DF0C77ABE400C4FEA4 /* Archive.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = Archive.cpp; sourceTree = ""; }; - 9FE450E00C77ABE400C4FEA4 /* ArchiveInternals.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ArchiveInternals.h; sourceTree = ""; }; - 9FE450E10C77ABE400C4FEA4 /* ArchiveReader.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ArchiveReader.cpp; sourceTree = ""; }; - 9FE450E20C77ABE400C4FEA4 /* ArchiveWriter.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ArchiveWriter.cpp; sourceTree = ""; }; - 9FEB8C550D1CD1E200EE46BC /* ExecutionEngine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ExecutionEngine.h; sourceTree = ""; }; - 9FEDD5F10D8D73AB009F6DF1 /* Scalar.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Scalar.h; sourceTree = ""; }; - 9FEDD5F70D8D797D009F6DF1 /* Scalar.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Scalar.cpp; sourceTree = ""; }; - 9FEDD6140D8D7C3B009F6DF1 /* scalar_opts.ml */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = scalar_opts.ml; sourceTree = ""; }; - 9FEDD6B60D8D83D0009F6DF1 /* Target.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Target.cpp; sourceTree = ""; }; - 9FEDD6B80D8D83EC009F6DF1 /* Target.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Target.h; sourceTree = ""; }; - 9FEDD6BB0D8D8408009F6DF1 /* lto.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = lto.h; sourceTree = ""; }; - 9FEDD6BD0D8D8426009F6DF1 /* target.ml */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = target.ml; sourceTree = ""; }; - 9FEDD6C10D8D844E009F6DF1 /* llvm_target.ml */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = llvm_target.ml; sourceTree = ""; }; - 9FEDD6C20D8D844E009F6DF1 /* llvm_target.mli */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = llvm_target.mli; sourceTree = ""; }; - 9FEDD6C40D8D844E009F6DF1 /* target_ocaml.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = target_ocaml.c; sourceTree = ""; }; - CF1ACC9709C9DE4400D3C5EB /* IntrinsicInst.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = IntrinsicInst.cpp; path = ../lib/VMCore/IntrinsicInst.cpp; sourceTree = ""; }; - CF26835B09178F5500C5F253 /* TargetInstrItineraries.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TargetInstrItineraries.h; sourceTree = ""; }; - CF32AF5C0AEE6A4E00D24CD4 /* LLVMTargetMachine.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LLVMTargetMachine.cpp; sourceTree = ""; }; - CF33BE160AF62B4200E93805 /* SmallString.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SmallString.h; sourceTree = ""; }; - CF341DAD0AB07A8B0099B064 /* AlphaTargetAsmInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AlphaTargetAsmInfo.h; sourceTree = ""; }; - CF341DAE0AB07A8B0099B064 /* AlphaTargetAsmInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AlphaTargetAsmInfo.cpp; sourceTree = ""; }; - CF341E010AB080220099B064 /* PPCTargetAsmInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PPCTargetAsmInfo.h; sourceTree = ""; }; - CF341E020AB080220099B064 /* PPCTargetAsmInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PPCTargetAsmInfo.cpp; sourceTree = ""; }; - CF341E220AB0814B0099B064 /* SparcTargetAsmInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SparcTargetAsmInfo.h; sourceTree = ""; }; - CF341E230AB0814B0099B064 /* SparcTargetAsmInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SparcTargetAsmInfo.cpp; sourceTree = ""; }; - CF341E320AB082D60099B064 /* X86TargetAsmInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = X86TargetAsmInfo.h; sourceTree = ""; }; - CF341E330AB082D60099B064 /* X86TargetAsmInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = X86TargetAsmInfo.cpp; sourceTree = ""; }; - CF42B6BF0AF24F5300D5D47C /* FoldingSet.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FoldingSet.h; sourceTree = ""; }; - CF42B6C40AF2512000D5D47C /* FoldingSet.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FoldingSet.cpp; sourceTree = ""; }; - CF47BD380AAF40BC00A8B13E /* TargetAsmInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TargetAsmInfo.h; sourceTree = ""; }; - CF47BD860AAF487E00A8B13E /* TargetAsmInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TargetAsmInfo.cpp; sourceTree = ""; }; - CF490D14090541D30072DB1C /* TargetSchedule.td */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = TargetSchedule.td; sourceTree = ""; }; - CF490D15090541D30072DB1C /* TargetSelectionDAG.td */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = TargetSelectionDAG.td; sourceTree = ""; }; - CF490E2F0907BBF80072DB1C /* SubtargetEmitter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SubtargetEmitter.h; sourceTree = ""; }; - CF490E300907BBF80072DB1C /* SubtargetEmitter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SubtargetEmitter.cpp; sourceTree = ""; }; - CF4F27E60A7B6E23004359F6 /* MachinePassRegistry.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MachinePassRegistry.h; sourceTree = ""; }; - CF4F27F60A7B6FA3004359F6 /* MachinePassRegistry.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MachinePassRegistry.cpp; sourceTree = ""; }; - CF65223409CA39B800C4B521 /* Intrinsics.gen */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Intrinsics.gen; sourceTree = ""; }; - CF6527D909D1A53400C4B521 /* MachineLocation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MachineLocation.h; sourceTree = ""; }; - CF6527FA09D1BA3800C4B521 /* DelaySlotFiller.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DelaySlotFiller.cpp; path = ../lib/Target/Sparc/DelaySlotFiller.cpp; sourceTree = SOURCE_ROOT; }; - CF6527FB09D1BA3800C4B521 /* FPMover.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = FPMover.cpp; path = ../lib/Target/Sparc/FPMover.cpp; sourceTree = SOURCE_ROOT; }; - CF6527FC09D1BA3800C4B521 /* Makefile */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.make; name = Makefile; path = ../lib/Target/Sparc/Makefile; sourceTree = SOURCE_ROOT; }; - CF6527FD09D1BA3800C4B521 /* README.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = README.txt; path = ../lib/Target/Sparc/README.txt; sourceTree = SOURCE_ROOT; }; - CF6527FE09D1BA3800C4B521 /* Sparc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Sparc.h; path = ../lib/Target/Sparc/Sparc.h; sourceTree = SOURCE_ROOT; }; - CF6527FF09D1BA3800C4B521 /* Sparc.td */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = Sparc.td; path = ../lib/Target/Sparc/Sparc.td; sourceTree = SOURCE_ROOT; }; - CF65280009D1BA3800C4B521 /* SparcAsmPrinter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SparcAsmPrinter.cpp; path = ../lib/Target/Sparc/SparcAsmPrinter.cpp; sourceTree = SOURCE_ROOT; }; - CF65280109D1BA3800C4B521 /* SparcGenAsmWriter.inc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; name = SparcGenAsmWriter.inc; path = ../lib/Target/Sparc/SparcGenAsmWriter.inc; sourceTree = SOURCE_ROOT; }; - CF65280209D1BA3800C4B521 /* SparcGenDAGISel.inc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; name = SparcGenDAGISel.inc; path = ../lib/Target/Sparc/SparcGenDAGISel.inc; sourceTree = SOURCE_ROOT; }; - CF65280309D1BA3800C4B521 /* SparcGenInstrInfo.inc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; name = SparcGenInstrInfo.inc; path = ../lib/Target/Sparc/SparcGenInstrInfo.inc; sourceTree = SOURCE_ROOT; }; - CF65280409D1BA3800C4B521 /* SparcGenInstrNames.inc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; name = SparcGenInstrNames.inc; path = ../lib/Target/Sparc/SparcGenInstrNames.inc; sourceTree = SOURCE_ROOT; }; - CF65280509D1BA3800C4B521 /* SparcGenRegisterInfo.h.inc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; name = SparcGenRegisterInfo.h.inc; path = ../lib/Target/Sparc/SparcGenRegisterInfo.h.inc; sourceTree = SOURCE_ROOT; }; - CF65280609D1BA3800C4B521 /* SparcGenRegisterInfo.inc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; name = SparcGenRegisterInfo.inc; path = ../lib/Target/Sparc/SparcGenRegisterInfo.inc; sourceTree = SOURCE_ROOT; }; - CF65280709D1BA3800C4B521 /* SparcGenRegisterNames.inc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; name = SparcGenRegisterNames.inc; path = ../lib/Target/Sparc/SparcGenRegisterNames.inc; sourceTree = SOURCE_ROOT; }; - CF65280809D1BA3800C4B521 /* SparcGenSubtarget.inc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; name = SparcGenSubtarget.inc; path = ../lib/Target/Sparc/SparcGenSubtarget.inc; sourceTree = SOURCE_ROOT; }; - CF65280909D1BA3800C4B521 /* SparcInstrFormats.td */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = SparcInstrFormats.td; path = ../lib/Target/Sparc/SparcInstrFormats.td; sourceTree = SOURCE_ROOT; }; - CF65280A09D1BA3800C4B521 /* SparcInstrInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SparcInstrInfo.cpp; path = ../lib/Target/Sparc/SparcInstrInfo.cpp; sourceTree = SOURCE_ROOT; }; - CF65280B09D1BA3800C4B521 /* SparcInstrInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SparcInstrInfo.h; path = ../lib/Target/Sparc/SparcInstrInfo.h; sourceTree = SOURCE_ROOT; }; - CF65280C09D1BA3800C4B521 /* SparcInstrInfo.td */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = SparcInstrInfo.td; path = ../lib/Target/Sparc/SparcInstrInfo.td; sourceTree = SOURCE_ROOT; }; - CF65280D09D1BA3800C4B521 /* SparcISelDAGToDAG.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SparcISelDAGToDAG.cpp; path = ../lib/Target/Sparc/SparcISelDAGToDAG.cpp; sourceTree = SOURCE_ROOT; }; - CF65280E09D1BA3800C4B521 /* SparcRegisterInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SparcRegisterInfo.cpp; path = ../lib/Target/Sparc/SparcRegisterInfo.cpp; sourceTree = SOURCE_ROOT; }; - CF65280F09D1BA3800C4B521 /* SparcRegisterInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SparcRegisterInfo.h; path = ../lib/Target/Sparc/SparcRegisterInfo.h; sourceTree = SOURCE_ROOT; }; - CF65281009D1BA3800C4B521 /* SparcRegisterInfo.td */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = SparcRegisterInfo.td; path = ../lib/Target/Sparc/SparcRegisterInfo.td; sourceTree = SOURCE_ROOT; }; - CF65281109D1BA3800C4B521 /* SparcSubtarget.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SparcSubtarget.cpp; path = ../lib/Target/Sparc/SparcSubtarget.cpp; sourceTree = SOURCE_ROOT; }; - CF65281209D1BA3800C4B521 /* SparcSubtarget.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SparcSubtarget.h; path = ../lib/Target/Sparc/SparcSubtarget.h; sourceTree = SOURCE_ROOT; }; - CF65281309D1BA3800C4B521 /* SparcTargetMachine.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SparcTargetMachine.cpp; path = ../lib/Target/Sparc/SparcTargetMachine.cpp; sourceTree = SOURCE_ROOT; }; - CF65281409D1BA3800C4B521 /* SparcTargetMachine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SparcTargetMachine.h; path = ../lib/Target/Sparc/SparcTargetMachine.h; sourceTree = SOURCE_ROOT; }; - CF6529A6095B21A8007F884E /* MachineModuleInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MachineModuleInfo.cpp; sourceTree = ""; }; - CF6B5AFD095C82C300D1EA42 /* DAGCombiner.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DAGCombiner.cpp; sourceTree = ""; }; - CF6F487109505E1500BC9E82 /* MachineModuleInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MachineModuleInfo.h; sourceTree = ""; }; - CF71B60F0AC45EDA0007F57C /* SmallVector.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SmallVector.h; sourceTree = ""; }; - CF73C0A2098A4FDF00627152 /* InlineAsm.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InlineAsm.h; sourceTree = ""; }; - CF73C0A3098A4FDF00627152 /* TypeSymbolTable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TypeSymbolTable.h; sourceTree = ""; }; - CF73C0A4098A4FDF00627152 /* ValueSymbolTable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ValueSymbolTable.h; sourceTree = ""; }; - CF73C0A5098A507300627152 /* ConstantFolding.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ConstantFolding.h; sourceTree = ""; }; - CF73C0A9098A50FD00627152 /* config.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = config.h; sourceTree = ""; }; - CF73C0AD098A519400627152 /* DataTypes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DataTypes.h; sourceTree = ""; }; - CF73C0AE098A51AD00627152 /* Alarm.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Alarm.h; sourceTree = ""; }; - CF73C0AF098A51DD00627152 /* RSProfiling.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RSProfiling.h; sourceTree = ""; }; - CF73C0B0098A523C00627152 /* ConstantFolding.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ConstantFolding.cpp; sourceTree = ""; }; - CF73C0B7098A546000627152 /* RSProfiling.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RSProfiling.cpp; sourceTree = ""; }; - CF73C0B8098A546000627152 /* RSProfiling.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RSProfiling.h; sourceTree = ""; }; - CF73C0B9098A546000627152 /* Reg2Mem.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Reg2Mem.cpp; sourceTree = ""; }; - CF73C0BD098A551F00627152 /* InlineAsm.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = InlineAsm.cpp; path = ../lib/VMCore/InlineAsm.cpp; sourceTree = SOURCE_ROOT; }; - CF73C0BE098A551F00627152 /* TypeSymbolTable.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = TypeSymbolTable.cpp; path = ../lib/VMCore/TypeSymbolTable.cpp; sourceTree = SOURCE_ROOT; }; - CF73C0BF098A551F00627152 /* ValueSymbolTable.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ValueSymbolTable.cpp; path = ../lib/VMCore/ValueSymbolTable.cpp; sourceTree = SOURCE_ROOT; }; - CF79495D09B326D4005ADFCA /* Dwarf.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Dwarf.cpp; sourceTree = ""; }; - CF7FFA1F0985081C008B0087 /* ScheduleDAGList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ScheduleDAGList.cpp; sourceTree = ""; }; - CF7FFA2109850864008B0087 /* ScheduleDAG.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScheduleDAG.h; sourceTree = ""; }; - CF8D62FA09C2226F006017BA /* Intrinsics.td */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Intrinsics.td; sourceTree = ""; }; - CF8E00490989162500DA2399 /* Dwarf.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Dwarf.h; sourceTree = ""; }; - CF8F1B410B64F6D100BB4199 /* RuntimeLibcalls.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RuntimeLibcalls.h; sourceTree = ""; }; - CF8F1B420B64F70B00BB4199 /* PassManagers.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PassManagers.h; sourceTree = ""; }; - CF8F1B430B64F74400BB4199 /* Allocator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Allocator.h; sourceTree = ""; }; - CF8F1B440B64F74400BB4199 /* Compiler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Compiler.h; sourceTree = ""; }; - CF8F1B460B64F74400BB4199 /* ManagedStatic.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ManagedStatic.h; sourceTree = ""; }; - CF8F1B470B64F74400BB4199 /* OutputBuffer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OutputBuffer.h; sourceTree = ""; }; - CF8F1B490B64F7AB00BB4199 /* LinkTimeOptimizer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LinkTimeOptimizer.h; sourceTree = ""; }; - CF8F1B4D0B64F80700BB4199 /* AliasDebugger.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AliasDebugger.cpp; sourceTree = ""; }; - CF8F1B500B64F86A00BB4199 /* ManagedStatic.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ManagedStatic.cpp; sourceTree = ""; }; - CF8F1B510B64F86A00BB4199 /* Streams.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Streams.cpp; sourceTree = ""; }; - CF8F1B530B64F8C000BB4199 /* IncludeFile.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IncludeFile.cpp; sourceTree = ""; }; - CF8F1B540B64F90F00BB4199 /* AlphaBranchSelector.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AlphaBranchSelector.cpp; sourceTree = ""; }; - CF8F1B550B64F90F00BB4199 /* AlphaLLRP.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AlphaLLRP.cpp; sourceTree = ""; }; - CF8F1B560B64F98900BB4199 /* CBackend.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CBackend.cpp; sourceTree = ""; }; - CF8F1B570B64F9AC00BB4199 /* PPCPredicates.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PPCPredicates.cpp; sourceTree = ""; }; - CF8F1B580B64F9AC00BB4199 /* PPCPredicates.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PPCPredicates.h; sourceTree = ""; }; - CF8F1B590B64F9E100BB4199 /* X86COFF.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = X86COFF.h; sourceTree = ""; }; - CF8F1B5B0B64FA2F00BB4199 /* PredicateSimplifier.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PredicateSimplifier.cpp; sourceTree = ""; }; - CF8F1B5C0B64FA7300BB4199 /* PassManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = PassManager.cpp; path = ../lib/VMCore/PassManager.cpp; sourceTree = SOURCE_ROOT; }; - CF8F1B680B64FADA00BB4199 /* llvm-upgrade.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = "llvm-upgrade.cpp"; sourceTree = ""; }; - CF8F1B720B64FADA00BB4199 /* UpgradeInternals.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UpgradeInternals.h; sourceTree = ""; }; - CF8F1B750B64FADA00BB4199 /* UpgradeLexer.l */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.lex; path = UpgradeLexer.l; sourceTree = ""; }; - CF8F1B7C0B64FADA00BB4199 /* UpgradeParser.y */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.yacc; path = UpgradeParser.y; sourceTree = ""; }; - CF8F1B7F0B64FADA00BB4199 /* CppWriter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CppWriter.cpp; sourceTree = ""; }; - CF8F1B800B64FADA00BB4199 /* CppWriter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CppWriter.h; sourceTree = ""; }; - CF8F1B870B64FADA00BB4199 /* llvm2cpp.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = llvm2cpp.cpp; sourceTree = ""; }; - CF8F1B950B64FB5000BB4199 /* ConfigLexer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ConfigLexer.cpp; sourceTree = ""; }; - CF8F1B9D0B64FB7F00BB4199 /* lto-c.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = "lto-c.cpp"; sourceTree = ""; }; - CF8F1B9E0B64FB7F00BB4199 /* lto.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = lto.cpp; sourceTree = ""; }; - CF8F1BAC0B64FB8000BB4199 /* AnalysisWrappers.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AnalysisWrappers.cpp; sourceTree = ""; }; - CF8F1BB70B64FB8000BB4199 /* GraphPrinters.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GraphPrinters.cpp; sourceTree = ""; }; - CF8F1BB90B64FB8000BB4199 /* opt.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = opt.cpp; sourceTree = ""; }; - CF8F1BBA0B64FB8000BB4199 /* PrintSCC.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PrintSCC.cpp; sourceTree = ""; }; - CF8F1BC90B64FBD500BB4199 /* CodeGenIntrinsics.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CodeGenIntrinsics.h; sourceTree = ""; }; - CF8F1BD10B64FC8A00BB4199 /* ARM.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ARM.h; sourceTree = ""; }; - CF8F1BD20B64FC8A00BB4199 /* ARM.td */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ARM.td; sourceTree = ""; }; - CF8F1BD30B64FC8A00BB4199 /* ARMAddressingModes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ARMAddressingModes.h; sourceTree = ""; }; - CF8F1BD40B64FC8A00BB4199 /* ARMAsmPrinter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ARMAsmPrinter.cpp; sourceTree = ""; }; - CF8F1BD50B64FC8A00BB4199 /* ARMConstantIslandPass.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ARMConstantIslandPass.cpp; sourceTree = ""; }; - CF8F1BD60B64FC8A00BB4199 /* ARMConstantPoolValue.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ARMConstantPoolValue.cpp; sourceTree = ""; }; - CF8F1BD70B64FC8A00BB4199 /* ARMConstantPoolValue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ARMConstantPoolValue.h; sourceTree = ""; }; - CF8F1BD80B64FC8A00BB4199 /* ARMFrameInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ARMFrameInfo.h; sourceTree = ""; }; - CF8F1BD90B64FC8A00BB4199 /* ARMInstrInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ARMInstrInfo.cpp; sourceTree = ""; }; - CF8F1BDA0B64FC8A00BB4199 /* ARMInstrInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ARMInstrInfo.h; sourceTree = ""; }; - CF8F1BDB0B64FC8A00BB4199 /* ARMInstrInfo.td */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ARMInstrInfo.td; sourceTree = ""; }; - CF8F1BDC0B64FC8A00BB4199 /* ARMInstrThumb.td */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ARMInstrThumb.td; sourceTree = ""; }; - CF8F1BDD0B64FC8A00BB4199 /* ARMInstrVFP.td */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ARMInstrVFP.td; sourceTree = ""; }; - CF8F1BDE0B64FC8A00BB4199 /* ARMISelDAGToDAG.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ARMISelDAGToDAG.cpp; sourceTree = ""; }; - CF8F1BDF0B64FC8A00BB4199 /* ARMISelLowering.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ARMISelLowering.cpp; sourceTree = ""; }; - CF8F1BE00B64FC8A00BB4199 /* ARMISelLowering.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ARMISelLowering.h; sourceTree = ""; }; - CF8F1BE10B64FC8A00BB4199 /* ARMLoadStoreOptimizer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ARMLoadStoreOptimizer.cpp; sourceTree = ""; }; - CF8F1BE20B64FC8A00BB4199 /* ARMMachineFunctionInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ARMMachineFunctionInfo.h; sourceTree = ""; }; - CF8F1BE30B64FC8A00BB4199 /* ARMRegisterInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ARMRegisterInfo.cpp; sourceTree = ""; }; - CF8F1BE40B64FC8A00BB4199 /* ARMRegisterInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ARMRegisterInfo.h; sourceTree = ""; }; - CF8F1BE50B64FC8A00BB4199 /* ARMRegisterInfo.td */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ARMRegisterInfo.td; sourceTree = ""; }; - CF8F1BE60B64FC8A00BB4199 /* ARMSubtarget.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ARMSubtarget.cpp; sourceTree = ""; }; - CF8F1BE70B64FC8A00BB4199 /* ARMSubtarget.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ARMSubtarget.h; sourceTree = ""; }; - CF8F1BE80B64FC8A00BB4199 /* ARMTargetAsmInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ARMTargetAsmInfo.cpp; sourceTree = ""; }; - CF8F1BE90B64FC8A00BB4199 /* ARMTargetAsmInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ARMTargetAsmInfo.h; sourceTree = ""; }; - CF8F1BEA0B64FC8A00BB4199 /* ARMTargetMachine.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ARMTargetMachine.cpp; sourceTree = ""; }; - CF8F1BEB0B64FC8A00BB4199 /* ARMTargetMachine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ARMTargetMachine.h; sourceTree = ""; }; - CF9720260A9F39B9002CEEDD /* LinkAllPasses.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LinkAllPasses.h; sourceTree = ""; }; - CF9720270A9F39B9002CEEDD /* LinkTimeOptimizer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LinkTimeOptimizer.h; sourceTree = ""; }; - CF9720340A9F3A41002CEEDD /* IncludeFile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IncludeFile.h; sourceTree = ""; }; - CF9720350A9F3ADC002CEEDD /* MachOWriter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MachOWriter.cpp; sourceTree = ""; }; - CF9720370A9F3B1C002CEEDD /* TargetLowering.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TargetLowering.cpp; sourceTree = ""; }; - CF97208A0A9F3C6F002CEEDD /* LCSSA.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LCSSA.cpp; sourceTree = ""; }; - CF97208B0A9F3C6F002CEEDD /* LowerAllocations.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LowerAllocations.cpp; sourceTree = ""; }; - CF97208C0A9F3C6F002CEEDD /* LowerInvoke.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LowerInvoke.cpp; sourceTree = ""; }; - CF97208E0A9F3C6F002CEEDD /* LowerSwitch.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LowerSwitch.cpp; sourceTree = ""; }; - CF97208F0A9F3C6F002CEEDD /* Mem2Reg.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Mem2Reg.cpp; sourceTree = ""; }; - CF9720900A9F3CA2002CEEDD /* ValueTypes.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ValueTypes.cpp; path = ../lib/VMCore/ValueTypes.cpp; sourceTree = SOURCE_ROOT; }; - CF9720910A9F3CC7002CEEDD /* FindBugs.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FindBugs.cpp; sourceTree = ""; }; - CF9720920A9F3CC7002CEEDD /* ToolRunner.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ToolRunner.cpp; sourceTree = ""; }; - CF9720930A9F3CC7002CEEDD /* ToolRunner.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ToolRunner.h; sourceTree = ""; }; - CF9720970A9F3D4D002CEEDD /* IntrinsicEmitter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IntrinsicEmitter.cpp; sourceTree = ""; }; - CF9720980A9F3D4D002CEEDD /* IntrinsicEmitter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IntrinsicEmitter.h; sourceTree = ""; }; - CF9BCD0808C74DE0001E7011 /* SubtargetFeature.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SubtargetFeature.h; sourceTree = ""; }; - CF9BCD1508C75070001E7011 /* SubtargetFeature.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SubtargetFeature.cpp; sourceTree = ""; }; - CFA702BB0A6FA85F0006009A /* AlphaGenAsmWriter.inc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; path = AlphaGenAsmWriter.inc; sourceTree = ""; }; - CFA702BC0A6FA85F0006009A /* AlphaGenCodeEmitter.inc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; path = AlphaGenCodeEmitter.inc; sourceTree = ""; }; - CFA702BD0A6FA85F0006009A /* AlphaGenDAGISel.inc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; path = AlphaGenDAGISel.inc; sourceTree = ""; }; - CFA702BE0A6FA85F0006009A /* AlphaGenInstrInfo.inc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; path = AlphaGenInstrInfo.inc; sourceTree = ""; }; - CFA702BF0A6FA85F0006009A /* AlphaGenInstrNames.inc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; path = AlphaGenInstrNames.inc; sourceTree = ""; }; - CFA702C00A6FA85F0006009A /* AlphaGenRegisterInfo.h.inc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; path = AlphaGenRegisterInfo.h.inc; sourceTree = ""; }; - CFA702C10A6FA85F0006009A /* AlphaGenRegisterInfo.inc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; path = AlphaGenRegisterInfo.inc; sourceTree = ""; }; - CFA702C20A6FA85F0006009A /* AlphaGenRegisterNames.inc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; path = AlphaGenRegisterNames.inc; sourceTree = ""; }; - CFA702C30A6FA85F0006009A /* AlphaGenSubtarget.inc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; path = AlphaGenSubtarget.inc; sourceTree = ""; }; - CFA702CB0A6FA8AD0006009A /* PPCGenAsmWriter.inc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; path = PPCGenAsmWriter.inc; sourceTree = ""; }; - CFA702CC0A6FA8AD0006009A /* PPCGenCodeEmitter.inc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; path = PPCGenCodeEmitter.inc; sourceTree = ""; }; - CFA702CD0A6FA8AD0006009A /* PPCGenDAGISel.inc */ = {isa = PBXFileReference; explicitFileType = sourcecode.pascal; fileEncoding = 4; path = PPCGenDAGISel.inc; sourceTree = ""; }; - CFA702CE0A6FA8AD0006009A /* PPCGenInstrInfo.inc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; path = PPCGenInstrInfo.inc; sourceTree = ""; }; - CFA702CF0A6FA8AD0006009A /* PPCGenInstrNames.inc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; path = PPCGenInstrNames.inc; sourceTree = ""; }; - CFA702D00A6FA8AD0006009A /* PPCGenRegisterInfo.h.inc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; path = PPCGenRegisterInfo.h.inc; sourceTree = ""; }; - CFA702D10A6FA8AD0006009A /* PPCGenRegisterInfo.inc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; path = PPCGenRegisterInfo.inc; sourceTree = ""; }; - CFA702D20A6FA8AD0006009A /* PPCGenRegisterNames.inc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; path = PPCGenRegisterNames.inc; sourceTree = ""; }; - CFA702D30A6FA8AD0006009A /* PPCGenSubtarget.inc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; path = PPCGenSubtarget.inc; sourceTree = ""; }; - CFA702D40A6FA8DD0006009A /* X86GenAsmWriter.inc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; path = X86GenAsmWriter.inc; sourceTree = ""; }; - CFA702D50A6FA8DD0006009A /* X86GenAsmWriter1.inc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; path = X86GenAsmWriter1.inc; sourceTree = ""; }; - CFA702D60A6FA8DD0006009A /* X86GenDAGISel.inc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; path = X86GenDAGISel.inc; sourceTree = ""; }; - CFA702D70A6FA8DD0006009A /* X86GenInstrInfo.inc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; path = X86GenInstrInfo.inc; sourceTree = ""; }; - CFA702D80A6FA8DD0006009A /* X86GenInstrNames.inc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; path = X86GenInstrNames.inc; sourceTree = ""; }; - CFA702D90A6FA8DD0006009A /* X86GenRegisterInfo.h.inc */ = {isa = PBXFileReference; fileEncoding = 4; languageSpecificationIdentifier = c.cpp; lastKnownFileType = sourcecode.pascal; path = X86GenRegisterInfo.h.inc; sourceTree = ""; }; - CFA702DA0A6FA8DD0006009A /* X86GenRegisterInfo.inc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; path = X86GenRegisterInfo.inc; sourceTree = ""; }; - CFA702DB0A6FA8DD0006009A /* X86GenRegisterNames.inc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; path = X86GenRegisterNames.inc; sourceTree = ""; }; - CFA702DC0A6FA8DD0006009A /* X86GenSubtarget.inc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; path = X86GenSubtarget.inc; sourceTree = ""; }; - CFABD0A20B09E342003EB061 /* PPCMachineFunctionInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PPCMachineFunctionInfo.h; sourceTree = ""; }; - CFBD8B1A090E76540020B107 /* AlphaISelDAGToDAG.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AlphaISelDAGToDAG.cpp; sourceTree = ""; }; - CFBD8B1B090E76540020B107 /* AlphaISelLowering.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AlphaISelLowering.cpp; sourceTree = ""; }; - CFBD8B1C090E76540020B107 /* AlphaISelLowering.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AlphaISelLowering.h; sourceTree = ""; }; - CFBD8B1D090E76540020B107 /* AlphaSubtarget.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AlphaSubtarget.cpp; sourceTree = ""; }; - CFBD8B1E090E76540020B107 /* AlphaSubtarget.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AlphaSubtarget.h; sourceTree = ""; }; - CFC244570959DEF2009F8C47 /* DwarfWriter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DwarfWriter.cpp; sourceTree = ""; }; - CFC244BB0959F24C009F8C47 /* X86ISelDAGToDAG.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = X86ISelDAGToDAG.cpp; sourceTree = ""; }; - CFC244BC0959F24C009F8C47 /* X86ISelLowering.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = X86ISelLowering.cpp; sourceTree = ""; }; - CFC244BD0959F24C009F8C47 /* X86ISelLowering.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = X86ISelLowering.h; sourceTree = ""; }; - CFD7E4F30A798FC3000C7379 /* LinkAllCodegenComponents.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LinkAllCodegenComponents.h; sourceTree = ""; }; - CFD99AA80AFE827B0068D19C /* LICENSE.TXT */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = LICENSE.TXT; path = ../LICENSE.TXT; sourceTree = SOURCE_ROOT; }; - CFD99AAD0AFE827B0068D19C /* README.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = README.txt; path = ../README.txt; sourceTree = SOURCE_ROOT; }; - CFD99AB70AFE848A0068D19C /* Allocator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Allocator.cpp; sourceTree = ""; }; - CFD99ABA0AFE84D70068D19C /* IncludeFile.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IncludeFile.cpp; sourceTree = ""; }; - CFD99ABB0AFE84EF0068D19C /* Alarm.inc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; path = Alarm.inc; sourceTree = ""; }; - CFD99ABE0AFE857A0068D19C /* README-X86-64.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "README-X86-64.txt"; sourceTree = ""; }; - CFD99ADA0AFE87650068D19C /* lto.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = lto.cpp; path = lto/lto.cpp; sourceTree = ""; }; - CFD99ADB0AFE87870068D19C /* AnalysisWrappers.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = AnalysisWrappers.cpp; path = opt/AnalysisWrappers.cpp; sourceTree = ""; }; - CFD99ADC0AFE87870068D19C /* GraphPrinters.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = GraphPrinters.cpp; path = opt/GraphPrinters.cpp; sourceTree = ""; }; - CFD99ADD0AFE87870068D19C /* opt.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = opt.cpp; path = opt/opt.cpp; sourceTree = ""; }; - CFD99ADE0AFE87870068D19C /* PrintSCC.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = PrintSCC.cpp; path = opt/PrintSCC.cpp; sourceTree = ""; }; - CFE21C780A80CC0600D3E908 /* RegAllocRegistry.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RegAllocRegistry.h; sourceTree = ""; }; - CFE21C7B0A80CC1C00D3E908 /* SchedulerRegistry.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SchedulerRegistry.h; sourceTree = ""; }; - CFE420FB0A66F67300AB4BF6 /* MachineJumpTableInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MachineJumpTableInfo.h; sourceTree = ""; }; - CFE420FC0A66F67300AB4BF6 /* ValueTypes.td */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ValueTypes.td; sourceTree = ""; }; - CFE420FD0A66F67300AB4BF6 /* Interpreter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Interpreter.h; sourceTree = ""; }; - CFE420FE0A66F67300AB4BF6 /* JIT.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JIT.h; sourceTree = ""; }; - CFE420FF0A66F67300AB4BF6 /* IntrinsicsPowerPC.td */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = IntrinsicsPowerPC.td; sourceTree = ""; }; - CFE421000A66F67300AB4BF6 /* IntrinsicsX86.td */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = IntrinsicsX86.td; sourceTree = ""; }; - CFE421010A66F67300AB4BF6 /* LinkAllVMCore.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LinkAllVMCore.h; sourceTree = ""; }; - CFE421060A66F86D00AB4BF6 /* ScheduleDAGRRList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ScheduleDAGRRList.cpp; sourceTree = ""; }; - CFE421070A66F8DC00AB4BF6 /* GraphWriter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GraphWriter.cpp; sourceTree = ""; }; - CFE421090A66F93300AB4BF6 /* Alarm.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Alarm.cpp; sourceTree = ""; }; - CFE4210A0A66F93300AB4BF6 /* Alarm.inc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; path = Alarm.inc; sourceTree = ""; }; - CFE4210B0A66F96400AB4BF6 /* AlphaSchedule.td */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = AlphaSchedule.td; sourceTree = ""; }; - CFE421140A66FA2D00AB4BF6 /* PPC.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PPC.h; sourceTree = ""; }; - CFE421150A66FA2D00AB4BF6 /* PPC.td */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = PPC.td; sourceTree = ""; }; - CFE421160A66FA2D00AB4BF6 /* PPCAsmPrinter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PPCAsmPrinter.cpp; sourceTree = ""; }; - CFE421170A66FA2D00AB4BF6 /* PPCBranchSelector.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PPCBranchSelector.cpp; sourceTree = ""; }; - CFE421180A66FA2D00AB4BF6 /* PPCCodeEmitter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PPCCodeEmitter.cpp; sourceTree = ""; }; - CFE421190A66FA2D00AB4BF6 /* PPCFrameInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PPCFrameInfo.h; sourceTree = ""; }; - CFE4211A0A66FA2D00AB4BF6 /* PPCHazardRecognizers.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PPCHazardRecognizers.cpp; sourceTree = ""; }; - CFE4211B0A66FA2D00AB4BF6 /* PPCHazardRecognizers.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PPCHazardRecognizers.h; sourceTree = ""; }; - CFE4211C0A66FA2D00AB4BF6 /* PPCInstr64Bit.td */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = PPCInstr64Bit.td; sourceTree = ""; }; - CFE4211D0A66FA2D00AB4BF6 /* PPCInstrAltivec.td */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = PPCInstrAltivec.td; sourceTree = ""; }; - CFE4211E0A66FA2D00AB4BF6 /* PPCInstrBuilder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PPCInstrBuilder.h; sourceTree = ""; }; - CFE4211F0A66FA2D00AB4BF6 /* PPCInstrFormats.td */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = PPCInstrFormats.td; sourceTree = ""; }; - CFE421200A66FA2D00AB4BF6 /* PPCInstrInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PPCInstrInfo.cpp; sourceTree = ""; }; - CFE421210A66FA2D00AB4BF6 /* PPCInstrInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PPCInstrInfo.h; sourceTree = ""; }; - CFE421220A66FA2D00AB4BF6 /* PPCInstrInfo.td */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = PPCInstrInfo.td; sourceTree = ""; }; - CFE421230A66FA2D00AB4BF6 /* PPCISelDAGToDAG.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PPCISelDAGToDAG.cpp; sourceTree = ""; }; - CFE421240A66FA2D00AB4BF6 /* PPCISelLowering.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PPCISelLowering.cpp; sourceTree = ""; }; - CFE421250A66FA2D00AB4BF6 /* PPCISelLowering.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PPCISelLowering.h; sourceTree = ""; }; - CFE421260A66FA2D00AB4BF6 /* PPCJITInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PPCJITInfo.cpp; sourceTree = ""; }; - CFE421270A66FA2D00AB4BF6 /* PPCJITInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PPCJITInfo.h; sourceTree = ""; }; - CFE421280A66FA2D00AB4BF6 /* PPCPerfectShuffle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PPCPerfectShuffle.h; sourceTree = ""; }; - CFE421290A66FA2D00AB4BF6 /* PPCRegisterInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PPCRegisterInfo.cpp; sourceTree = ""; }; - CFE4212A0A66FA2D00AB4BF6 /* PPCRegisterInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PPCRegisterInfo.h; sourceTree = ""; }; - CFE4212B0A66FA2D00AB4BF6 /* PPCRegisterInfo.td */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = PPCRegisterInfo.td; sourceTree = ""; }; - CFE4212C0A66FA2D00AB4BF6 /* PPCRelocations.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PPCRelocations.h; sourceTree = ""; }; - CFE4212D0A66FA2D00AB4BF6 /* PPCSchedule.td */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = PPCSchedule.td; sourceTree = ""; }; - CFE4212E0A66FA2D00AB4BF6 /* PPCScheduleG3.td */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = PPCScheduleG3.td; sourceTree = ""; }; - CFE4212F0A66FA2D00AB4BF6 /* PPCScheduleG4.td */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = PPCScheduleG4.td; sourceTree = ""; }; - CFE421300A66FA2D00AB4BF6 /* PPCScheduleG4Plus.td */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = PPCScheduleG4Plus.td; sourceTree = ""; }; - CFE421310A66FA2D00AB4BF6 /* PPCScheduleG5.td */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = PPCScheduleG5.td; sourceTree = ""; }; - CFE421320A66FA2E00AB4BF6 /* PPCSubtarget.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PPCSubtarget.cpp; sourceTree = ""; }; - CFE421330A66FA2E00AB4BF6 /* PPCSubtarget.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PPCSubtarget.h; sourceTree = ""; }; - CFE421340A66FA2E00AB4BF6 /* PPCTargetMachine.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PPCTargetMachine.cpp; sourceTree = ""; }; - CFE421350A66FA2E00AB4BF6 /* PPCTargetMachine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PPCTargetMachine.h; sourceTree = ""; }; - CFE421360A66FA2E00AB4BF6 /* README_ALTIVEC.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = README_ALTIVEC.txt; sourceTree = ""; }; - CFE421370A66FA2E00AB4BF6 /* README.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = README.txt; sourceTree = ""; }; - CFE421380A66FA8000AB4BF6 /* README-FPStack.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "README-FPStack.txt"; sourceTree = ""; }; - CFE421390A66FA8000AB4BF6 /* README-SSE.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "README-SSE.txt"; sourceTree = ""; }; - CFE4213A0A66FA8000AB4BF6 /* README.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = README.txt; sourceTree = ""; }; - CFE4213B0A66FA8000AB4BF6 /* X86MachineFunctionInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = X86MachineFunctionInfo.h; sourceTree = ""; }; - CFE4213D0A66FAE100AB4BF6 /* Hello.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Hello.cpp; sourceTree = ""; }; - CFE4213F0A66FB5E00AB4BF6 /* IndMemRemoval.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IndMemRemoval.cpp; sourceTree = ""; }; - CFF0DE6309BF6C360031957F /* X86InstrFPStack.td */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = X86InstrFPStack.td; sourceTree = ""; }; - CFF0DE6409BF6C360031957F /* X86InstrMMX.td */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = X86InstrMMX.td; sourceTree = ""; }; - CFF0DE6509BF6C360031957F /* X86InstrSSE.td */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = X86InstrSSE.td; sourceTree = ""; }; - CFF8B434097C605F0047F72A /* UniqueVector.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UniqueVector.h; sourceTree = ""; }; - DE4DA0390911476D0012D44B /* LoopSimplify.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = LoopSimplify.cpp; path = ../lib/Transforms/Utils/LoopSimplify.cpp; sourceTree = SOURCE_ROOT; }; - DE4DA03C091147920012D44B /* LiveInterval.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = LiveInterval.h; path = ../include/llvm/CodeGen/LiveInterval.h; sourceTree = SOURCE_ROOT; }; - DE4DA03D091147920012D44B /* LiveIntervalAnalysis.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = LiveIntervalAnalysis.h; path = ../include/llvm/CodeGen/LiveIntervalAnalysis.h; sourceTree = SOURCE_ROOT; }; - DE4DA065091148520012D44B /* SubtargetEmitter.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = SubtargetEmitter.cpp; path = ../utils/TableGen/SubtargetEmitter.cpp; sourceTree = SOURCE_ROOT; }; - DE4DA066091148520012D44B /* SubtargetEmitter.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = SubtargetEmitter.h; path = ../utils/TableGen/SubtargetEmitter.h; sourceTree = SOURCE_ROOT; }; - DE66EC5B08ABE86900323D32 /* AsmWriter.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = AsmWriter.cpp; path = ../lib/VMCore/AsmWriter.cpp; sourceTree = SOURCE_ROOT; }; - DE66EC5C08ABE86A00323D32 /* BasicBlock.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = BasicBlock.cpp; path = ../lib/VMCore/BasicBlock.cpp; sourceTree = SOURCE_ROOT; }; - DE66EC6008ABE86A00323D32 /* Constants.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = Constants.cpp; path = ../lib/VMCore/Constants.cpp; sourceTree = SOURCE_ROOT; }; - DE66EC6108ABE86A00323D32 /* Dominators.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = Dominators.cpp; path = ../lib/VMCore/Dominators.cpp; sourceTree = SOURCE_ROOT; }; - DE66EC6208ABE86A00323D32 /* Function.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = Function.cpp; path = ../lib/VMCore/Function.cpp; sourceTree = SOURCE_ROOT; }; - DE66EC6308ABE86A00323D32 /* Globals.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = Globals.cpp; path = ../lib/VMCore/Globals.cpp; sourceTree = SOURCE_ROOT; }; - DE66EC6408ABE86A00323D32 /* Instruction.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = Instruction.cpp; path = ../lib/VMCore/Instruction.cpp; sourceTree = SOURCE_ROOT; }; - DE66EC6508ABE86A00323D32 /* Instructions.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = Instructions.cpp; path = ../lib/VMCore/Instructions.cpp; sourceTree = SOURCE_ROOT; }; - DE66EC6608ABE86A00323D32 /* LeakDetector.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = LeakDetector.cpp; path = ../lib/VMCore/LeakDetector.cpp; sourceTree = SOURCE_ROOT; }; - DE66EC6708ABE86A00323D32 /* Mangler.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = Mangler.cpp; path = ../lib/VMCore/Mangler.cpp; sourceTree = SOURCE_ROOT; }; - DE66EC6808ABE86A00323D32 /* Module.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = Module.cpp; path = ../lib/VMCore/Module.cpp; sourceTree = SOURCE_ROOT; }; - DE66EC6908ABE86A00323D32 /* ModuleProvider.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = ModuleProvider.cpp; path = ../lib/VMCore/ModuleProvider.cpp; sourceTree = SOURCE_ROOT; }; - DE66EC6A08ABE86A00323D32 /* Pass.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = Pass.cpp; path = ../lib/VMCore/Pass.cpp; sourceTree = SOURCE_ROOT; }; - DE66EC6D08ABE86A00323D32 /* SymbolTableListTraitsImpl.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = SymbolTableListTraitsImpl.h; path = ../lib/VMCore/SymbolTableListTraitsImpl.h; sourceTree = SOURCE_ROOT; }; - DE66EC6E08ABE86A00323D32 /* Type.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = Type.cpp; path = ../lib/VMCore/Type.cpp; sourceTree = SOURCE_ROOT; }; - DE66EC6F08ABE86A00323D32 /* Value.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = Value.cpp; path = ../lib/VMCore/Value.cpp; sourceTree = SOURCE_ROOT; }; - DE66EC7008ABE86A00323D32 /* Verifier.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = Verifier.cpp; path = ../lib/VMCore/Verifier.cpp; sourceTree = SOURCE_ROOT; }; - DE66EC8E08ABEAF000323D32 /* llvmAsmParser.y */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.yacc; name = llvmAsmParser.y; path = ../lib/AsmParser/llvmAsmParser.y; sourceTree = SOURCE_ROOT; }; - DE66EC8F08ABEAF000323D32 /* Parser.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = Parser.cpp; path = ../lib/AsmParser/Parser.cpp; sourceTree = SOURCE_ROOT; }; - DE66EC9008ABEAF000323D32 /* ParserInternals.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = ParserInternals.h; path = ../lib/AsmParser/ParserInternals.h; sourceTree = SOURCE_ROOT; }; - DE66ECBE08ABEC0700323D32 /* AliasAnalysis.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = AliasAnalysis.cpp; sourceTree = ""; }; - DE66ECBF08ABEC0700323D32 /* AliasAnalysisCounter.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = AliasAnalysisCounter.cpp; sourceTree = ""; }; - DE66ECC008ABEC0700323D32 /* AliasAnalysisEvaluator.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = AliasAnalysisEvaluator.cpp; sourceTree = ""; }; - DE66ECC108ABEC0700323D32 /* AliasSetTracker.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = AliasSetTracker.cpp; sourceTree = ""; }; - DE66ECC208ABEC0700323D32 /* BasicAliasAnalysis.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = BasicAliasAnalysis.cpp; sourceTree = ""; }; - DE66ECC308ABEC0700323D32 /* CFGPrinter.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CFGPrinter.cpp; sourceTree = ""; }; - DE66ED1708ABEC0800323D32 /* InstCount.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = InstCount.cpp; sourceTree = ""; }; - DE66ED1808ABEC0800323D32 /* Interval.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = Interval.cpp; sourceTree = ""; }; - DE66ED1908ABEC0800323D32 /* IntervalPartition.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = IntervalPartition.cpp; sourceTree = ""; }; - DE66ED1B08ABEC0800323D32 /* Andersens.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = Andersens.cpp; sourceTree = ""; }; - DE66ED1C08ABEC0800323D32 /* CallGraph.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CallGraph.cpp; sourceTree = ""; }; - DE66ED1D08ABEC0800323D32 /* CallGraphSCCPass.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CallGraphSCCPass.cpp; sourceTree = ""; }; - DE66ED2F08ABEC0800323D32 /* FindUsedTypes.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = FindUsedTypes.cpp; sourceTree = ""; }; - DE66ED3008ABEC0800323D32 /* GlobalsModRef.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = GlobalsModRef.cpp; sourceTree = ""; }; - DE66ED3308ABEC0800323D32 /* LoadValueNumbering.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = LoadValueNumbering.cpp; sourceTree = ""; }; - DE66ED3408ABEC0800323D32 /* LoopInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = LoopInfo.cpp; sourceTree = ""; }; - DE66ED3608ABEC0800323D32 /* PostDominators.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = PostDominators.cpp; sourceTree = ""; }; - DE66ED3708ABEC0800323D32 /* ProfileInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ProfileInfo.cpp; sourceTree = ""; }; - DE66ED3808ABEC0800323D32 /* ProfileInfoLoader.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ProfileInfoLoader.cpp; sourceTree = ""; }; - DE66ED3908ABEC0800323D32 /* ProfileInfoLoaderPass.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ProfileInfoLoaderPass.cpp; sourceTree = ""; }; - DE66ED3A08ABEC0800323D32 /* ScalarEvolution.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ScalarEvolution.cpp; sourceTree = ""; }; - DE66ED3B08ABEC0800323D32 /* ScalarEvolutionExpander.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ScalarEvolutionExpander.cpp; sourceTree = ""; }; - DE66ED3C08ABEC0800323D32 /* Trace.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = Trace.cpp; sourceTree = ""; }; - DE66ED3D08ABEC0800323D32 /* ValueNumbering.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ValueNumbering.cpp; sourceTree = ""; }; - DE66ED3F08ABEC2A00323D32 /* AsmPrinter.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = AsmPrinter.cpp; sourceTree = ""; }; - DE66ED4008ABEC2A00323D32 /* BranchFolding.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = BranchFolding.cpp; sourceTree = ""; }; - DE66ED6F08ABEC2B00323D32 /* ELFWriter.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ELFWriter.cpp; sourceTree = ""; }; - DE66ED7008ABEC2B00323D32 /* IntrinsicLowering.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = IntrinsicLowering.cpp; sourceTree = ""; }; - DE66ED7108ABEC2B00323D32 /* LiveInterval.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = LiveInterval.cpp; sourceTree = ""; }; - DE66ED7308ABEC2B00323D32 /* LiveIntervalAnalysis.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = LiveIntervalAnalysis.cpp; sourceTree = ""; }; - DE66ED7508ABEC2B00323D32 /* LiveVariables.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = LiveVariables.cpp; sourceTree = ""; }; - DE66ED7608ABEC2B00323D32 /* MachineBasicBlock.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = MachineBasicBlock.cpp; sourceTree = ""; }; - DE66ED7808ABEC2B00323D32 /* MachineFunction.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = MachineFunction.cpp; sourceTree = ""; }; - DE66ED7908ABEC2B00323D32 /* MachineInstr.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = MachineInstr.cpp; sourceTree = ""; }; - DE66ED7B08ABEC2B00323D32 /* Passes.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = Passes.cpp; sourceTree = ""; }; - DE66ED7C08ABEC2B00323D32 /* PHIElimination.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = PHIElimination.cpp; sourceTree = ""; }; - DE66ED7D08ABEC2B00323D32 /* PhysRegTracker.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = PhysRegTracker.h; sourceTree = ""; }; - DE66ED7E08ABEC2B00323D32 /* PrologEpilogInserter.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = PrologEpilogInserter.cpp; sourceTree = ""; }; - DE66ED8008ABEC2B00323D32 /* RegAllocLinearScan.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = RegAllocLinearScan.cpp; sourceTree = ""; }; - DE66ED8108ABEC2B00323D32 /* RegAllocLocal.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = RegAllocLocal.cpp; sourceTree = ""; }; - DE66ED8208ABEC2B00323D32 /* RegAllocSimple.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = RegAllocSimple.cpp; sourceTree = ""; }; - DE66ED9008ABEC2B00323D32 /* LegalizeDAG.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = LegalizeDAG.cpp; sourceTree = ""; }; - DE66ED9208ABEC2B00323D32 /* SelectionDAG.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = SelectionDAG.cpp; sourceTree = ""; }; - DE66ED9308ABEC2B00323D32 /* SelectionDAGISel.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = SelectionDAGISel.cpp; sourceTree = ""; }; - DE66ED9408ABEC2B00323D32 /* SelectionDAGPrinter.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = SelectionDAGPrinter.cpp; sourceTree = ""; }; - DE66ED9508ABEC2B00323D32 /* TwoAddressInstructionPass.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = TwoAddressInstructionPass.cpp; sourceTree = ""; }; - DE66ED9608ABEC2B00323D32 /* UnreachableBlockElim.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = UnreachableBlockElim.cpp; sourceTree = ""; }; - DE66ED9808ABEC2B00323D32 /* VirtRegMap.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = VirtRegMap.cpp; sourceTree = ""; }; - DE66ED9908ABEC2B00323D32 /* VirtRegMap.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = VirtRegMap.h; sourceTree = ""; }; - DE66EDB108ABEC7300323D32 /* Debugger.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = Debugger.cpp; sourceTree = ""; }; - DE66EDB508ABEC7300323D32 /* ProgramInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ProgramInfo.cpp; sourceTree = ""; }; - DE66EDB608ABEC7300323D32 /* README.txt */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = README.txt; sourceTree = ""; }; - DE66EDB708ABEC7300323D32 /* RuntimeInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = RuntimeInfo.cpp; sourceTree = ""; }; - DE66EDB808ABEC7300323D32 /* SourceFile.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = SourceFile.cpp; sourceTree = ""; }; - DE66EDB908ABEC7300323D32 /* SourceLanguage-CFamily.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = "SourceLanguage-CFamily.cpp"; sourceTree = ""; }; - DE66EDBA08ABEC7300323D32 /* SourceLanguage-CPlusPlus.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = "SourceLanguage-CPlusPlus.cpp"; sourceTree = ""; }; - DE66EDBB08ABEC7300323D32 /* SourceLanguage-Unknown.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = "SourceLanguage-Unknown.cpp"; sourceTree = ""; }; - DE66EDBC08ABEC7300323D32 /* SourceLanguage.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = SourceLanguage.cpp; sourceTree = ""; }; - DE66EDC408ABEC9000323D32 /* ExecutionEngine.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ExecutionEngine.cpp; sourceTree = ""; }; - DE66EDCE08ABEC9000323D32 /* Execution.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = Execution.cpp; sourceTree = ""; }; - DE66EDCF08ABEC9000323D32 /* ExternalFunctions.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ExternalFunctions.cpp; sourceTree = ""; }; - DE66EDD008ABEC9000323D32 /* Interpreter.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = Interpreter.cpp; sourceTree = ""; }; - DE66EDD108ABEC9000323D32 /* Interpreter.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Interpreter.h; sourceTree = ""; }; - DE66EDDE08ABEC9100323D32 /* Intercept.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = Intercept.cpp; sourceTree = ""; }; - DE66EDDF08ABEC9100323D32 /* JIT.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = JIT.cpp; sourceTree = ""; }; - DE66EDE008ABEC9100323D32 /* JIT.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = JIT.h; sourceTree = ""; }; - DE66EDE108ABEC9100323D32 /* JITEmitter.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = JITEmitter.cpp; sourceTree = ""; }; - DE66EDE308ABEC9100323D32 /* TargetSelect.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = TargetSelect.cpp; sourceTree = ""; }; - DE66EDF608ABEDD300323D32 /* LinkArchives.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = LinkArchives.cpp; sourceTree = ""; }; - DE66EDF708ABEDD300323D32 /* Linker.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = Linker.cpp; sourceTree = ""; }; - DE66EDF808ABEDD300323D32 /* LinkItems.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = LinkItems.cpp; sourceTree = ""; }; - DE66EDF908ABEDD300323D32 /* LinkModules.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = LinkModules.cpp; sourceTree = ""; }; - DE66EDFC08ABEDE600323D32 /* Annotation.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = Annotation.cpp; sourceTree = ""; }; - DE66EE1D08ABEDE600323D32 /* CommandLine.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CommandLine.cpp; sourceTree = ""; }; - DE66EE3D08ABEDE600323D32 /* Debug.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = Debug.cpp; sourceTree = ""; }; - DE66EE3E08ABEDE600323D32 /* FileUtilities.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = FileUtilities.cpp; sourceTree = ""; }; - DE66EE3F08ABEDE600323D32 /* IsInf.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = IsInf.cpp; sourceTree = ""; }; - DE66EE4008ABEDE600323D32 /* IsNAN.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = IsNAN.cpp; sourceTree = ""; }; - DE66EE4208ABEDE600323D32 /* PluginLoader.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = PluginLoader.cpp; sourceTree = ""; }; - DE66EE4308ABEDE600323D32 /* SlowOperationInformer.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = SlowOperationInformer.cpp; sourceTree = ""; }; - DE66EE4408ABEDE600323D32 /* Statistic.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = Statistic.cpp; sourceTree = ""; }; - DE66EE4508ABEDE700323D32 /* StringExtras.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = StringExtras.cpp; sourceTree = ""; }; - DE66EE4608ABEDE700323D32 /* SystemUtils.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = SystemUtils.cpp; sourceTree = ""; }; - DE66EE4708ABEDE700323D32 /* Timer.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = Timer.cpp; sourceTree = ""; }; - DE66EE6008ABEE3400323D32 /* DynamicLibrary.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = DynamicLibrary.cpp; sourceTree = ""; }; - DE66EE6108ABEE3400323D32 /* LICENSE.TXT */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = LICENSE.TXT; sourceTree = ""; }; - DE66EE6508ABEE3400323D32 /* MappedFile.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = MappedFile.cpp; sourceTree = ""; }; - DE66EE6608ABEE3400323D32 /* Memory.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = Memory.cpp; sourceTree = ""; }; - DE66EE6708ABEE3400323D32 /* Mutex.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = Mutex.cpp; sourceTree = ""; }; - DE66EE6808ABEE3400323D32 /* Path.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = Path.cpp; sourceTree = ""; }; - DE66EE6908ABEE3400323D32 /* Process.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = Process.cpp; sourceTree = ""; }; - DE66EE6A08ABEE3400323D32 /* Program.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = Program.cpp; sourceTree = ""; }; - DE66EE6B08ABEE3400323D32 /* README.txt */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = README.txt; sourceTree = ""; }; - DE66EE7C08ABEE3400323D32 /* Signals.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = Signals.cpp; sourceTree = ""; }; - DE66EE7D08ABEE3400323D32 /* TimeValue.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = TimeValue.cpp; sourceTree = ""; }; - DE66EE7F08ABEE3500323D32 /* MappedFile.inc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = MappedFile.inc; sourceTree = ""; }; - DE66EE8008ABEE3500323D32 /* Memory.inc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = Memory.inc; sourceTree = ""; }; - DE66EE8108ABEE3500323D32 /* Mutex.inc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = Mutex.inc; sourceTree = ""; }; - DE66EE8208ABEE3500323D32 /* Path.inc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = Path.inc; sourceTree = ""; }; - DE66EE8308ABEE3500323D32 /* Process.inc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = Process.inc; sourceTree = ""; }; - DE66EE8408ABEE3500323D32 /* Program.inc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = Program.inc; sourceTree = ""; }; - DE66EE8508ABEE3500323D32 /* README.txt */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = README.txt; sourceTree = ""; }; - DE66EE8608ABEE3500323D32 /* Signals.inc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = Signals.inc; sourceTree = ""; }; - DE66EE8908ABEE3500323D32 /* TimeValue.inc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = TimeValue.inc; sourceTree = ""; }; - DE66EE8A08ABEE3500323D32 /* Unix.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Unix.h; sourceTree = ""; }; - DE66EE8C08ABEE3500323D32 /* DynamicLibrary.inc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = DynamicLibrary.inc; sourceTree = ""; }; - DE66EE8D08ABEE3500323D32 /* MappedFile.inc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = MappedFile.inc; sourceTree = ""; }; - DE66EE8E08ABEE3500323D32 /* Memory.inc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = Memory.inc; sourceTree = ""; }; - DE66EE8F08ABEE3500323D32 /* Mutex.inc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = Mutex.inc; sourceTree = ""; }; - DE66EE9008ABEE3500323D32 /* Path.inc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = Path.inc; sourceTree = ""; }; - DE66EE9108ABEE3500323D32 /* Process.inc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = Process.inc; sourceTree = ""; }; - DE66EE9208ABEE3500323D32 /* Program.inc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = Program.inc; sourceTree = ""; }; - DE66EE9308ABEE3500323D32 /* Signals.inc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = Signals.inc; sourceTree = ""; }; - DE66EE9408ABEE3500323D32 /* TimeValue.inc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = TimeValue.inc; sourceTree = ""; }; - DE66EE9508ABEE3500323D32 /* Win32.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Win32.h; sourceTree = ""; }; - DE66EE9808ABEE5E00323D32 /* Alpha.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Alpha.h; sourceTree = ""; }; - DE66EE9908ABEE5E00323D32 /* Alpha.td */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = Alpha.td; sourceTree = ""; }; - DE66EE9A08ABEE5E00323D32 /* AlphaAsmPrinter.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = AlphaAsmPrinter.cpp; sourceTree = ""; }; - DE66EE9B08ABEE5E00323D32 /* AlphaCodeEmitter.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = AlphaCodeEmitter.cpp; sourceTree = ""; }; - DE66EEA308ABEE5E00323D32 /* AlphaInstrFormats.td */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = AlphaInstrFormats.td; sourceTree = ""; }; - DE66EEA408ABEE5E00323D32 /* AlphaInstrInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = AlphaInstrInfo.cpp; sourceTree = ""; }; - DE66EEA508ABEE5E00323D32 /* AlphaInstrInfo.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = AlphaInstrInfo.h; sourceTree = ""; }; - DE66EEA608ABEE5E00323D32 /* AlphaInstrInfo.td */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = AlphaInstrInfo.td; sourceTree = ""; }; - DE66EEA908ABEE5E00323D32 /* AlphaJITInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = AlphaJITInfo.cpp; sourceTree = ""; }; - DE66EEAA08ABEE5E00323D32 /* AlphaJITInfo.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = AlphaJITInfo.h; sourceTree = ""; }; - DE66EEAB08ABEE5E00323D32 /* AlphaRegisterInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = AlphaRegisterInfo.cpp; sourceTree = ""; }; - DE66EEAC08ABEE5E00323D32 /* AlphaRegisterInfo.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = AlphaRegisterInfo.h; sourceTree = ""; }; - DE66EEAD08ABEE5E00323D32 /* AlphaRegisterInfo.td */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = AlphaRegisterInfo.td; sourceTree = ""; }; - DE66EEAE08ABEE5E00323D32 /* AlphaRelocations.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = AlphaRelocations.h; sourceTree = ""; }; - DE66EEAF08ABEE5E00323D32 /* AlphaTargetMachine.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = AlphaTargetMachine.cpp; sourceTree = ""; }; - DE66EEB008ABEE5E00323D32 /* AlphaTargetMachine.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = AlphaTargetMachine.h; sourceTree = ""; }; - DE66EECA08ABEE5E00323D32 /* CTargetMachine.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CTargetMachine.h; sourceTree = ""; }; - DE66EF0E08ABEE5E00323D32 /* README */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = README; sourceTree = ""; }; - DE66EF1008ABEE5E00323D32 /* TargetRegisterInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = TargetRegisterInfo.cpp; sourceTree = ""; }; - DE66F08A08ABEE6000323D32 /* Target.td */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = Target.td; sourceTree = ""; }; - DE66F08B08ABEE6000323D32 /* TargetData.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = TargetData.cpp; sourceTree = ""; }; - DE66F08C08ABEE6000323D32 /* TargetFrameInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = TargetFrameInfo.cpp; sourceTree = ""; }; - DE66F08D08ABEE6000323D32 /* TargetInstrInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = TargetInstrInfo.cpp; sourceTree = ""; }; - DE66F08F08ABEE6000323D32 /* TargetMachine.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = TargetMachine.cpp; sourceTree = ""; }; - DE66F09008ABEE6000323D32 /* TargetMachineRegistry.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = TargetMachineRegistry.cpp; sourceTree = ""; }; - DE66F09208ABEE6000323D32 /* TargetSubtarget.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = TargetSubtarget.cpp; sourceTree = ""; }; - DE66F0BC08ABEE6000323D32 /* X86.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = X86.h; sourceTree = ""; }; - DE66F0BD08ABEE6000323D32 /* X86.td */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = X86.td; sourceTree = ""; }; - DE66F0BE08ABEE6000323D32 /* X86AsmPrinter.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = X86AsmPrinter.cpp; sourceTree = ""; }; - DE66F0BF08ABEE6000323D32 /* X86AsmPrinter.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = X86AsmPrinter.h; sourceTree = ""; }; - DE66F0C008ABEE6000323D32 /* X86ATTAsmPrinter.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = X86ATTAsmPrinter.cpp; sourceTree = ""; }; - DE66F0C108ABEE6000323D32 /* X86ATTAsmPrinter.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = X86ATTAsmPrinter.h; sourceTree = ""; }; - DE66F0C208ABEE6000323D32 /* X86CodeEmitter.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = X86CodeEmitter.cpp; sourceTree = ""; }; - DE66F0C408ABEE6000323D32 /* X86FloatingPoint.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = X86FloatingPoint.cpp; sourceTree = ""; }; - DE66F0CC08ABEE6000323D32 /* X86InstrBuilder.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = X86InstrBuilder.h; sourceTree = ""; }; - DE66F0CD08ABEE6000323D32 /* X86InstrInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = X86InstrInfo.cpp; sourceTree = ""; }; - DE66F0CE08ABEE6000323D32 /* X86InstrInfo.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = X86InstrInfo.h; sourceTree = ""; }; - DE66F0CF08ABEE6100323D32 /* X86InstrInfo.td */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = X86InstrInfo.td; sourceTree = ""; }; - DE66F0D008ABEE6100323D32 /* X86IntelAsmPrinter.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = X86IntelAsmPrinter.cpp; sourceTree = ""; }; - DE66F0D108ABEE6100323D32 /* X86IntelAsmPrinter.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = X86IntelAsmPrinter.h; sourceTree = ""; }; - DE66F0D508ABEE6100323D32 /* X86JITInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = X86JITInfo.cpp; sourceTree = ""; }; - DE66F0D608ABEE6100323D32 /* X86JITInfo.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = X86JITInfo.h; sourceTree = ""; }; - DE66F0D808ABEE6100323D32 /* X86RegisterInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = X86RegisterInfo.cpp; sourceTree = ""; }; - DE66F0D908ABEE6100323D32 /* X86RegisterInfo.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = X86RegisterInfo.h; sourceTree = ""; }; - DE66F0DA08ABEE6100323D32 /* X86RegisterInfo.td */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = X86RegisterInfo.td; sourceTree = ""; }; - DE66F0DB08ABEE6100323D32 /* X86Relocations.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = X86Relocations.h; sourceTree = ""; }; - DE66F0DC08ABEE6100323D32 /* X86Subtarget.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = X86Subtarget.cpp; sourceTree = ""; }; - DE66F0DD08ABEE6100323D32 /* X86Subtarget.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = X86Subtarget.h; sourceTree = ""; }; - DE66F0DE08ABEE6100323D32 /* X86TargetMachine.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = X86TargetMachine.cpp; sourceTree = ""; }; - DE66F0DF08ABEE6100323D32 /* X86TargetMachine.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = X86TargetMachine.h; sourceTree = ""; }; - DE66F0EF08ABEFB300323D32 /* BlockProfiling.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = BlockProfiling.cpp; sourceTree = ""; }; - DE66F0FE08ABEFB300323D32 /* EdgeProfiling.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = EdgeProfiling.cpp; sourceTree = ""; }; - DE66F11B08ABEFB300323D32 /* ProfilingUtils.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ProfilingUtils.cpp; sourceTree = ""; }; - DE66F11C08ABEFB300323D32 /* ProfilingUtils.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ProfilingUtils.h; sourceTree = ""; }; - DE66F12008ABEFB300323D32 /* ArgumentPromotion.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ArgumentPromotion.cpp; sourceTree = ""; }; - DE66F12108ABEFB300323D32 /* ConstantMerge.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ConstantMerge.cpp; sourceTree = ""; }; - DE66F12208ABEFB300323D32 /* DeadArgumentElimination.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = DeadArgumentElimination.cpp; sourceTree = ""; }; - DE66F12308ABEFB300323D32 /* DeadTypeElimination.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = DeadTypeElimination.cpp; sourceTree = ""; }; - DE66F14C08ABEFB400323D32 /* GlobalDCE.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = GlobalDCE.cpp; sourceTree = ""; }; - DE66F14D08ABEFB400323D32 /* GlobalOpt.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = GlobalOpt.cpp; sourceTree = ""; }; - DE66F14E08ABEFB400323D32 /* Inliner.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = Inliner.cpp; sourceTree = ""; }; - DE66F15008ABEFB400323D32 /* InlineSimple.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = InlineSimple.cpp; sourceTree = ""; }; - DE66F15108ABEFB400323D32 /* Internalize.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = Internalize.cpp; sourceTree = ""; }; - DE66F15208ABEFB400323D32 /* IPConstantPropagation.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = IPConstantPropagation.cpp; sourceTree = ""; }; - DE66F15308ABEFB400323D32 /* LoopExtractor.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = LoopExtractor.cpp; sourceTree = ""; }; - DE66F15408ABEFB400323D32 /* LowerSetJmp.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = LowerSetJmp.cpp; sourceTree = ""; }; - DE66F15608ABEFB400323D32 /* PruneEH.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = PruneEH.cpp; sourceTree = ""; }; - DE66F15708ABEFB400323D32 /* RaiseAllocations.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = RaiseAllocations.cpp; sourceTree = ""; }; - DE66F15808ABEFB400323D32 /* SimplifyLibCalls.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = SimplifyLibCalls.cpp; sourceTree = ""; }; - DE66F15908ABEFB400323D32 /* StripSymbols.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = StripSymbols.cpp; sourceTree = ""; }; - DE66F15E08ABEFB400323D32 /* ADCE.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ADCE.cpp; sourceTree = ""; }; - DE66F15F08ABEFB400323D32 /* BasicBlockPlacement.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = BasicBlockPlacement.cpp; sourceTree = ""; }; - DE66F16008ABEFB400323D32 /* CondPropagate.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CondPropagate.cpp; sourceTree = ""; }; - DE66F16108ABEFB400323D32 /* ConstantProp.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ConstantProp.cpp; sourceTree = ""; }; - DE66F16308ABEFB400323D32 /* DCE.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = DCE.cpp; sourceTree = ""; }; - DE66F16408ABEFB400323D32 /* DeadStoreElimination.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = DeadStoreElimination.cpp; sourceTree = ""; }; - DE66F1A308ABEFB400323D32 /* GCSE.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = GCSE.cpp; sourceTree = ""; }; - DE66F1A408ABEFB400323D32 /* IndVarSimplify.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = IndVarSimplify.cpp; sourceTree = ""; }; - DE66F1A508ABEFB400323D32 /* InstructionCombining.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = InstructionCombining.cpp; sourceTree = ""; }; - DE66F1A608ABEFB400323D32 /* LICM.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = LICM.cpp; sourceTree = ""; }; - DE66F1A808ABEFB400323D32 /* LoopStrengthReduce.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = LoopStrengthReduce.cpp; sourceTree = ""; }; - DE66F1A908ABEFB400323D32 /* LoopUnroll.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = LoopUnroll.cpp; sourceTree = ""; }; - DE66F1AA08ABEFB400323D32 /* LoopUnswitch.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = LoopUnswitch.cpp; sourceTree = ""; }; - DE66F1B508ABEFB400323D32 /* Reassociate.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = Reassociate.cpp; sourceTree = ""; }; - DE66F1B608ABEFB400323D32 /* ScalarReplAggregates.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ScalarReplAggregates.cpp; sourceTree = ""; }; - DE66F1B708ABEFB400323D32 /* SCCP.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = SCCP.cpp; sourceTree = ""; }; - DE66F1B808ABEFB400323D32 /* SimplifyCFG.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = SimplifyCFG.cpp; sourceTree = ""; }; - DE66F1B908ABEFB400323D32 /* TailDuplication.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = TailDuplication.cpp; sourceTree = ""; }; - DE66F1BA08ABEFB400323D32 /* TailRecursionElimination.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = TailRecursionElimination.cpp; sourceTree = ""; }; - DE66F1BE08ABEFB400323D32 /* BasicBlockUtils.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = BasicBlockUtils.cpp; sourceTree = ""; }; - DE66F1BF08ABEFB400323D32 /* BreakCriticalEdges.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = BreakCriticalEdges.cpp; sourceTree = ""; }; - DE66F1C008ABEFB400323D32 /* CloneFunction.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CloneFunction.cpp; sourceTree = ""; }; - DE66F1C108ABEFB400323D32 /* CloneModule.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CloneModule.cpp; sourceTree = ""; }; - DE66F1C208ABEFB400323D32 /* CloneTrace.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CloneTrace.cpp; sourceTree = ""; }; - DE66F1C308ABEFB400323D32 /* CodeExtractor.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CodeExtractor.cpp; sourceTree = ""; }; - DE66F1E008ABEFB400323D32 /* DemoteRegToStack.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = DemoteRegToStack.cpp; sourceTree = ""; }; - DE66F1E108ABEFB400323D32 /* InlineFunction.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = InlineFunction.cpp; sourceTree = ""; }; - DE66F1E208ABEFB400323D32 /* Local.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = Local.cpp; sourceTree = ""; }; - DE66F1E408ABEFB400323D32 /* PromoteMemoryToRegister.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = PromoteMemoryToRegister.cpp; sourceTree = ""; }; - DE66F1E508ABEFB400323D32 /* SimplifyCFG.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = SimplifyCFG.cpp; sourceTree = ""; }; - DE66F1E608ABEFB400323D32 /* UnifyFunctionExitNodes.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = UnifyFunctionExitNodes.cpp; sourceTree = ""; }; - DE66F1E708ABEFB400323D32 /* ValueMapper.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ValueMapper.cpp; sourceTree = ""; }; - DE66F1EA08ABF03100323D32 /* AbstractTypeUser.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = AbstractTypeUser.h; sourceTree = ""; }; - DE66F1EE08ABF03100323D32 /* DenseMap.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = DenseMap.h; sourceTree = ""; }; - DE66F1EF08ABF03100323D32 /* DepthFirstIterator.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = DepthFirstIterator.h; sourceTree = ""; }; - DE66F1F008ABF03100323D32 /* EquivalenceClasses.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = EquivalenceClasses.h; sourceTree = ""; }; - DE66F1F108ABF03100323D32 /* GraphTraits.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = GraphTraits.h; sourceTree = ""; }; - DE66F1F308ABF03100323D32 /* hash_map.in */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = hash_map.in; sourceTree = ""; }; - DE66F1F508ABF03100323D32 /* hash_set.in */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = hash_set.in; sourceTree = ""; }; - DE66F1F608ABF03100323D32 /* HashExtras.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = HashExtras.h; sourceTree = ""; }; - DE66F1F708ABF03100323D32 /* ilist */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = ilist; sourceTree = ""; }; - DE66F1F908ABF03100323D32 /* iterator.in */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = iterator.in; sourceTree = ""; }; - DE66F1FA08ABF03100323D32 /* PostOrderIterator.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = PostOrderIterator.h; sourceTree = ""; }; - DE66F1FB08ABF03100323D32 /* SCCIterator.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = SCCIterator.h; sourceTree = ""; }; - DE66F1FC08ABF03100323D32 /* SetOperations.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = SetOperations.h; sourceTree = ""; }; - DE66F1FD08ABF03100323D32 /* SetVector.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = SetVector.h; sourceTree = ""; }; - DE66F1FE08ABF03100323D32 /* Statistic.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Statistic.h; sourceTree = ""; }; - DE66F1FF08ABF03100323D32 /* STLExtras.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = STLExtras.h; sourceTree = ""; }; - DE66F20008ABF03100323D32 /* StringExtras.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = StringExtras.h; sourceTree = ""; }; - DE66F20108ABF03100323D32 /* Tree.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Tree.h; sourceTree = ""; }; - DE66F20208ABF03100323D32 /* VectorExtras.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = VectorExtras.h; sourceTree = ""; }; - DE66F20408ABF03100323D32 /* AliasAnalysis.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = AliasAnalysis.h; sourceTree = ""; }; - DE66F20508ABF03100323D32 /* AliasSetTracker.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = AliasSetTracker.h; sourceTree = ""; }; - DE66F20608ABF03100323D32 /* CallGraph.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CallGraph.h; sourceTree = ""; }; - DE66F20708ABF03100323D32 /* CFGPrinter.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CFGPrinter.h; sourceTree = ""; }; - DE66F20808ABF03100323D32 /* ConstantsScanner.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ConstantsScanner.h; sourceTree = ""; }; - DE66F20F08ABF03100323D32 /* Dominators.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Dominators.h; sourceTree = ""; }; - DE66F21208ABF03100323D32 /* FindUsedTypes.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = FindUsedTypes.h; sourceTree = ""; }; - DE66F21308ABF03100323D32 /* Interval.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Interval.h; sourceTree = ""; }; - DE66F21408ABF03100323D32 /* IntervalIterator.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = IntervalIterator.h; sourceTree = ""; }; - DE66F21508ABF03100323D32 /* IntervalPartition.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = IntervalPartition.h; sourceTree = ""; }; - DE66F21608ABF03100323D32 /* LoadValueNumbering.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = LoadValueNumbering.h; sourceTree = ""; }; - DE66F21708ABF03100323D32 /* LoopInfo.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = LoopInfo.h; sourceTree = ""; }; - DE66F21808ABF03100323D32 /* Passes.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Passes.h; sourceTree = ""; }; - DE66F21908ABF03100323D32 /* PostDominators.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = PostDominators.h; sourceTree = ""; }; - DE66F21A08ABF03100323D32 /* ProfileInfo.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ProfileInfo.h; sourceTree = ""; }; - DE66F21B08ABF03100323D32 /* ProfileInfoLoader.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ProfileInfoLoader.h; sourceTree = ""; }; - DE66F21C08ABF03100323D32 /* ProfileInfoTypes.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ProfileInfoTypes.h; sourceTree = ""; }; - DE66F21D08ABF03100323D32 /* ScalarEvolution.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ScalarEvolution.h; sourceTree = ""; }; - DE66F21E08ABF03100323D32 /* ScalarEvolutionExpander.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ScalarEvolutionExpander.h; sourceTree = ""; }; - DE66F21F08ABF03100323D32 /* ScalarEvolutionExpressions.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ScalarEvolutionExpressions.h; sourceTree = ""; }; - DE66F22008ABF03100323D32 /* Trace.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Trace.h; sourceTree = ""; }; - DE66F22108ABF03100323D32 /* ValueNumbering.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ValueNumbering.h; sourceTree = ""; }; - DE66F22208ABF03100323D32 /* Verifier.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Verifier.h; sourceTree = ""; }; - DE66F22308ABF03100323D32 /* Argument.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Argument.h; sourceTree = ""; }; - DE66F22508ABF03100323D32 /* AsmAnnotationWriter.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = AsmAnnotationWriter.h; sourceTree = ""; }; - DE66F22708ABF03100323D32 /* Parser.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Parser.h; sourceTree = ""; }; - DE66F22808ABF03100323D32 /* PrintModulePass.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = PrintModulePass.h; sourceTree = ""; }; - DE66F22908ABF03100323D32 /* Writer.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Writer.h; sourceTree = ""; }; - DE66F22A08ABF03100323D32 /* BasicBlock.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = BasicBlock.h; sourceTree = ""; }; - DE66F23308ABF03100323D32 /* CallGraphSCCPass.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CallGraphSCCPass.h; sourceTree = ""; }; - DE66F23408ABF03100323D32 /* CallingConv.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CallingConv.h; sourceTree = ""; }; - DE66F23608ABF03100323D32 /* AsmPrinter.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = AsmPrinter.h; sourceTree = ""; }; - DE66F23908ABF03100323D32 /* IntrinsicLowering.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = IntrinsicLowering.h; sourceTree = ""; }; - DE66F23A08ABF03100323D32 /* LiveVariables.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = LiveVariables.h; sourceTree = ""; }; - DE66F23B08ABF03100323D32 /* MachineBasicBlock.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = MachineBasicBlock.h; sourceTree = ""; }; - DE66F23C08ABF03100323D32 /* MachineCodeEmitter.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = MachineCodeEmitter.h; sourceTree = ""; }; - DE66F23D08ABF03100323D32 /* MachineConstantPool.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = MachineConstantPool.h; sourceTree = ""; }; - DE66F23E08ABF03100323D32 /* MachineFrameInfo.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = MachineFrameInfo.h; sourceTree = ""; }; - DE66F23F08ABF03100323D32 /* MachineFunction.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = MachineFunction.h; sourceTree = ""; }; - DE66F24008ABF03100323D32 /* MachineFunctionPass.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = MachineFunctionPass.h; sourceTree = ""; }; - DE66F24108ABF03100323D32 /* MachineInstr.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = MachineInstr.h; sourceTree = ""; }; - DE66F24208ABF03100323D32 /* MachineInstrBuilder.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = MachineInstrBuilder.h; sourceTree = ""; }; - DE66F24308ABF03100323D32 /* MachineRelocation.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = MachineRelocation.h; sourceTree = ""; }; - DE66F24408ABF03100323D32 /* Passes.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Passes.h; sourceTree = ""; }; - DE66F24508ABF03100323D32 /* SchedGraphCommon.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = SchedGraphCommon.h; sourceTree = ""; }; - DE66F24608ABF03100323D32 /* SelectionDAG.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = SelectionDAG.h; sourceTree = ""; }; - DE66F24708ABF03100323D32 /* SelectionDAGISel.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = SelectionDAGISel.h; sourceTree = ""; }; - DE66F24808ABF03100323D32 /* SelectionDAGNodes.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = SelectionDAGNodes.h; sourceTree = ""; }; - DE66F24B08ABF03100323D32 /* ValueTypes.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ValueTypes.h; sourceTree = ""; }; - DE66F24E08ABF03100323D32 /* alloca.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = alloca.h; sourceTree = ""; }; - DE66F25008ABF03100323D32 /* config.h.in */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = config.h.in; sourceTree = ""; }; - DE66F25108ABF03100323D32 /* Constant.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Constant.h; sourceTree = ""; }; - DE66F25208ABF03100323D32 /* Constants.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Constants.h; sourceTree = ""; }; - DE66F25408ABF03100323D32 /* Debugger.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Debugger.h; sourceTree = ""; }; - DE66F25508ABF03100323D32 /* InferiorProcess.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = InferiorProcess.h; sourceTree = ""; }; - DE66F25608ABF03100323D32 /* ProgramInfo.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ProgramInfo.h; sourceTree = ""; }; - DE66F25708ABF03100323D32 /* RuntimeInfo.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = RuntimeInfo.h; sourceTree = ""; }; - DE66F25808ABF03100323D32 /* SourceFile.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = SourceFile.h; sourceTree = ""; }; - DE66F25908ABF03100323D32 /* SourceLanguage.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = SourceLanguage.h; sourceTree = ""; }; - DE66F25A08ABF03100323D32 /* DerivedTypes.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = DerivedTypes.h; sourceTree = ""; }; - DE66F25C08ABF03100323D32 /* ExecutionEngine.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ExecutionEngine.h; sourceTree = ""; }; - DE66F25D08ABF03100323D32 /* GenericValue.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = GenericValue.h; sourceTree = ""; }; - DE66F25E08ABF03100323D32 /* Function.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Function.h; sourceTree = ""; }; - DE66F25F08ABF03100323D32 /* GlobalValue.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = GlobalValue.h; sourceTree = ""; }; - DE66F26008ABF03100323D32 /* GlobalVariable.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = GlobalVariable.h; sourceTree = ""; }; - DE66F26108ABF03100323D32 /* InstrTypes.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = InstrTypes.h; sourceTree = ""; }; - DE66F26208ABF03100323D32 /* Instruction.def */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = Instruction.def; sourceTree = ""; }; - DE66F26308ABF03100323D32 /* Instruction.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Instruction.h; sourceTree = ""; }; - DE66F26408ABF03100323D32 /* Instructions.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Instructions.h; sourceTree = ""; }; - DE66F26508ABF03100323D32 /* IntrinsicInst.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = IntrinsicInst.h; sourceTree = ""; }; - DE66F26608ABF03100323D32 /* Intrinsics.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Intrinsics.h; sourceTree = ""; }; - DE66F26708ABF03100323D32 /* Linker.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Linker.h; sourceTree = ""; }; - DE66F26808ABF03100323D32 /* Module.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Module.h; sourceTree = ""; }; - DE66F26908ABF03200323D32 /* ModuleProvider.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ModuleProvider.h; sourceTree = ""; }; - DE66F26A08ABF03200323D32 /* Pass.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Pass.h; sourceTree = ""; }; - DE66F26B08ABF03200323D32 /* PassAnalysisSupport.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = PassAnalysisSupport.h; sourceTree = ""; }; - DE66F26C08ABF03200323D32 /* PassManager.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = PassManager.h; sourceTree = ""; }; - DE66F26D08ABF03200323D32 /* PassSupport.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = PassSupport.h; sourceTree = ""; }; - DE66F27008ABF03200323D32 /* AIXDataTypesFix.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = AIXDataTypesFix.h; sourceTree = ""; }; - DE66F27108ABF03200323D32 /* Annotation.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Annotation.h; sourceTree = ""; }; - DE66F27208ABF03200323D32 /* CallSite.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CallSite.h; sourceTree = ""; }; - DE66F27308ABF03200323D32 /* Casting.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Casting.h; sourceTree = ""; }; - DE66F27408ABF03200323D32 /* CFG.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CFG.h; sourceTree = ""; }; - DE66F27508ABF03200323D32 /* CommandLine.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CommandLine.h; sourceTree = ""; }; - DE66F27708ABF03200323D32 /* ConstantRange.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ConstantRange.h; sourceTree = ""; }; - DE66F27908ABF03200323D32 /* DataTypes.h.in */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = DataTypes.h.in; sourceTree = ""; }; - DE66F27A08ABF03200323D32 /* Debug.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Debug.h; sourceTree = ""; }; - DE66F27B08ABF03200323D32 /* DOTGraphTraits.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = DOTGraphTraits.h; sourceTree = ""; }; - DE66F27C08ABF03200323D32 /* DynamicLinker.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = DynamicLinker.h; sourceTree = ""; }; - DE66F27D08ABF03200323D32 /* ELF.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ELF.h; sourceTree = ""; }; - DE66F27E08ABF03200323D32 /* FileUtilities.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = FileUtilities.h; sourceTree = ""; }; - DE66F27F08ABF03200323D32 /* GetElementPtrTypeIterator.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = GetElementPtrTypeIterator.h; sourceTree = ""; }; - DE66F28008ABF03200323D32 /* GraphWriter.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = GraphWriter.h; sourceTree = ""; }; - DE66F28108ABF03200323D32 /* InstIterator.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = InstIterator.h; sourceTree = ""; }; - DE66F28208ABF03200323D32 /* InstVisitor.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = InstVisitor.h; sourceTree = ""; }; - DE66F28308ABF03200323D32 /* LeakDetector.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = LeakDetector.h; sourceTree = ""; }; - DE66F28408ABF03200323D32 /* Mangler.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Mangler.h; sourceTree = ""; }; - DE66F28508ABF03200323D32 /* MathExtras.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = MathExtras.h; sourceTree = ""; }; - DE66F28608ABF03200323D32 /* MutexGuard.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = MutexGuard.h; sourceTree = ""; }; - DE66F28708ABF03200323D32 /* PassNameParser.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = PassNameParser.h; sourceTree = ""; }; - DE66F28808ABF03200323D32 /* PatternMatch.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = PatternMatch.h; sourceTree = ""; }; - DE66F28908ABF03200323D32 /* PluginLoader.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = PluginLoader.h; sourceTree = ""; }; - DE66F28A08ABF03200323D32 /* SlowOperationInformer.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = SlowOperationInformer.h; sourceTree = ""; }; - DE66F28B08ABF03200323D32 /* StableBasicBlockNumbering.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = StableBasicBlockNumbering.h; sourceTree = ""; }; - DE66F28C08ABF03200323D32 /* SystemUtils.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = SystemUtils.h; sourceTree = ""; }; - DE66F28E08ABF03200323D32 /* Timer.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Timer.h; sourceTree = ""; }; - DE66F29008ABF03200323D32 /* type_traits.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = type_traits.h; sourceTree = ""; }; - DE66F29308ABF03200323D32 /* SymbolTableListTraits.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = SymbolTableListTraits.h; sourceTree = ""; }; - DE66F29508ABF03200323D32 /* DynamicLibrary.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = DynamicLibrary.h; sourceTree = ""; }; - DE66F29608ABF03200323D32 /* LICENSE.TXT */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = LICENSE.TXT; sourceTree = ""; }; - DE66F29708ABF03200323D32 /* MappedFile.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = MappedFile.h; sourceTree = ""; }; - DE66F29808ABF03200323D32 /* Memory.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Memory.h; sourceTree = ""; }; - DE66F29908ABF03200323D32 /* Mutex.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Mutex.h; sourceTree = ""; }; - DE66F29A08ABF03200323D32 /* Path.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Path.h; sourceTree = ""; }; - DE66F29B08ABF03200323D32 /* Process.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Process.h; sourceTree = ""; }; - DE66F29C08ABF03200323D32 /* Program.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Program.h; sourceTree = ""; }; - DE66F29D08ABF03200323D32 /* Signals.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Signals.h; sourceTree = ""; }; - DE66F29E08ABF03200323D32 /* TimeValue.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = TimeValue.h; sourceTree = ""; }; - DE66F2A008ABF03200323D32 /* TargetRegisterInfo.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = TargetRegisterInfo.h; sourceTree = ""; }; - DE66F2A108ABF03200323D32 /* TargetData.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = TargetData.h; sourceTree = ""; }; - DE66F2A208ABF03200323D32 /* TargetFrameInfo.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = TargetFrameInfo.h; sourceTree = ""; }; - DE66F2A308ABF03200323D32 /* TargetInstrInfo.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = TargetInstrInfo.h; sourceTree = ""; }; - DE66F2A408ABF03200323D32 /* TargetJITInfo.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = TargetJITInfo.h; sourceTree = ""; }; - DE66F2A508ABF03200323D32 /* TargetLowering.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = TargetLowering.h; sourceTree = ""; }; - DE66F2A608ABF03200323D32 /* TargetMachine.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = TargetMachine.h; sourceTree = ""; }; - DE66F2A708ABF03200323D32 /* TargetMachineRegistry.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = TargetMachineRegistry.h; sourceTree = ""; }; - DE66F2A808ABF03200323D32 /* TargetOptions.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = TargetOptions.h; sourceTree = ""; }; - DE66F2AA08ABF03200323D32 /* TargetSubtarget.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = TargetSubtarget.h; sourceTree = ""; }; - DE66F2AC08ABF03200323D32 /* Instrumentation.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Instrumentation.h; sourceTree = ""; }; - DE66F2AD08ABF03200323D32 /* IPO.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = IPO.h; sourceTree = ""; }; - DE66F2AF08ABF03200323D32 /* Scalar.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Scalar.h; sourceTree = ""; }; - DE66F2B108ABF03200323D32 /* BasicBlockUtils.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = BasicBlockUtils.h; sourceTree = ""; }; - DE66F2B208ABF03200323D32 /* Cloning.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Cloning.h; sourceTree = ""; }; - DE66F2B308ABF03200323D32 /* FunctionUtils.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = FunctionUtils.h; sourceTree = ""; }; - DE66F2B408ABF03200323D32 /* Local.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Local.h; sourceTree = ""; }; - DE66F2B508ABF03200323D32 /* PromoteMemToReg.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = PromoteMemToReg.h; sourceTree = ""; }; - DE66F2B608ABF03200323D32 /* UnifyFunctionExitNodes.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = UnifyFunctionExitNodes.h; sourceTree = ""; }; - DE66F2B708ABF03200323D32 /* Type.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Type.h; sourceTree = ""; }; - DE66F2B808ABF03200323D32 /* Use.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Use.h; sourceTree = ""; }; - DE66F2B908ABF03200323D32 /* User.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = User.h; sourceTree = ""; }; - DE66F2BA08ABF03200323D32 /* Value.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Value.h; sourceTree = ""; }; - DE66F2CC08ABF14400323D32 /* BugDriver.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = BugDriver.cpp; sourceTree = ""; }; - DE66F2CD08ABF14400323D32 /* BugDriver.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = BugDriver.h; sourceTree = ""; }; - DE66F2CE08ABF14400323D32 /* bugpoint.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = bugpoint.cpp; sourceTree = ""; }; - DE66F2CF08ABF14400323D32 /* CrashDebugger.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CrashDebugger.cpp; sourceTree = ""; }; - DE66F2E208ABF14400323D32 /* ExecutionDriver.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ExecutionDriver.cpp; sourceTree = ""; }; - DE66F2E308ABF14400323D32 /* ExtractFunction.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ExtractFunction.cpp; sourceTree = ""; }; - DE66F2E408ABF14400323D32 /* ListReducer.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ListReducer.h; sourceTree = ""; }; - DE66F2E608ABF14400323D32 /* Miscompilation.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = Miscompilation.cpp; sourceTree = ""; }; - DE66F2E708ABF14400323D32 /* OptimizerDriver.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = OptimizerDriver.cpp; sourceTree = ""; }; - DE66F2E808ABF14400323D32 /* TestPasses.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = TestPasses.cpp; sourceTree = ""; }; - DE66F30008ABF14400323D32 /* llc.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = llc.cpp; path = llc/llc.cpp; sourceTree = ""; }; - DE66F30708ABF14400323D32 /* lli.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = lli.cpp; path = lli/lli.cpp; sourceTree = ""; }; - DE66F30E08ABF14400323D32 /* llvm-ar.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = "llvm-ar.cpp"; path = "llvm-ar/llvm-ar.cpp"; sourceTree = ""; }; - DE66F31508ABF14400323D32 /* llvm-as.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = "llvm-as.cpp"; path = "llvm-as/llvm-as.cpp"; sourceTree = ""; }; - DE66F31C08ABF14400323D32 /* llvm-bcanalyzer.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = "llvm-bcanalyzer.cpp"; path = "llvm-bcanalyzer/llvm-bcanalyzer.cpp"; sourceTree = ""; }; - DE66F31F08ABF14400323D32 /* CLICommand.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CLICommand.h; sourceTree = ""; }; - DE66F32008ABF14400323D32 /* CLIDebugger.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CLIDebugger.cpp; sourceTree = ""; }; - DE66F32108ABF14400323D32 /* CLIDebugger.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CLIDebugger.h; sourceTree = ""; }; - DE66F32208ABF14400323D32 /* Commands.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = Commands.cpp; sourceTree = ""; }; - DE66F32B08ABF14400323D32 /* llvm-db.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = "llvm-db.cpp"; sourceTree = ""; }; - DE66F33208ABF14400323D32 /* llvm-dis.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = "llvm-dis.cpp"; path = "llvm-dis/llvm-dis.cpp"; sourceTree = ""; }; - DE66F33908ABF14400323D32 /* llvm-extract.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = "llvm-extract.cpp"; path = "llvm-extract/llvm-extract.cpp"; sourceTree = ""; }; - DE66F34208ABF14400323D32 /* llvm-ld.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = "llvm-ld.cpp"; sourceTree = ""; }; - DE66F34408ABF14400323D32 /* Optimize.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = Optimize.cpp; sourceTree = ""; }; - DE66F34A08ABF14400323D32 /* llvm-link.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = "llvm-link.cpp"; path = "llvm-link/llvm-link.cpp"; sourceTree = ""; }; - DE66F35108ABF14400323D32 /* llvm-nm.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = "llvm-nm.cpp"; path = "llvm-nm/llvm-nm.cpp"; sourceTree = ""; }; - DE66F35808ABF14500323D32 /* llvm-prof.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = "llvm-prof.cpp"; path = "llvm-prof/llvm-prof.cpp"; sourceTree = ""; }; - DE66F35F08ABF14500323D32 /* llvm-ranlib.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = "llvm-ranlib.cpp"; path = "llvm-ranlib/llvm-ranlib.cpp"; sourceTree = ""; }; - DE66F36908ABF14500323D32 /* c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = c; sourceTree = ""; }; - DE66F36A08ABF14500323D32 /* CompilerDriver.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CompilerDriver.cpp; sourceTree = ""; }; - DE66F36B08ABF14500323D32 /* CompilerDriver.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CompilerDriver.h; sourceTree = ""; }; - DE66F36D08ABF14500323D32 /* ConfigLexer.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ConfigLexer.h; sourceTree = ""; }; - DE66F36E08ABF14500323D32 /* ConfigLexer.l */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.lex; path = ConfigLexer.l; sourceTree = ""; }; - DE66F36F08ABF14500323D32 /* Configuration.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = Configuration.cpp; sourceTree = ""; }; - DE66F37008ABF14500323D32 /* Configuration.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Configuration.h; sourceTree = ""; }; - DE66F37108ABF14500323D32 /* cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = cpp; sourceTree = ""; }; - DE66F37D08ABF14500323D32 /* ll */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = ll; sourceTree = ""; }; - DE66F37E08ABF14500323D32 /* llvmc.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = llvmc.cpp; sourceTree = ""; }; - DE66F38C08ABF35300323D32 /* CREDITS.TXT */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; name = CREDITS.TXT; path = ../CREDITS.TXT; sourceTree = SOURCE_ROOT; }; - DE66F38F08ABF35C00323D32 /* AliasAnalysis.html */ = {isa = PBXFileReference; explicitFileType = text.html.documentation; fileEncoding = 30; path = AliasAnalysis.html; sourceTree = ""; }; - DE66F39008ABF35C00323D32 /* Bugpoint.html */ = {isa = PBXFileReference; explicitFileType = text.html.documentation; fileEncoding = 30; path = Bugpoint.html; sourceTree = ""; }; - DE66F39208ABF35C00323D32 /* GCCFEBuildInstrs.html */ = {isa = PBXFileReference; explicitFileType = text.html.documentation; fileEncoding = 30; path = GCCFEBuildInstrs.html; sourceTree = ""; }; - DE66F39308ABF35C00323D32 /* CodeGenerator.html */ = {isa = PBXFileReference; explicitFileType = text.html.documentation; fileEncoding = 30; path = CodeGenerator.html; sourceTree = ""; }; - DE66F39408ABF35C00323D32 /* CodingStandards.html */ = {isa = PBXFileReference; explicitFileType = text.html.documentation; fileEncoding = 30; path = CodingStandards.html; sourceTree = ""; }; - DE66F39808ABF35C00323D32 /* bugpoint.pod */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = bugpoint.pod; sourceTree = ""; }; - DE66F39E08ABF35C00323D32 /* index.html */ = {isa = PBXFileReference; explicitFileType = text.html.documentation; fileEncoding = 30; path = index.html; sourceTree = ""; }; - DE66F39F08ABF35C00323D32 /* llc.pod */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = llc.pod; sourceTree = ""; }; - DE66F3A008ABF35C00323D32 /* lli.pod */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = lli.pod; sourceTree = ""; }; - DE66F3A108ABF35C00323D32 /* llvm-ar.pod */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = "llvm-ar.pod"; sourceTree = ""; }; - DE66F3A208ABF35C00323D32 /* llvm-as.pod */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = "llvm-as.pod"; sourceTree = ""; }; - DE66F3A308ABF35C00323D32 /* llvm-bcanalyzer.pod */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = "llvm-bcanalyzer.pod"; sourceTree = ""; }; - DE66F3A408ABF35C00323D32 /* llvm-db.pod */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = "llvm-db.pod"; sourceTree = ""; }; - DE66F3A508ABF35C00323D32 /* llvm-dis.pod */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = "llvm-dis.pod"; sourceTree = ""; }; - DE66F3A608ABF35C00323D32 /* llvm-extract.pod */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = "llvm-extract.pod"; sourceTree = ""; }; - DE66F3A708ABF35C00323D32 /* llvm-ld.pod */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = "llvm-ld.pod"; sourceTree = ""; }; - DE66F3A808ABF35C00323D32 /* llvm-link.pod */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = "llvm-link.pod"; sourceTree = ""; }; - DE66F3A908ABF35C00323D32 /* llvm-nm.pod */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = "llvm-nm.pod"; sourceTree = ""; }; - DE66F3AA08ABF35C00323D32 /* llvm-prof.pod */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = "llvm-prof.pod"; sourceTree = ""; }; - DE66F3AB08ABF35C00323D32 /* llvm-ranlib.pod */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = "llvm-ranlib.pod"; sourceTree = ""; }; - DE66F3AC08ABF35C00323D32 /* llvmc.pod */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = llvmc.pod; sourceTree = ""; }; - DE66F3AD08ABF35C00323D32 /* llvmgcc.pod */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = llvmgcc.pod; sourceTree = ""; }; - DE66F3AE08ABF35C00323D32 /* llvmgxx.pod */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = llvmgxx.pod; sourceTree = ""; }; - DE66F3AF08ABF35C00323D32 /* Makefile */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.make; path = Makefile; sourceTree = ""; }; - DE66F3B408ABF35D00323D32 /* manpage.css */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = manpage.css; sourceTree = ""; }; - DE66F3B508ABF35D00323D32 /* opt.pod */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = opt.pod; sourceTree = ""; }; - DE66F3B808ABF35D00323D32 /* stkrc.pod */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = stkrc.pod; sourceTree = ""; }; - DE66F3B908ABF35D00323D32 /* CommandLine.html */ = {isa = PBXFileReference; explicitFileType = text.html.documentation; fileEncoding = 30; path = CommandLine.html; sourceTree = ""; }; - DE66F3BA08ABF35D00323D32 /* CompilerDriver.html */ = {isa = PBXFileReference; explicitFileType = text.html.documentation; fileEncoding = 30; path = CompilerDriver.html; sourceTree = ""; }; - DE66F3BB08ABF35D00323D32 /* CompilerWriterInfo.html */ = {isa = PBXFileReference; explicitFileType = text.html.documentation; fileEncoding = 30; path = CompilerWriterInfo.html; sourceTree = ""; }; - DE66F3BD08ABF35D00323D32 /* doxygen.cfg.in */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = doxygen.cfg.in; sourceTree = ""; }; - DE66F3BE08ABF35D00323D32 /* doxygen.css */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = doxygen.css; sourceTree = ""; }; - DE66F3BF08ABF35D00323D32 /* doxygen.footer */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = doxygen.footer; sourceTree = ""; }; - DE66F3C008ABF35D00323D32 /* doxygen.header */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = doxygen.header; sourceTree = ""; }; - DE66F3C108ABF35D00323D32 /* doxygen.intro */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = doxygen.intro; sourceTree = ""; }; - DE66F3C208ABF35D00323D32 /* ExtendingLLVM.html */ = {isa = PBXFileReference; explicitFileType = text.html.documentation; fileEncoding = 30; path = ExtendingLLVM.html; sourceTree = ""; }; - DE66F3C308ABF35D00323D32 /* FAQ.html */ = {isa = PBXFileReference; explicitFileType = text.html.documentation; fileEncoding = 30; path = FAQ.html; sourceTree = ""; }; - DE66F3C408ABF35D00323D32 /* GarbageCollection.html */ = {isa = PBXFileReference; explicitFileType = text.html.documentation; fileEncoding = 30; path = GarbageCollection.html; sourceTree = ""; }; - DE66F3C508ABF35D00323D32 /* GettingStarted.html */ = {isa = PBXFileReference; explicitFileType = text.html.documentation; fileEncoding = 30; path = GettingStarted.html; sourceTree = ""; }; - DE66F3C608ABF35D00323D32 /* GettingStartedVS.html */ = {isa = PBXFileReference; explicitFileType = text.html.documentation; fileEncoding = 30; path = GettingStartedVS.html; sourceTree = ""; }; - DE66F3E408ABF35D00323D32 /* HowToSubmitABug.html */ = {isa = PBXFileReference; explicitFileType = text.html.documentation; fileEncoding = 30; path = HowToSubmitABug.html; sourceTree = ""; }; - DE66F3E608ABF35D00323D32 /* Debugging.gif */ = {isa = PBXFileReference; lastKnownFileType = image.gif; path = Debugging.gif; sourceTree = ""; }; - DE66F3E708ABF35D00323D32 /* libdeps.gif */ = {isa = PBXFileReference; lastKnownFileType = image.gif; path = libdeps.gif; sourceTree = ""; }; - DE66F3E808ABF35D00323D32 /* lines.gif */ = {isa = PBXFileReference; lastKnownFileType = image.gif; path = lines.gif; sourceTree = ""; }; - DE66F3E908ABF35D00323D32 /* objdeps.gif */ = {isa = PBXFileReference; lastKnownFileType = image.gif; path = objdeps.gif; sourceTree = ""; }; - DE66F3EA08ABF35D00323D32 /* venusflytrap.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = venusflytrap.jpg; sourceTree = ""; }; - DE66F3EB08ABF35D00323D32 /* index.html */ = {isa = PBXFileReference; explicitFileType = text.html.documentation; fileEncoding = 30; path = index.html; sourceTree = ""; }; - DE66F3EC08ABF35D00323D32 /* LangRef.html */ = {isa = PBXFileReference; explicitFileType = text.html.documentation; fileEncoding = 30; path = LangRef.html; sourceTree = ""; }; - DE66F3ED08ABF35D00323D32 /* Lexicon.html */ = {isa = PBXFileReference; explicitFileType = text.html.documentation; fileEncoding = 30; path = Lexicon.html; sourceTree = ""; }; - DE66F3EE08ABF35D00323D32 /* llvm.css */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = llvm.css; sourceTree = ""; }; - DE66F3F108ABF35D00323D32 /* MakefileGuide.html */ = {isa = PBXFileReference; explicitFileType = text.html.documentation; fileEncoding = 30; path = MakefileGuide.html; sourceTree = ""; }; - DE66F3F208ABF35D00323D32 /* ProgrammersManual.html */ = {isa = PBXFileReference; explicitFileType = text.html.documentation; fileEncoding = 30; path = ProgrammersManual.html; sourceTree = ""; }; - DE66F3F308ABF35D00323D32 /* Projects.html */ = {isa = PBXFileReference; explicitFileType = text.html.documentation; fileEncoding = 30; path = Projects.html; sourceTree = ""; }; - DE66F3F408ABF35D00323D32 /* ReleaseNotes.html */ = {isa = PBXFileReference; explicitFileType = text.html.documentation; fileEncoding = 30; path = ReleaseNotes.html; sourceTree = ""; }; - DE66F3F508ABF35D00323D32 /* SourceLevelDebugging.html */ = {isa = PBXFileReference; explicitFileType = text.html.documentation; fileEncoding = 30; path = SourceLevelDebugging.html; sourceTree = ""; }; - DE66F3F708ABF35D00323D32 /* SystemLibrary.html */ = {isa = PBXFileReference; explicitFileType = text.html.documentation; fileEncoding = 30; path = SystemLibrary.html; sourceTree = ""; }; - DE66F3F808ABF35D00323D32 /* TableGenFundamentals.html */ = {isa = PBXFileReference; explicitFileType = text.html.documentation; fileEncoding = 30; path = TableGenFundamentals.html; sourceTree = ""; }; - DE66F3F908ABF35D00323D32 /* TestingGuide.html */ = {isa = PBXFileReference; explicitFileType = text.html.documentation; fileEncoding = 30; path = TestingGuide.html; sourceTree = ""; }; - DE66F3FA08ABF35D00323D32 /* UsingLibraries.html */ = {isa = PBXFileReference; explicitFileType = text.html.documentation; fileEncoding = 30; path = UsingLibraries.html; sourceTree = ""; }; - DE66F3FB08ABF35D00323D32 /* WritingAnLLVMBackend.html */ = {isa = PBXFileReference; explicitFileType = text.html.documentation; fileEncoding = 30; path = WritingAnLLVMBackend.html; sourceTree = ""; }; - DE66F3FC08ABF35D00323D32 /* WritingAnLLVMPass.html */ = {isa = PBXFileReference; explicitFileType = text.html.documentation; fileEncoding = 30; path = WritingAnLLVMPass.html; sourceTree = ""; }; - DE66F40E08ABF37000323D32 /* fibonacci.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = fibonacci.cpp; path = Fibonacci/fibonacci.cpp; sourceTree = ""; }; - DE66F41508ABF37000323D32 /* HowToUseJIT.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = HowToUseJIT.cpp; path = HowToUseJIT/HowToUseJIT.cpp; sourceTree = ""; }; - DE66F41E08ABF37000323D32 /* ModuleMaker.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = ModuleMaker.cpp; path = ModuleMaker/ModuleMaker.cpp; sourceTree = ""; }; - DE66F42608ABF37000323D32 /* ParallelJIT.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = ParallelJIT.cpp; path = ParallelJIT/ParallelJIT.cpp; sourceTree = ""; }; - DE694D9F08B51E0C0039C106 /* ScheduleDAG.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ScheduleDAG.cpp; sourceTree = ""; }; - DE81704008CFB44D0093BDEF /* fpcmp.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = fpcmp.cpp; path = fpcmp/fpcmp.cpp; sourceTree = ""; }; - DE81704F08CFB44D0093BDEF /* NightlyTest.gnuplot */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = NightlyTest.gnuplot; sourceTree = ""; }; - DE81705108CFB44D0093BDEF /* NightlyTestTemplate.html */ = {isa = PBXFileReference; explicitFileType = text.html.documentation; fileEncoding = 30; path = NightlyTestTemplate.html; sourceTree = ""; }; - DE81705908CFB44D0093BDEF /* AsmWriterEmitter.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = AsmWriterEmitter.cpp; sourceTree = ""; }; - DE81705A08CFB44D0093BDEF /* AsmWriterEmitter.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = AsmWriterEmitter.h; sourceTree = ""; }; - DE81705B08CFB44D0093BDEF /* CodeEmitterGen.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CodeEmitterGen.cpp; sourceTree = ""; }; - DE81705C08CFB44D0093BDEF /* CodeEmitterGen.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CodeEmitterGen.h; sourceTree = ""; }; - DE81705D08CFB44D0093BDEF /* CodeGenInstruction.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CodeGenInstruction.h; sourceTree = ""; }; - DE81705E08CFB44D0093BDEF /* CodeGenRegisters.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CodeGenRegisters.h; sourceTree = ""; }; - DE81705F08CFB44D0093BDEF /* CodeGenTarget.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CodeGenTarget.cpp; sourceTree = ""; }; - DE81706008CFB44D0093BDEF /* CodeGenTarget.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CodeGenTarget.h; sourceTree = ""; }; - DE81706708CFB44D0093BDEF /* DAGISelEmitter.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = DAGISelEmitter.cpp; sourceTree = ""; }; - DE81706808CFB44D0093BDEF /* DAGISelEmitter.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = DAGISelEmitter.h; sourceTree = ""; }; - DE81708908CFB44D0093BDEF /* InstrInfoEmitter.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = InstrInfoEmitter.cpp; sourceTree = ""; }; - DE81708A08CFB44D0093BDEF /* InstrInfoEmitter.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = InstrInfoEmitter.h; sourceTree = ""; }; - DE81708E08CFB44D0093BDEF /* Record.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = Record.cpp; sourceTree = ""; }; - DE81708F08CFB44D0093BDEF /* Record.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Record.h; sourceTree = ""; }; - DE81709008CFB44D0093BDEF /* RegisterInfoEmitter.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = RegisterInfoEmitter.cpp; sourceTree = ""; }; - DE81709108CFB44D0093BDEF /* RegisterInfoEmitter.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = RegisterInfoEmitter.h; sourceTree = ""; }; - DE8170AA08CFB44D0093BDEF /* TableGen.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = TableGen.cpp; sourceTree = ""; }; - DE8170AB08CFB44D0093BDEF /* TableGenBackend.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = TableGenBackend.cpp; sourceTree = ""; }; - DE8170AC08CFB44D0093BDEF /* TableGenBackend.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = TableGenBackend.h; sourceTree = ""; }; - DEFAB19D0959E9A100E0AB42 /* DwarfWriter.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = DwarfWriter.h; path = ../include/llvm/CodeGen/DwarfWriter.h; sourceTree = SOURCE_ROOT; }; - F22627320DAE34D10008F441 /* index.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = index.html; sourceTree = ""; }; - F22627330DAE34D20008F441 /* JITTutorial1.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = JITTutorial1.html; sourceTree = ""; }; - F22627340DAE34D20008F441 /* JITTutorial2-1.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "JITTutorial2-1.png"; sourceTree = ""; }; - F22627350DAE34D20008F441 /* JITTutorial2.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = JITTutorial2.html; sourceTree = ""; }; - F22627360DAE34D20008F441 /* LangImpl1.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = LangImpl1.html; sourceTree = ""; }; - F22627370DAE34D20008F441 /* LangImpl2.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = LangImpl2.html; sourceTree = ""; }; - F22627380DAE34D20008F441 /* LangImpl3.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = LangImpl3.html; sourceTree = ""; }; - F22627390DAE34D20008F441 /* LangImpl4.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = LangImpl4.html; sourceTree = ""; }; - F226273A0DAE34D20008F441 /* LangImpl5-cfg.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "LangImpl5-cfg.png"; sourceTree = ""; }; - F226273B0DAE34D20008F441 /* LangImpl5.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = LangImpl5.html; sourceTree = ""; }; - F226273C0DAE34D20008F441 /* LangImpl6.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = LangImpl6.html; sourceTree = ""; }; - F226273D0DAE34D20008F441 /* LangImpl7.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = LangImpl7.html; sourceTree = ""; }; - F226273E0DAE34D20008F441 /* LangImpl8.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = LangImpl8.html; sourceTree = ""; }; - F226273F0DAE34D20008F441 /* Makefile */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.make; path = Makefile; sourceTree = ""; }; - F22627400DAE34D20008F441 /* OCamlLangImpl1.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = OCamlLangImpl1.html; sourceTree = ""; }; - F22627410DAE34D20008F441 /* OCamlLangImpl2.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = OCamlLangImpl2.html; sourceTree = ""; }; - F22627420DAE34D20008F441 /* OCamlLangImpl3.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = OCamlLangImpl3.html; sourceTree = ""; }; - F22627430DAE34D20008F441 /* OCamlLangImpl4.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = OCamlLangImpl4.html; sourceTree = ""; }; - F22627440DAE34D20008F441 /* OCamlLangImpl5.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = OCamlLangImpl5.html; sourceTree = ""; }; - F22627450DAE34D20008F441 /* OCamlLangImpl6.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = OCamlLangImpl6.html; sourceTree = ""; }; - F22627460DAE34D20008F441 /* OCamlLangImpl7.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = OCamlLangImpl7.html; sourceTree = ""; }; - F22761DF0DAD09CD003D8065 /* BrainF.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = BrainF.cpp; path = BrainF/BrainF.cpp; sourceTree = ""; }; - F22761E00DAD09CD003D8065 /* BrainF.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = BrainF.h; path = BrainF/BrainF.h; sourceTree = ""; }; - F22761E10DAD09CD003D8065 /* BrainFDriver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = BrainFDriver.cpp; path = BrainF/BrainFDriver.cpp; sourceTree = ""; }; - F27C8CE90DAD2EF900A33844 /* IRBuilder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IRBuilder.h; sourceTree = ""; }; - F27C8CFF0DAD307700A33844 /* ShadowStackCollector.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ShadowStackCollector.cpp; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXGroup section */ - 08FB7794FE84155DC02AAC07 /* LLVM */ = { - isa = PBXGroup; - children = ( - DE66F1E908ABF03100323D32 /* include/llvm */, - CF8F1B480B64F7AB00BB4199 /* include/llvm-c */, - DE66ECBD08ABEC0700323D32 /* lib/Analysis */, - 9FE450DE0C77ABE400C4FEA4 /* lib/Archive */, - DE66EC8808ABEAC900323D32 /* lib/AsmParser */, - 9F68EB030C77AD2C004AA152 /* lib/Bitcode */, - DE66ED3E08ABEC2A00323D32 /* lib/CodeGen */, - DE66ED9A08ABEC7200323D32 /* lib/Debugger */, - DE66EDBF08ABEC8F00323D32 /* lib/ExecutionEngine */, - DE66EDEB08ABEDD300323D32 /* lib/Linker */, - DE66EDFB08ABEDE600323D32 /* lib/Support */, - DE66EE4908ABEE3400323D32 /* lib/System */, - DE66EE9608ABEE5D00323D32 /* lib/Target */, - DE66F0E108ABEFB300323D32 /* lib/Transforms */, - DE66EC7508ABE8EF00323D32 /* lib/VMCore */, - DE66F2BD08ABF14400323D32 /* tools */, - DE816FAC08CFB44C0093BDEF /* utils */, - DE66F38D08ABF35C00323D32 /* docs */, - 9FD3E56D0CA0116100E54D15 /* bindings */, - 9F7C2B690CB9496B00498408 /* test */, - DE66F3FD08ABF37000323D32 /* examples */, - DE66F38C08ABF35300323D32 /* CREDITS.TXT */, - CFD99AA80AFE827B0068D19C /* LICENSE.TXT */, - CFD99AAD0AFE827B0068D19C /* README.txt */, - 721CA1750D0B44D200D5004F /* Products */, - ); - name = LLVM; - sourceTree = ""; - }; - 721CA1750D0B44D200D5004F /* Products */ = { - isa = PBXGroup; - children = ( - ); - name = Products; - sourceTree = ""; - }; - 9F4B0E5D0D0E02580061F270 /* bitreader */ = { - isa = PBXGroup; - children = ( - 9F4B0E5E0D0E02580061F270 /* bitreader_ocaml.c */, - 9F4B0E5F0D0E02580061F270 /* llvm_bitreader.ml */, - 9F4B0E600D0E02580061F270 /* llvm_bitreader.mli */, - ); - path = bitreader; - sourceTree = ""; - }; - 9F502ACD0D1D8CA3007939DF /* executionengine */ = { - isa = PBXGroup; - children = ( - 9F502ADB0D1D8CA3007939DF /* executionengine_ocaml.c */, - 9F502ADC0D1D8CA3007939DF /* llvm_executionengine.ml */, - 9F502ADD0D1D8CA3007939DF /* llvm_executionengine.mli */, - ); - path = executionengine; - sourceTree = ""; - }; - 9F68EB030C77AD2C004AA152 /* lib/Bitcode */ = { - isa = PBXGroup; - children = ( - 9F68EB050C77AD2C004AA152 /* Reader */, - 9F68EB110C77AD2C004AA152 /* Writer */, - ); - name = lib/Bitcode; - path = ../lib/Bitcode; - sourceTree = SOURCE_ROOT; - }; - 9F68EB050C77AD2C004AA152 /* Reader */ = { - isa = PBXGroup; - children = ( - 35A9CDF00CD0F6D5008ABC1D /* Deserialize.cpp */, - 9F4B0E8D0D0E05ED0061F270 /* DeserializeAPFloat.cpp */, - 354CF6D10CD299440059AF3E /* DeserializeAPInt.cpp */, - 9F68EB060C77AD2C004AA152 /* BitcodeReader.cpp */, - 9F68EB070C77AD2C004AA152 /* BitcodeReader.h */, - 9F4B0E8C0D0E05ED0061F270 /* BitReader.cpp */, - ); - path = Reader; - sourceTree = ""; - }; - 9F68EB110C77AD2C004AA152 /* Writer */ = { - isa = PBXGroup; - children = ( - 354CF6D20CD2994D0059AF3E /* SerializeAPInt.cpp */, - 9FD3E5920CA012B300E54D15 /* BitWriter.cpp */, - 9F68EB120C77AD2C004AA152 /* BitcodeWriter.cpp */, - 9F68EB130C77AD2C004AA152 /* BitcodeWriterPass.cpp */, - 9F68EB250C77AD2C004AA152 /* ValueEnumerator.cpp */, - 9F68EB260C77AD2C004AA152 /* ValueEnumerator.h */, - 35A9CDF10CD0F6E1008ABC1D /* Serialize.cpp */, - ); - path = Writer; - sourceTree = ""; - }; - 9F7040170D8D72FF00FD06FF /* transforms */ = { - isa = PBXGroup; - children = ( - 9F7040190D8D730A00FD06FF /* scalar */, - ); - name = transforms; - sourceTree = ""; - }; - 9F7040190D8D730A00FD06FF /* scalar */ = { - isa = PBXGroup; - children = ( - 9F70401A0D8D732400FD06FF /* llvm_scalar_opts.ml */, - 9F70401B0D8D732400FD06FF /* llvm_scalar_opts.mli */, - 9F70401E0D8D735E00FD06FF /* scalar_opts_ocaml.c */, - ); - name = scalar; - sourceTree = ""; - }; - 9F77937F0C73C54C00551F9C /* Bitcode */ = { - isa = PBXGroup; - children = ( - 9F7793800C73C54C00551F9C /* Archive.h */, - 9F7793810C73C54C00551F9C /* BitCodes.h */, - 9F7793820C73C54C00551F9C /* BitstreamReader.h */, - 9F7793830C73C54C00551F9C /* BitstreamWriter.h */, - 9F7793840C73C54C00551F9C /* LLVMBitCodes.h */, - 9F7793850C73C54C00551F9C /* ReaderWriter.h */, - 35A9CDEE0CD0F6AF008ABC1D /* Serialization.h */, - 35A9CDEF0CD0F6AF008ABC1D /* Serialize.h */, - 35A9CDED0CD0F6AF008ABC1D /* Deserialize.h */, - ); - path = Bitcode; - sourceTree = ""; - }; - 9F7794120C73CB6100551F9C /* Mips */ = { - isa = PBXGroup; - children = ( - 9F7794140C73CB6100551F9C /* Mips.h */, - 9F7794150C73CB6100551F9C /* Mips.td */, - 9F7794160C73CB6100551F9C /* MipsAsmPrinter.cpp */, - 9F7794170C73CB6100551F9C /* MipsCallingConv.td */, - 9F7794180C73CB6100551F9C /* MipsInstrFormats.td */, - 9F7794190C73CB6100551F9C /* MipsInstrInfo.cpp */, - 9F77941A0C73CB6100551F9C /* MipsInstrInfo.h */, - 9F77941B0C73CB6100551F9C /* MipsInstrInfo.td */, - 9F77941C0C73CB6100551F9C /* MipsISelDAGToDAG.cpp */, - 9F77941D0C73CB6100551F9C /* MipsISelLowering.cpp */, - 9F77941E0C73CB6100551F9C /* MipsISelLowering.h */, - 9F77941F0C73CB6100551F9C /* MipsMachineFunction.h */, - 9F7794200C73CB6100551F9C /* MipsRegisterInfo.cpp */, - 9F7794210C73CB6100551F9C /* MipsRegisterInfo.h */, - 9F7794220C73CB6100551F9C /* MipsRegisterInfo.td */, - 9F7794230C73CB6100551F9C /* MipsSubtarget.cpp */, - 9F7794240C73CB6100551F9C /* MipsSubtarget.h */, - 9F7794250C73CB6100551F9C /* MipsTargetAsmInfo.cpp */, - 9F7794260C73CB6100551F9C /* MipsTargetAsmInfo.h */, - 9F7794270C73CB6100551F9C /* MipsTargetMachine.cpp */, - 9F7794280C73CB6100551F9C /* MipsTargetMachine.h */, - ); - path = Mips; - sourceTree = ""; - }; - 9F7794290C73CB7900551F9C /* MSIL */ = { - isa = PBXGroup; - children = ( - 9F77942F0C73CB7900551F9C /* MSILWriter.cpp */, - 9F7794300C73CB7900551F9C /* MSILWriter.h */, - ); - path = MSIL; - sourceTree = ""; - }; - 9F7C240B0CB81ECD00498408 /* analysis */ = { - isa = PBXGroup; - children = ( - 9F7C240C0CB81ECD00498408 /* analysis_ocaml.c */, - 9F7C240D0CB81ECD00498408 /* llvm_analysis.ml */, - 9F7C240E0CB81ECD00498408 /* llvm_analysis.mli */, - ); - path = analysis; - sourceTree = ""; - }; - 9F7C2B690CB9496B00498408 /* test */ = { - isa = PBXGroup; - children = ( - 9F7C2C4B0CB9496C00498408 /* Bindings */, - ); - name = test; - path = ../test; - sourceTree = SOURCE_ROOT; - }; - 9F7C2C4B0CB9496C00498408 /* Bindings */ = { - isa = PBXGroup; - children = ( - 9F7C2C4C0CB9496C00498408 /* Ocaml */, - ); - path = Bindings; - sourceTree = ""; - }; - 9F7C2C4C0CB9496C00498408 /* Ocaml */ = { - isa = PBXGroup; - children = ( - 9F7C2C4F0CB9496C00498408 /* analysis.ml */, - 9F6B2CC00D0F6E56000F00FD /* bitreader.ml */, - 9F7C2C520CB9496C00498408 /* bitwriter.ml */, - 9F502AEC0D1D8CF8007939DF /* executionengine.ml */, - 9FEDD6140D8D7C3B009F6DF1 /* scalar_opts.ml */, - 9FEDD6BD0D8D8426009F6DF1 /* target.ml */, - 9F7C2C5D0CB9496C00498408 /* vmcore.ml */, - ); - path = Ocaml; - sourceTree = ""; - }; - 9FA638E90C77B252007F12AE /* IPO */ = { - isa = PBXGroup; - children = ( - 9FA638EA0C77B252007F12AE /* InlinerPass.h */, - ); - path = IPO; - sourceTree = ""; - }; - 9FD3E56D0CA0116100E54D15 /* bindings */ = { - isa = PBXGroup; - children = ( - 9FD3E56F0CA0116100E54D15 /* ocaml */, - ); - name = bindings; - path = ../bindings; - sourceTree = SOURCE_ROOT; - }; - 9FD3E56F0CA0116100E54D15 /* ocaml */ = { - isa = PBXGroup; - children = ( - 9F502ACD0D1D8CA3007939DF /* executionengine */, - 9F7C240B0CB81ECD00498408 /* analysis */, - 9F4B0E5D0D0E02580061F270 /* bitreader */, - 9FD3E5700CA0116100E54D15 /* bitwriter */, - 9FD3E57A0CA0116100E54D15 /* llvm */, - 9FEDD6C00D8D844E009F6DF1 /* target */, - 9F7040170D8D72FF00FD06FF /* transforms */, - ); - path = ocaml; - sourceTree = ""; - }; - 9FD3E5700CA0116100E54D15 /* bitwriter */ = { - isa = PBXGroup; - children = ( - 9FD3E5710CA0116100E54D15 /* bitwriter_ocaml.c */, - 9FD3E5720CA0116100E54D15 /* llvm_bitwriter.ml */, - 9FD3E5730CA0116100E54D15 /* llvm_bitwriter.mli */, - ); - path = bitwriter; - sourceTree = ""; - }; - 9FD3E57A0CA0116100E54D15 /* llvm */ = { - isa = PBXGroup; - children = ( - 9FD3E57B0CA0116100E54D15 /* llvm.ml */, - 9FD3E57C0CA0116100E54D15 /* llvm.mli */, - 9FD3E57D0CA0116100E54D15 /* llvm_ocaml.c */, - ); - path = llvm; - sourceTree = ""; - }; - 9FE450DE0C77ABE400C4FEA4 /* lib/Archive */ = { - isa = PBXGroup; - children = ( - 9FE450DF0C77ABE400C4FEA4 /* Archive.cpp */, - 9FE450E00C77ABE400C4FEA4 /* ArchiveInternals.h */, - 9FE450E10C77ABE400C4FEA4 /* ArchiveReader.cpp */, - 9FE450E20C77ABE400C4FEA4 /* ArchiveWriter.cpp */, - ); - name = lib/Archive; - path = ../lib/Archive; - sourceTree = SOURCE_ROOT; - }; - 9FEDD5F00D8D73AB009F6DF1 /* Transforms */ = { - isa = PBXGroup; - children = ( - 9FEDD5F10D8D73AB009F6DF1 /* Scalar.h */, - ); - path = Transforms; - sourceTree = ""; - }; - 9FEDD6C00D8D844E009F6DF1 /* target */ = { - isa = PBXGroup; - children = ( - 9FEDD6C10D8D844E009F6DF1 /* llvm_target.ml */, - 9FEDD6C20D8D844E009F6DF1 /* llvm_target.mli */, - 9FEDD6C40D8D844E009F6DF1 /* target_ocaml.c */, - ); - path = target; - sourceTree = ""; - }; - CF8F1B480B64F7AB00BB4199 /* include/llvm-c */ = { - isa = PBXGroup; - children = ( - 9F7C23E50CB81C2100498408 /* Analysis.h */, - 9F5B90E70D0DF19100CDFDEA /* BitReader.h */, - 9FD3E58D0CA0125F00E54D15 /* BitWriter.h */, - 9FD3E58E0CA0125F00E54D15 /* Core.h */, - 9FEB8C550D1CD1E200EE46BC /* ExecutionEngine.h */, - CF8F1B490B64F7AB00BB4199 /* LinkTimeOptimizer.h */, - 9FEDD6BB0D8D8408009F6DF1 /* lto.h */, - 9FEDD6B80D8D83EC009F6DF1 /* Target.h */, - 9FEDD5F00D8D73AB009F6DF1 /* Transforms */, - ); - name = "include/llvm-c"; - path = "../include/llvm-c"; - sourceTree = SOURCE_ROOT; - }; - CF8F1B5E0B64FADA00BB4199 /* llvm-upgrade */ = { - isa = PBXGroup; - children = ( - CF8F1B680B64FADA00BB4199 /* llvm-upgrade.cpp */, - CF8F1B720B64FADA00BB4199 /* UpgradeInternals.h */, - CF8F1B750B64FADA00BB4199 /* UpgradeLexer.l */, - CF8F1B7C0B64FADA00BB4199 /* UpgradeParser.y */, - ); - path = "llvm-upgrade"; - sourceTree = ""; - }; - CF8F1B7E0B64FADA00BB4199 /* llvm2cpp */ = { - isa = PBXGroup; - children = ( - CF8F1B7F0B64FADA00BB4199 /* CppWriter.cpp */, - CF8F1B800B64FADA00BB4199 /* CppWriter.h */, - CF8F1B870B64FADA00BB4199 /* llvm2cpp.cpp */, - ); - path = llvm2cpp; - sourceTree = ""; - }; - CF8F1B960B64FB7F00BB4199 /* lto */ = { - isa = PBXGroup; - children = ( - CF8F1B9D0B64FB7F00BB4199 /* lto-c.cpp */, - CF8F1B9E0B64FB7F00BB4199 /* lto.cpp */, - ); - path = lto; - sourceTree = ""; - }; - CF8F1BAB0B64FB8000BB4199 /* opt */ = { - isa = PBXGroup; - children = ( - CF8F1BAC0B64FB8000BB4199 /* AnalysisWrappers.cpp */, - CF8F1BB70B64FB8000BB4199 /* GraphPrinters.cpp */, - CF8F1BB90B64FB8000BB4199 /* opt.cpp */, - CF8F1BBA0B64FB8000BB4199 /* PrintSCC.cpp */, - ); - path = opt; - sourceTree = ""; - }; - CF8F1BCF0B64FC8A00BB4199 /* ARM */ = { - isa = PBXGroup; - children = ( - 9FE4508B0C77A77000C4FEA4 /* ARMCodeEmitter.cpp */, - 9FE4508C0C77A77000C4FEA4 /* ARMGenAsmWriter.inc */, - 9FE4508D0C77A77000C4FEA4 /* ARMGenDAGISel.inc */, - 9FE4508E0C77A77100C4FEA4 /* ARMGenInstrInfo.inc */, - 9FE4508F0C77A77100C4FEA4 /* ARMGenInstrNames.inc */, - 9FE450900C77A77100C4FEA4 /* ARMGenRegisterInfo.h.inc */, - 9FE450910C77A77100C4FEA4 /* ARMGenRegisterInfo.inc */, - 9FE450920C77A77100C4FEA4 /* ARMGenRegisterNames.inc */, - 9FE450930C77A77100C4FEA4 /* ARMGenSubtarget.inc */, - 9FE450940C77A77100C4FEA4 /* ARMJITInfo.cpp */, - 9FE450950C77A77100C4FEA4 /* ARMJITInfo.h */, - 9FE450960C77A77100C4FEA4 /* ARMRelocations.h */, - 9FE450970C77A77100C4FEA4 /* README-Thumb.txt */, - 9FE450980C77A77100C4FEA4 /* README.txt */, - CF8F1BD10B64FC8A00BB4199 /* ARM.h */, - CF8F1BD20B64FC8A00BB4199 /* ARM.td */, - CF8F1BD30B64FC8A00BB4199 /* ARMAddressingModes.h */, - CF8F1BD40B64FC8A00BB4199 /* ARMAsmPrinter.cpp */, - CF8F1BD50B64FC8A00BB4199 /* ARMConstantIslandPass.cpp */, - CF8F1BD60B64FC8A00BB4199 /* ARMConstantPoolValue.cpp */, - CF8F1BD70B64FC8A00BB4199 /* ARMConstantPoolValue.h */, - CF8F1BD80B64FC8A00BB4199 /* ARMFrameInfo.h */, - CF8F1BD90B64FC8A00BB4199 /* ARMInstrInfo.cpp */, - CF8F1BDA0B64FC8A00BB4199 /* ARMInstrInfo.h */, - CF8F1BDB0B64FC8A00BB4199 /* ARMInstrInfo.td */, - CF8F1BDC0B64FC8A00BB4199 /* ARMInstrThumb.td */, - CF8F1BDD0B64FC8A00BB4199 /* ARMInstrVFP.td */, - CF8F1BDE0B64FC8A00BB4199 /* ARMISelDAGToDAG.cpp */, - CF8F1BDF0B64FC8A00BB4199 /* ARMISelLowering.cpp */, - CF8F1BE00B64FC8A00BB4199 /* ARMISelLowering.h */, - CF8F1BE10B64FC8A00BB4199 /* ARMLoadStoreOptimizer.cpp */, - CF8F1BE20B64FC8A00BB4199 /* ARMMachineFunctionInfo.h */, - CF8F1BE30B64FC8A00BB4199 /* ARMRegisterInfo.cpp */, - CF8F1BE40B64FC8A00BB4199 /* ARMRegisterInfo.h */, - CF8F1BE50B64FC8A00BB4199 /* ARMRegisterInfo.td */, - CF8F1BE60B64FC8A00BB4199 /* ARMSubtarget.cpp */, - CF8F1BE70B64FC8A00BB4199 /* ARMSubtarget.h */, - CF8F1BE80B64FC8A00BB4199 /* ARMTargetAsmInfo.cpp */, - CF8F1BE90B64FC8A00BB4199 /* ARMTargetAsmInfo.h */, - CF8F1BEA0B64FC8A00BB4199 /* ARMTargetMachine.cpp */, - CF8F1BEB0B64FC8A00BB4199 /* ARMTargetMachine.h */, - ); - path = ARM; - sourceTree = ""; - }; - CFD99ADF0AFE878F0068D19C /* opt */ = { - isa = PBXGroup; - children = ( - CFD99ADB0AFE87870068D19C /* AnalysisWrappers.cpp */, - CFD99ADC0AFE87870068D19C /* GraphPrinters.cpp */, - CFD99ADD0AFE87870068D19C /* opt.cpp */, - CFD99ADE0AFE87870068D19C /* PrintSCC.cpp */, - ); - name = opt; - sourceTree = ""; - }; - CFE4213C0A66FAE100AB4BF6 /* Hello */ = { - isa = PBXGroup; - children = ( - CFE4213D0A66FAE100AB4BF6 /* Hello.cpp */, - ); - path = Hello; - sourceTree = ""; - }; - DE66EC7508ABE8EF00323D32 /* lib/VMCore */ = { - isa = PBXGroup; - children = ( - DE66EC5B08ABE86900323D32 /* AsmWriter.cpp */, - 9F77937B0C73C4F400551F9C /* AutoUpgrade.cpp */, - DE66EC5C08ABE86A00323D32 /* BasicBlock.cpp */, - 9F77937C0C73C4F400551F9C /* ConstantFold.cpp */, - 9F77937D0C73C4F400551F9C /* ConstantFold.h */, - DE66EC6008ABE86A00323D32 /* Constants.cpp */, - 9FD3E5900CA0129D00E54D15 /* Core.cpp */, - DE66EC6108ABE86A00323D32 /* Dominators.cpp */, - DE66EC6208ABE86A00323D32 /* Function.cpp */, - DE66EC6308ABE86A00323D32 /* Globals.cpp */, - CF73C0BD098A551F00627152 /* InlineAsm.cpp */, - DE66EC6408ABE86A00323D32 /* Instruction.cpp */, - DE66EC6508ABE86A00323D32 /* Instructions.cpp */, - CF1ACC9709C9DE4400D3C5EB /* IntrinsicInst.cpp */, - DE66EC6608ABE86A00323D32 /* LeakDetector.cpp */, - DE66EC6708ABE86A00323D32 /* Mangler.cpp */, - DE66EC6808ABE86A00323D32 /* Module.cpp */, - DE66EC6908ABE86A00323D32 /* ModuleProvider.cpp */, - DE66EC6A08ABE86A00323D32 /* Pass.cpp */, - CF8F1B5C0B64FA7300BB4199 /* PassManager.cpp */, - DE66EC6D08ABE86A00323D32 /* SymbolTableListTraitsImpl.h */, - DE66EC6E08ABE86A00323D32 /* Type.cpp */, - CF73C0BE098A551F00627152 /* TypeSymbolTable.cpp */, - DE66EC6F08ABE86A00323D32 /* Value.cpp */, - CF73C0BF098A551F00627152 /* ValueSymbolTable.cpp */, - CF9720900A9F3CA2002CEEDD /* ValueTypes.cpp */, - DE66EC7008ABE86A00323D32 /* Verifier.cpp */, - ); - name = lib/VMCore; - sourceTree = ""; - }; - DE66EC8808ABEAC900323D32 /* lib/AsmParser */ = { - isa = PBXGroup; - children = ( - DE66EC8E08ABEAF000323D32 /* llvmAsmParser.y */, - DE66EC8F08ABEAF000323D32 /* Parser.cpp */, - DE66EC9008ABEAF000323D32 /* ParserInternals.h */, - ); - name = lib/AsmParser; - sourceTree = ""; - }; - DE66ECBD08ABEC0700323D32 /* lib/Analysis */ = { - isa = PBXGroup; - children = ( - DE66ED1A08ABEC0800323D32 /* IPA */, - DE66ECBE08ABEC0700323D32 /* AliasAnalysis.cpp */, - DE66ECBF08ABEC0700323D32 /* AliasAnalysisCounter.cpp */, - DE66ECC008ABEC0700323D32 /* AliasAnalysisEvaluator.cpp */, - CF8F1B4D0B64F80700BB4199 /* AliasDebugger.cpp */, - DE66ECC108ABEC0700323D32 /* AliasSetTracker.cpp */, - 9F7C23E60CB81C2B00498408 /* Analysis.cpp */, - DE66ECC208ABEC0700323D32 /* BasicAliasAnalysis.cpp */, - DE66ECC308ABEC0700323D32 /* CFGPrinter.cpp */, - CF73C0B0098A523C00627152 /* ConstantFolding.cpp */, - DE66ED1708ABEC0800323D32 /* InstCount.cpp */, - DE66ED1808ABEC0800323D32 /* Interval.cpp */, - DE66ED1908ABEC0800323D32 /* IntervalPartition.cpp */, - DE66ED3308ABEC0800323D32 /* LoadValueNumbering.cpp */, - DE66ED3408ABEC0800323D32 /* LoopInfo.cpp */, - 9F68EB010C77AD02004AA152 /* LoopPass.cpp */, - 9F68EB020C77AD02004AA152 /* MemoryDependenceAnalysis.cpp */, - DE66ED3608ABEC0800323D32 /* PostDominators.cpp */, - DE66ED3708ABEC0800323D32 /* ProfileInfo.cpp */, - DE66ED3808ABEC0800323D32 /* ProfileInfoLoader.cpp */, - DE66ED3908ABEC0800323D32 /* ProfileInfoLoaderPass.cpp */, - DE66ED3A08ABEC0800323D32 /* ScalarEvolution.cpp */, - DE66ED3B08ABEC0800323D32 /* ScalarEvolutionExpander.cpp */, - DE66ED3C08ABEC0800323D32 /* Trace.cpp */, - DE66ED3D08ABEC0800323D32 /* ValueNumbering.cpp */, - ); - name = lib/Analysis; - path = ../lib/Analysis; - sourceTree = SOURCE_ROOT; - }; - DE66ED1A08ABEC0800323D32 /* IPA */ = { - isa = PBXGroup; - children = ( - DE66ED1B08ABEC0800323D32 /* Andersens.cpp */, - DE66ED1C08ABEC0800323D32 /* CallGraph.cpp */, - DE66ED1D08ABEC0800323D32 /* CallGraphSCCPass.cpp */, - DE66ED2F08ABEC0800323D32 /* FindUsedTypes.cpp */, - DE66ED3008ABEC0800323D32 /* GlobalsModRef.cpp */, - ); - path = IPA; - sourceTree = ""; - }; - DE66ED3E08ABEC2A00323D32 /* lib/CodeGen */ = { - isa = PBXGroup; - children = ( - F27C8CFF0DAD307700A33844 /* ShadowStackCollector.cpp */, - 754221420D171DFC00DDB61B /* MachineLICM.cpp */, - 9FE450AB0C77AB6100C4FEA4 /* README.txt */, - DE66ED8308ABEC2B00323D32 /* SelectionDAG */, - DE66ED3F08ABEC2A00323D32 /* AsmPrinter.cpp */, - DE66ED4008ABEC2A00323D32 /* BranchFolding.cpp */, - CFC244570959DEF2009F8C47 /* DwarfWriter.cpp */, - 9F7793500C73BD1500551F9C /* ELFWriter.h */, - DE66ED6F08ABEC2B00323D32 /* ELFWriter.cpp */, - 9F7793510C73BD1500551F9C /* IfConversion.cpp */, - DE66ED7008ABEC2B00323D32 /* IntrinsicLowering.cpp */, - DE66ED7108ABEC2B00323D32 /* LiveInterval.cpp */, - DE66ED7308ABEC2B00323D32 /* LiveIntervalAnalysis.cpp */, - DE66ED7508ABEC2B00323D32 /* LiveVariables.cpp */, - CF32AF5C0AEE6A4E00D24CD4 /* LLVMTargetMachine.cpp */, - 9F7793520C73BD1500551F9C /* LowerSubregs.cpp */, - DE66ED7608ABEC2B00323D32 /* MachineBasicBlock.cpp */, - CF6529A6095B21A8007F884E /* MachineModuleInfo.cpp */, - DE66ED7808ABEC2B00323D32 /* MachineFunction.cpp */, - DE66ED7908ABEC2B00323D32 /* MachineInstr.cpp */, - CF4F27F60A7B6FA3004359F6 /* MachinePassRegistry.cpp */, - 9F7793530C73BD1500551F9C /* MachOWriter.h */, - CF9720350A9F3ADC002CEEDD /* MachOWriter.cpp */, - DE66ED7B08ABEC2B00323D32 /* Passes.cpp */, - DE66ED7C08ABEC2B00323D32 /* PHIElimination.cpp */, - 9F7793540C73BD1500551F9C /* PostRASchedulerList.cpp */, - DE66ED7D08ABEC2B00323D32 /* PhysRegTracker.h */, - DE66ED7E08ABEC2B00323D32 /* PrologEpilogInserter.cpp */, - 9F7793550C73BD1500551F9C /* RegAllocBigBlock.cpp */, - DE66ED8008ABEC2B00323D32 /* RegAllocLinearScan.cpp */, - DE66ED8108ABEC2B00323D32 /* RegAllocLocal.cpp */, - 9FE25D940CAB16FB005383FC /* RegisterCoalescer.cpp */, - 9F7793560C73BD1500551F9C /* RegisterScavenging.cpp */, - DE66ED8208ABEC2B00323D32 /* RegAllocSimple.cpp */, - 9F7793570C73BD1500551F9C /* SimpleRegisterCoalescing.cpp */, - DE66ED9508ABEC2B00323D32 /* TwoAddressInstructionPass.cpp */, - DE66ED9608ABEC2B00323D32 /* UnreachableBlockElim.cpp */, - DE66ED9808ABEC2B00323D32 /* VirtRegMap.cpp */, - DE66ED9908ABEC2B00323D32 /* VirtRegMap.h */, - ); - name = lib/CodeGen; - path = ../lib/CodeGen; - sourceTree = SOURCE_ROOT; - }; - DE66ED8308ABEC2B00323D32 /* SelectionDAG */ = { - isa = PBXGroup; - children = ( - 9FE450AC0C77AB6E00C4FEA4 /* CallingConvLower.cpp */, - CF6B5AFD095C82C300D1EA42 /* DAGCombiner.cpp */, - DE66ED9008ABEC2B00323D32 /* LegalizeDAG.cpp */, - CF7FFA1F0985081C008B0087 /* ScheduleDAGList.cpp */, - DE694D9F08B51E0C0039C106 /* ScheduleDAG.cpp */, - DE66ED9208ABEC2B00323D32 /* SelectionDAG.cpp */, - DE66ED9308ABEC2B00323D32 /* SelectionDAGISel.cpp */, - DE66ED9408ABEC2B00323D32 /* SelectionDAGPrinter.cpp */, - CFE421060A66F86D00AB4BF6 /* ScheduleDAGRRList.cpp */, - CF9720370A9F3B1C002CEEDD /* TargetLowering.cpp */, - ); - path = SelectionDAG; - sourceTree = ""; - }; - DE66ED9A08ABEC7200323D32 /* lib/Debugger */ = { - isa = PBXGroup; - children = ( - DE66EDB108ABEC7300323D32 /* Debugger.cpp */, - DE66EDB508ABEC7300323D32 /* ProgramInfo.cpp */, - DE66EDB608ABEC7300323D32 /* README.txt */, - DE66EDB708ABEC7300323D32 /* RuntimeInfo.cpp */, - DE66EDB808ABEC7300323D32 /* SourceFile.cpp */, - DE66EDB908ABEC7300323D32 /* SourceLanguage-CFamily.cpp */, - DE66EDBA08ABEC7300323D32 /* SourceLanguage-CPlusPlus.cpp */, - DE66EDBB08ABEC7300323D32 /* SourceLanguage-Unknown.cpp */, - DE66EDBC08ABEC7300323D32 /* SourceLanguage.cpp */, - ); - name = lib/Debugger; - path = ../lib/Debugger; - sourceTree = SOURCE_ROOT; - }; - DE66EDBF08ABEC8F00323D32 /* lib/ExecutionEngine */ = { - isa = PBXGroup; - children = ( - DE66EDC508ABEC9000323D32 /* Interpreter */, - DE66EDD308ABEC9000323D32 /* JIT */, - DE66EDC408ABEC9000323D32 /* ExecutionEngine.cpp */, - 9F502B090D1D8D8D007939DF /* ExecutionEngineBindings.cpp */, - ); - name = lib/ExecutionEngine; - path = ../lib/ExecutionEngine; - sourceTree = SOURCE_ROOT; - }; - DE66EDC508ABEC9000323D32 /* Interpreter */ = { - isa = PBXGroup; - children = ( - DE66EDCE08ABEC9000323D32 /* Execution.cpp */, - DE66EDCF08ABEC9000323D32 /* ExternalFunctions.cpp */, - DE66EDD008ABEC9000323D32 /* Interpreter.cpp */, - DE66EDD108ABEC9000323D32 /* Interpreter.h */, - ); - path = Interpreter; - sourceTree = ""; - }; - DE66EDD308ABEC9000323D32 /* JIT */ = { - isa = PBXGroup; - children = ( - DE66EDDE08ABEC9100323D32 /* Intercept.cpp */, - DE66EDDF08ABEC9100323D32 /* JIT.cpp */, - DE66EDE008ABEC9100323D32 /* JIT.h */, - DE66EDE108ABEC9100323D32 /* JITEmitter.cpp */, - DE66EDE308ABEC9100323D32 /* TargetSelect.cpp */, - ); - path = JIT; - sourceTree = ""; - }; - DE66EDEB08ABEDD300323D32 /* lib/Linker */ = { - isa = PBXGroup; - children = ( - DE66EDF608ABEDD300323D32 /* LinkArchives.cpp */, - DE66EDF708ABEDD300323D32 /* Linker.cpp */, - DE66EDF808ABEDD300323D32 /* LinkItems.cpp */, - DE66EDF908ABEDD300323D32 /* LinkModules.cpp */, - ); - name = lib/Linker; - path = ../lib/Linker; - sourceTree = SOURCE_ROOT; - }; - DE66EDFB08ABEDE600323D32 /* lib/Support */ = { - isa = PBXGroup; - children = ( - 9FE25D950CAB1724005383FC /* APFloat.cpp */, - 9FE450A60C77AB3200C4FEA4 /* APInt.cpp */, - 9FE450A70C77AB3200C4FEA4 /* ConstantRange.cpp */, - 9FE450A80C77AB3200C4FEA4 /* MemoryBuffer.cpp */, - 9FE450A90C77AB3200C4FEA4 /* SmallPtrSet.cpp */, - 9FE450AA0C77AB3200C4FEA4 /* StringMap.cpp */, - CFD99AB70AFE848A0068D19C /* Allocator.cpp */, - DE66EDFC08ABEDE600323D32 /* Annotation.cpp */, - DE66EE1D08ABEDE600323D32 /* CommandLine.cpp */, - DE66EE3D08ABEDE600323D32 /* Debug.cpp */, - CF79495D09B326D4005ADFCA /* Dwarf.cpp */, - DE66EE3E08ABEDE600323D32 /* FileUtilities.cpp */, - CF42B6C40AF2512000D5D47C /* FoldingSet.cpp */, - CFE421070A66F8DC00AB4BF6 /* GraphWriter.cpp */, - DE66EE3F08ABEDE600323D32 /* IsInf.cpp */, - DE66EE4008ABEDE600323D32 /* IsNAN.cpp */, - CF8F1B500B64F86A00BB4199 /* ManagedStatic.cpp */, - DE66EE4208ABEDE600323D32 /* PluginLoader.cpp */, - DE66EE4308ABEDE600323D32 /* SlowOperationInformer.cpp */, - DE66EE4408ABEDE600323D32 /* Statistic.cpp */, - CF8F1B510B64F86A00BB4199 /* Streams.cpp */, - DE66EE4508ABEDE700323D32 /* StringExtras.cpp */, - 9F5B90CB0D0CE87100CDFDEA /* StringPool.cpp */, - DE66EE4608ABEDE700323D32 /* SystemUtils.cpp */, - DE66EE4708ABEDE700323D32 /* Timer.cpp */, - ); - name = lib/Support; - path = ../lib/Support; - sourceTree = SOURCE_ROOT; - }; - DE66EE4908ABEE3400323D32 /* lib/System */ = { - isa = PBXGroup; - children = ( - 9FE450A50C77AAF000C4FEA4 /* Disassembler.cpp */, - DE66EE7E08ABEE3500323D32 /* Unix */, - DE66EE8B08ABEE3500323D32 /* Win32 */, - CFE421090A66F93300AB4BF6 /* Alarm.cpp */, - DE66EE6008ABEE3400323D32 /* DynamicLibrary.cpp */, - CF8F1B530B64F8C000BB4199 /* IncludeFile.cpp */, - DE66EE6108ABEE3400323D32 /* LICENSE.TXT */, - CFD99ABA0AFE84D70068D19C /* IncludeFile.cpp */, - DE66EE6508ABEE3400323D32 /* MappedFile.cpp */, - DE66EE6608ABEE3400323D32 /* Memory.cpp */, - DE66EE6708ABEE3400323D32 /* Mutex.cpp */, - DE66EE6808ABEE3400323D32 /* Path.cpp */, - DE66EE6908ABEE3400323D32 /* Process.cpp */, - DE66EE6A08ABEE3400323D32 /* Program.cpp */, - DE66EE6B08ABEE3400323D32 /* README.txt */, - DE66EE7C08ABEE3400323D32 /* Signals.cpp */, - DE66EE7D08ABEE3400323D32 /* TimeValue.cpp */, - ); - name = lib/System; - path = ../lib/System; - sourceTree = SOURCE_ROOT; - }; - DE66EE7E08ABEE3500323D32 /* Unix */ = { - isa = PBXGroup; - children = ( - CFD99ABB0AFE84EF0068D19C /* Alarm.inc */, - DE66EE7F08ABEE3500323D32 /* MappedFile.inc */, - DE66EE8008ABEE3500323D32 /* Memory.inc */, - DE66EE8108ABEE3500323D32 /* Mutex.inc */, - DE66EE8208ABEE3500323D32 /* Path.inc */, - DE66EE8308ABEE3500323D32 /* Process.inc */, - DE66EE8408ABEE3500323D32 /* Program.inc */, - DE66EE8508ABEE3500323D32 /* README.txt */, - DE66EE8608ABEE3500323D32 /* Signals.inc */, - DE66EE8908ABEE3500323D32 /* TimeValue.inc */, - DE66EE8A08ABEE3500323D32 /* Unix.h */, - ); - path = Unix; - sourceTree = ""; - }; - DE66EE8B08ABEE3500323D32 /* Win32 */ = { - isa = PBXGroup; - children = ( - CFE4210A0A66F93300AB4BF6 /* Alarm.inc */, - DE66EE8C08ABEE3500323D32 /* DynamicLibrary.inc */, - DE66EE8D08ABEE3500323D32 /* MappedFile.inc */, - DE66EE8E08ABEE3500323D32 /* Memory.inc */, - DE66EE8F08ABEE3500323D32 /* Mutex.inc */, - DE66EE9008ABEE3500323D32 /* Path.inc */, - DE66EE9108ABEE3500323D32 /* Process.inc */, - DE66EE9208ABEE3500323D32 /* Program.inc */, - DE66EE9308ABEE3500323D32 /* Signals.inc */, - DE66EE9408ABEE3500323D32 /* TimeValue.inc */, - DE66EE9508ABEE3500323D32 /* Win32.h */, - ); - path = Win32; - sourceTree = ""; - }; - DE66EE9608ABEE5D00323D32 /* lib/Target */ = { - isa = PBXGroup; - children = ( - 9F7794290C73CB7900551F9C /* MSIL */, - DE66EE9708ABEE5D00323D32 /* Alpha */, - CF8F1BCF0B64FC8A00BB4199 /* ARM */, - DE66EEC908ABEE5E00323D32 /* CBackend */, - 9F7794120C73CB6100551F9C /* Mips */, - DE66EF1108ABEE5E00323D32 /* PowerPC */, - DE66EF7008ABEE5F00323D32 /* Sparc */, - DE66F09308ABEE6000323D32 /* X86 */, - DE66EF1008ABEE5E00323D32 /* TargetRegisterInfo.cpp */, - CF9BCD1508C75070001E7011 /* SubtargetFeature.cpp */, - 9FEDD6B60D8D83D0009F6DF1 /* Target.cpp */, - DE66F08A08ABEE6000323D32 /* Target.td */, - CF47BD860AAF487E00A8B13E /* TargetAsmInfo.cpp */, - 9FE25D960CAB1759005383FC /* TargetCallingConv.td */, - DE66F08B08ABEE6000323D32 /* TargetData.cpp */, - DE66F08C08ABEE6000323D32 /* TargetFrameInfo.cpp */, - DE66F08D08ABEE6000323D32 /* TargetInstrInfo.cpp */, - DE66F08F08ABEE6000323D32 /* TargetMachine.cpp */, - DE66F09008ABEE6000323D32 /* TargetMachineRegistry.cpp */, - 84115FFE0B66D87400E1293E /* TargetMachOWriterInfo.cpp */, - CF490D14090541D30072DB1C /* TargetSchedule.td */, - CF490D15090541D30072DB1C /* TargetSelectionDAG.td */, - DE66F09208ABEE6000323D32 /* TargetSubtarget.cpp */, - ); - name = lib/Target; - path = ../lib/Target; - sourceTree = SOURCE_ROOT; - }; - DE66EE9708ABEE5D00323D32 /* Alpha */ = { - isa = PBXGroup; - children = ( - DE66EE9808ABEE5E00323D32 /* Alpha.h */, - DE66EE9908ABEE5E00323D32 /* Alpha.td */, - DE66EE9A08ABEE5E00323D32 /* AlphaAsmPrinter.cpp */, - CF8F1B540B64F90F00BB4199 /* AlphaBranchSelector.cpp */, - DE66EE9B08ABEE5E00323D32 /* AlphaCodeEmitter.cpp */, - CFA702BB0A6FA85F0006009A /* AlphaGenAsmWriter.inc */, - CFA702BC0A6FA85F0006009A /* AlphaGenCodeEmitter.inc */, - CFA702BD0A6FA85F0006009A /* AlphaGenDAGISel.inc */, - CFA702BE0A6FA85F0006009A /* AlphaGenInstrInfo.inc */, - CFA702BF0A6FA85F0006009A /* AlphaGenInstrNames.inc */, - CFA702C00A6FA85F0006009A /* AlphaGenRegisterInfo.h.inc */, - CFA702C10A6FA85F0006009A /* AlphaGenRegisterInfo.inc */, - CFA702C20A6FA85F0006009A /* AlphaGenRegisterNames.inc */, - CFA702C30A6FA85F0006009A /* AlphaGenSubtarget.inc */, - DE66EEA308ABEE5E00323D32 /* AlphaInstrFormats.td */, - DE66EEA408ABEE5E00323D32 /* AlphaInstrInfo.cpp */, - DE66EEA508ABEE5E00323D32 /* AlphaInstrInfo.h */, - DE66EEA608ABEE5E00323D32 /* AlphaInstrInfo.td */, - CFBD8B1A090E76540020B107 /* AlphaISelDAGToDAG.cpp */, - CFBD8B1B090E76540020B107 /* AlphaISelLowering.cpp */, - CFBD8B1C090E76540020B107 /* AlphaISelLowering.h */, - DE66EEA908ABEE5E00323D32 /* AlphaJITInfo.cpp */, - DE66EEAA08ABEE5E00323D32 /* AlphaJITInfo.h */, - CF8F1B550B64F90F00BB4199 /* AlphaLLRP.cpp */, - DE66EEAB08ABEE5E00323D32 /* AlphaRegisterInfo.cpp */, - DE66EEAC08ABEE5E00323D32 /* AlphaRegisterInfo.h */, - DE66EEAD08ABEE5E00323D32 /* AlphaRegisterInfo.td */, - DE66EEAE08ABEE5E00323D32 /* AlphaRelocations.h */, - CFE4210B0A66F96400AB4BF6 /* AlphaSchedule.td */, - CFBD8B1D090E76540020B107 /* AlphaSubtarget.cpp */, - CFBD8B1E090E76540020B107 /* AlphaSubtarget.h */, - CF341DAE0AB07A8B0099B064 /* AlphaTargetAsmInfo.cpp */, - CF341DAD0AB07A8B0099B064 /* AlphaTargetAsmInfo.h */, - DE66EEAF08ABEE5E00323D32 /* AlphaTargetMachine.cpp */, - DE66EEB008ABEE5E00323D32 /* AlphaTargetMachine.h */, - ); - path = Alpha; - sourceTree = ""; - }; - DE66EEC908ABEE5E00323D32 /* CBackend */ = { - isa = PBXGroup; - children = ( - CF8F1B560B64F98900BB4199 /* CBackend.cpp */, - DE66EECA08ABEE5E00323D32 /* CTargetMachine.h */, - ); - path = CBackend; - sourceTree = ""; - }; - DE66EF1108ABEE5E00323D32 /* PowerPC */ = { - isa = PBXGroup; - children = ( - 9FE4509A0C77A79C00C4FEA4 /* PPCCallingConv.td */, - 9FE4509B0C77A79C00C4FEA4 /* PPCGenCallingConv.inc */, - 841160000B66D8AC00E1293E /* PPCMachOWriterInfo.h */, - 84115FFF0B66D89B00E1293E /* PPCMachOWriterInfo.cpp */, - CFA702CB0A6FA8AD0006009A /* PPCGenAsmWriter.inc */, - CFA702CC0A6FA8AD0006009A /* PPCGenCodeEmitter.inc */, - CFA702CD0A6FA8AD0006009A /* PPCGenDAGISel.inc */, - CFA702CE0A6FA8AD0006009A /* PPCGenInstrInfo.inc */, - CFA702CF0A6FA8AD0006009A /* PPCGenInstrNames.inc */, - CFA702D00A6FA8AD0006009A /* PPCGenRegisterInfo.h.inc */, - CFA702D10A6FA8AD0006009A /* PPCGenRegisterInfo.inc */, - CFA702D20A6FA8AD0006009A /* PPCGenRegisterNames.inc */, - CFA702D30A6FA8AD0006009A /* PPCGenSubtarget.inc */, - CFE421140A66FA2D00AB4BF6 /* PPC.h */, - CFE421150A66FA2D00AB4BF6 /* PPC.td */, - CFE421160A66FA2D00AB4BF6 /* PPCAsmPrinter.cpp */, - CFE421170A66FA2D00AB4BF6 /* PPCBranchSelector.cpp */, - CFE421180A66FA2D00AB4BF6 /* PPCCodeEmitter.cpp */, - CFE421190A66FA2D00AB4BF6 /* PPCFrameInfo.h */, - CFE4211A0A66FA2D00AB4BF6 /* PPCHazardRecognizers.cpp */, - CFE4211B0A66FA2D00AB4BF6 /* PPCHazardRecognizers.h */, - CFE4211C0A66FA2D00AB4BF6 /* PPCInstr64Bit.td */, - CFE4211D0A66FA2D00AB4BF6 /* PPCInstrAltivec.td */, - CFE4211E0A66FA2D00AB4BF6 /* PPCInstrBuilder.h */, - CFE4211F0A66FA2D00AB4BF6 /* PPCInstrFormats.td */, - CFE421200A66FA2D00AB4BF6 /* PPCInstrInfo.cpp */, - CFE421210A66FA2D00AB4BF6 /* PPCInstrInfo.h */, - CFE421220A66FA2D00AB4BF6 /* PPCInstrInfo.td */, - CFE421230A66FA2D00AB4BF6 /* PPCISelDAGToDAG.cpp */, - CFE421240A66FA2D00AB4BF6 /* PPCISelLowering.cpp */, - CFE421250A66FA2D00AB4BF6 /* PPCISelLowering.h */, - CFE421260A66FA2D00AB4BF6 /* PPCJITInfo.cpp */, - CFE421270A66FA2D00AB4BF6 /* PPCJITInfo.h */, - CFABD0A20B09E342003EB061 /* PPCMachineFunctionInfo.h */, - CFE421280A66FA2D00AB4BF6 /* PPCPerfectShuffle.h */, - CF8F1B570B64F9AC00BB4199 /* PPCPredicates.cpp */, - CF8F1B580B64F9AC00BB4199 /* PPCPredicates.h */, - CFE421290A66FA2D00AB4BF6 /* PPCRegisterInfo.cpp */, - CFE4212A0A66FA2D00AB4BF6 /* PPCRegisterInfo.h */, - CFE4212B0A66FA2D00AB4BF6 /* PPCRegisterInfo.td */, - CFE4212C0A66FA2D00AB4BF6 /* PPCRelocations.h */, - CFE4212D0A66FA2D00AB4BF6 /* PPCSchedule.td */, - CFE4212E0A66FA2D00AB4BF6 /* PPCScheduleG3.td */, - CFE4212F0A66FA2D00AB4BF6 /* PPCScheduleG4.td */, - CFE421300A66FA2D00AB4BF6 /* PPCScheduleG4Plus.td */, - CFE421310A66FA2D00AB4BF6 /* PPCScheduleG5.td */, - CFE421320A66FA2E00AB4BF6 /* PPCSubtarget.cpp */, - CFE421330A66FA2E00AB4BF6 /* PPCSubtarget.h */, - CF341E020AB080220099B064 /* PPCTargetAsmInfo.cpp */, - CF341E010AB080220099B064 /* PPCTargetAsmInfo.h */, - CFE421340A66FA2E00AB4BF6 /* PPCTargetMachine.cpp */, - CFE421350A66FA2E00AB4BF6 /* PPCTargetMachine.h */, - CFE421360A66FA2E00AB4BF6 /* README_ALTIVEC.txt */, - CFE421370A66FA2E00AB4BF6 /* README.txt */, - ); - path = PowerPC; - sourceTree = ""; - }; - DE66EF7008ABEE5F00323D32 /* Sparc */ = { - isa = PBXGroup; - children = ( - CF65280109D1BA3800C4B521 /* SparcGenAsmWriter.inc */, - CF65280209D1BA3800C4B521 /* SparcGenDAGISel.inc */, - CF65280309D1BA3800C4B521 /* SparcGenInstrInfo.inc */, - CF65280409D1BA3800C4B521 /* SparcGenInstrNames.inc */, - CF65280509D1BA3800C4B521 /* SparcGenRegisterInfo.h.inc */, - CF65280609D1BA3800C4B521 /* SparcGenRegisterInfo.inc */, - CF65280709D1BA3800C4B521 /* SparcGenRegisterNames.inc */, - CF65280809D1BA3800C4B521 /* SparcGenSubtarget.inc */, - CF6527FA09D1BA3800C4B521 /* DelaySlotFiller.cpp */, - CF6527FB09D1BA3800C4B521 /* FPMover.cpp */, - CF6527FC09D1BA3800C4B521 /* Makefile */, - CF6527FD09D1BA3800C4B521 /* README.txt */, - CF6527FE09D1BA3800C4B521 /* Sparc.h */, - CF6527FF09D1BA3800C4B521 /* Sparc.td */, - CF65280009D1BA3800C4B521 /* SparcAsmPrinter.cpp */, - CF65280909D1BA3800C4B521 /* SparcInstrFormats.td */, - CF65280A09D1BA3800C4B521 /* SparcInstrInfo.cpp */, - CF65280B09D1BA3800C4B521 /* SparcInstrInfo.h */, - CF65280C09D1BA3800C4B521 /* SparcInstrInfo.td */, - CF65280D09D1BA3800C4B521 /* SparcISelDAGToDAG.cpp */, - CF65280E09D1BA3800C4B521 /* SparcRegisterInfo.cpp */, - CF65280F09D1BA3800C4B521 /* SparcRegisterInfo.h */, - CF65281009D1BA3800C4B521 /* SparcRegisterInfo.td */, - CF65281109D1BA3800C4B521 /* SparcSubtarget.cpp */, - CF65281209D1BA3800C4B521 /* SparcSubtarget.h */, - CF341E230AB0814B0099B064 /* SparcTargetAsmInfo.cpp */, - CF341E220AB0814B0099B064 /* SparcTargetAsmInfo.h */, - CF65281309D1BA3800C4B521 /* SparcTargetMachine.cpp */, - CF65281409D1BA3800C4B521 /* SparcTargetMachine.h */, - ); - path = Sparc; - sourceTree = ""; - }; - DE66F09308ABEE6000323D32 /* X86 */ = { - isa = PBXGroup; - children = ( - 9FE4509C0C77A7BC00C4FEA4 /* README-MMX.txt */, - 9FE4509D0C77A7BC00C4FEA4 /* X86CallingConv.td */, - 9FE4509F0C77A7BC00C4FEA4 /* X86ELFWriterInfo.cpp */, - 9FE450A00C77A7BC00C4FEA4 /* X86ELFWriterInfo.h */, - 9FE450A10C77A7BC00C4FEA4 /* X86GenCallingConv.inc */, - 9FE450A20C77A7BC00C4FEA4 /* X86InstrFormats.td */, - CFA702D40A6FA8DD0006009A /* X86GenAsmWriter.inc */, - CFA702D50A6FA8DD0006009A /* X86GenAsmWriter1.inc */, - CFA702D60A6FA8DD0006009A /* X86GenDAGISel.inc */, - CFA702D70A6FA8DD0006009A /* X86GenInstrInfo.inc */, - CFA702D80A6FA8DD0006009A /* X86GenInstrNames.inc */, - CFA702D90A6FA8DD0006009A /* X86GenRegisterInfo.h.inc */, - CFA702DA0A6FA8DD0006009A /* X86GenRegisterInfo.inc */, - CFA702DB0A6FA8DD0006009A /* X86GenRegisterNames.inc */, - CFA702DC0A6FA8DD0006009A /* X86GenSubtarget.inc */, - CFE421380A66FA8000AB4BF6 /* README-FPStack.txt */, - CFE421390A66FA8000AB4BF6 /* README-SSE.txt */, - CFD99ABE0AFE857A0068D19C /* README-X86-64.txt */, - CFE4213A0A66FA8000AB4BF6 /* README.txt */, - CFF0DE6309BF6C360031957F /* X86InstrFPStack.td */, - CFF0DE6409BF6C360031957F /* X86InstrMMX.td */, - CFF0DE6509BF6C360031957F /* X86InstrSSE.td */, - DE66F0BC08ABEE6000323D32 /* X86.h */, - DE66F0BD08ABEE6000323D32 /* X86.td */, - DE66F0BE08ABEE6000323D32 /* X86AsmPrinter.cpp */, - DE66F0BF08ABEE6000323D32 /* X86AsmPrinter.h */, - DE66F0C008ABEE6000323D32 /* X86ATTAsmPrinter.cpp */, - DE66F0C108ABEE6000323D32 /* X86ATTAsmPrinter.h */, - DE66F0C208ABEE6000323D32 /* X86CodeEmitter.cpp */, - CF8F1B590B64F9E100BB4199 /* X86COFF.h */, - DE66F0C408ABEE6000323D32 /* X86FloatingPoint.cpp */, - DE66F0CC08ABEE6000323D32 /* X86InstrBuilder.h */, - DE66F0CD08ABEE6000323D32 /* X86InstrInfo.cpp */, - DE66F0CE08ABEE6000323D32 /* X86InstrInfo.h */, - DE66F0CF08ABEE6100323D32 /* X86InstrInfo.td */, - DE66F0D008ABEE6100323D32 /* X86IntelAsmPrinter.cpp */, - DE66F0D108ABEE6100323D32 /* X86IntelAsmPrinter.h */, - DE66F0D508ABEE6100323D32 /* X86JITInfo.cpp */, - DE66F0D608ABEE6100323D32 /* X86JITInfo.h */, - CFE4213B0A66FA8000AB4BF6 /* X86MachineFunctionInfo.h */, - DE66F0D808ABEE6100323D32 /* X86RegisterInfo.cpp */, - DE66F0D908ABEE6100323D32 /* X86RegisterInfo.h */, - DE66F0DA08ABEE6100323D32 /* X86RegisterInfo.td */, - DE66F0DB08ABEE6100323D32 /* X86Relocations.h */, - CFC244BB0959F24C009F8C47 /* X86ISelDAGToDAG.cpp */, - CFC244BC0959F24C009F8C47 /* X86ISelLowering.cpp */, - CFC244BD0959F24C009F8C47 /* X86ISelLowering.h */, - DE66F0DC08ABEE6100323D32 /* X86Subtarget.cpp */, - DE66F0DD08ABEE6100323D32 /* X86Subtarget.h */, - CF341E330AB082D60099B064 /* X86TargetAsmInfo.cpp */, - CF341E320AB082D60099B064 /* X86TargetAsmInfo.h */, - DE66F0DE08ABEE6100323D32 /* X86TargetMachine.cpp */, - DE66F0DF08ABEE6100323D32 /* X86TargetMachine.h */, - ); - path = X86; - sourceTree = ""; - }; - DE66F0E108ABEFB300323D32 /* lib/Transforms */ = { - isa = PBXGroup; - children = ( - DE66F0EE08ABEFB300323D32 /* Instrumentation */, - CFE4213C0A66FAE100AB4BF6 /* Hello */, - DE66F11F08ABEFB300323D32 /* IPO */, - DE66F15C08ABEFB400323D32 /* Scalar */, - DE66F1BD08ABEFB400323D32 /* Utils */, - ); - name = lib/Transforms; - path = ../lib/Transforms; - sourceTree = SOURCE_ROOT; - }; - DE66F0EE08ABEFB300323D32 /* Instrumentation */ = { - isa = PBXGroup; - children = ( - DE66F0EF08ABEFB300323D32 /* BlockProfiling.cpp */, - DE66F0FE08ABEFB300323D32 /* EdgeProfiling.cpp */, - DE66F11B08ABEFB300323D32 /* ProfilingUtils.cpp */, - DE66F11C08ABEFB300323D32 /* ProfilingUtils.h */, - CF73C0B7098A546000627152 /* RSProfiling.cpp */, - CF73C0B8098A546000627152 /* RSProfiling.h */, - ); - path = Instrumentation; - sourceTree = ""; - }; - DE66F11F08ABEFB300323D32 /* IPO */ = { - isa = PBXGroup; - children = ( - 9F7793770C73C48A00551F9C /* StripDeadPrototypes.cpp */, - DE66F12008ABEFB300323D32 /* ArgumentPromotion.cpp */, - DE66F12108ABEFB300323D32 /* ConstantMerge.cpp */, - DE66F12208ABEFB300323D32 /* DeadArgumentElimination.cpp */, - DE66F12308ABEFB300323D32 /* DeadTypeElimination.cpp */, - DE66F14C08ABEFB400323D32 /* GlobalDCE.cpp */, - DE66F14D08ABEFB400323D32 /* GlobalOpt.cpp */, - CFE4213F0A66FB5E00AB4BF6 /* IndMemRemoval.cpp */, - DE66F14E08ABEFB400323D32 /* Inliner.cpp */, - DE66F15008ABEFB400323D32 /* InlineSimple.cpp */, - DE66F15108ABEFB400323D32 /* Internalize.cpp */, - DE66F15208ABEFB400323D32 /* IPConstantPropagation.cpp */, - DE66F15308ABEFB400323D32 /* LoopExtractor.cpp */, - DE66F15408ABEFB400323D32 /* LowerSetJmp.cpp */, - DE66F15608ABEFB400323D32 /* PruneEH.cpp */, - DE66F15708ABEFB400323D32 /* RaiseAllocations.cpp */, - DE66F15808ABEFB400323D32 /* SimplifyLibCalls.cpp */, - DE66F15908ABEFB400323D32 /* StripSymbols.cpp */, - ); - path = IPO; - sourceTree = ""; - }; - DE66F15C08ABEFB400323D32 /* Scalar */ = { - isa = PBXGroup; - children = ( - DE66F15E08ABEFB400323D32 /* ADCE.cpp */, - DE66F15F08ABEFB400323D32 /* BasicBlockPlacement.cpp */, - 9F7793460C73BC2000551F9C /* CodeGenPrepare.cpp */, - DE66F16008ABEFB400323D32 /* CondPropagate.cpp */, - DE66F16108ABEFB400323D32 /* ConstantProp.cpp */, - DE66F16308ABEFB400323D32 /* DCE.cpp */, - DE66F16408ABEFB400323D32 /* DeadStoreElimination.cpp */, - DE66F1A308ABEFB400323D32 /* GCSE.cpp */, - 9F7793470C73BC2000551F9C /* GVN.cpp */, - 9F7793480C73BC2000551F9C /* GVNPRE.cpp */, - DE66F1A408ABEFB400323D32 /* IndVarSimplify.cpp */, - DE66F1A508ABEFB400323D32 /* InstructionCombining.cpp */, - DE66F1A608ABEFB400323D32 /* LICM.cpp */, - 9F77934A0C73BC2000551F9C /* LoopRotation.cpp */, - 9F7793490C73BC2000551F9C /* LoopIndexSplit.cpp */, - DE66F1A808ABEFB400323D32 /* LoopStrengthReduce.cpp */, - DE66F1A908ABEFB400323D32 /* LoopUnroll.cpp */, - DE66F1AA08ABEFB400323D32 /* LoopUnswitch.cpp */, - CF8F1B5B0B64FA2F00BB4199 /* PredicateSimplifier.cpp */, - DE66F1B508ABEFB400323D32 /* Reassociate.cpp */, - CF73C0B9098A546000627152 /* Reg2Mem.cpp */, - 9FEDD5F70D8D797D009F6DF1 /* Scalar.cpp */, - DE66F1B608ABEFB400323D32 /* ScalarReplAggregates.cpp */, - DE66F1B708ABEFB400323D32 /* SCCP.cpp */, - DE66F1B808ABEFB400323D32 /* SimplifyCFG.cpp */, - DE66F1B908ABEFB400323D32 /* TailDuplication.cpp */, - DE66F1BA08ABEFB400323D32 /* TailRecursionElimination.cpp */, - ); - path = Scalar; - sourceTree = ""; - }; - DE66F1BD08ABEFB400323D32 /* Utils */ = { - isa = PBXGroup; - children = ( - DE66F1BE08ABEFB400323D32 /* BasicBlockUtils.cpp */, - 9F7793780C73C49A00551F9C /* BasicInliner.cpp */, - DE66F1BF08ABEFB400323D32 /* BreakCriticalEdges.cpp */, - DE66F1C008ABEFB400323D32 /* CloneFunction.cpp */, - 9F7793790C73C49A00551F9C /* CloneLoop.cpp */, - DE66F1C108ABEFB400323D32 /* CloneModule.cpp */, - DE66F1C208ABEFB400323D32 /* CloneTrace.cpp */, - DE66F1C308ABEFB400323D32 /* CodeExtractor.cpp */, - DE66F1E008ABEFB400323D32 /* DemoteRegToStack.cpp */, - 9F77937A0C73C49A00551F9C /* InlineCost.cpp */, - DE66F1E108ABEFB400323D32 /* InlineFunction.cpp */, - CF97208A0A9F3C6F002CEEDD /* LCSSA.cpp */, - DE66F1E208ABEFB400323D32 /* Local.cpp */, - DE4DA0390911476D0012D44B /* LoopSimplify.cpp */, - CF97208B0A9F3C6F002CEEDD /* LowerAllocations.cpp */, - CF97208C0A9F3C6F002CEEDD /* LowerInvoke.cpp */, - CF97208E0A9F3C6F002CEEDD /* LowerSwitch.cpp */, - CF97208F0A9F3C6F002CEEDD /* Mem2Reg.cpp */, - DE66F1E408ABEFB400323D32 /* PromoteMemoryToRegister.cpp */, - DE66F1E508ABEFB400323D32 /* SimplifyCFG.cpp */, - DE66F1E608ABEFB400323D32 /* UnifyFunctionExitNodes.cpp */, - DE66F1E708ABEFB400323D32 /* ValueMapper.cpp */, - ); - path = Utils; - sourceTree = ""; - }; - DE66F1E908ABF03100323D32 /* include/llvm */ = { - isa = PBXGroup; - children = ( - DE66F1EB08ABF03100323D32 /* ADT */, - DE66F20308ABF03100323D32 /* Analysis */, - DE66F22408ABF03100323D32 /* Assembly */, - 9F77937F0C73C54C00551F9C /* Bitcode */, - DE66F23508ABF03100323D32 /* CodeGen */, - DE66F24C08ABF03100323D32 /* Config */, - DE66F25308ABF03100323D32 /* Debugger */, - DE66F25B08ABF03100323D32 /* ExecutionEngine */, - DE66F26E08ABF03200323D32 /* Support */, - DE66F29408ABF03200323D32 /* System */, - DE66F29F08ABF03200323D32 /* Target */, - DE66F2AB08ABF03200323D32 /* Transforms */, - DE66F1EA08ABF03100323D32 /* AbstractTypeUser.h */, - DE66F22308ABF03100323D32 /* Argument.h */, - 9FA638D90C77B184007F12AE /* AutoUpgrade.h */, - DE66F22A08ABF03100323D32 /* BasicBlock.h */, - DE66F23308ABF03100323D32 /* CallGraphSCCPass.h */, - DE66F23408ABF03100323D32 /* CallingConv.h */, - DE66F25108ABF03100323D32 /* Constant.h */, - DE66F25208ABF03100323D32 /* Constants.h */, - DE66F25A08ABF03100323D32 /* DerivedTypes.h */, - DE66F25E08ABF03100323D32 /* Function.h */, - 9FA638DA0C77B184007F12AE /* GlobalAlias.h */, - DE66F25F08ABF03100323D32 /* GlobalValue.h */, - DE66F26008ABF03100323D32 /* GlobalVariable.h */, - CF73C0A2098A4FDF00627152 /* InlineAsm.h */, - DE66F26108ABF03100323D32 /* InstrTypes.h */, - DE66F26208ABF03100323D32 /* Instruction.def */, - DE66F26308ABF03100323D32 /* Instruction.h */, - DE66F26408ABF03100323D32 /* Instructions.h */, - DE66F26508ABF03100323D32 /* IntrinsicInst.h */, - DE66F26608ABF03100323D32 /* Intrinsics.h */, - CF65223409CA39B800C4B521 /* Intrinsics.gen */, - CFE420FF0A66F67300AB4BF6 /* IntrinsicsPowerPC.td */, - CFE421000A66F67300AB4BF6 /* IntrinsicsX86.td */, - CF8D62FA09C2226F006017BA /* Intrinsics.td */, - CF9720260A9F39B9002CEEDD /* LinkAllPasses.h */, - CFE421010A66F67300AB4BF6 /* LinkAllVMCore.h */, - CF9720270A9F39B9002CEEDD /* LinkTimeOptimizer.h */, - DE66F26708ABF03100323D32 /* Linker.h */, - DE66F26808ABF03100323D32 /* Module.h */, - DE66F26908ABF03200323D32 /* ModuleProvider.h */, - 9F77937E0C73C53000551F9C /* ParameterAttributes.h */, - DE66F26A08ABF03200323D32 /* Pass.h */, - DE66F26B08ABF03200323D32 /* PassAnalysisSupport.h */, - DE66F26C08ABF03200323D32 /* PassManager.h */, - CF8F1B420B64F70B00BB4199 /* PassManagers.h */, - DE66F26D08ABF03200323D32 /* PassSupport.h */, - DE66F29308ABF03200323D32 /* SymbolTableListTraits.h */, - DE66F2B708ABF03200323D32 /* Type.h */, - CF73C0A3098A4FDF00627152 /* TypeSymbolTable.h */, - DE66F2B808ABF03200323D32 /* Use.h */, - DE66F2B908ABF03200323D32 /* User.h */, - DE66F2BA08ABF03200323D32 /* Value.h */, - CF73C0A4098A4FDF00627152 /* ValueSymbolTable.h */, - ); - name = include/llvm; - path = ../include/llvm; - sourceTree = SOURCE_ROOT; - }; - DE66F1EB08ABF03100323D32 /* ADT */ = { - isa = PBXGroup; - children = ( - 35E98A830CBC2ED300C5CDC1 /* DenseSet.h */, - 35E98A840CBC2ED300C5CDC1 /* ImmutableMap.h */, - 35E98A850CBC2ED300C5CDC1 /* ImmutableSet.h */, - 9FA638DD0C77B1AB007F12AE /* BitVector.h */, - DE66F1EE08ABF03100323D32 /* DenseMap.h */, - DE66F1EF08ABF03100323D32 /* DepthFirstIterator.h */, - DE66F1F008ABF03100323D32 /* EquivalenceClasses.h */, - CF42B6BF0AF24F5300D5D47C /* FoldingSet.h */, - CF42B6BF0AF24F5300D5D47C /* FoldingSet.h */, - DE66F1F108ABF03100323D32 /* GraphTraits.h */, - DE66F1F308ABF03100323D32 /* hash_map.in */, - DE66F1F508ABF03100323D32 /* hash_set.in */, - DE66F1F608ABF03100323D32 /* HashExtras.h */, - DE66F1F708ABF03100323D32 /* ilist */, - 9FA638E00C77B1AB007F12AE /* IndexedMap.h */, - 9FE25D900CAB166D005383FC /* APFloat.h */, - 9FA638DB0C77B1AB007F12AE /* APInt.h */, - 9FA638DC0C77B1AB007F12AE /* APSInt.h */, - DE66F1F908ABF03100323D32 /* iterator.in */, - DE66F1FA08ABF03100323D32 /* PostOrderIterator.h */, - DE66F1FB08ABF03100323D32 /* SCCIterator.h */, - DE66F1FC08ABF03100323D32 /* SetOperations.h */, - DE66F1FD08ABF03100323D32 /* SetVector.h */, - 9FA638E20C77B1AB007F12AE /* SmallPtrSet.h */, - 9FA638E30C77B1AB007F12AE /* SmallSet.h */, - CF33BE160AF62B4200E93805 /* SmallString.h */, - CF71B60F0AC45EDA0007F57C /* SmallVector.h */, - 9FE25D910CAB166D005383FC /* SparseBitVector.h */, - 9FA638E40C77B1AB007F12AE /* StringMap.h */, - DE66F1FE08ABF03100323D32 /* Statistic.h */, - DE66F1FF08ABF03100323D32 /* STLExtras.h */, - DE66F20008ABF03100323D32 /* StringExtras.h */, - DE66F20108ABF03100323D32 /* Tree.h */, - CFF8B434097C605F0047F72A /* UniqueVector.h */, - DE66F20208ABF03100323D32 /* VectorExtras.h */, - ); - path = ADT; - sourceTree = ""; - }; - DE66F20308ABF03100323D32 /* Analysis */ = { - isa = PBXGroup; - children = ( - 9FA638E50C77B203007F12AE /* LoopPass.h */, - 9FA638E60C77B203007F12AE /* MemoryDependenceAnalysis.h */, - DE66F20408ABF03100323D32 /* AliasAnalysis.h */, - DE66F20508ABF03100323D32 /* AliasSetTracker.h */, - DE66F20608ABF03100323D32 /* CallGraph.h */, - DE66F20708ABF03100323D32 /* CFGPrinter.h */, - CF73C0A5098A507300627152 /* ConstantFolding.h */, - DE66F20808ABF03100323D32 /* ConstantsScanner.h */, - DE66F20F08ABF03100323D32 /* Dominators.h */, - DE66F21208ABF03100323D32 /* FindUsedTypes.h */, - DE66F21308ABF03100323D32 /* Interval.h */, - DE66F21408ABF03100323D32 /* IntervalIterator.h */, - DE66F21508ABF03100323D32 /* IntervalPartition.h */, - DE66F21608ABF03100323D32 /* LoadValueNumbering.h */, - DE66F21708ABF03100323D32 /* LoopInfo.h */, - DE66F21808ABF03100323D32 /* Passes.h */, - DE66F21908ABF03100323D32 /* PostDominators.h */, - DE66F21A08ABF03100323D32 /* ProfileInfo.h */, - DE66F21B08ABF03100323D32 /* ProfileInfoLoader.h */, - DE66F21C08ABF03100323D32 /* ProfileInfoTypes.h */, - DE66F21D08ABF03100323D32 /* ScalarEvolution.h */, - DE66F21E08ABF03100323D32 /* ScalarEvolutionExpander.h */, - DE66F21F08ABF03100323D32 /* ScalarEvolutionExpressions.h */, - DE66F22008ABF03100323D32 /* Trace.h */, - DE66F22108ABF03100323D32 /* ValueNumbering.h */, - DE66F22208ABF03100323D32 /* Verifier.h */, - ); - path = Analysis; - sourceTree = ""; - }; - DE66F22408ABF03100323D32 /* Assembly */ = { - isa = PBXGroup; - children = ( - DE66F22508ABF03100323D32 /* AsmAnnotationWriter.h */, - DE66F22708ABF03100323D32 /* Parser.h */, - DE66F22808ABF03100323D32 /* PrintModulePass.h */, - DE66F22908ABF03100323D32 /* Writer.h */, - ); - path = Assembly; - sourceTree = ""; - }; - DE66F23508ABF03100323D32 /* CodeGen */ = { - isa = PBXGroup; - children = ( - DE66F23608ABF03100323D32 /* AsmPrinter.h */, - 9F7793860C73C57100551F9C /* CallingConvLower.h */, - DEFAB19D0959E9A100E0AB42 /* DwarfWriter.h */, - 9F7793870C73C57100551F9C /* ELFRelocation.h */, - 9F7793880C73C57100551F9C /* FileWriters.h */, - DE66F23908ABF03100323D32 /* IntrinsicLowering.h */, - CFD7E4F30A798FC3000C7379 /* LinkAllCodegenComponents.h */, - DE4DA03C091147920012D44B /* LiveInterval.h */, - DE4DA03D091147920012D44B /* LiveIntervalAnalysis.h */, - DE66F23A08ABF03100323D32 /* LiveVariables.h */, - DE66F23B08ABF03100323D32 /* MachineBasicBlock.h */, - DE66F23C08ABF03100323D32 /* MachineCodeEmitter.h */, - DE66F23D08ABF03100323D32 /* MachineConstantPool.h */, - CF6F487109505E1500BC9E82 /* MachineModuleInfo.h */, - DE66F23E08ABF03100323D32 /* MachineFrameInfo.h */, - DE66F23F08ABF03100323D32 /* MachineFunction.h */, - DE66F24008ABF03100323D32 /* MachineFunctionPass.h */, - DE66F24108ABF03100323D32 /* MachineInstr.h */, - DE66F24208ABF03100323D32 /* MachineInstrBuilder.h */, - CFE420FB0A66F67300AB4BF6 /* MachineJumpTableInfo.h */, - CF6527D909D1A53400C4B521 /* MachineLocation.h */, - CF4F27E60A7B6E23004359F6 /* MachinePassRegistry.h */, - DE66F24308ABF03100323D32 /* MachineRelocation.h */, - 9F7793890C73C57100551F9C /* MachORelocation.h */, - DE66F24408ABF03100323D32 /* Passes.h */, - CFE21C780A80CC0600D3E908 /* RegAllocRegistry.h */, - 9FE25D920CAB169F005383FC /* RegisterCoalescer.h */, - 9F77938A0C73C57100551F9C /* RegisterScavenging.h */, - CF8F1B410B64F6D100BB4199 /* RuntimeLibcalls.h */, - DE66F24508ABF03100323D32 /* SchedGraphCommon.h */, - CF7FFA2109850864008B0087 /* ScheduleDAG.h */, - CFE21C7B0A80CC1C00D3E908 /* SchedulerRegistry.h */, - DE66F24608ABF03100323D32 /* SelectionDAG.h */, - DE66F24708ABF03100323D32 /* SelectionDAGISel.h */, - DE66F24808ABF03100323D32 /* SelectionDAGNodes.h */, - DE66F24B08ABF03100323D32 /* ValueTypes.h */, - CFE420FC0A66F67300AB4BF6 /* ValueTypes.td */, - ); - path = CodeGen; - sourceTree = ""; - }; - DE66F24C08ABF03100323D32 /* Config */ = { - isa = PBXGroup; - children = ( - DE66F24E08ABF03100323D32 /* alloca.h */, - CF73C0A9098A50FD00627152 /* config.h */, - DE66F25008ABF03100323D32 /* config.h.in */, - ); - path = Config; - sourceTree = ""; - }; - DE66F25308ABF03100323D32 /* Debugger */ = { - isa = PBXGroup; - children = ( - DE66F25408ABF03100323D32 /* Debugger.h */, - DE66F25508ABF03100323D32 /* InferiorProcess.h */, - DE66F25608ABF03100323D32 /* ProgramInfo.h */, - DE66F25708ABF03100323D32 /* RuntimeInfo.h */, - DE66F25808ABF03100323D32 /* SourceFile.h */, - DE66F25908ABF03100323D32 /* SourceLanguage.h */, - ); - path = Debugger; - sourceTree = ""; - }; - DE66F25B08ABF03100323D32 /* ExecutionEngine */ = { - isa = PBXGroup; - children = ( - DE66F25C08ABF03100323D32 /* ExecutionEngine.h */, - DE66F25D08ABF03100323D32 /* GenericValue.h */, - CFE420FD0A66F67300AB4BF6 /* Interpreter.h */, - CFE420FE0A66F67300AB4BF6 /* JIT.h */, - ); - path = ExecutionEngine; - sourceTree = ""; - }; - DE66F26E08ABF03200323D32 /* Support */ = { - isa = PBXGroup; - children = ( - F27C8CE90DAD2EF900A33844 /* IRBuilder.h */, - DE66F27008ABF03200323D32 /* AIXDataTypesFix.h */, - 9F5B90CE0D0CE89300CDFDEA /* AlignOf.h */, - CF8F1B430B64F74400BB4199 /* Allocator.h */, - DE66F27108ABF03200323D32 /* Annotation.h */, - DE66F27208ABF03200323D32 /* CallSite.h */, - DE66F27308ABF03200323D32 /* Casting.h */, - DE66F27408ABF03200323D32 /* CFG.h */, - DE66F27508ABF03200323D32 /* CommandLine.h */, - CF8F1B440B64F74400BB4199 /* Compiler.h */, - DE66F27708ABF03200323D32 /* ConstantRange.h */, - CF73C0AD098A519400627152 /* DataTypes.h */, - DE66F27908ABF03200323D32 /* DataTypes.h.in */, - DE66F27A08ABF03200323D32 /* Debug.h */, - DE66F27B08ABF03200323D32 /* DOTGraphTraits.h */, - DE66F27C08ABF03200323D32 /* DynamicLinker.h */, - DE66F27D08ABF03200323D32 /* ELF.h */, - CF8E00490989162500DA2399 /* Dwarf.h */, - DE66F27E08ABF03200323D32 /* FileUtilities.h */, - DE66F27F08ABF03200323D32 /* GetElementPtrTypeIterator.h */, - DE66F28008ABF03200323D32 /* GraphWriter.h */, - DE66F28108ABF03200323D32 /* InstIterator.h */, - DE66F28208ABF03200323D32 /* InstVisitor.h */, - DE66F28308ABF03200323D32 /* LeakDetector.h */, - CF8F1B460B64F74400BB4199 /* ManagedStatic.h */, - DE66F28408ABF03200323D32 /* Mangler.h */, - DE66F28508ABF03200323D32 /* MathExtras.h */, - 9F7794880C73D51000551F9C /* MemoryBuffer.h */, - DE66F28608ABF03200323D32 /* MutexGuard.h */, - CF8F1B470B64F74400BB4199 /* OutputBuffer.h */, - DE66F28708ABF03200323D32 /* PassNameParser.h */, - DE66F28808ABF03200323D32 /* PatternMatch.h */, - DE66F28908ABF03200323D32 /* PluginLoader.h */, - 9F5B90CF0D0CE89300CDFDEA /* Registry.h */, - DE66F28A08ABF03200323D32 /* SlowOperationInformer.h */, - DE66F28B08ABF03200323D32 /* StableBasicBlockNumbering.h */, - 9F7794890C73D51000551F9C /* Streams.h */, - 9F5B90D00D0CE89300CDFDEA /* StringPool.h */, - DE66F28C08ABF03200323D32 /* SystemUtils.h */, - DE66F28E08ABF03200323D32 /* Timer.h */, - DE66F29008ABF03200323D32 /* type_traits.h */, - ); - path = Support; - sourceTree = ""; - }; - DE66F29408ABF03200323D32 /* System */ = { - isa = PBXGroup; - children = ( - CF73C0AE098A51AD00627152 /* Alarm.h */, - 9FA638E70C77B222007F12AE /* Disassembler.h */, - DE66F29508ABF03200323D32 /* DynamicLibrary.h */, - CF9720340A9F3A41002CEEDD /* IncludeFile.h */, - DE66F29608ABF03200323D32 /* LICENSE.TXT */, - DE66F29708ABF03200323D32 /* MappedFile.h */, - DE66F29808ABF03200323D32 /* Memory.h */, - DE66F29908ABF03200323D32 /* Mutex.h */, - DE66F29A08ABF03200323D32 /* Path.h */, - DE66F29B08ABF03200323D32 /* Process.h */, - DE66F29C08ABF03200323D32 /* Program.h */, - DE66F29D08ABF03200323D32 /* Signals.h */, - DE66F29E08ABF03200323D32 /* TimeValue.h */, - ); - path = System; - sourceTree = ""; - }; - DE66F29F08ABF03200323D32 /* Target */ = { - isa = PBXGroup; - children = ( - DE66F2A008ABF03200323D32 /* TargetRegisterInfo.h */, - CF9BCD0808C74DE0001E7011 /* SubtargetFeature.h */, - CF47BD380AAF40BC00A8B13E /* TargetAsmInfo.h */, - DE66F2A108ABF03200323D32 /* TargetData.h */, - 9FA638E80C77B231007F12AE /* TargetELFWriterInfo.h */, - DE66F2A208ABF03200323D32 /* TargetFrameInfo.h */, - DE66F2A308ABF03200323D32 /* TargetInstrInfo.h */, - CF26835B09178F5500C5F253 /* TargetInstrItineraries.h */, - DE66F2A408ABF03200323D32 /* TargetJITInfo.h */, - DE66F2A508ABF03200323D32 /* TargetLowering.h */, - DE66F2A608ABF03200323D32 /* TargetMachine.h */, - DE66F2A708ABF03200323D32 /* TargetMachineRegistry.h */, - 8443EF210B66B62D00959964 /* TargetMachOWriterInfo.h */, - DE66F2A808ABF03200323D32 /* TargetOptions.h */, - DE66F2AA08ABF03200323D32 /* TargetSubtarget.h */, - ); - path = Target; - sourceTree = ""; - }; - DE66F2AB08ABF03200323D32 /* Transforms */ = { - isa = PBXGroup; - children = ( - DE66F2AC08ABF03200323D32 /* Instrumentation.h */, - 9FA638E90C77B252007F12AE /* IPO */, - DE66F2AD08ABF03200323D32 /* IPO.h */, - CF73C0AF098A51DD00627152 /* RSProfiling.h */, - DE66F2AF08ABF03200323D32 /* Scalar.h */, - DE66F2B008ABF03200323D32 /* Utils */, - ); - path = Transforms; - sourceTree = ""; - }; - DE66F2B008ABF03200323D32 /* Utils */ = { - isa = PBXGroup; - children = ( - DE66F2B108ABF03200323D32 /* BasicBlockUtils.h */, - 9FA638EB0C77B26B007F12AE /* BasicInliner.h */, - DE66F2B208ABF03200323D32 /* Cloning.h */, - DE66F2B308ABF03200323D32 /* FunctionUtils.h */, - 9FA638EC0C77B26B007F12AE /* InlineCost.h */, - DE66F2B408ABF03200323D32 /* Local.h */, - DE66F2B508ABF03200323D32 /* PromoteMemToReg.h */, - DE66F2B608ABF03200323D32 /* UnifyFunctionExitNodes.h */, - ); - path = Utils; - sourceTree = ""; - }; - DE66F2BD08ABF14400323D32 /* tools */ = { - isa = PBXGroup; - children = ( - CFD99ADF0AFE878F0068D19C /* opt */, - DE66F2CB08ABF14400323D32 /* bugpoint */, - DE66F2F008ABF14400323D32 /* gccld */, - DE66F31E08ABF14400323D32 /* llvm-db */, - DE66F33B08ABF14400323D32 /* llvm-ld */, - DE66F36808ABF14500323D32 /* llvmc */, - CF8F1B5E0B64FADA00BB4199 /* llvm-upgrade */, - CF8F1B7E0B64FADA00BB4199 /* llvm2cpp */, - CFD99ADA0AFE87650068D19C /* lto.cpp */, - DE66F30008ABF14400323D32 /* llc.cpp */, - DE66F30708ABF14400323D32 /* lli.cpp */, - DE66F30E08ABF14400323D32 /* llvm-ar.cpp */, - DE66F31508ABF14400323D32 /* llvm-as.cpp */, - DE66F31C08ABF14400323D32 /* llvm-bcanalyzer.cpp */, - DE66F33208ABF14400323D32 /* llvm-dis.cpp */, - DE66F33908ABF14400323D32 /* llvm-extract.cpp */, - DE66F34A08ABF14400323D32 /* llvm-link.cpp */, - DE66F35108ABF14400323D32 /* llvm-nm.cpp */, - DE66F35808ABF14500323D32 /* llvm-prof.cpp */, - DE66F35F08ABF14500323D32 /* llvm-ranlib.cpp */, - CF8F1B960B64FB7F00BB4199 /* lto */, - CF8F1BAB0B64FB8000BB4199 /* opt */, - ); - name = tools; - path = ../tools; - sourceTree = SOURCE_ROOT; - }; - DE66F2CB08ABF14400323D32 /* bugpoint */ = { - isa = PBXGroup; - children = ( - DE66F2CC08ABF14400323D32 /* BugDriver.cpp */, - DE66F2CD08ABF14400323D32 /* BugDriver.h */, - DE66F2CE08ABF14400323D32 /* bugpoint.cpp */, - DE66F2CF08ABF14400323D32 /* CrashDebugger.cpp */, - DE66F2E208ABF14400323D32 /* ExecutionDriver.cpp */, - DE66F2E308ABF14400323D32 /* ExtractFunction.cpp */, - CF9720910A9F3CC7002CEEDD /* FindBugs.cpp */, - DE66F2E408ABF14400323D32 /* ListReducer.h */, - DE66F2E608ABF14400323D32 /* Miscompilation.cpp */, - DE66F2E708ABF14400323D32 /* OptimizerDriver.cpp */, - DE66F2E808ABF14400323D32 /* TestPasses.cpp */, - CF9720920A9F3CC7002CEEDD /* ToolRunner.cpp */, - CF9720930A9F3CC7002CEEDD /* ToolRunner.h */, - ); - path = bugpoint; - sourceTree = ""; - }; - DE66F2F008ABF14400323D32 /* gccld */ = { - isa = PBXGroup; - children = ( - ); - path = gccld; - sourceTree = ""; - }; - DE66F31E08ABF14400323D32 /* llvm-db */ = { - isa = PBXGroup; - children = ( - DE66F31F08ABF14400323D32 /* CLICommand.h */, - DE66F32008ABF14400323D32 /* CLIDebugger.cpp */, - DE66F32108ABF14400323D32 /* CLIDebugger.h */, - DE66F32208ABF14400323D32 /* Commands.cpp */, - DE66F32B08ABF14400323D32 /* llvm-db.cpp */, - ); - path = "llvm-db"; - sourceTree = ""; - }; - DE66F33B08ABF14400323D32 /* llvm-ld */ = { - isa = PBXGroup; - children = ( - DE66F34208ABF14400323D32 /* llvm-ld.cpp */, - DE66F34408ABF14400323D32 /* Optimize.cpp */, - ); - path = "llvm-ld"; - sourceTree = ""; - }; - DE66F36808ABF14500323D32 /* llvmc */ = { - isa = PBXGroup; - children = ( - DE66F36908ABF14500323D32 /* c */, - DE66F36A08ABF14500323D32 /* CompilerDriver.cpp */, - DE66F36B08ABF14500323D32 /* CompilerDriver.h */, - CF8F1B950B64FB5000BB4199 /* ConfigLexer.cpp */, - DE66F36D08ABF14500323D32 /* ConfigLexer.h */, - DE66F36E08ABF14500323D32 /* ConfigLexer.l */, - DE66F36F08ABF14500323D32 /* Configuration.cpp */, - DE66F37008ABF14500323D32 /* Configuration.h */, - DE66F37108ABF14500323D32 /* cpp */, - DE66F37D08ABF14500323D32 /* ll */, - DE66F37E08ABF14500323D32 /* llvmc.cpp */, - ); - path = llvmc; - sourceTree = ""; - }; - DE66F38D08ABF35C00323D32 /* docs */ = { - isa = PBXGroup; - children = ( - F22627310DAE34D10008F441 /* tutorial */, - DE66F38F08ABF35C00323D32 /* AliasAnalysis.html */, - DE66F39008ABF35C00323D32 /* Bugpoint.html */, - DE66F39208ABF35C00323D32 /* GCCFEBuildInstrs.html */, - DE66F39308ABF35C00323D32 /* CodeGenerator.html */, - DE66F39408ABF35C00323D32 /* CodingStandards.html */, - DE66F39508ABF35C00323D32 /* CommandGuide */, - DE66F3B908ABF35D00323D32 /* CommandLine.html */, - DE66F3BA08ABF35D00323D32 /* CompilerDriver.html */, - DE66F3BB08ABF35D00323D32 /* CompilerWriterInfo.html */, - DE66F3BD08ABF35D00323D32 /* doxygen.cfg.in */, - DE66F3BE08ABF35D00323D32 /* doxygen.css */, - DE66F3BF08ABF35D00323D32 /* doxygen.footer */, - DE66F3C008ABF35D00323D32 /* doxygen.header */, - DE66F3C108ABF35D00323D32 /* doxygen.intro */, - DE66F3C208ABF35D00323D32 /* ExtendingLLVM.html */, - DE66F3C308ABF35D00323D32 /* FAQ.html */, - DE66F3C408ABF35D00323D32 /* GarbageCollection.html */, - DE66F3C508ABF35D00323D32 /* GettingStarted.html */, - DE66F3C608ABF35D00323D32 /* GettingStartedVS.html */, - DE66F3E408ABF35D00323D32 /* HowToSubmitABug.html */, - DE66F3E508ABF35D00323D32 /* img */, - DE66F3EB08ABF35D00323D32 /* index.html */, - DE66F3EC08ABF35D00323D32 /* LangRef.html */, - DE66F3ED08ABF35D00323D32 /* Lexicon.html */, - DE66F3EE08ABF35D00323D32 /* llvm.css */, - DE66F3F108ABF35D00323D32 /* MakefileGuide.html */, - DE66F3F208ABF35D00323D32 /* ProgrammersManual.html */, - DE66F3F308ABF35D00323D32 /* Projects.html */, - DE66F3F408ABF35D00323D32 /* ReleaseNotes.html */, - DE66F3F508ABF35D00323D32 /* SourceLevelDebugging.html */, - DE66F3F708ABF35D00323D32 /* SystemLibrary.html */, - DE66F3F808ABF35D00323D32 /* TableGenFundamentals.html */, - DE66F3F908ABF35D00323D32 /* TestingGuide.html */, - DE66F3FA08ABF35D00323D32 /* UsingLibraries.html */, - DE66F3FB08ABF35D00323D32 /* WritingAnLLVMBackend.html */, - DE66F3FC08ABF35D00323D32 /* WritingAnLLVMPass.html */, - ); - name = docs; - path = ../docs; - sourceTree = SOURCE_ROOT; - }; - DE66F39508ABF35C00323D32 /* CommandGuide */ = { - isa = PBXGroup; - children = ( - DE66F39808ABF35C00323D32 /* bugpoint.pod */, - DE66F39E08ABF35C00323D32 /* index.html */, - DE66F39F08ABF35C00323D32 /* llc.pod */, - DE66F3A008ABF35C00323D32 /* lli.pod */, - DE66F3A108ABF35C00323D32 /* llvm-ar.pod */, - DE66F3A208ABF35C00323D32 /* llvm-as.pod */, - DE66F3A308ABF35C00323D32 /* llvm-bcanalyzer.pod */, - DE66F3A408ABF35C00323D32 /* llvm-db.pod */, - DE66F3A508ABF35C00323D32 /* llvm-dis.pod */, - DE66F3A608ABF35C00323D32 /* llvm-extract.pod */, - DE66F3A708ABF35C00323D32 /* llvm-ld.pod */, - DE66F3A808ABF35C00323D32 /* llvm-link.pod */, - DE66F3A908ABF35C00323D32 /* llvm-nm.pod */, - DE66F3AA08ABF35C00323D32 /* llvm-prof.pod */, - DE66F3AB08ABF35C00323D32 /* llvm-ranlib.pod */, - DE66F3AC08ABF35C00323D32 /* llvmc.pod */, - DE66F3AD08ABF35C00323D32 /* llvmgcc.pod */, - DE66F3AE08ABF35C00323D32 /* llvmgxx.pod */, - DE66F3AF08ABF35C00323D32 /* Makefile */, - DE66F3B408ABF35D00323D32 /* manpage.css */, - DE66F3B508ABF35D00323D32 /* opt.pod */, - DE66F3B808ABF35D00323D32 /* stkrc.pod */, - ); - path = CommandGuide; - sourceTree = ""; - }; - DE66F3E508ABF35D00323D32 /* img */ = { - isa = PBXGroup; - children = ( - DE66F3E608ABF35D00323D32 /* Debugging.gif */, - DE66F3E708ABF35D00323D32 /* libdeps.gif */, - DE66F3E808ABF35D00323D32 /* lines.gif */, - DE66F3E908ABF35D00323D32 /* objdeps.gif */, - DE66F3EA08ABF35D00323D32 /* venusflytrap.jpg */, - ); - path = img; - sourceTree = ""; - }; - DE66F3FD08ABF37000323D32 /* examples */ = { - isa = PBXGroup; - children = ( - F22761DF0DAD09CD003D8065 /* BrainF.cpp */, - F22761E00DAD09CD003D8065 /* BrainF.h */, - F22761E10DAD09CD003D8065 /* BrainFDriver.cpp */, - DE66F40E08ABF37000323D32 /* fibonacci.cpp */, - DE66F41508ABF37000323D32 /* HowToUseJIT.cpp */, - DE66F41E08ABF37000323D32 /* ModuleMaker.cpp */, - DE66F42608ABF37000323D32 /* ParallelJIT.cpp */, - ); - name = examples; - path = ../examples; - sourceTree = SOURCE_ROOT; - }; - DE816FAC08CFB44C0093BDEF /* utils */ = { - isa = PBXGroup; - children = ( - DE81705708CFB44D0093BDEF /* TableGen */, - DE81704008CFB44D0093BDEF /* fpcmp.cpp */, - DE81704F08CFB44D0093BDEF /* NightlyTest.gnuplot */, - DE81705108CFB44D0093BDEF /* NightlyTestTemplate.html */, - ); - name = utils; - path = ../utils; - sourceTree = SOURCE_ROOT; - }; - DE81705708CFB44D0093BDEF /* TableGen */ = { - isa = PBXGroup; - children = ( - DE81705908CFB44D0093BDEF /* AsmWriterEmitter.cpp */, - DE81705A08CFB44D0093BDEF /* AsmWriterEmitter.h */, - DE81705B08CFB44D0093BDEF /* CodeEmitterGen.cpp */, - DE81705C08CFB44D0093BDEF /* CodeEmitterGen.h */, - DE81705D08CFB44D0093BDEF /* CodeGenInstruction.h */, - CF8F1BC90B64FBD500BB4199 /* CodeGenIntrinsics.h */, - DE81705E08CFB44D0093BDEF /* CodeGenRegisters.h */, - DE81705F08CFB44D0093BDEF /* CodeGenTarget.cpp */, - DE81706008CFB44D0093BDEF /* CodeGenTarget.h */, - DE81706708CFB44D0093BDEF /* DAGISelEmitter.cpp */, - DE81706808CFB44D0093BDEF /* DAGISelEmitter.h */, - CF9720970A9F3D4D002CEEDD /* IntrinsicEmitter.cpp */, - CF9720980A9F3D4D002CEEDD /* IntrinsicEmitter.h */, - DE81708908CFB44D0093BDEF /* InstrInfoEmitter.cpp */, - DE81708A08CFB44D0093BDEF /* InstrInfoEmitter.h */, - DE81708E08CFB44D0093BDEF /* Record.cpp */, - DE81708F08CFB44D0093BDEF /* Record.h */, - DE81709008CFB44D0093BDEF /* RegisterInfoEmitter.cpp */, - DE81709108CFB44D0093BDEF /* RegisterInfoEmitter.h */, - DE4DA065091148520012D44B /* SubtargetEmitter.cpp */, - DE4DA066091148520012D44B /* SubtargetEmitter.h */, - DE8170AA08CFB44D0093BDEF /* TableGen.cpp */, - DE8170AB08CFB44D0093BDEF /* TableGenBackend.cpp */, - DE8170AC08CFB44D0093BDEF /* TableGenBackend.h */, - CF490E300907BBF80072DB1C /* SubtargetEmitter.cpp */, - CF490E2F0907BBF80072DB1C /* SubtargetEmitter.h */, - ); - path = TableGen; - sourceTree = ""; - }; - F22627310DAE34D10008F441 /* tutorial */ = { - isa = PBXGroup; - children = ( - F22627320DAE34D10008F441 /* index.html */, - F22627330DAE34D20008F441 /* JITTutorial1.html */, - F22627340DAE34D20008F441 /* JITTutorial2-1.png */, - F22627350DAE34D20008F441 /* JITTutorial2.html */, - F22627360DAE34D20008F441 /* LangImpl1.html */, - F22627370DAE34D20008F441 /* LangImpl2.html */, - F22627380DAE34D20008F441 /* LangImpl3.html */, - F22627390DAE34D20008F441 /* LangImpl4.html */, - F226273A0DAE34D20008F441 /* LangImpl5-cfg.png */, - F226273B0DAE34D20008F441 /* LangImpl5.html */, - F226273C0DAE34D20008F441 /* LangImpl6.html */, - F226273D0DAE34D20008F441 /* LangImpl7.html */, - F226273E0DAE34D20008F441 /* LangImpl8.html */, - F226273F0DAE34D20008F441 /* Makefile */, - F22627400DAE34D20008F441 /* OCamlLangImpl1.html */, - F22627410DAE34D20008F441 /* OCamlLangImpl2.html */, - F22627420DAE34D20008F441 /* OCamlLangImpl3.html */, - F22627430DAE34D20008F441 /* OCamlLangImpl4.html */, - F22627440DAE34D20008F441 /* OCamlLangImpl5.html */, - F22627450DAE34D20008F441 /* OCamlLangImpl6.html */, - F22627460DAE34D20008F441 /* OCamlLangImpl7.html */, - ); - path = tutorial; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXLegacyTarget section */ - CF0329B608D1BE110030FD33 /* LLVM lib */ = { - isa = PBXLegacyTarget; - buildArgumentsString = "$(ACTION) -j 2"; - buildConfigurationList = CF0329B708D1BE530030FD33 /* Build configuration list for PBXLegacyTarget "LLVM lib" */; - buildPhases = ( - ); - buildToolPath = /usr/bin/make; - buildWorkingDirectory = "$(SRCROOT)/../lib"; - dependencies = ( - ); - name = "LLVM lib"; - passBuildSettingsInEnvironment = 0; - productName = "LLVM lib"; - }; - CF0329BB08D1BE5D0030FD33 /* LLVM llc */ = { - isa = PBXLegacyTarget; - buildArgumentsString = "$(ACTION) -j 2"; - buildConfigurationList = CF0329C308D1BEC40030FD33 /* Build configuration list for PBXLegacyTarget "LLVM llc" */; - buildPhases = ( - ); - buildToolPath = /usr/bin/make; - buildWorkingDirectory = "$(SRCROOT)/../tools/llc"; - dependencies = ( - ); - name = "LLVM llc"; - passBuildSettingsInEnvironment = 0; - productName = "LLVM llc"; - }; - CF490E830907CDAB0072DB1C /* LLVM TableGen */ = { - isa = PBXLegacyTarget; - buildArgumentsString = "$(ACTION) -j 2"; - buildConfigurationList = CF490E840907CDAB0072DB1C /* Build configuration list for PBXLegacyTarget "LLVM TableGen" */; - buildPhases = ( - ); - buildToolPath = /usr/bin/make; - buildWorkingDirectory = "${SRCROOT}/../utils/TableGen"; - dependencies = ( - ); - name = "LLVM TableGen"; - passBuildSettingsInEnvironment = 0; - productName = "LLVM llc"; - }; - CFDF86BD0ADE819D00D40A3D /* LLVM lib release */ = { - isa = PBXLegacyTarget; - buildArgumentsString = "$(ACTION) -j 2 ENABLE_OPTIMIZED=1 DISABLE_ASSERTIONS=1"; - buildConfigurationList = CFDF86BE0ADE819D00D40A3D /* Build configuration list for PBXLegacyTarget "LLVM lib release" */; - buildPhases = ( - ); - buildToolPath = /usr/bin/make; - buildWorkingDirectory = "$(SRCROOT)/../lib"; - dependencies = ( - ); - name = "LLVM lib release"; - passBuildSettingsInEnvironment = 0; - productName = "LLVM lib"; - }; - CFDF86C60ADE81D000D40A3D /* LLVM llc release */ = { - isa = PBXLegacyTarget; - buildArgumentsString = "$(ACTION) -j 2 ENABLE_OPTIMIZED=1 DISABLE_ASSERTIONS=1"; - buildConfigurationList = CFDF86C70ADE81D000D40A3D /* Build configuration list for PBXLegacyTarget "LLVM llc release" */; - buildPhases = ( - ); - buildToolPath = /usr/bin/make; - buildWorkingDirectory = "$(SRCROOT)/../tools/llc"; - dependencies = ( - ); - name = "LLVM llc release"; - passBuildSettingsInEnvironment = 0; - productName = "LLVM llc"; - }; - D28A88AD04BDD90700651E21 /* LLVM */ = { - isa = PBXLegacyTarget; - buildArgumentsString = "$(ACTION) -j 2"; - buildConfigurationList = DE66EC4C08ABE78900323D32 /* Build configuration list for PBXLegacyTarget "LLVM" */; - buildPhases = ( - ); - buildToolPath = /usr/bin/make; - buildWorkingDirectory = "$(SRCROOT)/../"; - dependencies = ( - ); - name = LLVM; - passBuildSettingsInEnvironment = 0; - productName = LLVM; - }; -/* End PBXLegacyTarget section */ - -/* Begin PBXProject section */ - 08FB7793FE84155DC02AAC07 /* Project object */ = { - isa = PBXProject; - buildConfigurationList = DE66EC5008ABE78900323D32 /* Build configuration list for PBXProject "LLVM" */; - compatibilityVersion = "Xcode 2.4"; - hasScannedForEncodings = 1; - mainGroup = 08FB7794FE84155DC02AAC07 /* LLVM */; - productRefGroup = 721CA1750D0B44D200D5004F /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - D28A88AD04BDD90700651E21 /* LLVM */, - CF0329B608D1BE110030FD33 /* LLVM lib */, - CF0329BB08D1BE5D0030FD33 /* LLVM llc */, - CF0329BC08D1BE8E0030FD33 /* LLVM full llc */, - CF490E830907CDAB0072DB1C /* LLVM TableGen */, - CFDF86BD0ADE819D00D40A3D /* LLVM lib release */, - CFDF86C60ADE81D000D40A3D /* LLVM llc release */, - CFDF86D00ADE820000D40A3D /* LLVM full llc release */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXTargetDependency section */ - CF0329BE08D1BE970030FD33 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = CF0329B608D1BE110030FD33 /* LLVM lib */; - targetProxy = CF0329BD08D1BE970030FD33 /* PBXContainerItemProxy */; - }; - CF0329C008D1BE9B0030FD33 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = CF0329BB08D1BE5D0030FD33 /* LLVM llc */; - targetProxy = CF0329BF08D1BE9B0030FD33 /* PBXContainerItemProxy */; - }; - CFDF86DA0ADE822100D40A3D /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = CFDF86BD0ADE819D00D40A3D /* LLVM lib release */; - targetProxy = CFDF86D90ADE822100D40A3D /* PBXContainerItemProxy */; - }; - CFDF86DC0ADE822100D40A3D /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = CFDF86C60ADE81D000D40A3D /* LLVM llc release */; - targetProxy = CFDF86DB0ADE822100D40A3D /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - -/* Begin XCBuildConfiguration section */ - CF0329B808D1BE530030FD33 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - COPY_PHASE_STRIP = NO; - GCC_GENERATE_DEBUGGING_SYMBOLS = YES; - OPTIMIZATION_CFLAGS = "-O0"; - OTHER_CFLAGS = ""; - OTHER_LDFLAGS = ""; - OTHER_REZFLAGS = ""; - PRODUCT_NAME = "LLVM lib"; - SECTORDER_FLAGS = ""; - WARNING_CFLAGS = ( - "-Wmost", - "-Wno-four-char-constants", - "-Wno-unknown-pragmas", - ); - }; - name = Debug; - }; - CF0329B908D1BE530030FD33 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - COPY_PHASE_STRIP = YES; - GCC_GENERATE_DEBUGGING_SYMBOLS = NO; - OPTIMIZATION_CFLAGS = "-O0"; - OTHER_CFLAGS = ""; - OTHER_LDFLAGS = ""; - OTHER_REZFLAGS = ""; - PRODUCT_NAME = "LLVM lib"; - SECTORDER_FLAGS = ""; - WARNING_CFLAGS = ( - "-Wmost", - "-Wno-four-char-constants", - "-Wno-unknown-pragmas", - ); - }; - name = Release; - }; - CF0329C408D1BEC40030FD33 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - COPY_PHASE_STRIP = NO; - GCC_GENERATE_DEBUGGING_SYMBOLS = YES; - OPTIMIZATION_CFLAGS = "-O0"; - OTHER_CFLAGS = ""; - OTHER_LDFLAGS = ""; - OTHER_REZFLAGS = ""; - PRODUCT_NAME = "LLVM llc"; - SECTORDER_FLAGS = ""; - WARNING_CFLAGS = ( - "-Wmost", - "-Wno-four-char-constants", - "-Wno-unknown-pragmas", - ); - }; - name = Debug; - }; - CF0329C508D1BEC40030FD33 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - COPY_PHASE_STRIP = YES; - GCC_GENERATE_DEBUGGING_SYMBOLS = NO; - OPTIMIZATION_CFLAGS = "-O0"; - OTHER_CFLAGS = ""; - OTHER_LDFLAGS = ""; - OTHER_REZFLAGS = ""; - PRODUCT_NAME = "LLVM llc"; - SECTORDER_FLAGS = ""; - WARNING_CFLAGS = ( - "-Wmost", - "-Wno-four-char-constants", - "-Wno-unknown-pragmas", - ); - }; - name = Release; - }; - CF0329C808D1BEC40030FD33 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - COPY_PHASE_STRIP = NO; - GCC_GENERATE_DEBUGGING_SYMBOLS = YES; - OPTIMIZATION_CFLAGS = "-O0"; - OTHER_CFLAGS = ""; - OTHER_LDFLAGS = ""; - OTHER_REZFLAGS = ""; - PRODUCT_NAME = "LLVM full llc"; - SECTORDER_FLAGS = ""; - WARNING_CFLAGS = ( - "-Wmost", - "-Wno-four-char-constants", - "-Wno-unknown-pragmas", - ); - }; - name = Debug; - }; - CF0329C908D1BEC40030FD33 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - COPY_PHASE_STRIP = YES; - GCC_GENERATE_DEBUGGING_SYMBOLS = NO; - OPTIMIZATION_CFLAGS = "-O0"; - OTHER_CFLAGS = ""; - OTHER_LDFLAGS = ""; - OTHER_REZFLAGS = ""; - PRODUCT_NAME = "LLVM full llc"; - SECTORDER_FLAGS = ""; - WARNING_CFLAGS = ( - "-Wmost", - "-Wno-four-char-constants", - "-Wno-unknown-pragmas", - ); - }; - name = Release; - }; - CF490E850907CDAB0072DB1C /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - COPY_PHASE_STRIP = NO; - GCC_GENERATE_DEBUGGING_SYMBOLS = YES; - OPTIMIZATION_CFLAGS = "-O0"; - OTHER_CFLAGS = ""; - OTHER_LDFLAGS = ""; - OTHER_REZFLAGS = ""; - PRODUCT_NAME = "LLVM TableGen"; - SECTORDER_FLAGS = ""; - WARNING_CFLAGS = ( - "-Wmost", - "-Wno-four-char-constants", - "-Wno-unknown-pragmas", - ); - }; - name = Debug; - }; - CF490E860907CDAB0072DB1C /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - COPY_PHASE_STRIP = YES; - GCC_GENERATE_DEBUGGING_SYMBOLS = NO; - OPTIMIZATION_CFLAGS = "-O0"; - OTHER_CFLAGS = ""; - OTHER_LDFLAGS = ""; - OTHER_REZFLAGS = ""; - PRODUCT_NAME = "LLVM llc"; - SECTORDER_FLAGS = ""; - WARNING_CFLAGS = ( - "-Wmost", - "-Wno-four-char-constants", - "-Wno-unknown-pragmas", - ); - }; - name = Release; - }; - CFDF86BF0ADE819D00D40A3D /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - COPY_PHASE_STRIP = NO; - GCC_GENERATE_DEBUGGING_SYMBOLS = YES; - OPTIMIZATION_CFLAGS = "-O0"; - OTHER_CFLAGS = ""; - OTHER_LDFLAGS = ""; - OTHER_REZFLAGS = ""; - PRODUCT_NAME = "LLVM lib"; - SECTORDER_FLAGS = ""; - WARNING_CFLAGS = ( - "-Wmost", - "-Wno-four-char-constants", - "-Wno-unknown-pragmas", - ); - }; - name = Debug; - }; - CFDF86C00ADE819D00D40A3D /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - COPY_PHASE_STRIP = YES; - GCC_GENERATE_DEBUGGING_SYMBOLS = NO; - OPTIMIZATION_CFLAGS = "-O0"; - OTHER_CFLAGS = ""; - OTHER_LDFLAGS = ""; - OTHER_REZFLAGS = ""; - PRODUCT_NAME = "LLVM lib"; - SECTORDER_FLAGS = ""; - WARNING_CFLAGS = ( - "-Wmost", - "-Wno-four-char-constants", - "-Wno-unknown-pragmas", - ); - }; - name = Release; - }; - CFDF86C80ADE81D000D40A3D /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - COPY_PHASE_STRIP = NO; - GCC_GENERATE_DEBUGGING_SYMBOLS = YES; - OPTIMIZATION_CFLAGS = "-O0"; - OTHER_CFLAGS = ""; - OTHER_LDFLAGS = ""; - OTHER_REZFLAGS = ""; - PRODUCT_NAME = "LLVM llc"; - SECTORDER_FLAGS = ""; - WARNING_CFLAGS = ( - "-Wmost", - "-Wno-four-char-constants", - "-Wno-unknown-pragmas", - ); - }; - name = Debug; - }; - CFDF86C90ADE81D000D40A3D /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - COPY_PHASE_STRIP = YES; - GCC_GENERATE_DEBUGGING_SYMBOLS = NO; - OPTIMIZATION_CFLAGS = "-O0"; - OTHER_CFLAGS = ""; - OTHER_LDFLAGS = ""; - OTHER_REZFLAGS = ""; - PRODUCT_NAME = "LLVM llc"; - SECTORDER_FLAGS = ""; - WARNING_CFLAGS = ( - "-Wmost", - "-Wno-four-char-constants", - "-Wno-unknown-pragmas", - ); - }; - name = Release; - }; - CFDF86D60ADE820000D40A3D /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - COPY_PHASE_STRIP = NO; - GCC_GENERATE_DEBUGGING_SYMBOLS = YES; - OPTIMIZATION_CFLAGS = "-O0"; - OTHER_CFLAGS = ""; - OTHER_LDFLAGS = ""; - OTHER_REZFLAGS = ""; - PRODUCT_NAME = "LLVM full llc"; - SECTORDER_FLAGS = ""; - WARNING_CFLAGS = ( - "-Wmost", - "-Wno-four-char-constants", - "-Wno-unknown-pragmas", - ); - }; - name = Debug; - }; - CFDF86D70ADE820000D40A3D /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - COPY_PHASE_STRIP = YES; - GCC_GENERATE_DEBUGGING_SYMBOLS = NO; - OPTIMIZATION_CFLAGS = "-O0"; - OTHER_CFLAGS = ""; - OTHER_LDFLAGS = ""; - OTHER_REZFLAGS = ""; - PRODUCT_NAME = "LLVM full llc"; - SECTORDER_FLAGS = ""; - WARNING_CFLAGS = ( - "-Wmost", - "-Wno-four-char-constants", - "-Wno-unknown-pragmas", - ); - }; - name = Release; - }; - DE66EC4D08ABE78900323D32 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - COPY_PHASE_STRIP = NO; - DEBUGGING_SYMBOLS = YES; - GCC_DYNAMIC_NO_PIC = NO; - GCC_ENABLE_FIX_AND_CONTINUE = YES; - GCC_GENERATE_DEBUGGING_SYMBOLS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - OPTIMIZATION_CFLAGS = "-O0"; - OTHER_CFLAGS = ""; - OTHER_LDFLAGS = ""; - PRODUCT_NAME = LLVM; - ZERO_LINK = YES; - }; - name = Debug; - }; - DE66EC4E08ABE78900323D32 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - COPY_PHASE_STRIP = YES; - ENABLE_OPTIMIZED = 1; - GCC_ENABLE_FIX_AND_CONTINUE = NO; - OTHER_CFLAGS = ""; - OTHER_LDFLAGS = ""; - PRODUCT_NAME = LLVM; - ZERO_LINK = NO; - }; - name = Release; - }; - DE66EC5108ABE78900323D32 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - DEBUG_INFORMATION_FORMAT = dwarf; - GCC_OPTIMIZATION_LEVEL = 0; - USER_HEADER_SEARCH_PATHS = "../include/**"; - }; - name = Debug; - }; - DE66EC5208ABE78900323D32 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - DEBUG_INFORMATION_FORMAT = dwarf; - USER_HEADER_SEARCH_PATHS = "../include/**"; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - CF0329B708D1BE530030FD33 /* Build configuration list for PBXLegacyTarget "LLVM lib" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - CF0329B808D1BE530030FD33 /* Debug */, - CF0329B908D1BE530030FD33 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Debug; - }; - CF0329C308D1BEC40030FD33 /* Build configuration list for PBXLegacyTarget "LLVM llc" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - CF0329C408D1BEC40030FD33 /* Debug */, - CF0329C508D1BEC40030FD33 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Debug; - }; - CF0329C708D1BEC40030FD33 /* Build configuration list for PBXAggregateTarget "LLVM full llc" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - CF0329C808D1BEC40030FD33 /* Debug */, - CF0329C908D1BEC40030FD33 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Debug; - }; - CF490E840907CDAB0072DB1C /* Build configuration list for PBXLegacyTarget "LLVM TableGen" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - CF490E850907CDAB0072DB1C /* Debug */, - CF490E860907CDAB0072DB1C /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Debug; - }; - CFDF86BE0ADE819D00D40A3D /* Build configuration list for PBXLegacyTarget "LLVM lib release" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - CFDF86BF0ADE819D00D40A3D /* Debug */, - CFDF86C00ADE819D00D40A3D /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Debug; - }; - CFDF86C70ADE81D000D40A3D /* Build configuration list for PBXLegacyTarget "LLVM llc release" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - CFDF86C80ADE81D000D40A3D /* Debug */, - CFDF86C90ADE81D000D40A3D /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Debug; - }; - CFDF86D50ADE820000D40A3D /* Build configuration list for PBXAggregateTarget "LLVM full llc release" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - CFDF86D60ADE820000D40A3D /* Debug */, - CFDF86D70ADE820000D40A3D /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Debug; - }; - DE66EC4C08ABE78900323D32 /* Build configuration list for PBXLegacyTarget "LLVM" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - DE66EC4D08ABE78900323D32 /* Debug */, - DE66EC4E08ABE78900323D32 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Debug; - }; - DE66EC5008ABE78900323D32 /* Build configuration list for PBXProject "LLVM" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - DE66EC5108ABE78900323D32 /* Debug */, - DE66EC5208ABE78900323D32 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Debug; - }; -/* End XCConfigurationList section */ - }; - rootObject = 08FB7793FE84155DC02AAC07 /* Project object */; -} diff --git a/Xcode/README.txt b/Xcode/README.txt deleted file mode 100644 index 614cd674726..00000000000 --- a/Xcode/README.txt +++ /dev/null @@ -1 +0,0 @@ -Xcode project files for LLVM, for Xcode 2.1 diff --git a/autoconf/m4/bison.m4 b/autoconf/m4/bison.m4 deleted file mode 100644 index 48b83cc4a61..00000000000 --- a/autoconf/m4/bison.m4 +++ /dev/null @@ -1,15 +0,0 @@ -# -# Check for Bison. -# -# This macro verifies that Bison is installed. If successful, then -# 1) YACC is set to bison -y (to emulate YACC calls) -# 2) BISON is set to bison -# -AC_DEFUN([AC_PROG_BISON], -[AC_CACHE_CHECK([],[llvm_cv_has_bison],[AC_PROG_YACC()]) -if test "$YACC" != "bison -y"; then - AC_SUBST(BISON,[]) - AC_MSG_WARN([bison not found, can't rebuild grammars]) -else - AC_SUBST(BISON,[bison]) -fi]) diff --git a/autoconf/m4/cxx_bidi_iterator.m4 b/autoconf/m4/cxx_bidi_iterator.m4 deleted file mode 100644 index d7de85630b5..00000000000 --- a/autoconf/m4/cxx_bidi_iterator.m4 +++ /dev/null @@ -1,22 +0,0 @@ -# -# Check for bidirectional iterator extension. This is modified from -# http://www.gnu.org/software/ac-archive/htmldoc/ac_cxx_have_ext_hash_set.html -# -AC_DEFUN([AC_CXX_HAVE_BI_ITERATOR], -[AC_CACHE_CHECK(whether the compiler has the bidirectional iterator, -ac_cv_cxx_have_bi_iterator, -[AC_REQUIRE([AC_CXX_NAMESPACES]) - AC_LANG_PUSH([C++]) - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include -#ifdef HAVE_NAMESPACES -using namespace std; -#endif]], [[bidirectional_iterator t; return 0;]])],[ac_cv_cxx_have_bi_iterator=yes],[ac_cv_cxx_have_bi_iterator=no]) - AC_LANG_POP([C++]) -]) -if test "$ac_cv_cxx_have_bi_iterator" = yes -then - AC_DEFINE(HAVE_BI_ITERATOR,1,[Have bi-directional iterator]) -else - AC_DEFINE(HAVE_BI_ITERATOR,0,[Does not have bi-directional iterator]) -fi -]) diff --git a/autoconf/m4/cxx_fwd_iterator.m4 b/autoconf/m4/cxx_fwd_iterator.m4 deleted file mode 100644 index eb7660c7c25..00000000000 --- a/autoconf/m4/cxx_fwd_iterator.m4 +++ /dev/null @@ -1,22 +0,0 @@ -# Check for forward iterator extension. This is modified from -# http://www.gnu.org/software/ac-archive/htmldoc/ac_cxx_have_ext_hash_set.html -AC_DEFUN([AC_CXX_HAVE_FWD_ITERATOR], -[AC_CACHE_CHECK(whether the compiler has forward iterators, -ac_cv_cxx_have_fwd_iterator, -[AC_REQUIRE([AC_CXX_NAMESPACES]) - AC_LANG_PUSH([C++]) - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include -#ifdef HAVE_NAMESPACES -using namespace std; -#endif]], [[forward_iterator t; return 0;]])],[ac_cv_cxx_have_fwd_iterator=yes],[ac_cv_cxx_have_fwd_iterator=no]) - AC_LANG_POP([C++]) -]) -if test "$ac_cv_cxx_have_fwd_iterator" = yes -then - AC_DEFINE(HAVE_FWD_ITERATOR,1,[Have forward iterator]) -else - AC_DEFINE(HAVE_FWD_ITERATOR,0,[Does not have forward iterator]) -fi -]) - - diff --git a/autoconf/m4/cxx_namespaces.m4 b/autoconf/m4/cxx_namespaces.m4 deleted file mode 100644 index d8d650e4d44..00000000000 --- a/autoconf/m4/cxx_namespaces.m4 +++ /dev/null @@ -1,19 +0,0 @@ -# Check for C++ namespace support. This is from -# http://www.gnu.org/software/ac-archive/htmldoc/ac_cxx_namespaces.html -# -AC_DEFUN([AC_CXX_NAMESPACES], -[AC_CACHE_CHECK(whether the compiler implements namespaces, -ac_cv_cxx_namespaces, -[AC_LANG_PUSH([C++]) - AC_COMPILE_IFELSE([AC_LANG_PROGRAM( - [[namespace Outer { namespace Inner { int i = 0; }}]], - [[using namespace Outer::Inner; return i;]])], - ac_cv_cxx_namespaces=yes, - ac_cv_cxx_namespaces=no) - AC_LANG_POP([C++]) -]) -if test "$ac_cv_cxx_namespaces" = yes; then - AC_DEFINE(HAVE_NAMESPACES,,[define if the compiler implements namespaces]) -fi -]) - diff --git a/autoconf/m4/cxx_std_iterator.m4 b/autoconf/m4/cxx_std_iterator.m4 deleted file mode 100644 index 38a611764c7..00000000000 --- a/autoconf/m4/cxx_std_iterator.m4 +++ /dev/null @@ -1,26 +0,0 @@ -# Check for standard iterator extension. This is modified from -# http://www.gnu.org/software/ac-archive/htmldoc/ac_cxx_have_ext_hash_set.html -AC_DEFUN([AC_CXX_HAVE_STD_ITERATOR], -[AC_CACHE_CHECK(whether the compiler has the standard iterator, -ac_cv_cxx_have_std_iterator, -[AC_REQUIRE([AC_CXX_NAMESPACES]) - AC_LANG_PUSH([C++]) - AC_COMPILE_IFELSE([AC_LANG_PROGRAM( - [[#include -#ifdef HAVE_NAMESPACES -using namespace std; -#endif]], - [[iterator t; return 0;]])], - ac_cv_cxx_have_std_iterator=yes, - ac_cv_cxx_have_std_iterator=no) - AC_LANG_POP([C++]) -]) -if test "$ac_cv_cxx_have_std_iterator" = yes -then - AC_DEFINE(HAVE_STD_ITERATOR,1,[Have std namespace iterator]) -else - AC_DEFINE(HAVE_STD_ITERATOR,0,[Does not have std namespace iterator]) -fi -]) - - diff --git a/autoconf/m4/flex.m4 b/autoconf/m4/flex.m4 deleted file mode 100644 index 5cb3dc4f8fd..00000000000 --- a/autoconf/m4/flex.m4 +++ /dev/null @@ -1,17 +0,0 @@ -# -# Check for FLEX. -# -# This macro verifies that flex is installed. If successful, then -# 1) $LEX is set to "flex" (to emulate lex calls) -# 2) BISON is set to bison -AC_DEFUN([AC_PROG_FLEX], -[AC_CACHE_CHECK(, -ac_cv_has_flex, -[AC_PROG_LEX() -]) -if test "$LEX" != "flex"; then - AC_MSG_ERROR([flex not found but required]) -else - AC_SUBST(FLEX,[flex],[location of flex]) -fi -]) diff --git a/docs/AdvancedGetElementPtr.html b/docs/AdvancedGetElementPtr.html deleted file mode 100644 index 1d372786927..00000000000 --- a/docs/AdvancedGetElementPtr.html +++ /dev/null @@ -1,362 +0,0 @@ - - - - - The Revenge Of The Often Misunderstood GEP Instruction - - - - - -
- The Revenge Of The Often Misunderstood GEP Instruction -
- - - - -
-

GEP was mysterious and wily at first, but it turned out that the basic - workings were fairly comprehensible. However the dragon was merely subdued; - now it's back, and it has more fundamental complexity to confront. This - document seeks to uncover misunderstandings of the GEP operator that tend - to persist past initial confusion about the funky "extra 0" thing. Here we - show that the GEP instruction is really not quite as simple as it seems, - even after the initial confusion is overcome.

-
- - - -
-

It's very similar; there are only subtle differences.

- -

With ptrtoint, you have to pick an integer type. One approach is to pick i64; - this is safe on everything LLVM supports (LLVM internally assumes pointers - are never wider than 64 bits in many places), and the optimizer will actually - narrow the i64 arithmetic down to the actual pointer size on targets which - don't support 64-bit arithmetic in most cases. However, there are some cases - where it doesn't do this. With GEP you can avoid this problem. - -

Also, GEP carries additional pointer aliasing rules. It's invalid to take a - GEP from one object, address into a different separately allocated - object, and dereference it. IR producers (front-ends) must follow this rule, - and consumers (optimizers, specifically alias analysis) benefit from being - able to rely on it.

- -

And, GEP is more concise in common cases.

- -

However, for the underlying integer computation implied, there - is no difference.

- -
- - - -
-

You don't. The integer computation implied by a GEP is target-independent. - Typically what you'll need to do is make your backend pattern-match - expressions trees involving ADD, MUL, etc., which are what GEP is lowered - into. This has the advantage of letting your code work correctly in more - cases.

- -

GEP does use target-dependent parameters for the size and layout of data - types, which targets can customize.

- -

If you require support for addressing units which are not 8 bits, you'll - need to fix a lot of code in the backend, with GEP lowering being only a - small piece of the overall picture.

- -
- - - -
-

The specific type i32 is probably just a historical artifact, however it's - wide enough for all practical purposes, so there's been no need to change it. - It doesn't necessarily imply i32 address arithmetic; it's just an identifier - which identifies a field in a struct. Requiring that all struct indices be - the same reduces the range of possibilities for cases where two GEPs are - effectively the same but have distinct operand types.

- -
- - - -
-

GEPs don't natively support VLAs. LLVM's type system is entirely static, - and GEP address computations are guided by an LLVM type.

- -

VLA indices can be implemented as linearized indices. For example, an - expression like X[a][b][c], must be effectively lowered into a form - like X[a*m+b*n+c], so that it appears to the GEP as a single-dimensional - array reference.

- -

This means if you want to write an analysis which understands array - indices and you want to support VLAs, your code will have to be - prepared to reverse-engineer the linearization. One way to solve this - problem is to use the ScalarEvolution library, which always presents - VLA and non-VLA indexing in the same manner.

- -
- - - -
-

There are two senses in which an array index can be out of bounds.

- -

First, there's the array type which comes from the (static) type of - the first operand to the GEP. Indices greater than the number of elements - in the corresponding static array type are valid. There is no problem with - out of bounds indices in this sense. Indexing into an array only depends - on the size of the array element, not the number of elements.

- -

A common example of how this is used is arrays where the size is not known. - It's common to use array types with zero length to represent these. The - fact that the static type says there are zero elements is irrelevant; it's - perfectly valid to compute arbitrary element indices, as the computation - only depends on the size of the array element, not the number of - elements. Note that zero-sized arrays are not a special case here.

- -

This sense is unconnected with inbounds keyword. The - inbounds keyword is designed to describe low-level pointer - arithmetic overflow conditions, rather than high-level array - indexing rules. - -

Analysis passes which wish to understand array indexing should not - assume that the static array type bounds are respected.

- -

The second sense of being out of bounds is computing an address that's - beyond the actual underlying allocated object.

- -

With the inbounds keyword, the result value of the GEP is - undefined if the address is outside the actual underlying allocated - object and not the address one-past-the-end.

- -

Without the inbounds keyword, there are no restrictions - on computing out-of-bounds addresses. Obviously, performing a load or - a store requires an address of allocated and sufficiently aligned - memory. But the GEP itself is only concerned with computing addresses.

- -
- - - -
-

Yes. This is basically a special case of array indices being out - of bounds.

- -
- - - -
-

Yes. If both addresses are within the same allocated object, or - one-past-the-end, you'll get the comparison result you expect. If either - is outside of it, integer arithmetic wrapping may occur, so the - comparison may not be meaningful.

- -
- - - -
-

Yes. There are no restrictions on bitcasting a pointer value to an arbitrary - pointer type. The types in a GEP serve only to define the parameters for the - underlying integer computation. They need not correspond with the actual - type of the underlying object.

- -

Furthermore, loads and stores don't have to use the same types as the type - of the underlying object. Types in this context serve only to specify - memory size and alignment. Beyond that there are merely a hint to the - optimizer indicating how the value will likely be used.

- -
- - - -
-

You can compute an address that way, but if you use GEP to do the add, - you can't use that pointer to actually access the object, unless the - object is managed outside of LLVM.

- -

The underlying integer computation is sufficiently defined; null has a - defined value -- zero -- and you can add whatever value you want to it.

- -

However, it's invalid to access (load from or store to) an LLVM-aware - object with such a pointer. This includes GlobalVariables, Allocas, and - objects pointed to by noalias pointers.

- -

If you really need this functionality, you can do the arithmetic with - explicit integer instructions, and use inttoptr to convert the result to - an address. Most of GEP's special aliasing rules do not apply to pointers - computed from ptrtoint, arithmetic, and inttoptr sequences.

- -
- - - -
-

As with arithmetic on null, You can use GEP to compute an address that - way, but you can't use that pointer to actually access the object if you - do, unless the object is managed outside of LLVM.

- -

Also as above, ptrtoint and inttoptr provide an alternative way to do this - which do not have this restriction.

- -
- - - -
-

You can't do type-based alias analysis using LLVM's built-in type system, - because LLVM has no restrictions on mixing types in addressing, loads or - stores.

- -

It would be possible to add special annotations to the IR, probably using - metadata, to describe a different type system (such as the C type system), - and do type-based aliasing on top of that. This is a much bigger - undertaking though.

- -
- - - - -
-

Some LLVM optimizers operate on GEPs by internally lowering them into - more primitive integer expressions, which allows them to be combined - with other integer expressions and/or split into multiple separate - integer expressions. If they've made non-trivial changes, translating - back into LLVM IR can involve reverse-engineering the structure of - the addressing in order to fit it into the static type of the original - first operand. It isn't always possibly to fully reconstruct this - structure; sometimes the underlying addressing doesn't correspond with - the static type at all. In such cases the optimizer instead will emit - a GEP with the base pointer casted to a simple address-unit pointer, - using the name "uglygep". This isn't pretty, but it's just as - valid, and it's sufficient to preserve the pointer aliasing guarantees - that GEP provides.

- -
- - - - -
-

Sort of. This hasn't always been forcefully disallowed, though it's - not recommended. It leads to awkward special cases in the optimizers. - In the future, it may be outright disallowed.

- -

Instead, you should cast your pointer types and use arrays instead of - vectors for addressing. Arrays have the same in-memory representation - as vectors, so the addressing is interchangeable.

- -
- - - - -
-

Unknown.

- -
- - - - -
-

If the GEP has the inbounds keyword, the result value is - undefined.

- -

Otherwise, the result value is the result from evaluating the implied - two's complement integer computation. However, since there's no - guarantee of where an object will be allocated in the address space, - such values have limited meaning.

- -
- - - - -
-

None, except that the address space qualifier on the first operand pointer - type always matches the address space qualifier on the result type.

- -
- - - - -
-

The design of GEP has the following goals, in rough unofficial - order of priority:

-
    -
  • Support C, C-like languages, and languages which can be - conceptually lowered into C (this covers a lot).
  • -
  • Support optimizations such as those that are common in - C compilers.
  • -
  • Provide a consistent method for computing addresses so that - address computations don't need to be a part of load and - store instructions in the IR.
  • -
  • Support non-C-like languages, to the extent that it doesn't - interfere with other goals.
  • -
  • Minimize target-specific information in the IR.
  • -
-
- - - -
-
- Valid CSS - Valid HTML 4.01 - The LLVM Compiler Infrastructure
- Last modified: $Date: 2010-02-18 19:40:29 +0100 (Thu, 18 Feb 2010) $ -
- - - diff --git a/docs/CommandGuide/llvm-db.pod b/docs/CommandGuide/llvm-db.pod deleted file mode 100644 index 132417685c2..00000000000 --- a/docs/CommandGuide/llvm-db.pod +++ /dev/null @@ -1,16 +0,0 @@ -=pod - -=head1 NAME - -llvm-db - LLVM debugger (alpha) - -=head1 SYNOPSIS - -Details coming soon. Please see -L in the meantime. - -=head1 AUTHORS - -Maintained by the LLVM Team (L). - -=cut diff --git a/docs/ReleaseNotes-2.6.html b/docs/ReleaseNotes-2.6.html deleted file mode 100644 index 64084cd4f55..00000000000 --- a/docs/ReleaseNotes-2.6.html +++ /dev/null @@ -1,784 +0,0 @@ - - - - - - LLVM 2.6 Release Notes - - - -
LLVM 2.6 Release Notes
- -
    -
  1. Introduction
  2. -
  3. Sub-project Status Update
  4. -
  5. External Projects Using LLVM 2.6
  6. -
  7. What's New in LLVM 2.6?
  8. -
  9. Installation Instructions
  10. -
  11. Portability and Supported Platforms
  12. -
  13. Known Problems
  14. -
  15. Additional Information
  16. -
- -
-

Written by the LLVM Team

-
- - - - - -
- -

This document contains the release notes for the LLVM Compiler -Infrastructure, release 2.6. Here we describe the status of LLVM, including -major improvements from the previous release and significant known problems. -All LLVM releases may be downloaded from the LLVM releases web site.

- -

For more information about LLVM, including information about the latest -release, please check out the main LLVM -web site. If you have questions or comments, the LLVM Developer's Mailing -List is a good place to send them.

- -

Note that if you are reading this file from a Subversion checkout or the -main LLVM web page, this document applies to the next release, not the -current one. To see the release notes for a specific release, please see the -releases page.

- -
- - - - - - - - - -
-

-The LLVM 2.6 distribution currently consists of code from the core LLVM -repository —which roughly includes the LLVM optimizers, code generators -and supporting tools — and the llvm-gcc repository. In addition to this -code, the LLVM Project includes other sub-projects that are in development. The -two which are the most actively developed are the Clang -Project and the VMKit Project. -

- -
- - - - - -
- -

The Clang project is an effort to build -a set of new 'LLVM native' front-end technologies for the LLVM optimizer and -code generator. While Clang is not included in the LLVM 2.6 release, it is -continuing to make major strides forward in all areas. Its C and Objective-C -parsing and code generation support is now very solid. For example, it is -capable of successfully building many real-world applications for X86-32 -and X86-64, -including the FreeBSD -kernel and gcc 4.2. C++ is also -making incredible progress, -and work on templates has recently started. If you are -interested in fast compiles and good diagnostics, we encourage you to try it out -by building from mainline -and reporting any issues you hit to the Clang front-end mailing -list.

- -

In the LLVM 2.6 time-frame, the Clang team has made many improvements:

- -
    -
  • Something wonderful!
  • -
  • Many many bugs are fixed and many features have been added.
  • -
-
- - - - -
- -

Previously announced in the 2.4 LLVM release, the Clang project also -includes an early stage static source code analysis tool for automatically finding bugs -in C and Objective-C programs. The tool performs a growing set of checks to find -bugs that occur on a specific path within a program.

- -

In the LLVM 2.6 time-frame there have been many significant improvements to -XYZ.

- -

The set of checks performed by the static analyzer continues to expand, and -future plans for the tool include full source-level inter-procedural analysis -and deeper checks such as buffer overrun detection. There are many opportunities -to extend and enhance the static analyzer, and anyone interested in working on -this project is encouraged to get involved!

- -
- - - - -
-

-The VMKit project is an implementation of -a JVM and a CLI Virtual Machines (Microsoft .NET is an -implementation of the CLI) using the Just-In-Time compiler of LLVM.

- -

Following LLVM 2.6, VMKit has its XYZ release that you can find on its -webpage. The release includes -bug fixes, cleanup and new features. The major changes are:

- -
    - -
  • Something wonderful!
  • - -
-
- - - - - - -
-Pure -
- -
-

-Pure -is an algebraic/functional programming language based on term rewriting. -Programs are collections of equations which are used to evaluate expressions in -a symbolic fashion. Pure offers dynamic typing, eager and lazy evaluation, -lexical closures, a hygienic macro system (also based on term rewriting), -built-in list and matrix support (including list and matrix comprehensions) and -an easy-to-use C interface. The interpreter uses LLVM as a backend to - JIT-compile Pure programs to fast native code.

- -

In addition to the usual algebraic data structures, Pure also has -MATLAB-style matrices in order to support numeric computations and signal -processing in an efficient way. Pure is mainly aimed at mathematical -applications right now, but it has been designed as a general purpose language. -The dynamic interpreter environment and the C interface make it possible to use -it as a kind of functional scripting language for many application areas. -

-
- - - - - -
-

-LDC is an implementation of -the D Programming Language using the LLVM optimizer and code generator. -The LDC project works great with the LLVM 2.6 release. General improvements in -this -cycle have included new inline asm constraint handling, better debug info -support, general bugfixes, and better x86-64 support. This has allowed -some major improvements in LDC, getting us much closer to being as -fully featured as the original DMD compiler from DigitalMars. -

-
- - - - -
-

Roadsend PHP (rphp) is an open -source implementation of the PHP programming -language that uses LLVM for its optimizer, JIT, and static compiler. This is a -reimplementation of an earlier project that is now based on LLVM.

-
- - - - -
-

Unladen Swallow is a -branch of Python intended to be fully -compatible and significantly faster. It uses LLVM's optimization passes and JIT -compiler.

-
- - - - -
-

Rubinius is a new virtual -machine for Ruby. It leverages LLVM to dynamically compile Ruby code down to -machine code using LLVM's JIT.

-
- - - - - - -
- -

This release includes a huge number of bug fixes, performance tweaks, and -minor improvements. Some of the major improvements and new features are listed -in this section. -

-
- - - - -
- -

LLVM 2.6 includes several major new capabilities:

- -
    -
  • Something wonderful!
  • -
- -
- - - - - -
- -

LLVM fully supports the llvm-gcc 4.2 front-end, which marries the GCC -front-ends and driver with the LLVM optimizer and code generator. It currently -includes support for the C, C++, Objective-C, Ada, and Fortran front-ends.

- -
    -
  • Something wonderful!
  • -
- -
- - - - - -
-

LLVM IR has several new features that are used by our existing front-ends and -can be useful if you are writing a front-end for LLVM:

- -
    -
  • Something wonderful!
  • -
- -
- - - - -
- -

In addition to a large array of bug fixes and minor performance tweaks, this -release includes a few major enhancements and additions to the optimizers:

- -
    - -
  • Something wonderful!
  • - -
- -
- - - - -
- -

We have put a significant amount of work into the code generator -infrastructure, which allows us to implement more aggressive algorithms and make -it run faster:

- -
    - -
  • Something wonderful!
  • -
-
- - - - -
-

New features of the X86 target include: -

- -
    - -
  • Something wonderful!
  • -
- -
- - - - -
-

New features of the PIC16 target include: -

- -
    -
  • Something wonderful!
  • -
- -

Things not yet supported:

- -
    -
  • Floating point.
  • -
  • Passing/returning aggregate types to and from functions.
  • -
  • Variable arguments.
  • -
  • Indirect function calls.
  • -
  • Interrupts/programs.
  • -
  • Debug info.
  • -
- -
- - - - - -
-

New features include:

- -
    -
  • Something wonderful!
  • -
- -
- - - - - -
- -

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

- -
    - -
  • Something horrible!
  • - -
- - -

In addition, many APIs have changed in this release. Some of the major LLVM -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.
  • -
- -
- - - - - - - -
- -

LLVM is known to work on the following platforms:

- -
    -
  • Intel and AMD machines (IA32, X86-64, AMD64, EMT-64) running Red Hat -Linux, Fedora Core and FreeBSD (and probably other unix-like systems).
  • -
  • PowerPC and X86-based Mac OS X systems, running 10.3 and above in 32-bit -and 64-bit modes.
  • -
  • Intel and AMD machines running on Win32 using MinGW libraries (native).
  • -
  • Intel and AMD machines running on Win32 with the Cygwin libraries (limited - support is available for native builds with Visual C++).
  • -
  • Sun UltraSPARC workstations running Solaris 10.
  • -
  • Alpha-based machines running Debian GNU/Linux.
  • -
  • Itanium-based (IA64) machines running Linux and HP-UX.
  • -
- -

The core LLVM infrastructure uses GNU autoconf to adapt itself -to the machine and operating system on which it is built. However, minor -porting may be required to get LLVM to work on new platforms. We welcome your -portability patches and reports of successful builds or error messages.

- -
- - - - - -
- -

This section contains significant known problems with the LLVM system, -listed by component. If you run into a problem, please check the LLVM bug database and submit a bug if -there isn't already one.

- -
- - - - -
- -

The following components of this LLVM release are either untested, known to -be broken or unreliable, or are in early development. These components should -not be relied on, and bugs should not be filed against them, but they may be -useful to some people. In particular, if you would like to work on one of these -components, please contact us on the LLVMdev list.

- -
    -
  • The MSIL, IA64, Alpha, SPU, MIPS, and PIC16 backends are experimental.
  • -
  • The llc "-filetype=asm" (the default) is the only - supported value for this option.
  • -
- -
- - - - -
- -
    -
  • The X86 backend does not yet support - all inline assembly that uses the X86 - floating point stack. It supports the 'f' and 't' constraints, but not - 'u'.
  • -
  • The X86 backend generates inefficient floating point code when configured - to generate code for systems that don't have SSE2.
  • -
  • Win64 code generation wasn't widely tested. Everything should work, but we - expect small issues to happen. Also, llvm-gcc cannot build the mingw64 - runtime currently due - to several - bugs and due to lack of support for - the - 'u' inline assembly constraint and for X87 floating point inline assembly.
  • -
  • The X86-64 backend does not yet support the LLVM IR instruction - va_arg. Currently, the llvm-gcc and front-ends support variadic - argument constructs on X86-64 by lowering them manually.
  • -
- -
- - - - -
- -
    -
  • The Linux PPC32/ABI support needs testing for the interpreter and static -compilation, and lacks support for debug information.
  • -
- -
- - - - -
- -
    -
  • Thumb mode works only on ARMv6 or higher processors. On sub-ARMv6 -processors, thumb programs can crash or produce wrong -results (PR1388).
  • -
  • Compilation for ARM Linux OABI (old ABI) is supported but not fully tested. -
  • -
  • There is a bug in QEMU-ARM (<= 0.9.0) which causes it to incorrectly - execute -programs compiled with LLVM. Please use more recent versions of QEMU.
  • -
- -
- - - - -
- -
    -
  • The SPARC backend only supports the 32-bit SPARC ABI (-m32); it does not - support the 64-bit SPARC ABI (-m64).
  • -
- -
- - - - -
- -
    -
  • The O32 ABI is not fully supported.
  • -
  • 64-bit MIPS targets are not supported yet.
  • -
- -
- - - - -
- -
    - -
  • On 21164s, some rare FP arithmetic sequences which may trap do not have the -appropriate nops inserted to ensure restartability.
  • - -
-
- - - - -
- -
    -
  • The Itanium backend is highly experimental and has a number of known - issues. We are looking for a maintainer for the Itanium backend. If you - are interested, please contact the LLVMdev mailing list.
  • -
- -
- - - - -
- - - -
- - - - - -
- -

llvm-gcc does not currently support Link-Time -Optimization on most platforms "out-of-the-box". Please inquire on the -LLVMdev mailing list if you are interested.

- -

The only major language feature of GCC not supported by llvm-gcc is - the __builtin_apply family of builtins. However, some extensions - are only supported on some targets. For example, trampolines are only - supported on some targets (these are used when you take the address of a - nested function).

- -

If you run into GCC extensions which are not supported, please let us know. -

- -
- - - - -
- -

The C++ front-end is considered to be fully -tested and works for a number of non-trivial programs, including LLVM -itself, Qt, Mozilla, etc.

- -
    -
  • Exception handling works well on the X86 and PowerPC targets. Currently - only Linux and Darwin targets are supported (both 32 and 64 bit).
  • -
- -
- - - - -
-
    -
  • Fortran support generally works, but there are still several unresolved bugs - in Bugzilla. Please see the tools/gfortran component for details.
  • -
-
- - - - -
-The llvm-gcc 4.2 Ada compiler works fairly well; however, this is not a mature -technology, and problems should be expected. -
    -
  • The Ada front-end currently only builds on X86-32. This is mainly due -to lack of trampoline support (pointers to nested functions) on other platforms. -However, it also fails to build on X86-64 -which does support trampolines.
  • -
  • The Ada front-end fails to bootstrap. -This is due to lack of LLVM support for setjmp/longjmp style -exception handling, which is used internally by the compiler. -Workaround: configure with --disable-bootstrap.
  • -
  • The c380004, c393010 -and cxg2021 ACATS tests fail -(c380004 also fails with gcc-4.2 mainline). -If the compiler is built with checks disabled then c393010 -causes the compiler to go into an infinite loop, using up all system memory.
  • -
  • Some GCC specific Ada tests continue to crash the compiler.
  • -
  • The -E binder option (exception backtraces) -does not work and will result in programs -crashing if an exception is raised. Workaround: do not use -E.
  • -
  • Only discrete types are allowed to start -or finish at a non-byte offset in a record. Workaround: do not pack records -or use representation clauses that result in a field of a non-discrete type -starting or finishing in the middle of a byte.
  • -
  • The lli interpreter considers -'main' as generated by the Ada binder to be invalid. -Workaround: hand edit the file to use pointers for argv and -envp rather than integers.
  • -
  • The -fstack-check option is -ignored.
  • -
-
- - - - - -
- -

A wide variety of additional information is available on the LLVM web page, in particular in the documentation section. The web page also -contains versions of the API documentation which is up-to-date with the -Subversion version of the source code. -You can access versions of these documents specific to this release by going -into the "llvm/doc/" directory in the LLVM tree.

- -

If you have any questions or comments about LLVM, please feel free to contact -us via the mailing -lists.

- -
- - - -
-
- Valid CSS - Valid HTML 4.01 - - LLVM Compiler Infrastructure
- Last modified: $Date: 2009-07-02 18:48:38 +0200 (Thu, 02 Jul 2009) $ -
- - - diff --git a/docs/tutorial/JITTutorial1.html b/docs/tutorial/JITTutorial1.html deleted file mode 100644 index 3b7b8dea1ac..00000000000 --- a/docs/tutorial/JITTutorial1.html +++ /dev/null @@ -1,207 +0,0 @@ - - - - - LLVM Tutorial 1: A First Function - - - - - - - - -
LLVM Tutorial 1: A First Function
- -
-

Written by Owen Anderson

-
- - - - - -
- -

For starters, let's consider a relatively straightforward function that takes three integer parameters and returns an arithmetic combination of them. This is nice and simple, especially since it involves no control flow:

- -
-
-int mul_add(int x, int y, int z) {
-  return x * y + z;
-}
-
-
- -

As a preview, the LLVM IR we’re going to end up generating for this function will look like:

- -
-
-define i32 @mul_add(i32 %x, i32 %y, i32 %z) {
-entry:
-  %tmp = mul i32 %x, %y
-  %tmp2 = add i32 %tmp, %z
-  ret i32 %tmp2
-}
-
-
- -

If you're unsure what the above code says, skim through the LLVM Language Reference Manual and convince yourself that the above LLVM IR is actually equivalent to the original function. Once you’re satisfied with that, let's move on to actually generating it programmatically!

- -

Of course, before we can start, we need to #include the appropriate LLVM header files:

- -
-
-#include "llvm/Module.h"
-#include "llvm/Function.h"
-#include "llvm/PassManager.h"
-#include "llvm/CallingConv.h"
-#include "llvm/Analysis/Verifier.h"
-#include "llvm/Assembly/PrintModulePass.h"
-#include "llvm/Support/IRBuilder.h"
-#include "llvm/Support/raw_ostream.h"
-
-
- -

Now, let's get started on our real program. Here's what our basic main() will look like:

- -
-
-using namespace llvm;
-
-Module* makeLLVMModule();
-
-int main(int argc, char**argv) {
-  Module* Mod = makeLLVMModule();
-
-  verifyModule(*Mod, PrintMessageAction);
-
-  PassManager PM;
-  PM.add(createPrintModulePass(&outs()));
-  PM.run(*Mod);
-
-  delete Mod;
-  return 0;
-}
-
-
- -

The first segment is pretty simple: it creates an LLVM “module.†In LLVM, a module represents a single unit of code that is to be processed together. A module contains things like global variables, function declarations, and implementations. Here we’ve declared a makeLLVMModule() function to do the real work of creating the module. Don’t worry, we’ll be looking at that one next!

- -

The second segment runs the LLVM module verifier on our newly created module. While this probably isn’t really necessary for a simple module like this one, it's always a good idea, especially if you’re generating LLVM IR based on some input. The verifier will print an error message if your LLVM module is malformed in any way.

- -

Finally, we instantiate an LLVM PassManager and run -the PrintModulePass on our module. LLVM uses an explicit pass -infrastructure to manage optimizations and various other things. -A PassManager, as should be obvious from its name, manages passes: -it is responsible for scheduling them, invoking them, and ensuring the proper -disposal after we’re done with them. For this example, we’re just using a -trivial pass that prints out our module in textual form.

- -

Now onto the interesting part: creating and populating a module. Here's the -first chunk of our makeLLVMModule():

- -
-
-Module* makeLLVMModule() {
-  // Module Construction
-  Module* mod = new Module("test", getGlobalContext());
-
-
- -

Exciting, isn’t it!? All we’re doing here is instantiating a module and giving it a name. The name isn’t particularly important unless you’re going to be dealing with multiple modules at once.

- -
-
-  Constant* c = mod->getOrInsertFunction("mul_add",
-  /*ret type*/                           IntegerType::get(32),
-  /*args*/                               IntegerType::get(32),
-                                         IntegerType::get(32),
-                                         IntegerType::get(32),
-  /*varargs terminated with null*/       NULL);
-  
-  Function* mul_add = cast<Function>(c);
-  mul_add->setCallingConv(CallingConv::C);
-
-
- -

We construct our Function by calling getOrInsertFunction() on our module, passing in the name, return type, and argument types of the function. In the case of our mul_add function, that means one 32-bit integer for the return value and three 32-bit integers for the arguments.

- -

You'll notice that getOrInsertFunction() doesn't actually return a Function*. This is because getOrInsertFunction() will return a cast of the existing function if the function already existed with a different prototype. Since we know that there's not already a mul_add function, we can safely just cast c to a Function*. - -

In addition, we set the calling convention for our new function to be the C -calling convention. This isn’t strictly necessary, but it ensures that our new -function will interoperate properly with C code, which is a good thing.

- -
-
-  Function::arg_iterator args = mul_add->arg_begin();
-  Value* x = args++;
-  x->setName("x");
-  Value* y = args++;
-  y->setName("y");
-  Value* z = args++;
-  z->setName("z");
-
-
- -

While we’re setting up our function, let's also give names to the parameters. This also isn’t strictly necessary (LLVM will generate names for them if you don’t specify them), but it’ll make looking at our output somewhat more pleasant. To name the parameters, we iterate over the arguments of our function and call setName() on them. We’ll also keep the pointer to x, y, and z around, since we’ll need them when we get around to creating instructions.

- -

Great! We have a function now. But what good is a function if it has no body? Before we start working on a body for our new function, we need to recall some details of the LLVM IR. The IR, being an abstract assembly language, represents control flow using jumps (we call them branches), both conditional and unconditional. The straight-line sequences of code between branches are called basic blocks, or just blocks. To create a body for our function, we fill it with blocks:

- -
-
-  BasicBlock* block = BasicBlock::Create(getGlobalContext(), "entry", mul_add);
-  IRBuilder<> builder(block);
-
-
- -

We create a new basic block, as you might expect, by calling its constructor. All we need to tell it is its name and the function to which it belongs. In addition, we’re creating an IRBuilder object, which is a convenience interface for creating instructions and appending them to the end of a block. Instructions can be created through their constructors as well, but some of their interfaces are quite complicated. Unless you need a lot of control, using IRBuilder will make your life simpler.

- -
-
-  Value* tmp = builder.CreateBinOp(Instruction::Mul,
-                                   x, y, "tmp");
-  Value* tmp2 = builder.CreateBinOp(Instruction::Add,
-                                    tmp, z, "tmp2");
-
-  builder.CreateRet(tmp2);
-  
-  return mod;
-}
-
-
- -

The final step in creating our function is to create the instructions that make it up. Our mul_add function is composed of just three instructions: a multiply, an add, and a return. IRBuilder gives us a simple interface for constructing these instructions and appending them to the “entry†block. Each of the calls to IRBuilder returns a Value* that represents the value yielded by the instruction. You’ll also notice that, above, x, y, and z are also Value*'s, so it's clear that instructions operate on Value*'s.

- -

And that's it! Now you can compile and run your code, and get a wonderful textual print out of the LLVM IR we saw at the beginning. To compile, use the following command line as a guide:

- -
-
-# c++ -g tut1.cpp `llvm-config --cxxflags --ldflags --libs core` -o tut1
-# ./tut1
-
-
- -

The llvm-config utility is used to obtain the necessary GCC-compatible compiler flags for linking with LLVM. For this example, we only need the 'core' library. We'll use others once we start adding optimizers and the JIT engine.

- -Next: A More Complicated Function -
- - -
-
- Valid CSS! - Valid HTML 4.01! - - Owen Anderson
- The LLVM Compiler Infrastructure
- Last modified: $Date: 2009-07-21 11:05:13 -0700 (Tue, 21 Jul 2009) $ -
- - - diff --git a/docs/tutorial/JITTutorial2-1.png b/docs/tutorial/JITTutorial2-1.png deleted file mode 100644 index eb21695f684aa96dbd8b77cca08726e90d19965d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 59107 zcmbTeWl)_>&^AZ}3oaoz!QI{6-Q9z`y95m$+}$05+ab8SySux?-sJh-s<(Fc&+e&8 zr7{e2dV0Ehdak}YA#yUJa9=RLfPsO*iHiv-fPsDD0t5Td4Fv&=JQvZ{0DpZp;g{wI z16%kcFe{r4{2SU}9!BhjdVuAUPj^fh7kaJ(q5TVH(JkWf>z`lct3-K$trX8;! zXld=F)4q;bnh+Q!D~V;pt?p*JqfEh)SfOZ+SO;0;I;FxFw2(Lz*_D213&Dvgpc&B7 zg?SuY#b2U8|5kx%O1)YIbGwIVev)9BSPf&IeKHPPrx*C;P!1A&Bs_g0dG(6(%@|$p zo|lf!a}^|FJi2zqK8A7W$v$?49r67m()&jq`7ulgl27RU!=#&Zj`(kI(x6lD-;j71 zG{V1m#MC5Q|3>0!YeV4mie0xNSkE`ZXh}F=2?$b18&=&das_}BX<1`P$5;Qb?^A?5mS zgv^Y71OI&_C$A^q|J$St;*Q|g*9{>^{&#U}x9K+2KXMGV`_-*^Fi+_J+a5K$lq(t^ z86qDUssP#TaR0UM801<~AcV$H^-0mE-66*a>UsTPQI19~m`&z6)gvZP3Y> z`SGQQsy|4kGFYb2UnVxJa1pW_1OK|7HS5|Hm#O*1^whHF!V>Np;u9uyMzfnzY3)vRup5p6st}-n5mMkYi6UJ{tc{3=I(_!;QiA6^U#8BSqx#&s9#?ljig)^mwT9X6kJYhwwz-r|k@RhaWB4$gh+C> z`8C&p{O%ppfZgs2L+L!+hJtIi^MpkxrtKggg|AiAVd`!YSH_r+7&O^wT}>i?AE2qVd@22L{|o3 z;O=s7T0gaQF=7v;{IlW^{Z2;N`c-#Sl7omN)bJo|Y+CA`i&jgm>N}cwaDI7sc5U;LFE57pJFNd`b@UXH~ZznEaDW8JBKGlbV z+NK`-IjgREv9&H-c)>Dz|5@rlIP{q30NnJ_m5+vl$Y z{jM;zi;nVc78A&S14u)zr@gRx{p+H~lq){zY5dd55XRFv5z?Cx`c&uEv~?F~K?>HdM+SjVDoS+u>_2N)9m2I{belT#>P{*r2o{&W@j z+IeoP#mXibMhp+Eukj`6oQO{^3nw4Eseg1-#90O(`(-243al+sVjmVF%@RY*G@KAZ zUN;6Zebsk(SSk<8v7gfH?>X0L^;HO0S(^bh=u)VU>(mGd#%b$xxK1rKIXJQ?&7`UZ z*9{W~_8{3nJx{Q3K+tP1DFzBI3seh+nT`u_!NIW4Oh(2VrB*!U`k|IrIaKSQ8C5qh zz8tFX>(33qNcMkc==eRfGklZ822>RXn{-Z9#b?9q{NvnVCkLIg5UE3ttgJ zl~X2nt!M{yy7-MGGpFGjuTL-NI#rx__)Mrj4BkFjD^1U2m&_B$mV4>Z;@ZKEF6lTW zl69GxX#bJwn}!0PVJ#jnDf~XI8zr^n-55rpS6S-ULnd9`lB*)D5u-_i4#5zj0z!V_u9+#RNei4HHiymnH5)7e%tkI_Tv_aZiF-A{3=t)F+!dsM|2GiuHUarI7aCJ-=nie zNo|3u(dqzWxVUjEez6Us{Tgki&8)&M5?gM?b4La17S#PltIL1(n{FE+^JkWvNswOg z0jB!jGvu<%x*y1korwxjN;)DPt6xEU&jK|gREdd6+)y&@blE%}(SOqNC7>!#C~Ba3 zsI4zne#^zujxs7kp=c%B)u?S|?GV$nuZ8?Fo!G?50B1Tb>mxsin28kBoC)@WN7%&K zB8@JF+fZNn@K?*rr90`WGc|$D=1Ff-O~J)oJ*8okc+n&lW;nCOa~8pQ&vulkHIUtppK+8I z>^0XUSf$gK2W4-Ot`AJ>2@xBRqXmDjPkj9Bbw`8O16r`V8KcBh3y_?baG)w*Zt=9m z9*SJ4Z+XH#nfR9UoeG6hGDf2PXKzw~y=Ad3X7l9w* zwo&goIAX#ZZJ6d>S0Hi1Vw&0yUTFA`9#TsFE}z(VeZ2aYH53Nx6!LE_Lxi^1kJ{G8jCu81*ODgRDtb0@Y0{J|+rcGCb26EkNZew}jc+!k`Ew89iojo#TI z%CdFCxR&wPaB~#)1EcC0C~2qq{=I#(jh*AutaZBu@X`ggKUyH^qEd2{;pm&t0FZn% zWFSwWc0X&$m9&wcN6f7;w{xmq^)}4I14=tp!lu0RPUn+ZDe@dM`4fF2JE23XwuA$3 zO}YASm8;Us`~nS}N+y_xf}$;?!WkxJXqF+OsWR!!RW833G%xrFzw#0hvYHgaqp!?O zq-+uma#ZOEl7ZuUH!!F5CH>Ck(>eN>4epPP#)U5kWyAivVE1mw=o z=SBP?Yr0^4X6o6(>(0_F_e{AAWY7eqJiCI+Iz-3Z-~0QO4q_G`Yvg^YtEN&=uV5&R zU*G3pR+iXlY&6UBn=??Pm=V6s=w~uXc2j!G(o>CpUP#g<6=K;l3nAkED$i`?qnfTq zuld=5Z9|?iAH|8-UOAiy7NvbS8brD^8jHCkrtqC4KmqwjZSkH!vT^KIHARTxII&vZ z31-;Ns~kghjzvu2S7`1HvsIQI^qxFvZj?he<}b|LgrxPv%Xd9mNLOqt(h|C{q4hi+ zgd~}`vWb|ojXqPq<@7PvTzYv==M65R;%o?I^y=+u4GDcz-u6cKdqp+S~8RKC)#O6EBju=S<}?W|;N%fs5Ug%e@0ohO=Ud#Ybna9{nbp1UaKZL;^sHZf`?{4YEM6Zag4a zw(TmvKcHY7CL#PoI~Nvqy-^5nRup8!hdTH>Nl5hA3~>wn75(ilZeI#_a5u4VM6f(*gYMPF zf)Cdx$rYa4C*WPGQIK%Z*d7x5$C%QZx0d;`spgVw^lvDrjf3ll9H-^nDksBsh22hV z{gb|_XC2pUEjmoZW07iX{(SAc`xBw*qZOky*G^~U>bb$);rxtPIg58C|pEr#Yr zzwC+W=pxJY?dvsu3JUCUyrjHJCHFZ61S8CPDo|z?yiR(g|MMXk-`<~LX@_u~5 z*~d-_&e+E%Guhk>rawIocz-2r*|gWOGU?GdMPM_ox_w){7cJ~>R9FqRo4cKGq4mUR zG(6EsqFg-h2Sta1n2^^T$CNxCKG5q^_P(^#oIg)p#)o)-UIY7e#dKaL7#p4Mn)lOl z9=m_`7ed;DxDT_7YnZRte5s$J_&{@xk3L=Qm0$bY@#ZdX;ekZ{PY)*-^fp@^3QaED zSn4FAsVXj>8R%fK-&8A7k=?i4%2P2dDWBz)r!&+{s)g-v3JeoB_Eo^9;~OivM|_ah zY-Do;a;ME}jY^r(()j_jHMUlY)7N1%7@muXs9qhgv#s*G%Fe;!3Ld9tE34TV`<~T6 z#>Tzv@_X?C>n02x(<+>&xl`Y!z9?$DqHz&Y7XNn3-)G}$pw}LB>1+kN6={R`=4zy1 zYSIf;+BkzS4bwKbzA8f-%;nd1Wdmn!-##3dT%oolq-!6xmURJqdi4nc;={DS$8>{1 zVjY5(H;?IV9aPNv4&~)=UA#pe26Zk~pIA3!g!?i5BPEv}h*85n=x>(PV}yc(&)Wt} zTg{Y;gjX&Z9~V#Yn!wzT+5`RT&>SC1FE~qaJ;tUDmKyAlJPmZGcQ6Hf`e?_WUi;3Q zjvDj^xxCTr`V|_6q#3bf*}eyTNOfQtIRf4|WM)LoC=&`uXENm-8O{A!;Fl&Yv6Bl+ z8icOTI@!Xw6C;?+G3t#dT%Rq3)8+K(ztq=f_k)2?K2@+HBp|X|=ei!0M zP7N%;C5N!t#*cq+8vI1lCgX$=t88lD1m5l=rrk@%bThJM$j?nZDCSVGxf^|-3n@US z{<)MRCV65uCnLky$k(r5@AD*+lkZ2f@BZht=ULz)saa|1=X!{U!#&dWqAoVNu^g`c z%)Mgv8{cPMiV@zZ{wxF#IDKxUXp-_5h;_TI*z4$ zEA6**^exCe4qX%u9`P7uaN6+a1QB|~Z`}Bl+a!f%UV@1AY>lJKas zzdYFlyym8sh9J3Y5^fY?E`>`yOq3yBmNsN@k=#4wiDgFfmGi1SI?O)2s3fxa!sxum zmbfDV_im1kC1&$qXPfc^GSWYqn+Azxk1Q~`ncTf2nxEw)rypn|G3{(l?ZR1!P$k!5 z{~Qpx)h@q-h!WPA2R^aOU<5P&2MEB|DYU3+$LrVf4@Vyf6UZJ9NPqR}@`pNv6_ZTY zwDHn4A%^Yks#0pSy&aE7$G!d-#FUpGzG4Ff;)6O5qsLI7x4spCxnGZcyf9V#jhU$D zSv1PLu9pi=^QLb31!16LNwA^0ppvFUUc?;?RV*KWi^S(PiajRjC8!Wi^Bd@_90NJQL zwu`IZp~!R0uz5bHETE^+WPs_Uj9OmjdnAz2=Uxf~1odAH}K8y1D|a(ZKWm6o~L z#8)$=cxQ#)fDvsbmYB(_bhH1{O(HS`KwQc7J8NKXX7Pgcm*jT@xA@VS*o)56gR|4W zweYbq(86MOA z_J7A)K35@(F%hd`ogsew&}8)clKgWXQLBTDL4bh5AQF#rzMC#~W-^DhuEHDE$;V@h z1>`Y1KKJj`W0WI&_Al=muU4a0OQ`+jT{~)D;b>7eksiByCnWZSxzNSHb8scj)fblE zf&oA^)bN&*BJTi?5CEr-3BbS_=+Sv|vwHf!?Bi+m>q82lU%zkHa)C9oLJ~=B*b1gc@|#=s_$U$tNYkMDU=nDz|LbOvtgGj%tO~CA;nal4pg2 zb~M`4u>@EA!ngat%BdUj<(-&n&p0vgPY{ZSwX{EW89wQZCmZ22~QxzqMa6%zhwlj z1?!5RYGLeNAcUN*23dv!++>Y)=b5p3Va5pP(ir!^ z5LU9^Y;r$z{b2uR#({Z@iz8t6l52me#g&DDe+cZSP^_X6<21N!8lheMkm+mjfP;qRo~OT;#!zos_H4^NZ`| zZ9G5wPpyWc9XYQB*=!F|%C=Z;DrPXQ+-VJ&+krX4@)_F}B$i&E@nW%4WZaTGO z6W7dQ8}w-$ddVsHq1=N5@O^BDr}48(hp4Za)OTJwwD4UEtIOY^pVoYeKdq(11gH&- zJ65yXVOLULH(Tb@j7UE8Sk>?(Btw63GKNY>sfZT$PSlIv3>G&{9sMAB;i5d!Xt}AJ zG4*e|v#l~6pL53}UF~2Gi_lo7j?Gn(UR6;%}Y@_vYJ64UX;5)_R&k`_5c|1iRHW*yKZCEoD3_W!w_| zhvE^CjbFP9#7Bv#C^@}NBca70c6Jsjg)-BT{7$+6EIp$E4!*1})J%vy*DL5_v=_MXijPqYgaS&O<~7IQcdtno z%jbt*Iy~Rg6UQ54QdI)FM%~4TAxm+B>r04Pxqi8XX9^YEuXxQm^9{q8+m6i+NXUGd z3f{0=^WV4qczH)jckxrmD?iRKLyXLxI=IRpA&SxcY*X0Da1i0aMR~9v@x065AN|(^ ztLdLJ|7#CD*Uqzfp&cL!4dI|)$?r>Rh;#7$)V;E&afAjr z^#1~KsudD!`f#xNOpq0({*CnINWbhl0J+SN0iZ&cN5~l{FQ?IMlBjX5*-OA znn>E;uADM@eu`u@79(P9(jV5SEmZPkz@+2jurB`&ER#Cu$h+Bk6qMG=*l<{ilCT5G za5<;Tkm6dqa!iMcIIzz|D~LPw4r$eZrJ**ipM_8Hz9PiS3@VC4&*g%6EyF z*B|GLRfL~=KyC`pSJiPUtc9HZwkuTdm1~B3fCsOac4_8v=0w!Ngfh~^BF>?3Dr*`k zn1^bLinV(Cyvv6?IyDX>Z{Bf%%;h>tBd5Jip~*V`iU4FE#T)n&W43V3QuWdG>q!#} zLwW8ay2^?Jqri&nIv=&%-M&>UY~e}QgZ+Vv--m<4yYCHE$S=_rmTJkguNA*Ry6$$~ zGW_fukTZN435aLI)DFvh`5(FL9z)2!;>jWjDxcINoz2_zl@#}E6&|e=4qK&!}2lAe4 z7oS9|DEF;VLd(&dn&wBO37#0GbH!8F$dhK+;?T%+vU_1W)Haa0?5C)6$GP&P&de>) zj&Dgi7IIlSpxwa}+tflD8pUlrmi_kPjq%rhgma*U$xTfY%~Qon)v!SGcM#57%|>4l zoX)8z6UM2J02o}#a_(4?uBS?B+}F~~LMmA| z@&-A}xLs8!FP-*v>(Wpv#i^Zi+qDZSJQs&Rz0l?Yy)U|kD%m!n_pP{za+V4e^d5txtQEAUYMG;&~XJ4 zTs4CE(j!}#sv@h8990wtFI**iREKaID}Ib{MBqh08+4goYDd1aJZG7D?II<`-@cA> zs8B&^*H(ZVMYnwcr9=L#7xkM~7lDPJ2Cld%vo=lsg{u3Nr;$SHvM&1>O(}ArXf(4q zt)Q30N=RrRqJ5)~JOetaxDn7tzdEzR#9@s2=T|YKvPSiikDmiUxD6TuI2M<;H;fXl z-7iev$m4T7Q>BYx2acL{ULi@U4XAH+s!HOC96$<9b#>%3s6LG`3P{Rk2+g0vv^ppf zo+!v5mvfW?B7_BGT~ivQi-%JOr(a3=ZyLKpRmb|H8|H`UABo)FK{&nYa3Uf59h0CJ zd;^s~C2>}>ML#1?H0jbW9a+iaPu_vNEi@E<*+f0XvFw3amJLu}s^-JzmT3$AGPS`O z1A6k4D=AV?k%ZT@@V-+*Pf?tPh;*uHW(-RmRak0g$n$Tx0umL*BOhj-gQWMZ^b-rOgTN}7c{rB zpKu0mx_t^Jz^usG29685is9-{|5I(bTM+~0S(`Vn$Rl{t#m<-!A7+#3NYD%llS_z6 zDjc;`KJ8z#$`0d;sX7FX4I7?->_>w%0Uq3z69sHm%PzBTdKPwD%P4!_Rp#ZMw&p}c zFZCT=52tUE#SmEOr+iS=FKe0mVP&Td;~*F*yK)Btmk!bOhcVeN-(f$uJksJ29XbZ) zuTK(Vo5u?dQ0{3}6rZ>@s(qeDu*V>)b|P!eVd3fmWh8)n}F7lQ= zKD`(6v86%&-LEW5H7s|>2nOLl^T4^0p31K_x1pbU>m0aDxuSbG zulRDauJ~$}jdfYFbeRtJhD%uASl8aL%R3wye^#jYx&~=y8V31BxfhqD$sKh4){NKd zU$`T`xZKH}*0#=HeT1!Z@u9LFL}uL)fK@T@%aV5MaSJN6opKas(a%N4d2q_!W&yiR z)N{kag~Eom6{3<$ywLls`^>46o2V;)Nekg}wk`;kT{mH=jHGQ@ zjP#cx5W;n>J1?IZTkY2W5@uK(%*pIh|=fC-J!gFp{qc^%E6mIvr z0&hj!R-Y!<1ag`uOcnFG>3tix2lsg4B`zYhPRI|Aw()DUDGND?yue1`Z(PQ?-bxX# zYd2S=J>)5MT%>78Sv(!EWY|b_O@^{b<)^A)AV(X=T@QVqOH8lUeR)9d3DQ7_i!0hs zx1!4)VUH%YYCihYwe-NfOde|4mc1k0U(><=10e>&kmaeg)5<7Fk2We)>|?lCWorH* zJUxEC(6-NCm_6=YAZ)2NyD2QF+r6JRzo@CWAPfXhOd%((%%=PJvFGkY^cva*v5t^A z)%)EaR)#~3akB3Frh*o{##a9uRka^ThPmjOF&}_?LmO)Z`HmE8lsz`4)o0zVwe(pM z`9{vFRx>C*T!*c}N2HW8|Ill5rCVeqt z#$&a?)E17?Bw&j8(!*xZ^Wz^V7})=tAtFiwWu)2f+Wlfai@o~a^_2=l%kTaF=sKtm(ZqkSfquxYk z3Llrd_QJ?G)?0K^s;3U1y8D@zFs7*?#vg zx9L7yW*{O5#hu|2FQ@IuI$w=KY88FSKVi+SF_dw$-@;YT8NnwiEQGugVp{xbC=1+N)TY?KT=TU0=&Qyc)gc)8#_E)yKp?bv@KrI#Y72O( zndROQlAw9vc60|=fh0~jIm7(VX=n``p}+s3iFAI?&C$W$B9YR#A4;U?B%ZL%RX8L> z&wRvivc8vGIsO>`Sm)qzO{THCNx}{RAf10;%LEeLPdoPpG$x1|+r0IQMAduMrip|Q zu8kT9ChW=WOH zbB;uaf?)ApyP(a4t_&pK!V2XWa}o$-lWnGXiAFjM7qE-aE~1FUWa>0UIOl)@>)&etJDoZ=e$@8o!T4YHfcrHg8kb4PWf z$2T)h5#0&**xdgHo`1(su&ghk$Yx{E$dK=+r9eK`UPWJnylJs6{uRDGt6&+|J~sK+ zMKNKD$#(qX`>nioK82d-gZRQNApE*N(Vgd08^7@*|3TZ&X_~9rPjQx@yTst$<2X0? zC0?}kP~I5A9UF}9_ahr*|eo3x{aMW)S*A@{ta&2toWOzKyYP%o0Z+FiKy|9v& zC}|b+^kL#rOe0+8DM|}i+?MD4ETI9>9dmvHHCE3}Wu~}3;a2iPUmL>9lOKD2bTGMd z8mDskX{l;Y6nQnUrN&8AE75$lQcNr~?^k9mC>ypnU|0Zcsq=6<&C=6rh$w53M#^fh z@z~>r3*Ywt9+sXEk3@HIh-Kh%mRFD0ok3;`N=#FDm3m3fJRd{7e8_9ipw(0nH%ap=A0e<(JVL*yr(Os)zc^ODK$lJ0nG zN9+N!F=Kk9CHQfcnXl$k2oZA1h(dLBP5SfoIK(6n=wN;@-PwWB)*fCzTPNOPI{{Qm~k-G`xcoj$=-8w#|hw~9AOm|ZB%)A z!|P2u(7$8wRSHOxSk;X*QbWTBn!|^au+GH4CMgwvWbB|(EGQug@my)-WrQrX9BFhe zAjJ5!gjZ)#uI6m$!j^uCIyQ1RV@GkbkTCY6;1?}3wR1;7UZf7`YP($XQI!7Pr_%A` zRhF8sg^Jebcs^9c7^PdcUL#3W>vU#+2>a-T%k0xIN=dbi-MjNxOIqtTwmbF$I;so@ z>mpc4X|UHg29OOllUW|s3KZcl-D9b~joAaB+jeI_Fj{ujqWt2|TU9ThsJ>i6|6%Ox zd;pVlbPW{$?Kx&su-$`ukqbfJ145E!L!nYcHc|4~S%v|T4{==AyQi}U$TpbZ%7n)^ zk@tHqa8hjt^F6tmM|>TGouBir6VzEJ#20K~A}xPu2Gr^)R6q4c1H@*e;`u5&$sB(G z<4vI_;i_%Sv+N$weX?V)H&;y zdI@Ia_jMTraM$Bjw!ganN8#?~wRc|^MCTVGAQ1&1hTRJ6iF`uc{(o3w<}D+=IU%ci$bJ8B5 zfO1WRDyOHL`RYsNW%uZ>d=e1F_s4K=pDvZHS+-`68Yt#K=0me5Y7^d=v~8J1_kd<& zKB3@hVAo=hdDEHXb$-Ka3cJ$pr+w8;cIa94xR}{Am0Q(%1~WXHx^}WD~FBQHdNJw(4|H`@X8!Cg;9M;43lvjqmb+y}uWQ9MT0w>lF=2Qc#e; z08G zIrq>vo38Z`skfObq-?f^3Gm>uP9#iJ@A~QH;i~P=TThrYhRP3#^f$#d1E~6bU^=^i z^j83T;h$^#|8F|zvrx;>F}gc9GA^?5|0X}g{j3g(wzb=`t{Ag#RX*?D_ue+!l) z3;0T@Lc|f5clmf!Ny_mV@LW+${?$8Ll&$c;TVjLZMh`g^CQFbHDb9yh2 zHzDxBrt%JK*kaPsJ$pQNO+vvjafe4oC^$gx#>giUt~fbT*^F+N_9yM@o0|X$2B1J{=;JOy=&h>waEzhvDd zh`{~Xxq}E$0wyGN7C0%hVaw$pr9MmQ#eQxS2?ur#abZmjibyUJ@8d*NmC0C!Q1E+o zu?R2|@H>CJXD~(5VwE4SO-&HUfy`xe1weiPVdM8noQ7?1O-2V9%m{CrR`a4R@3%v ze@-8T;JyOy<$lF|x*X#<#O7(5Ul5NQ%&78VxlQLxD`@N@3(0U5%9-DCPZB>Ir^ zu7v`^iM$K9`S<6i`tW^7+D5j?ce@aHyAP%ccSffv zRV&^PPF(h}%kNs-V?R3>83%|;6FERI+Z|b`F}b*1vdOKgqMOJ@q=s>C(*X@Bs;iUx z+yPtt)uk}S6-`r0ty!-JxT)*q04bpPi9Z*Gyf4s4v*lgdE-T=vBMJZXf*k1r?1k%Y z*}?T;C-LIM#)tELNlL&$i=W#{i;Dh^kIMmP30#(JtAK8zV`Kf};!vNrNqNN`$%KX? z$M#~+E|(p~xY^t;fBZL*44ByXv_tCy9o*H?!YKqDladl@*cZ7mA&S>?ehxVO`*Q!y zTATv~sp`0ax4+(0qTqa)__K54zSF`Li~!(E2s}yu$r$9~N>-ucal-t39?ZMFf|K)^ z5gqn^wgE(p07uIWmINrU325H3QwH38h_)U3UvL71TV-v3kbdsbeGYtX0~}AIBI#Ui zSCF< z>NEhUc6N6DohunWu#lGLc?YDu?$4Gpkme~TpHP^;W8&WaMDC?_#@(t1?SGcSM#6>q z4e;f7JbN`YwfCh=!_V(xT-*SW**B}EnM@{$YmJ7`EZ0CdvOEv(3d}*z%P!9EfXRzS z<-M(rBIW=(XL7*1IJuZi#<=gWb-W*p;Dx1YfAusE5i$#xmz4?8p-U;Ly@&SqvmBKo zc@M}6?10zwPm-aAcfIE}?Rgv9z*QB4go2wAdwc7AJYW6k?IH6mBrPrN zJ>JBgyK<>DSmP)tC~WI*cX{8G>TWP*K1h8e1ek9ryg*6c;WGWq6EgGV*d+NFk=kIR zz+%#6=Iky?!kNeh$dCL8-Y5EaauAJZ*x1l!xb0%N1+W0M&D)cu;NIR|=)E@}JZt?m zefLQ;;A$-6z8)6@2pn*)w>EDqfbC5X3whX=awh#5(^m?&-9UsynIFK1ht zYmaC=m(fu~fL2nv4`)g*Vl$sVCu%#Z4?n!O(UBzs;Zhw45f9(oe$;cGwKBf1$Yihl(j)Fo0a7#8Jz-D~{`R`K1QIepNj(JqCz(Fb^XQup^i9_jiTCYcY{Qlf8An2^_4V<{ z_3@z4?x?(h1c+w=noagbKnk7XM)2Z6`Vt*w%D#nzo03rJxkKr?m+ta@Apki*C~0U=L=D&fy8{2uaBG)f z?BU6Yu(mdixw-kaiPL{Qjl}Qc98QO*vlZH5FHd*>u0gu0a0Xa9oh`||+^|49&#kaoMn7|SkeUTW0_!vCTbVAEd# zSDpeQbolhN66(KL{^gz2GS2!m6AU@Nv=a9Ea|7e}4_@0#%^K-@uTl(M6JMAwLfqdg0%{hR7@EzW);V5vu>Br&cV4S$9#0 zPwIz4oRQaNXLallq9+Kfmb^HYi8po8;~Q=0n{LRtNNus17|dA*D;2IJUz*Y1!|)0E z06)C$)hzdCcR@@8JRLC}Z?gmyPU8;;u7c#7ZmBQtxiiwp=QCiFKuAh>z5;HN-zazo zr=z_QSa$LiL{p|bX|%MyB2tc%Q&almN53`ILSDs|s`QOOGPHMIlVMj5Uj`@Gi;OWr zI!sE51hks|FFXGgnVHdH$F~!5c_~UUPObSWL`cV`j+p2yIoP&LKLI2+Q>J;hPJD0k zZWe!$SFKfgDiYjJMgO}v|H(db&hT;rR$#x3RzA{aj)t8kf&>9a-VpP;L4`mwT(feD zpY*>n`MF(SvpgA2rS~<*yKh{DK#wup_3^&iP4B(?qbuOQwmb2vk>-aYJY33pe;#_4NX#YaYdL|3XZCi;MM6@DJR#1Z*-VeT3!yC^mHCAvUKzV8YUy z7ut=!_^R=26A@V)9)IQi>NpX$G7@<1dy-1aNSHD>e9Jg9{L1llC(^qY@{oQHYldv5kRcadi)kX(Z?Vg+|^sd4P}ZnHgDC>ci9IRT>PkJoKyUI^^$>@e69 zo7d(?VViH#jTT-0|7Bk~qz7lD;4#jS1Un5~yYIDhgo zj~JtIb)@ia^yc{RFtK_vdr#E9&5Rk*c)1!_{TRYA*}%Z;#1-T{l!VF36p3w$D;xQ3 zPkJCD*Gz&iQ{L8ia*Q&cLBX8qfm@gth>2i0R)JNuSAb<3cH@>bVvH`mAP2!ZXV9gB zBDKWotNs3-G|dKj&UZ;9TxBx2LRwo}!6S{UFE<2Q;sRU!?_P5EOn0IoKe{gEdcJOD zxlBLDF;PQf{|^`7+Ud7uT)EcI1K3mSeFy$U6qWKM^NFSjh=~hVq)EogzfEzP8VF2f zl;Pn1{15oKhC6$ETX?ST_nW;sQD+;KsDNGUTB4qRu)aNJszvuM(FIH67R(>7{MQntuvGo#I5Y zKbzVDMw5rq(!5{w7E%Dj;>7qO-W=h3i*^bP3D;0k-`3CXP`L#wo>wE6rdFub;Ho|{ zO_g^4l~_~{1ow-UqpaSJ1Ayny4tb=*Tjaj=+k1^=t(sov$qc<A;>lcIqiWUNQP)P0I}_ zn>ty!j{7uGDG2c&ysALG;FR0e-t`uS;JycUCg5Cqds$4D>aDPV zXLuhkXJD1xnU_Q$F8py@r*CVg!1m65)ycVVEteZ-#iAFi5sBF?G&Yr$GUc`ZeZ~o0 z9*FmCZ{C{y=ebjxuZEe*G!EXI#~|Xm&%Tf9FaygbkCRwEr2TBpHaX-X&Q1T4vr@*a z>%8CA%n9Q!E~v`Z2a)IF9b1ZmKBK`|+iN-U5}>^hbQOTyB`cfTSj!KR+`^DUt_V8= zRaPXBSNy??KN)mpn6*lXt!Zf8jLx&}SzD62yjFZ-#pgU@laP!e)NF??98qpuBO+1Z zAw8Y1M`7oz_=}Q`o%r5EjrNOgXclsri~AuU_Gx=>*{F-8+jG``Ds$L~I?gJG_N?6)Y_xy`Ai{!Lp zt{y!lZ+SgMcD{xC&h}X~%9K@RwCrMlrp}#Y z)j8B&9_q=GB7JyU^4W#1wGThrdf0t8Cnfs9JFyudcKjH+7aov$)12jP6^R%t;<_Dt zpv-jQ;q|UP3P^rYfW#O>LsPTb?P|AJRRa0_f1v>KaMlX(HOG6;!IhA>>1n$W(DsA> zr*p9eHcV|8LqhxinZhu?+(G`%yYWv18@puasOcDd=$sW(r*^C*&v@-5OP z-Sq=KKBg1Vq=U!*McG>hRzg z?9&o45W+0)bAGqZcGwe!z$1;lgpw>VHP&SmOPW?J3?D-`!Fuvkpr zXVld|h&-(cNh%sbzUFl(eS(cUEz4+6)hJU z$tMNgQZF6MFzY%@j0ky7?`|)qj*yy~T6Xta=h@`eiR~^IQnX_(&tQfn>4QRG=*-* z?YwLi4vt>80GALJi!LT59UTVR&2F8mofglH>Sx_ZSu$(ECFy|a5@`omijOc}0s>h7 zkiLRd^S9!|H~|=^D_x1@#3o62Z+J2HVp(JPh^+j6J{b>0SiyAS^Vh*&42ns4mqr+= za@#w!%rI2eDfY*iE}~c$LE}QQg=h^%Mf;&ktrC?(^RZ&4a60llQ%;5-kF?hD9|DY1 z)aaQR!%$LVK5AsNiK>msll#v*$Eo>mU^EcLc}caik1G;O+6MHEYj)586DU1Jh5l0yka&jQUs(Jj{^VynC+SUKcY2V@n8SI2k>sJH~R1>>Bo*$O5cys+XG&zPF zS~*WjN-&vKvz^$oeJ!NlW{tg?{|$+(iMOa4mo0hl#%Ra>0x;T()&q1OZumM$I&O*C z*Rv2dl0dmMGte!^i2n25kCF7bo{Fs$9vQvgnfYf8TuA!Raa0^0%7Gvs1>SmOtGU`_{R&kcS~u zLkq{oju&ofxazFw{j7O2**ir_uW|doe>6ch4Bx2 zSn#4UZ2SpY!E^8PL`rq8VeWSy;&Nzq5^Tn!d|2yW^pm~5=8v;Yz=6E-@Rmon$0je` z$8-2|z7z9kg($^@iGw;4q2P0B>Ilf)HqK9ZVfydw?^8v+BK|Vk2j%{+jCLEz<|&n; zY943%j|akH5vm_>_LaVkePb!oUNLc1CvK+Pt04U%HoWAf=)DHeNm@PKKtJ-W{+r!C z4Y1oivlS|h9_K_!NHSu^YS@XiF?*!~7BX2qmK|>|**zWuCzq$odz8$l>tUu#fBk>b z+Xn~!(c359=AZYApW@%Tu_mP$R5=XT>)t@HIy=bRIUCZv=aOD>29 z9(g=avO0;RG704&Aw$4hQqlN54atx$jn=SbdDE$#;z}whM@{h*l8O>>>(H$$cYh{Q zh>u@rrhjXFb%@b2HFt&;G`FCr=qLY}5}Pk~Q_kCY>!2uCaW{a7=UO$H=+!C#l2{fJV;HFNusdG6$y}QuN z*TpfWK2ybZF>E&97a-DYVg%~5Fv2x2`|FnohZ{ILu)Dqd1OE1?%`wTPQp?2Hrz$`8 zNI^bJlY2YFWol=A4aaJ!>LPbdWxao5LHab^vXl(j(k5nmBc%0y)%KFJDz(_XXMFU+ z!y?V1Zxn48IQue0h~nKld6DAcn@5cc1cZ(L38v_NK#U@yUAB4W^PbjPf_NRKc~-pO zlMYqQb_qIX#UC?zd1{B3%s<7|BGgS7MfxVRXeHaxg`p0LkWD4xMOYYY;fhDnfoZWJ*+uE`Pxo_5un+8W1tuWukj9GH{gS zQHFGd=_;Frykd0gybL?A#LkJ@SzRm?*eGZph8rPzxyq3u*YZ+T90Hj8oO60lUP-NL z$_Gd&!gIzQddZ&ElEcC;zRVq^(_TZv0<`w80IeP7UL>z0LdACY*-TP@gY=rT24^;x zLT9m~%qmy0wLDag5j!l|cox&bdJVmZA=*jv{(3R*cwwjG6;Q>weXY6WwY9=mS-q9< z3V=hH;KwMSu(9eFGiR$)y|lEVtZP6?VYhQuSoD@(){x^`UXbl@4m~ErJsLL-t4ZPY zZB5~yg6arCd9JlTrr#3tH%pc}GbV4Sl*%kC6jtBE!Ku=i3=TJ?HOdoN8uKtYnbjdf zCPMZZyEVWzJIUa1F+SmNI7#CWe8%_92XVA>S7_@KWy?2*1g*jV{^3n9NJzsNeUFIrqG|_-zk{-E^--iXZ#s89aP<9^Oi#wb zhvl$fPvRXAgv3@FQHKT14rtv(RbQBlOjS%RV?HEr47@9%)A54OCMy>=N>!EgWZ@eO z6oXb-3;J}54Whr9N$+lQkmqQzER+u{=6Q|elWDv)l>r}0ugqz0L0>{g6K+=!)Of6@ zOp14 z)EW<@v$;XOF!7Y=%@D$Zi>u(B%i8{?=~r~Tmg+OdbSAy0C&8$n9mzB9vxFb|U53%} z$QM5Cm_%&Qewxx>{si~oH5;MAsSSLqtgo-&TcA{nt@e_7xkkcOt+~^KV!*99X6ckp z+2L~|-Qs{W%et9+Q_lk?vB@VNUk--LcTSTZxF4Ib<2SS_J7&We2c^PJCZK|rD?O*} z6zkwO7W%StcSC-LA#mLiuY7%OyIayO3UFrs>9B8xBFeAu`#Y#%fKD+jF8pv~tWx+@ z_)l)4Z6IMQhi~{aJT6a;hj1H)k_b;SVtRk)G~d_zB3isEi-{&WYil$CWC#JWZ>wjL z=p8yIpb+$N1CybP*+VzQqPyKjg^&%FJZ`@iTkRJ^n%GMN)32v1pXVT-qns5rq_Y-` zIvu#BTt2!4q<2NOg(n<0Y|fF{d^Psd_5BQC!FtlOZqRRg_e*-~wu3qqe@|+nOzg<& zDve%+;#B5p@q7A5QUXKFatw<_)r>pD4;xFRK8=`Oq%{+|em^BP4uZti&PH%UtueN9 znhXq%mf>s|2vqCfn)|G|TPUX{cTw);>8jELpG`ps1Z&DaBp5<5LIri&d7icoG1q*s zQyR)5#y*Zx-Uj*b$laKZWEV{vJZ|=HIZuhH7gvt* z!7x>GRsmWD{B`y3UT(LHNS$si5kc$Kb8+tjx%!bh#qKT)TOC?y18PecJ47aKxP6!^ z`n3-GZsGggQ>r5R$pbOs1HE8!2JLv2J>eYPd8nzWqdl*tZsfOQZcs%-I?Cu@YO7sM z&=7gt7+2JgB5rg~i{)FlQ?|H2p&l>%c*#Y`CTsUpnIe|W`tGv6$xTRgqEA0l)as_r z8s4DW`RA^3vzv9@|DeH(n%WK;bSbV^QS~RUJF20lb>w862INCcFg_q`$!Qjpbx9T4 z2t}10b9mO2;?ND;qTk=X+HH+a${u#JyJ|;zXCN6f<{xp36IzFR6r%Om+F+Jyd3^%i zr_8lQx5!~C*G*G5; zmW?T>zd!YNpKUA^nhw=xv5%AmOfYPm_DZHC&7vtp;|x6R+!Sru?E!WEq})oCFSd@P zElg%w-JF;UBdY<(wM5CkbR}F#>hF$^WJ$7<5{Gy7(n!RWloZLB8<@nj%>~2hO64l_ z0~2^3Xu1m3PP*vB*e4_URc6JX)r2lLQisfm7r zrk*LpyC$<%pp;-p1_NY1@*=u}GpB^h$(^`5a@WuXIqE1|Yy}9!Wt$Kf38zTOO!P{-Yoa&OL8GUSl}Qg_qNlj zJPNEjk@OH}aoit7R?JIwF5z#1d-WT*EW^iR8}JErym-g-sEVY2K7$+;pAEm`<~vjf zt;;V3)Oy+4l^RMQ*C0aD5kZGeu?CQOt|LaR48niz&y0C)7StYWty=EXl%{lOdWbVs zh(1^0Bnio858xD=M3kX&v>>CiOK&BdD04I>oorpP-zrHoReR5BTJu@rmMG;nz14%7 zDq^IfOzY7#9pmNc{v9LY3qfW#Qj<@a&%6?b$0y= zM>`8FgZt|Me3E5VEW%z>e@t$a0@|HIf(y%o*Kd&o4PDB~k!EWQ1lv_cLQw zyM=x#z5=_JNo^Pl2xJ+21shY{(ZXE3VxCQMN*-&dek%^aR+$GSNvCH8&j4IoZZ;u`yt8KfbeV zf=de6KKs05FN$b`x=V~Kx=MWAs5Nq&)HIJ`F5^yMu4dc4`oM3XE#@?P1W}_un{N48 z_+-7i`iLM@6`|(7qy+D8P8YI^Ut+jOrrT5?2vThEG~{hBpnZQ52L%yfl zTe{j|GpKf8>Z@YR=~=Sp+j^XE9jW@ulc;F+vUNV9eB z)jh(FMsXPp+`vy?aTqZnwuN<PdCH^7pcn6&uofg$9`MCTsGx3Jh|4zPt`m4x^#Z+B0L!6W2mSCYQe(^ z)T`QOaCSNQ;7#TG-Sa8#*fdiK4nt-}E&HnD1x8ES29t-p5c4N?vYxQnhmEEcPWb*>{<-i>Uu1Y1fm5OIK@TG^o=$*lg!k4q_OX8}Jo>=IQ+P$WG zTiUn;RKG*3rP$Ub33-mSOG_6o$$+w;LR zv2H6gIKMAk7M;1xSCCldw`JqC?7$=UfcfL4E1n_!DJ(_?m0pa;q`=CpPLOwe`82g* zz$U{te@{9>GwW7?-j1w1Rc5RztZE? z{zjAtdhc0xegO3f&-SFF61}w#I-DF|4?eP&`b&QVIh&4|euO6dV(s z5QXb`FJ_g=I6?05g`f71GZh+nq>{`+(^1_?z}1m{R|Arfm31xu8fyLavD=2PAWVmPIBWe= zyixLjgSs1~A@5wIFI7n|8{5wYt_l}pqx8Xg$~5S1a6zmTyWHg7<(nr1Qmp79Q&&UF zi?nXF{KNEgPJwcyyvTW(^&n{d=AYey$kV#D1?Zq*7yh^!yjzy#X@{vl@7kL^(Us{K zKsI142ZYChmmy4r;y9lnnZwg->K5eWeNp!vt{hd^&69jA-xbi*$f~-+lI}P8Vlyu- zhvFC0Zf$K5Q8FN@k;hd^f2#LD<{2%h%qfN7kXJk5ejT2%`QOS&)9 z_SRzxsR(k|!-m;SH>Xqq{!AEXlvq$T@U8tlr(t3=qzTTbjX*bT+Qq%UZ$Hp z8wUE$8r@x1YxLai$HuuBvLo0K=67w~BH4KK$}d|~AIi!RGkkehbo{&R1a43K9%I08 zImVtrHM|1v5jJ*(auP+N<~aO1y>o7JchdA$?4g&$7eS5TSsx5a-`y!0Hiu_ra`1cp z5mD*X>3P9Tc9SQ^4eumk%x{D~uu5#23CC9W6lty8JPK(2;!1LH3kw>Jt^~f*q~iy% z{(CQ0KlY&V)p&{`vX~t^<^~4jgahN}XKB_2Ir0m?@+dcX_JnRty3-1_z}trTLp7-a zh16+9VykIZ@ikO~l6j^XN0~?U{J@ki2V`!UMi?rJ<}PiX2sDUP!y z#ct!Z-b{mzLn?o&80lC_nd3gBvQo78c$Nw?;XQ_WUTYg1lb zV@Yfl$$dc-_$*@M3ay_EF?)Z3X_U19)Bp1Le1X=K>C<)p{$K^{W1*j&%qeW8^D!(f zL$e+1RQSfW$>Fc=)D#3He{hwjU7O>9_WXBP?vRfu?=~-y#7zjtMODDXBQ>&GoS)D} zbw87(anDm&m&C>!o=CZ_5w#i^RBcYSA-2+gE!*8(N)@&LE&_Mn+P07PQ1Cf|6zk6G z!fKWAM?}Pr6!6b^5B}Wc=?TJ5b<(je{zh5!#u<{(>kU_p*L5g#yNlz__k19`X54??Y}g#Ubcdfifu9$=5vNOM zI@l&8l$J`AtZ$n!Hzug#5h{V~Fx3&0W~r$!ID45b$(n}oZ&xBoq$t6yqEkx~Z?=}C z_S;IJ+!xfA={)D!D%T8)gABMcjV8rc4!e8QzWE|o1lefO@buy0wbhwiE&uJNiI;va zJrTB^weFvWOknTs==jlK(1Xg?QL+o4VNM7?C$G1{Lr1{MNX+%fN6Za8P{PKI?Q1Nb-HjQ)!brAKT_5$jnSKX9UYqGEG%UWhX_4DkL z%u{6C&>g!EQt^RxPq`B>3*iEiV&eI)rSn5($RG{5*6YT*Rqxi1)N!x~d|psq(N6_K z577C6qqpg-9|^%myx@O*w6^giV(f^x~xf zWmh-uhkb&k)2zU$^PzAAr9?0Aq1vygPgg_ml<*SxCp&0dKjTz_xlUeabI+2xO~&=jTPgIDjTv8tm?S@;W>QlD@N z2Ma*CWyPb8Azi}Fg{&0+X%1BVNU7l`abjE=A~B}(2`No{FHH*F+(XVvCiR`wXdM;9 z`n9#N%ppt_gN;rxJ_1%mHQm0c$IEx)N$dL1-h(AMK&C(ELwT-zX^N_Eb$g5>P&#pe zZc;2>XiDhTDlozyJQRC4VzW6pSi9X#IcQ;Yri^=)Kegr<-C3V#RifSYl^wJ!@x+*eW6E8--qT5;u=*81L-Ev*`W(rtSJ2iuX_GBDe-;oH6r@ouv9FLF(j+-X- z(iPmgXe2JKbXxj}!@;^H{?^QaFWA$SPKaspHqt{^mzt^DODf9o!@fexRdTBQHlsWm zSS;EkdXMviLRlvdj!@2obP#OOKyX^vbs8Za?wm>q)qC{66an7OI z#sqIdE$GQj&s8!xbf5BwKeF%0T#zeKE62o-+pJTp8rfv7Nl@>urMa|qjj~1|-|Rz1 zJ8RFy%0)qV5lfXJSRkakF`M z1+7H;JFg)@L`-p?AR^-!au28xD9Ar{oQWQ&8cQ~@T%GO) zrg(1Ol4!P?5X0%{Mz8=Vk!m)2Eu*C_H8n|^gtz7{nR+xXcDQ|MQ%g#c`PY665)oDT z`tlGNW>SpkZZw|0B`fB@;iUzJW^g?}ig}rD93Rrec5)=SU%bun>-ihImGwRk;KSIZ z#wfu-Ezzg`pw9ElQdkPk(kNHb8TbX_T6)hl9X2M00C)TTcba{WlEUZ*L9=x0CP8%8 zf%n_ZER36DTnOSVs1DRC>s3dEp92t@3Oa=MkuRHgid?wSoH&m~IQU{nOrIK`6c45s ziCqG5TJT4+o~j=2srzso{NHxo?q#N$~8NgQNS zJ7DP_RLT*?#EX0RJ7f$!Z&pKV6@(=5MQtbirL}Uz1Cfx z4}0}U%id~&gqX@18nT7_J~$-g_jOWCAiE!~K=5H$kVVWv-5T7y zBxc&s4C=U}WnlcGT(0)L$4_{QLqrzA>bRrJm~~xwe}1QQI>5g^9dn*P4}5>L-Q~IcGsfkzd41?OVfKZpiI{S7Kl-!Z!+E^1E~f@L z%p8-i*x;aYy zLOLOC^1UF$Pw0+r#L4IiiGHDYM>I(XuYuiGSAC8Mjgrq;?5XWRoHIAk^=*bDYReLJ z*4cyFkv7Xe8gs5Pw<1#eJIkgDx}fKizz1NUT@c+3_{Q*6xxhQCtBzwK{d^_^=bKm8 z&xfndKV|Ao(|-bGYBpGZ*rf>0gKAq(qUbb?v1<78O$L-<+NGa8*b+h^>JAFjwc??p za9&*|;`=hJT}6PaEYd-U)qVSNl4+P`Zu_-BvL&sPY-R0g0B%ibt$`zTZutqioXe2` zK%!RaOx4n@J<0pBee~Akt^=o5f*I2X)o&(QwL#A>6#;{parEYsYE1K@eI{L-KhHy75s7izu` zR@j?>x~>Lp$ZUG$$B#BbxP%J&bnP})s;pESHex>EbF}l0Z-&3z?RN=?5!UL7Tjcgd znLqn;M$A#R`+aXT!F*ZQz6yWmQ>*#%Jhyz3czn=Ga&E|(KSIf$7DHKasE_~6Vo8N{ zIk$rMA(`;kZzoR2mWm}+l@!K{zd9;2=k7}P%^gx zga@fMr+Ao(-xv^==f3;>9AjW5Ua4+hE*eJC(_v;Je2L|K<@huB9j^L<)N94W@deN*vqO}dqW)teNiBX zIblQXH*1bLU+=Rfz2Y|PQMp{A=c3b--dmiRAk1fdoqY&)YfNK%+Pt7Hl|mZJ7j7Uz zuRkru1)m0z>!GU-b}a7RwH`yTSyP8vdF{6wuT99iCAW3N1_~ik+?}&N_vH}BKJcSR zrGhb6QWkqX?RzT8t9p)Fwc=?dTa2N7630Eb6+_4NkIMH&b*EnB^4d>dD9XlPaWh&# zCo6c9d?D?HM?p&jo%vdM%x(2C_KB~0I-S0@t z6SigZ_C;;IU|Vy+jtX$mjwMtwt`L!%WUqUBb~=(jc{Db_&6T(3qEs_Y-$ZL#P>=N2 zH&|jUrwb9S|bo{btQCV>VrujRZN*>cZA7H+ zRsi4dLQe9BG3we@%)zt65SjoplK)a+QBVj%IxL;1c@O&)zdoWFMKy6%Surk<~5R;YTe!7qkBjo8u3-Gu`s9jnCvMiN~@Ot{@8O z780~p8u*a~tPt7!Nu|mP+!0H%xCckI?Cel8wYtt<#c_p>A}y3+tNRs%8U~6)sAcI& zpHN;{0tc=GF{oz5%-)li$yGqm+YQcRYF~X`Vb$7P(xp<5rGknHaMDok3bVJzE(tH9 zm&R?vEXL6wQ)Agk7o98jx)}hz5D=4uZINBBmSbYv!j<;`z02GAyjeRFG+u^237wOJ zBm&k3fwwc@Ek-eFQhh82R&6dtH2|V^iY}_}cN)1fH7J*Md#@~2Cp<=DWfh60Ry&Ox z@r%{%w=3$58C9?VaF`)C)DaAuamJ~Qy4)*C>dX}Sjcbzg8|I|*+{us)w~Mo)n=y_& z(TK|Qy?|_NJ$4$Y980=ru=D_NS}$nWkuweY)Dj>rQ@~)dxb+mgs|gVFHqVt7C)xeV z$R8~y(fi>6kJZ?`)FjZI^bligh^XWn9yLquT~m}j^=|pP2<-!>W|Y#99CKS-5vFf< zx2InzBL!HxW`RAGa(i2bQmxt=*`ctx~y z`1T81=H)4|vV((%f_l}D{U%5a;8IuMxw7h1#fbx@%*9^w03TJdo=5vP+TKqx!~A1m z5SSA0Tg6bnJJ+J*zB}TomZx0D$<8RJ%p7H`zsG4hsZ!eK+?mWbU8F#1%)}7o^3a&h zu7AH+igt;cE4RKhBu1=zS)z~#T-vxaLeoRZ3oa$Ff|LlT<_xSSO>&@ekY=&8F|LaC z;3bI!fhay+I6P_iPoT9Fi*acW{+tIZ)<+!AocbQAO(SgY%F?VF1j;6#v6~7^zmN%s zTtD+a6Ej}i)B~uxS^q?t?<`U2K6LaXK?_FMAb9mZC=gMcuFS4ge?>IIYYx7Q*5!#i41~^Y} zvdz<^lTNwA!ef?}z4RN$g7Xk?z zTY%gz1FZ={Gf-V`xc>Yw^0b;0$Zj5X+t9#f)9CS-9mgrlb9H=G_9xS!7#?REJ|?2g zuWWKITxJ9!))GTZz3m~g<(Y%6=}$9FRN@v#c9g5Ta&QiCvay-JLg#G6=&0je-bFGn zbUS^3W0m=$s_SfRsa2HM9LDfX@j!t(1)XL}@$k)3mM6K@I~Zli8A&7ubQd(J;ZqiZ z+N=3uk@HxVjh_18_Hg-gh1CuQ6`%Foa%*@g^fIqeEWI{3Ra5g6xPC6J){3btONdiD z#fZ{-uRs_pYQAn2h}mC|SWZrDAVEaY1KqqBguiB2ET!FaNwFn8WiQTZl}kf5uZQxygPO{iNRTh+#7UrjH7C7Mw_+ ze5HA=KOC6kH1|}lvw=o|OMkM=4{OQ$^U)0cW;stiU6;xE-9XcNep8Iu+?oD@8)>ta zjDZ14UHgxk+$EqI%SseMk70>O3f-`f-8f`*dZgRQQ_!8BPD>a>tHvg^Pc zmN=cMhcDOpUOvsA3*~z!MwL$v6LCBg3-Y|8kv@G!kW;AAcn)RSV=T<}mvuc$RwE-v z#v(7+%{GjgpR6Pt?cPSHPFD+_mw518BtSig9ViF+?wmaiz;lDpSO^Oc&@J{>uHxWcw3g@rJ>%Eh$Z`k^tbRLh- zDG8_e_}_!Z)dn^lF#3>oFCxN8e#Qm)D(+16Ap6fVq%B~^j-}yZkEa@o1O~6srsFy_m^aPP7 zueO~Rm4E??E+zm3}OdKrw>A$(QkYwPPnI~-3@dRF*5Vc%@}pAo8p z-zwDqHMsC_G~raA!8F=sq|fWE&v-5Lzj9j-iS8gLcLuD9<<4 zC-)Sfj!qQ_z0i4y-`z%wU%4~WF$mD2`U%WvFGgj#oeT#d_dEsR5de0e zOLr-&T(0n2H5F+n!@b7gDpfAIn*6n5C1?@^V^j%#>BvyeJ#fm+#ofuDpGOYun;1)un-@+Ld_Nx4@!{b3)!*Q-ruX!TZ+i3Y z{_@+&c%|3o2SWq!`q;RQw9<<2%~}vq()K_$d`Y@WShL|gTJ1V*fIeii?5R%QJ==jw zijD*v!0GQ)SM7gi;8q%G<))zDwOwo?OJ>2A&kLEJDl^HloXa&X^SiY*wTm3E=t%alaVD)aa3(+aW zNx)L(zxyv6lkLuTyVf*d&VK;=Qz7qTWYvWhjakb)ZI1#WkPH2vM*Z4B)lzKvdbjIZ&`$q)#D&Q8BG0&mujg zs*Ju;JS=D&(NOubuj&toAlq!A04I+O1=P~U7IwHelSd|M44|a$nDsWoh)4DOk$*rH z;JU~X;MX`a+Qx;WwRpe-oB6K(zp?OtchtWD3avl+6%pxQC<-8lVZ6aq{)LZf?b{mt z^X;DOfVp+zcoyn7>S+?>o@oCQ9-x(eIdFbZjb8D7JT|qm8m+~WhzGP=-uYaz`S=|j zSw20lz48DuA53(p0?0K&M99C^UXItgPH#7H*X}+59Q$O+Fd^g~RKZ>>Ivr``o)r}M z4^>`|&hYT?nJq22fNH=%ttc>8CQ?$;g<3PTH?sM>wg-aw7akjOX#EoaP7D0&Cr|`l z=Nsi5kX5jEhSm@Hb?W3je(CX=6+|%f21B4_{OhV?g%uS+lcqgQ4!g4I>d9tyz)}j{ z@r<87=jT&o!2z@0fqk2NBAT|_HahpiUQS_IS#JbB7ZV+#05bNswMR`TTdiMCK-%ij zPRswZ955BgV|y?)&7P2MQT~jWr_JX#I!N_Yk(6`OTfd z-(U$sOZO)(9btfsK*&2tC`7!0w`q+yB&VbZ6ZzGcjBfyfIQIFyK<0}QkibU+yq%Ma zOSpf#;`O0o5ZDMv$Q#SCu&|Ju4XzJn7n+?c{>@PUsJ;4%;&N}GMh^6G(Rd~ffq1{> z7{mCAhVwnGBQ?IhJoXBr5j2H^oXLQOP;a3cg|X`M>hZdEtFc)=iZ*LL?&=L}Uo>()%Hm%DE4)6fUzY&am zKEgbnSyTkGJC-JBW@h%+2q?e)bv83UZ=#L|BpLR%Cug*}Q&1%cFDoxcDG7LzQBzf7{U~7-7w?bF-2)L|< ze|shR+pAHkG$pImlE2g8+$3VhpH z@`b1@k9?lzeL}=~fmpKo=R21zYtPdDZM!H$K6l-Op{CYA)EE7AC{gV8&$@1I9DzYW z=YSZ}w^RT@y8}^f(Kxo=9CS!j9tL=ce85}J@;iXu4w~S?($bPCx+Bo)W4S})$vS87 zAqkLs75~~R)^$Aq^XzI`=C7bgz2#!`TNtYP+Wzi#LY^1aq!8%Q49LB1G(af!XWyf%ucbn+vZ?BI*+2^>5Y z0K)C6+b;f_NYGsmC2!Q!7LH-%^w6r5{o`=i`L?lW%Cj$dg z0=-tY?JO{a|KF#Iczrp2?MrCCB4@`#Y<)N=d5cCyhV|xc;eX%n^8`Y(egtTQaZ4l6n$o}N6Pfa!NMEHF{U!wRAZ<~KSw9fN^%3FAzoi1CqATYFDp#p+nyw^oC zMzTzRw=Zt0bUdKjJ2=?AKHtKbPzo6tk!u6K4=*kPY#suDwQ1isD%9xr!k)9?oLu<_ zHUN%KE0Vo-B-EXj85MVBs;t7>75FH-q_dt-C!CA7_v}Fwh9S zW`W)BJ||5kD%bbGA^WXq+;+wMf3N_;($$oS+}ziIa+*INi1i1EYtpwJLl|=2OtZlb zzuyUe-Yq1vfg7Ug4ggz1R0WG+lkkghYwPNIa~00Od{v(& zaDhkd>4BnIXtX1x*J_5SS(F?DTuB19{Ic<6lk?|c7xKr}Z$ub;Kw9e|py~3y?x(Zvn)J6bQ`Kic5^UUm znbOJC`E)gnRSyWi;NIRahIaNtH_wZh3^ENNAU-8=lmF*Q>MdIW4S^p9-CGj>clfIM z|9@DE@7+GT12HlkjMjcM>p#8jI=nVfhX;BlK{qxGd%^<5CMG66_sJ_idcz~Z>(R20 z(wYb%dw1w86#X!i0dgu>Sl2rCzM05&1XH1X{AT)&jPv5F4o_-hk2R4?0a{}gNWfUZ;~0N{2a0s(Tj z&Gv*6&oxjkTMnTy^Py+03df1FoIzB=u(!AOPaBH1jCD#R7z1{ySJjV*GMxuZPi~8J z8;{|OYSZj~nBCo*arc%?OWon3h%81>dU4+UVaLZ7B6j=QEQ?Nsg%g7zHxw&xIJjgD zxi{SA$HXK$obG);4Lj{+XhMU^8Phx#npJPMCh#o!e+W4i`-sGdYY7o*R`VvqoFy7b zTZs!M6*g)zT&4PhRhTpupclzXD!lZg>@N%6r#ohZYs+Vlr4Ms)EaEI29P>84E-Q#E z2dGxpn@ZgRnM?3UE#H_;=zr~2@~_T@7PQZ^6;z`FOBusVsS4k25xS@&m<*OD?D=;MC*FujJiCEs-s?nU)SOc+;gUJJ=O=cL>X`zjp> zw)>tVc5ZJ5K)UPCHKp4S+SRaucZ}6;!5Qf0+C2tg6E@W9iDlX=on>kk_@c7%UOE1& zB`uks&Y(dtL>?N1U#EZd_J2TH+2GI4+-};Dol9xZNzF%b>fA;%!+g9ycycm!ZUO)M z(M_|MRaLd+AYsV0C1cI!8)c4seL+`m%a1^?Qj8)-Vq)S_XAKPs>gf?* z*jHC>?wJV%UPTNp*Vu0{c1+z=4}G`_r#_hD@~_`fk4-47Z0HP4pF`7MYi;E&bY{_I z7pI9ts12#=_SBG$hjlwdlvZ2%V@ng-K!CZn9GUPH$n!})#~>LEX6oTacq`MA-^6_s zyDQfXu9D)LkA;eHdokso*k?jfm8g!XK75_u2X-@nRxCE37#9~nJByflj4h^BX^BAJ zlu|`O&*78Dtq3+uVg_zPLw*ma^EjTyRsc|5eZ~#^=3sF#hFvk|!phGwdw-_q*3X=+ z`FfrP@D?$QiiTvD=L#I3{ICwp1dl`P2VaisW^NGHPNhq*9JpX& zbfh&5Q#2|d7GZz_fTsFT)fcdKyJ@{t+UY^nXk`Ew{!*1t`uJzXD%F4!fa3{7NN|#NkbIB1edHXiZ?UTTo(p7y%zgvsr${>@a`&1A{ z4Gg;HH~UAs)Th;N1A`14I01*w>+?!<7YlkB;Mdcxc@^|84hy4SHd^ZQ!KD+>d`_M* zx$6&!l1nuMwHB@)l-zbDRL+0)ey2X))Vd=ZF4V4pO5piDBwOPGd>4BdC3UG57R1XA z5!4T5(tv^^c7M92_@m|%6yAV{fWS@T%zqaRZIe&ie9(M+jvsV~=7D5YwQz=*D!eM? zvZ>`KJQ8qzo$`z84`@g_6iR7zb-K%&<+ri#bU(7~GFh8-@1PcrrNth~ZsWtDc4{dX zLqv;44f+X`#)P~MaeW$XN$0nVGdiAnD$Ew0v&@bh^{0*cfo;3)*=8MhbX@nQ4^W3o zdV7xR7e;{s4qr;0JkBlWO{bV|yiP4#v)jNB#qx(o5O~>tz37=*;8-gD)bNbJKke}k z9ERbGyu1V3U|6IA4#41M4z7LfFKjn#0`fy5rYaX>?)3G1xnU(1Qfw$`fYIjW=Wk1kA8d2-U-xKNQQVeoBQUx44jrDgbDn?tVULXN$iHk4z|!w+`8=IF?#ec zNG=r-f}%2?Oze0>xTT1v!K-m8U?Hfm0?sGAvs%I_YxU_RZWzPL#5Ekx%kTcq+<&7xUd1_M;WpILNWHpK zFpgogyQ4oF8n@x`QYTC`M8_`|WvTWud|7_y(G42~9?D18vEOk0L@~Jd)W~#}es#Nc zW=!aVr1%Zo$3_thH+N8EyS$4h+x2Kc>9Xx?nd0;va_u$*7%w3`o_6G|w;q}qm-8x)Q!Gxy>$cy;{P5{7(&%d0k=NBm zO?!rq_St>5_xPr}20>qNt2htH2ORsQf+8P3NADyMN($WmafY6kwD(uW7)pI`(!A)Bg%Q3BfCzg3~aiJe=Lpz8JF9~UsF|uh%VN|>m2zJ zOF49EP-kqk^XL)2#E`>6b>8J)y^gpmehZ3x0vtKr^Cp-#qQ2WzAISAQx$4hP7xJS( z#~l{g{E?meX#*nxj`Ojmx4MnOD6}Rz5&tP@saC|k%y;vLmJR#)D9$fSYf=X?T&Bc` z)P;38JRZHuf-l@MY5j8DP#msSP}8Ql@N$o1$d6k_Gd}1g5^@SX!QeBD-s|0F-fMr( z8hOZR5q1`M5eu)Qb&i^XkAIoSATMA%yQDSzc$G=_cyBA(%owVca@sSuJq+aaRhJ-S zeMRQ((;7ZWkZ!Pqf$Je&2cJy6*E*`DCQKu3Z-?%2*p&C^ZQ8}5l0yzaIafMIUvX{z zW0n0f|5&6mJ62CB2p(R#bw_eba~^97O^uK8S%2BS5OZnibiggH?CES?qmGn z2lUJtnUK;Irtv(^wK@M&ksQWrnKp>?xH5>zil8{*Lnb zsaO);60%1o1Sjw!l17$g<9k(i|6(`uCS-;KPdQECA$uWmq{z0rc5NPG07)v#Db#rK z1v_5FN!30w52ezi8uLtc6~#|#sH$z_5x9Vp+|*`ownD~VY(`15&sMXYE=@LKxTl4dR^HuGt-jh59>VSo zn*Yb4ndjxZrp+${V{B_OOZj++1hQfq(5dYPt2tw3h2o7aoO!60eofAn-@Cv4LPQmG=*h5-+nFNmgKUu|kn4)oEU`{o|z?>HrjRMr?qu%ES z7|pmkiozar`AfkgNT|cHJ}!*6QcKX0^YsRme~j}TcOk(I0fe(32ai3ylauk&=@uHG z@2!n7%0zZs>E9}>V|%kQr?dw8?>00Fe@9=cO0lX)vckm;TC~J~0d>K+%Rih-;Y-XA z$ly_ykAMWf-s0>zOwOwnDE)=!kMue?d15~rrw^2TgCOv>p+{ESTsXa48a`Q{3Q#U~ z3~7~9zC9b5G1g*h*Wt}G)ymBuRf+J;%jW`Sz#8+@^xXKbv~%*vTC68^&H-n=>*SeX zwXAx&7gfwaKB6cU`=IbORCN=pT#~f4UwhePt|ldFl8wY$bN?Q@=#oHN@|4^WJO5?Z zqK&`-ml%bdJhLV_iRbH6s7*YoADsEZR4bD1)O0(pZ`A%78m9hP!3F0l7hx5nZ{eu* z@P(z?cM>3fBn+{XQI2dUj^m^2mpeXw5P0J~m&kXFy!;2rqC>-FiYC%Dp~4vyb?Vn= z4B3PkQ|-9BV-Uw)xH>lwDhfzN=#P#*EytXg6(Xp5d#U>wl!;Z{sh5z{iU^3qyyp=& z&kl{Hli1qR%0ENDUS9|=V8lo)cK;;!o#ywc!8(Y|qOKC56aEdA&lyaGE=|Gz_W)yp z-_ga?i1zn>+~lotBWnY3`KvnsR6-`C%bPlCXylG2}QPpj^l|i0?DoWS7gsn9jr|GhRzDH4UYWPZrXhHkt;}C993IfU=}~~R+kbA~ApXA?{eN!d|8G7d!F}uUQ@g~&By<#hFH~>RL?RO#)5nY5 z*8Z;{C_6hxtii|X{`Wo1#Wrb#x?6?iN%6rIZHbaq;l2TA|!=KoRjXg3N z@kW%j@$f8hGGXQ9h5Oc_jFFFIQJHtC#d>>SQ{|r-Q&21Nk#eftF7`hjTz(Rr)bK>- z9#Nv8>45D_%ZWeYR*Y0;FYmz`zZuAjx~tF8iVtk-*;DIi`=VarP9^1uH8ir-^=-T<~UF@IueMjOuA^VJZFLpwRJr$;e~-qlf} zMe)#O7}{;x2526~jvpe`sp7Dhg6jB;B2Ehv81Eo!EF_0M+zBXk-_EkB}+ zuH4cnBfxJdiOvSY;;p!``9NV2{i@mrARnVTX!V(%f-^h5=JuB-2koX=jOs*%jnO_P z@ro&MGwA`en~+LN@rB$H*E>29y+KLq>Skn+aNeDwA~u`Her@l-Ko zU{38vpWnbPC(G&N25J!P+kw(;WTjm_lH|z?Pi`=z3PTqO%d;KFjnc7?8bm&rR78*F zSLX+Qx4hY6DykMfcKGj~1gSpoc6le}tpKgX0KI76jOIon7QanfeZZN?N#P_RAFyVZ zJ|%H`=)j)m6v^jcUM=g~7>404A#-wjiioY5VuRoN3ipsSaiEWvX-fy4PQ=&GA+t7Q zm%HuKtWI$33UH!pFXlhKaZ$q+TfNumL zFS-Qn+DSvaT`55;`l)r2i2B9-gK= z_j)n{2xmXfGq1FOX?mF+MhmfW?vhk_M&rFG0uA4UC%9 z#}A2A%*eKoxequv{hleZdd*xRs))~|>83r|NYFbd$dOsuZRjeiA;vrGLBSEw{yq;o z1JR*%55j?RO!y~UZ2Qs-FJ=E&E>v_~=imT!)$HI3Q5vA;7p7KM!y2Eo<-qY(wY5Ne zAQ{9;_bqk)VP`15BrxeZ>4KymJs2BW1R5^L6?uDp(ArIZV|j>fiG8P*>n;D&!WH-# zlE~kN=U>m=OC4ZZIlE1ntMhiHe;sZ*Yct*Vw-iF07{U@W_grgXOnRa8y>Bu*>xrMS zkKSgfX7v zlusX!PZJ$P6*zYFWByn2`u{C9k8#%jZz~v?%xyhNM`^#5ci1{|ls7)2YPlZje1aX< zdw0*;OVt%5V$c3->S_ero-M`|`jwP@xInzmzP+K0E2_D4I}u5%pb=0}L3XH7;_zrd zd8_72Th5N1aj217qKN|EMj>XEH)HORQdxQIvZTnKeKFKVKmbQ8JD_V5e@4&Hu&=F% z++cZucmn-tR)+mOtCefv)s4v~Q>|)bx#TKnE33Y^US17SVT{P$!ylX|B}=@h6jMzd z9Eg`Id=H$CG$0t@e`0-`c;7dsh@wlm?&4bOB3gPO@lYxWGRQ&x)4T1YVf>rL8~NLy zgmJm`|6vA<<^o`t@Km|Hto`_5BXTvrv+enOrC`s`E*9ov#bzxZ*5bIPO24(*(bPWs z*d#*iE4`aBmX@_^mhML-8v7W@-FI7}w0C$b;c~T2*}pH=P~0qgN_|uDHwuQ}Tnhs3 zEK$!J_KqBS;QT9FS6X1@$W|O7BW|E*chTcpgov*%Njz_Xk%ZQeiIP0lx!OJ(G*P*8 zOsRwY$B%A17J#(#Q_}=w=98+$98rPCq<=D9sx8dA6Nj&>!<#4;{X?egEzxP8P@Cs>E98e~k^uygh+Ncd!T zvjj{gPt-+3M6RRi+6(gex3=znmAg69XKsvzdoW11OD`SE1p$xZwv1jrw)F1g?bQvr z*}fH5RGQAo8ynP-V{3lVTYJH-A1Qse^O5&#!UbvRqO!uQCzpNtlwiRrTTA@dSC(9d zvwxyG^06$3w1jOnJx7{lS3$G2#$)({&VcFeRAQ z`B%Z}7>MLZP&zlg*$Re{2DF_p^V~`cvO3pm5D=05!~?RahzS;(b7CkQ9bVETWE2J2WjI4i(w#N?rcGh@{iR7l9+8Uvf*i17;)<-XEoZ|hR-d8 z^2?)4=IWt;*~jYuS5Z;tUGwn8m3|Ai*|;QRkJG+^ zAt17>ggGJc&S#wR#m`}DVSmChPZL{uiP2gTglz?SK7E|-6z3C1j$l)0u|UHKcNdJy zDvRafsopyRw2T{t(QCP&X=!$095I;16-rk(skLKn{X_vWzPj`V9$`I)6$WlI=I?%y zs5#Pv0U9Uzd>2+QGN7>_GsF5+{X6*`8D+57$^e|rbB2l(En^F@*=byrg( z$R1FliBIqcU}WR6JW{6L_v#Vk*L~vde*q2C%TRU>tGPeFP7cq&19MdjTcA7ME*tfa z+o7IQPt7V<==mbn=zgrLv5YZ~7*#?bAImIWUlYTQIT4)8(-RZ5FxT!k75ag!h?IYR z^!1~S+OKK^c6aIL5nY8ZM|jYdgnO{y@Duf)W^$++0E=+vsI~r75Qn~+iJ58>p93%6zh;#_esV_Cr^)pXY z&`L zD!&w&`!V_&BA>2`(T?I0^tS<(zTN{M$((%t>a-0efX(;7b*OB{TOe85@kd$jCkHrwwff%c3K?>QBopMV zdAIek6`^nxV87dj#kWVebrH|o8`J~-W5DMaKba{n9ACIFMY>zzcDWuvsBRb%X@Z6* zF`yK2TI2{FY|TOc%4+qj#9`fZM!^DmR>k2P6tRWqrx3j3!_#nzQ}siKU%g_+lD!${ zs!0HF2UKAZ7yNFuVvq`n%hu+{>ls||#XM1!I@gy~5BmR+5?7gyod(mB!x4QZ#;QKb z!wnjjq}V2m4HTT;a%4XUYP2nfYQc~4eCwo1ZcfA1jEg--MBXyfp*&^9d^x=wxLoqf zjuNj@W>Cpbyf-|hyO?TSev5c_j^KMSF z;q+KM1t(8 z(XP5n-rn!lVOz>e$M0XCXq)4^$HUjE2|vWL(XwX?lbMJi~0 z2wq2z+wT@RN}*G6r!)MY79b8ZrY(_lq&Uqza$+6#jCtI5G18vZ$H1J$Q?bel@4KsS zLBG)zwd8_N3$N8Q&9$)WlGuwSv&J1lz zLpghowsYjJY9-Xv(Jko9f78&RE4ymaRSf?Lgx)s5X6lz-4szzn&5wVa+)i7pdF;bJ zfMRov&Ih|EAW|bxu8r0+rfwFp>Rk4>KmmhwRg870dT~z_G!Fifs=TNG-&=6=YGn-`R$R8U>?oV z5Gg9G%d2;}KG_|!YV?G+Ee3s*L?~8j_V|-CA)gf6KDaeWeCqRPF(4&2{qd7yvBQRu z2^m_R5bwmURXd-;%(=?KXG*~P+^tx@GY3yQa%HCb4{X@aWYl0u8CQ)$028Y7T2usd z4kV4rJfB9ICJVK$G#8LE1N9it8Q0)p`5P-8+4{r$eCVg@`ECnt+Gx}y(c`M;k+#ad z7t+LZ25z-{_K~I*?uOYIJY!;)+FxR!>-I#T3ksClXJVR7ntMS*@BoWM!Aq4V^(QI5 z@idLb?2=15k2Uf5IH@ZL;aOB5bc`9TuVYC`YXYRn zk%Z?O5A;dK!WlyTV!?d_SpsrE`YsLv$qT24+Eh@ka<%^`giy(#jl|nk^PMzF&#n71 zo)rkEaQ1mNmtgp+0ewV^)~DwJ3j~hjD2<7}=P9I4?{@|<5rwc0X)w73B$dIo*^fab zg)$b_lYmPbV7_dFZn@19nYl#fW9LwrY!p1|NWVR|5MG*K9hp;OkA%(}SZqE;GRrl|>94 zWYYMOu5Ea!!r&~`!u%mo1(pc4X)?f`^S0~eP}OeYO7n{pavcw@^a24+4)^NJ_L|r;U@gP!672IhN;qU4o z5?djTTSS-J1|1yMQb<{}*Vfn+tA<+UicYcG3BNJjeQQ~UVf3&reoG6*iMi8USAMa& z|8;eU>^)_(`t(l*i6KPLff3+@Dlbib$Md*b^NpKm?C)#5Xrp}c)V$C9t;Z>!wnbXO z%~+BBI4ume^4=s-d;8|VK)0f01Hn!Ef3}3EnTwHs4FIL)J>q0J&&ZC_&2z%+ILIDA z^6At*)Kgv~d>HK@?v9qMBFxyFm`24w$y}LTSHAz%zVX@1M-?iGib52vN zuD(j&=J1%z=5BZU;l+jM`=)+47PJQP!oWmMdnp3BU@dh_T*2^|^w!IiK;3QTfLFgQ z7-%}RF(1|4-CdGf{?1Tf({xbxI}|)v#cd&HAKHBr$a9q?ABiAtT%cGdnu9b zB+JVmK-*~BU6`3kgOHhu-7lxf-Qw{yxv=1W*FYF96Q8(vx=Vq4*O=|U;Hat!OP}lC z#IyFZSlL(~dFMdZph`Nt5SEwsdTMGtsN0|1esB5Xj^@W&v;%uP`pT0?zE#(^L@rY! z`^QBBF1{DttkjYomX4tleaVe4WTP@ky@%C=b*@fVHK#(ds@y@5+BCMlf$HHIJRuEt z$T|saJlxB6mp8_*&q^`9eF)^$s$R&C_7A5RMamhenFCAyXKhkZ`s$f|*zUFkxaE&+ z^hrMo1|}q}-*$!b(G`+1yX1VEX)G>UaW|xo_(6=2s2+cE##*+gK3Ws&`ak_cW5rm= z4v$xIfm+QmlQSYuPsNx|Ek&P~LY)f$O*~#(hXRP#FE>^#D4nzJyR{2+hS8&=2L`Ou z!q-idDHiOKR4CRwwtig0{S32Hk-#11@{n?Oi!(8*a}|w)g96lTK4Vxt1aNRKNOLuC zDR1ffqOzmwmK0O>bomBD3$plrwYiH^LzDVrLH{ytoHH^IIB2&MBhi<%L3#nQwlC)P zC{&|4Rdva3s1h4nOa2aU-?c2yFk__2yd37XUReWOfEh}QJsJ2ALYjm2(g%WhWBM`1KcXtw>m>B<8LN|wwW%L$f14F#v`Z|DTm0AiY_jJ~}8aeSy$;KrJJCCc^i>*10 zMus2osl9)#U3!07=Bz^Q)w?4xTxLDhT(mUx9#N7c#j1>!2;&ZYr7f-@|i zgc;o< z$OC*rDvnli$8=SqpT_w}xIZON;ddR)q7dtzAd|1I16~`fto1NVDarvA!1>wzid-Rg zc{_VE_zoYccO_s^P^LgwcwL25tC!>QaR!ysc6@RqDfP*?*oBOiX7wlDL9?F}Ldvw1 zTRzV~z%(agr8KIF{$pB`s<~(Xw2?p|)$ekeoaTnufDO7#(_8ctq7m+I$i;0I?v zxvN|w;B_f(jkPvWEfW|~x2Z>M#P91Lr1H=}*2RXG6k$^snDKHMpWAlghmDdZC!@uO z9F~ra%fFOcc5kX{TI-=YFlXvT8i;~4yliZgZgvYhq~>z9uvm$?7b@vWvOD9)^OokC z#$tIYME`xe*@GIT!2Vdoq5E55P2wt*xlQq4j1T(Y#E*&}OqiP8ly~=H>;Q>J^Fn;X zS|k2iv~6Hg{Y0!1bO^vLbW+;wzRoCC$XuqfL4am|gu^oohw!VUeAP&=IR_! zk!>IujL~gC9q9xY%HX(M)`pavGfkzgpPx`v8iIr$WPDej^dulX=<5QBG2OG(f(4mIh(fO$fU4)&16cMcN&T9ru6!C^LaMDmpaEU& zi^^Ok#U8C0J7XaQ^o~OdZ}pySt4Nr;Z4Per+^8qhZpo5Le>d_T(8x;ZWu(`FC%4}b zJYB2R+8+Pw^ae4bN%nkJ-AZO3A)x8c>(CoW^SEP8*=i>Xu{EEWZeqAA?-2 z06PD6!7$P@mN@B4^cp`i0HV9IAR6(q34Xx_Vd=4 z;1%9rPZ~KgM+t#7ri~1ImR>O2A)1@`e&Zs5*49 zlRNepngEg^S{kyvWKndN-ZyNRx~`AY;GRs)y}5?o6H}SeWNMH62v*Bo_T>9xmpU$Y z)k0J=lm-6wksLyNM>Ti#BwU(rcJT%K4(eaGa2JXuvYSnkhR0O(s=v^)x2CzW`)1Ug znJ?nbiwp7klUIaa#^bx#)+(AS)Z}bAI2Y%-u(x&39J6(u5Ve=JnCUwx`hfNJCw}W3 zxN@2i(1Rg+!ssIt<%|W$MOU3$v#fh2jjkjio!yVFWO~Dd+R>v8G#F*4z*`+dC&An) zWQtwN;a54^%vE2##X=T4C_S{ZzdV*Rno9+=ER~sUtRbsi#b;P~RmhaE@;5PF3LC?k zX|4%)+MiuA(~v@2{Q?uE>3+N?@fDi6k)mIs3U<$~;*;M8euPiN{kL4n=&IjLnsZ*N z18xS04r}7EYZvXEJ=D7nXgvR!Ww_-YZ+&l^3fqcOaPRCna|WT2mRl9 z+%YjR>Y8i(D>;eNDJslk0_6NvAGe48D6zAKYqM(G)UFZ&O$YnKaCuUhED}`;zZIe6 z%JD)o9amGBf0ZO0TUC+Pd~A70;Uey=*n31Fi$i7ZUu>Xo>{Es|sG*e56r-@kuRqBq za`3d6`~xEI1?ejuB%Q>&XOM=0YxW+TPOrXh<0xM7Xwv$N0NDVAW}Bh8LS(LS`9w0q zNuLY$F4Z`OUf%uz^o=@Z%b=pp&?NY%sl$HN?$QkW<*sYSt#Q}pxQBK-8a8$cS7k&s ztUwRDRAnMl`|#op_2JEG;d3pt+miz5Vs?ZcIJ;!OB$1AF*7ZekT4QB%D~u6aKRc_W zj`f#pJLhx0pT3Xr_??32`Mh8E%m`aFW&p;V2vv&%@C1)}ww}t53A)AymiqkQdR0Rd z<*L`hnc>xBN=;|L`x8!Z*Wg)PU{W30_szmKVh+Z1@K%%CvYiD3(^3O zyME4~E{u;U>yUD>Nbv5)iR#t?GKuIU)kOuo`>nC>;^A2_sHm`AMMgD3x`9ds!EPtc zKW2Z;ZBDYM#HmIaSH8xfYAhP{=fNvw=x}1>H@6>CbSo6p?OBdjjx*q2*r}KA<;t9E zoYW{>uNnY})t*hJk>YQ4?|yq>IfrEz*NM@W&9)L3@!Y&@VUFg`GBHWOcJ=ifYknog zKW341Ud~s{4WC1Wb@#E+pv1RaGE0|}PuLc+R2b>J;t)A=RulvcmO&&}mAO}KiO6G8dojU^C@`YUG2J#<4Z z#)xNiMm=%YG0O*gVX1a!E)seZHuJO(6i|eu#2l5o>8@%lw*7*~JSULV@3ycmevhdf z`O9z^`MmI)FowDYT6=}!4?7`&{v@y z)2?jZIHQEP6&?WHimOSU$h_|lEK*UtqbI$AB&`7ms)}~P^jmup_#W6;C6D|=zRzrT z=)G@dy<|rh``k|w_Z`KxG+}8DTh@@A&@+zJRvcOGvFSnfXk8;Z$A`g~otH{n{52I* zdcz$Vt&xKmTRSZu2h-d7r3E|lH1_vF{=jtuJ^Dx;3<9``pDpF~uylEfV!j9e#G>UO z^ds}Ik!3D*45h{IDbPMpaaF(XLTfeIeSTE>^pYLzcHa3Wb+F2rw$2|?v=o8=gPFap zFzeNzN&Lz1DNmiwzlUX}oH-k50l=#kPp)+Q@WX ziqP#?i={0=`NvMA#&0a2@OQN(m2ItGlzRbDiD~!o_<4jyz-lNcDAw`Z6)Pq(? zX$l5w2*Oicw_}9zWnN~Nh&dpYf^Rj*tX)XJ#`ZpxSS8QfU6)<#wn3r9F4E4B4jk!l zp@6rTGRkeTiv(aD2yx+_!6OEVV7T4IQ-3?~9TU+nHVBZP`8-iru_?KN-v@Uw4V!~% z^?Lme31^$&HxJis(ETf%jmMX%Oeup5K!k!L{pR%)-;eK&gcFrSzFgauN z&q2wFpB`V&K6p7dzK~!qN32SfWi5mg+FXgjY)WqQ(nMJs?s3v)`EYCGw>8FDHOnZ* zgM;#sWvm7=eY^b>MKLjDMPCcrWz;&@s@htLf>w8r-k1NN9_=Is>-664IKibMa_D}ET!`yCN5Eexre7t*NVcdNm6*>wLojGrV`pP}yYbo*X0CB2uL zv0H`~i5IMI9@y<35jJ`<#-IayiRL#LU>X6?OGQ?WAySdWOQirSgm7X~o3Bf2AEkw_ z)v}viYA>(VIM_APt=3HaZ@W0d!+&($%UlRuY&eka!Wo|U^@Ud*e&{q&kBJZkfOP-d zhB7Yt4^~lP>|zoOI()-dEuVPI+*z4I*^)_*$=}PVy0p$7NqR2q1akFdKF@j{XAa>^ zt~apNv2xsHWR$hcE;>>R8~VIFurq4we>gB9V`NPg(!XQ!5H=h<6^_;J%D`QjT1h)w z)bO~7p0;>0drXZi24^0O4EotUh3^wm%r4b8p}m6-f|`Rk{Frwf8O|SQR<}Q{qWvi?_hmD>YfHKYO`hOb!9Mr4lzVA9J~-|ZIWNTgR0_seMl8;km%gF zCO06F5BIWd*?!}c(n%J~&XpWN87P#u{joa4O+D?d>Z{0y-6YJ`sYxa6b*UmfPy>8; zNr2V254JaXpEs~0Ockm1T$f4X>sl#?lD$|8NYshT5axMnM!|4CqVE7(ueKk|*I3pl z9$Z!BI5NJWr^smR%uSYWy6s0=fXS)^ zSd5IVj(ywwIBCTwIS@JId=^;QsRQOyG!4c+&TeREPb!j-F?3G`as}eYhvS+ugd)hE zci%-^XvlHa!D}yt&P|B~jiC^1VQn0SZ>`gwy|f_z;4ls3caabm%B@Ks7{k4ee!HPI zUsD>HXv0Q{Zd(_GR7F$sU&zfY1*cdhocr=Z`}!rSlHa_ya|bi_;pZ4~b|Ss?tFQTMMExDM~#|NUWl# zor;&2CsMxdg4qxug|ulcWiHF@Vb||DzwyQnB-?WPfeYXFO1FiA$P&BWg8QGCfd`il zq23R{hMsxsaDmOAdD`~q)V4paJKVxfHy1qfWrw$zG87ukXCYqK<<->Zb_af>{{R)9 z5`w^dje~xW;j4(4+U)kNU@!-c?EQOdSijaL%AC-{vh+KufH9RYDK{Q3@yLBnpR=fa{P@etT)@V_;3t_) z$S%!|gLG`a^H5QkV;7_&SV^`bdPd~rzg=7WNzwpGYVEEH(|a#1j-chz@U&dV?K zoDj@-*Z0paenP!>mD`{;J~CfF%g%RVFTHzY7G9evBW{iQHo)qvhJ3Mdp5wcdJT^ukkY;LReBuY85?Yc4}UiOwpyC zOg`zlZ<^Wv68~i`hWm>%gS$aIB?Rl9DAO`_Q2DwEf)gvbm+9g*gTcD~k3-)EMBSoB zcY89*r8~5hkU*ppc4mGW08fpYtD>N`?W2)$D+UrSmM@*DRyqk^nP^DdoodZ_dh?7Y zC|-V~t_-fK0PFsd&_*xOM#NCT3`}V5ROy*bPXNfk>FNJzIz<&(i!)anWY*v+qme2* zaF$g6Wa>a;N4_TVWr~i4RWn)oYFA%DOSS}uBNSma4KHedv?LU1GR%?TDJDb zfYUK)twohV)Rq>vX)Udy#Hm@?-=xeRB?qA#+!vulq6mhwN|S7s%B$x+CD6FFObtNA zyZy(PHEt3+oCNe$N=yS@VM5_G5zQpiVZQG6+368WZk&scTTac%^xxvK5KTwY#nr6Y z`Vr(Ptt~WTmx1g7or&a>Inodu{sY?vWr$pm@vcjg8k zoJmbOc5#u(mXPwqYkw{%4H~vphizei+>7x_EdW25l>{pD_46_*K!-5!3ZyW%#GH|&~JWaJy=t8_As#Zsf@&4 zeUL$@t1CicXn^1Z_71h2h0u~Y*= zu>dTuprfiML|9m36GvIXmD#_0P*ZXiUn{awb|<2}bg9zg09}|)#Z_uMSXOvA)qA8Y zeM;Z8Cw5;|YBjInna_=!&1tc1WNpPFq~@Jq^JQKaIUydXwa{6XfUBXmEv*EdX@PVd zmMEX(Dp#$PolPl~6TIUh7ROS8$UFu^89H-$K<80aziU?kfe{Fqv9Xl=C3odRgUxcx z%4wzs$iB|dB|6Gl)U~5H2pGJ}!-G}SYE-gx;b$h+9fCBQ3TrrTns=EUFH_e%>S?D~ z3okWU6x1^#Uf1I`BFzBEy*id1);T$#*8j8s(sFm5(;oRT=*z#OR&Gvtn9m!CYJI3e>aARVpdIszpjc^Xely*)8kdS&@y9~-2-8LtoH|&UA$6Rrt_)4)qc)agXtdObp2KBt(S&8U) z{B8TGiqG1Imb>MVuZozZK=oMpsr#g$)lqO3zIQrH4 zmHkhNQJKwBrZ-prPI+^$J8+koC&OumZ(h@n;JhlWxEiXqNztyrs?nBE(a?1ZGv?q3 zHLMka>KS;7k;Kx(qq|)x*Zh9J??t={on=NH|I zhP(uKFd)@aoP5{$yqvG?7DL+F?e(*uGHwI908J-$<@NO=W?eiFLTCj8?pQdPd4)!( zOWk4{_<)DBp`MhSKyiOtYdzHG>RO0~Sw1rVp}NXIQG1&Ub4g}YT@q&Exbctiv`Fbs zZFfo~o>BMgpm7TfY65O*wGg^6asNgYOo=>qZ*o%JxR6108Y0_Y8b=+C9dskLb&K>0 zY<-{;o|og)fd0r7AdimBe0HQ#NC*^Ye*Yd<;T~vZbI~*axk;;7A<16sFY|$p-NTPg zZORh?WxJ8RA?NG)p7f{-{&gJg5sWVL$@k`)d&+O6)sF7GKfi^iQ@4DPvO-ChrgKWV zdnc6?4xG*goDQx0aL8|>}<_^PoGcK;s zZ#(_$UlST+faG0kxWbI?igorVGxLnLnl85=Xq86Qo(Ch6*+*bc#>>7HH(YPPu~|KV z_6=DtK{F?wdrv^OIQO0R?(1UTS?Yq1*Jn|gh^}q;Ek%U&(tJjovB7A#Z`FHu$S;3z zc%x`057pnxf_QXHxtMVNI6rGoH&A}XL_t0^8!#Ma3Gz4>EF=%Nas%tC{(YltHC$N%T0t>VH722yqHr8x zyh``$D+SJ!Gn(bN-XB*jED)ZKx7mGCPeL=*K>>rl1$v+MmsuDJSyK&^Gx=FGBCV;i;RjXBX%Sl!;qP6n zF)R_87T(V4mDg^pL-yGwEER7!!uGl}^0KEZjk5Rm?BciBat)|AsU!;lVSl(V`brEL z%rHLI53-Zz0oFlc{x+rQaDslj_9soK;prw1nJU~L{%2PDG79}25@Ylq=Te#Gd`Gw9 zkiq^kVhwb9rh_^N!q4kmh$1yxVJ=x!^be057lcBhM$~+b4on!B6XzcDf1kemSP%gh zm41citO#yeH!G&1((~!4Zz;#1Q98hM$dmf)r-p60zM1Ud1E*=T;U~+_U;H`!zhrfG zWhDx)_SrWs7gR9D!njQ2ww^BzS4+#}+}xjrHwZmmURYJ~|KaW@iWc_ltY2uB-P0i4 zeff~V=+J+-`;3Vh3}eQqS|I~I7)CYs%WFpl4k&E8;*97q zK-S*%#Kb2vSRG(vhl{Ii|!?%yoBQ{B!|m^Ia%8bZ2}=i z+Vz63lUXDYM5Oz?R->yu4D->Nx4n-faLm_>#d~kM*A%$ zDWQDYw`wAv>p$Cc3j<>&UcH9#oo(`-9hY84=!JbKZ2ZW@+~DzvE$5k)DN~Bg)^Vuc z{eVGN7gb#?cHO}37n>=5ue~^9%CZ3-6IL}Xb{783xn%P72%%Hv;h&IH_Fs%PUQR_o_Z4!woR?PM7pX(RlsVXlD)q6Yk4JZq( z8Cp;haeTP@E{~SH>FU!_H0T57&td3@KgqD%=>OyR`=FWrrzqOom})U1{PY_(M&~sH zFRp)VPU1Yx7;)*GD&z(4$l7+>18`lA;%KlJ{`vcW31gd-My8DRS3Jnb4O?3?SoT-D zI_B#(gBdegN>I$I<2jw>xVUF$W(R}ox%7G}G45C>);%$dS2N$vk1d2&^!8HFl21=r z!=p0#<$Q6@`Eg@Kv{h&l?HTMW|Khx(=7+Q*W;Xq)QH@U%) zr(0pAC(HNQwf?GMux>YP)J9a#4VZ)Bcoecj5pgbUfG^c1{{+20yfj!y=cQKuUzMF@SXAHM_YDN3OF%jVq+4PTq>+^FmWH8ANg5Od-n)b+0GEj@x{}XR-1JX6iMyVpRVvs_63!Q zsy*ExJDHfiKP_(ZVI&XgMHX2Gk2MRR*{{^c26hqrk3TC4N;I9+u;<}l%<*juCf`j> zDg0p8x{uEWVS1#xt@g!Y)7PKs(btaVtPke-r#o8X(t=wVlUPmf<7N(FFNG6c>cH6+h8WVj(gZ09{unb+b5>1$ z8Zk`0XZ{V@%;?FRIyQ7i+F_c8MpXSN0wJ6lf0i|@lU36^#;?JHGN>5jRsHK9Of1E1(&gq_Dz^K?W_x#iXTKWRv$q%Qn$ zK)`!yyrFQyMdNT2>j)Yx>f)SwGM0>u*($X03LsSdAgG-k=OiF+B} z^PogGd-e<8YQ2b=OloqV4%5@RC2f$% z_kfG$=^h^8D6AtbeO=SLL~F<&H=?|c(Ct74SF!Jw7l$N*4E=~$Lu6brf<>5jZ}4`5 z$!Ylx!~uc;+Zj~&rL;cIaRK4us=9Ct^BDQR;jjLy>xw9-o5e$J_7@2R2A-su{D zRrgr)POh~v`Q{pTwYY_Vgwg1gO3Z4wT3TMugaG)RQM#;xA~|QEn4mkXSWs@uYSjU8&wNvLY9=WKXj%%`|ph2bC7Id`su9Sf^oLoqoU1Sjj$9?~6rU#|EFdG#?JPkQwobL(y;ro? zlZjekR!6DJK#P83%8#lzCnc%|uWc&%ea&1P!h)MfloDE8`VZ z{1T9^dOI?FO^13LitF$9GoiSFBBQv}!BhMAixq}$p=^BtFzsxf*3dMUpAxBLZxlfX zTgvP>&=_9g&Sjz%_!SZvI(lTEmW@kZM(k179$t3p+Ns8`nvI(rwkO}CJ!~1gKHC_C zs8mD9*HKVJqF-UmBC{pM{DraM>=0i2fvFU}iQdz*ZSEB32&SK$+~5PB1+=wFzC<5G zSKR0(lDNq!*lx`Hk7sKqzee5u2N4SkJjp7Nu-_=<#*EtKmhAAltb`crS3L1nho(~# z=92!)$MS#bPv4hFLAjF?fvhA2!=gAMvn9silymiT~ z?Nnt&jPl9NJB-ojT~VG4N&Z~CL7ykHZS#>2>PG?7FN5B#FG#j|qf}8n`Z2}l?^KYu zXTdSn^GEI?;gcSXF1NImNl=pY6%SD$wT&56fX@8*WX@*iBrPj7fYBTWKaGuOHoSjryS^; z5h7;+>@8*AR~o56*?cA`KPT9#L9;hUYv~t3iIW4rV`BQAfi&e&R4qNiL@Hp0r!^F@ zLaf6dN^m_H_ONIAV`y&f4{vos+%{dM2%Wa~SN0r;LUW%Ii2&-%GW(RFVcUyU`GA1# zH|_pyCcz=npiml91`6elLUC}2%*@Og+i7m$>@XA%o{vN9IYQbx8?*_$*p?YEsgHgn z?O*6}UQBG_0u@!5~sF zv^#ugvK#ePsybPIM!N6x2O*f0xk~r;3bTrAg@^O~<@fe&!Ll4ri z83WF=$5ve##X96^EX<(|V|y4{Xy8lT*eMJuuPy2&X@1{yu}|B!ti zq;OhlV41~H2WeZCrm@FKFn9!$vMh2fW+8t2>FE8F3j#x-*G3HiNq9bQ=#VDDSHCBYf{hVBV(bSUkfemHs8D^x3#i6pZ8 zA~b4;Ih!3qeVJ0~9AFuZ56+^~G0F-Roi&We|1_}yfr1pyThUcufGk05Yq!4s&V66*`-uAqXFpU5{~m)s zN8-?Gwl&xudt)}yB5ySgs!vOBCT0=b%C(#&nZP$jUegSe4{Q*@6XX+MJkZQ{OLG@e zZ{Ak1^#CB%92{+}SP#WI_7$p66$yAiykdQHVz$Mq`hAp{fmdj6!)?jT$NMg+IbG^_ zQ!wMc(c5i-;oHpSPOWc(->3CpTFe7n;qm1jw`cK>AXKlx4E#={K&J*CI;pmtRLWq;yd9$DyLtb0umuL)ZJP*rCiegyGx|f7zYqX1|l2^ zUSr}js7Th8!%5b==G0QJYMl&cfPc8}Y1En*xz2~(iTH&zp5?tP<;hwJy}{EM;H^B# z{o`<(Bi{Ue;44ul0IUrbQQ@mJCYWm<4KB(CFzHMN)RD5#tuzW!SrRdJk$;pAfS+T1 z@&7YuMAI5Zd1-RPzfs_I-VOS})g7{=LUq$Ql2EeNThw+oQGHOvchdiCD0s2@NWX{Pu`dRL%;XvJR~ZDT`H4% z99B92Ng1|J;a(kF;Yvr9F*IR}&2n0!v!*d@r6o!iO>1Lc_0}95QuN&ojM;sS_JoWC zqIm49hSLw_Ztjr!?`813#%y}h(b6acDdRLt&Xlz6y17wHz9Q=*`n_^>y#fWsEBf12 zC;<`CVG*O-#p&0`>z_c=$&s$H8=P7uh$7N$cVlZyPB{oiGT_4PQeHgpx5)3qeMDwn zweoF4P2!J54&-1|DCnE(R>xv3I)jEIDl0+CoL>C6(+A(S5;nkNA^wUa5=IyFWIo1n zt@xSQMZ6JvjDWeA{E#Jfg7p@L*|jMIU;6T5m8bTU*u(K4+MII8VQUd_Ehqdi0Cu-zX=IErvFrU(REQe$1e zQD^4w1NP2HH<;~JH)mpw>p_gIN{O%vTj4>dP(oS0c!Xf+0_`BC0a6gma7yDU}Il;F|2bw zoQFhdh|wB|umNulmLYdV-YwwWY-m5m$TzOXd0(X6&+k_Y@Nw`*f6oib@17Xv+u4QU zOjai-J?FSOwhimOetU}&|M%{~{UY`%dXWE8X`BOk1$D&V#7VaW#n*v9VYHB}W9)%I z{TEZxGCd}Ph;7fq9cW9@lQI|5*OL*%sE&Pmkrl6K+LzIMKHtg-6cSCb|Ioh%;Vg`H z8ddB?RDxu}q3(AZ35^M8r`)g$L1-e|U2eld0vf@lalY_- zESW>gMPc-POQ*iphfQs->5c>}f|YD{9H)Nw3yNbymnZ zw>#iZj3He@j&JNM(~YoCe$K^W@(K_c6Z<>w$Ed}Hh=v%y8|Jz_6BF~pdxf!h))KoO z?*hA7FV_Cf#lqWTtz*b^q4q@9bH8yZ_Z5!TI|bJrUPX5DzbcM-H2s2U+BRn5lcK4w zwqnWZR*t3&>MR$M_}NwhI*YIUn8ZRXOlW-&x+@p6)Y#3d4M5<3!b$(AG5CyWrr1~Z zaOOitWSO8Shkp(Jw6VGw03L{R3;1)aXeQM}MZYXr__R#WFi>~}R5SFl;~dOu%sTCo z>G{GeXnZUZ5K^coBwAXYb2i5ZR)RYp>M1|Hb|I(oJlr7R zFNz_}ZDy(LA{+Wp(L%`4=P=~*V$eM&9hINYSO0ytXBz#G!d|I%GoKYHVXKTC@B1#V zB^o_iN4@O15GGj|_bIgHfOcsalZNyqE@0^E-q7AO^Gq_FT^NHH??ycbCVH&rMLs51Rz7h)$8Bv|eBY1F?H3Qf>g+S(ctUy8lkqli&u_n(Q zwX!i}%D_t_rHfqB&sszH7vHJ9Axu5=v1LY*?`;l0Ijz+Wo*pQ52dx^9yQGcvA_z+! z{*CYy%a4>9V_aCTXT3d4>aNK~Xw5lmHs6 zY95D*G3KcrcY$+Tt`i8!s-_uA^bHO@>M9JCV5nnlPyO^r4L^|bw|Le>V!Vh*Rc0_( zCmm&4sgxUh{q(DK+Qs}<(u89O@QmJ23f=4?Tb-akem%Ep8jVZQ_sA3@l~3P+&@GGhxmas_6Jt+x)NRqNe;j zbaPp{tM!uaDb3O(}ZzgFeKIZ`K8##BTdaE|?Is9!DBFEBuIq?xzvP z65_)|_w852I5A__5N>}Cx1FX3?3~D)7frBGX6m5gJ@LZ6w(ucjVJcmx3@H_gz}5rm z`0S;pubf%gv1BNJx}}Q%P00~!nyqR(85vS;;dQHj><+h~z{s@)KaD?^5;fH_we`KN zD8NQ}EPG>BDBS&qx__on zy(-qaI!-Gn8`2$}NSN&=o^E;Jer^!F^GyJH<793wsVI zL8Ow7PubT88)SE_zIU3NWA;T0UaHc(;$aJ^R1j6_O%AL3T;(O42FZ5w`(E&?nhG$V z3bFn^H9`UKEDoyX0y7t`EGSudo$V0nOmXRkBbY}H#SFgrQu}bje??IeJ>5ps&w3U> znJg1R`bv=Br`Qq%0(U`Cte5m{$1Ot1E=`u#>W5Me&F3u}CRP`};439YAO?i^O&zbQz{{9HR?bL?)HAHG(X#b zvNIun1Bw5ba)SAmI;DNxG-Mv^;1`qD^i-Ns18?iO-3Zl}3#nz|WdA@VAQ*TZ+CLA1bLt`O?gj0Ku1t@_!j^Y1Yii zky*!5)o9H?0lqV`x5Cg*XQxXhd+GW}Pp}A~VIQ~epO~x!TB8O6(x>iV`<&`kZA}${ z)0$=q~kZQxA9oM^>V1yY%AwsB*XiG2Aq&nv@8!Dk|nZZg&?0j-#NVd54_ca2ktqU}?jB z{{&qS)%pNHYzF88X=%T;$;Nz~nVuvj==qP?me@c;(dGOcHF**TOLSvUGjz1+!##Av zz{oHQ+X%U^YkTQ1Ep1ScOT=b^a_wbDnCxS;SYsV)Od{k!?sn&ic>cpiD$_0}x_SK> z0nwcIWvLHAAm3mL3IQ2@aK=m&*djm5l_+|I@;x_4-##y2%jV9G-rhGXnfpyVUv;p0 zx6VknJ*1PX7WPU910?=q-ec8@d!v{2;kBHK_Lg@?C*U;^~wB469fT@Zu zeN#_zfzc_<#93w8=NZ5;x!4 t|AUA0&mr6YY@atn6Jhj!cfy9QiQD$4oj)~4E#3k?&lNQls^qL9{vYOSzXSjP diff --git a/docs/tutorial/JITTutorial2.html b/docs/tutorial/JITTutorial2.html deleted file mode 100644 index 504d96597b0..00000000000 --- a/docs/tutorial/JITTutorial2.html +++ /dev/null @@ -1,200 +0,0 @@ - - - - - LLVM Tutorial 2: A More Complicated Function - - - - - - - - -
LLVM Tutorial 2: A More Complicated Function
- -
- - - - - -
- -

Now that we understand the basics of creating functions in LLVM, let's move on to a more complicated example: something with control flow. As an example, let's consider Euclid's Greatest Common Denominator (GCD) algorithm:

- -
-
-unsigned gcd(unsigned x, unsigned y) {
-  if(x == y) {
-    return x;
-  } else if(x < y) {
-    return gcd(x, y - x);
-  } else {
-    return gcd(x - y, y);
-  }
-}
-
-
- -

With this example, we'll learn how to create functions with multiple blocks and control flow, and how to make function calls within your LLVM code. For starters, consider the diagram below.

- -
GCD CFG
- -

This is a graphical representation of a program in LLVM IR. It places each basic block on a node of a graph and uses directed edges to indicate flow control. These blocks will be serialized when written to a text or bitcode file, but it is often useful conceptually to think of them as a graph. Again, if you are unsure about the code in the diagram, you should skim through the LLVM Language Reference Manual and convince yourself that it is, in fact, the GCD algorithm.

- -

The first part of our code is practically the same as from the first tutorial. The same basic setup is required: creating a module, verifying it, and running the PrintModulePass on it. Even the first segment of makeLLVMModule() looks essentially the same, except that gcd takes one fewer parameter than mul_add.

- -
-
-#include "llvm/Module.h"
-#include "llvm/Function.h"
-#include "llvm/PassManager.h"
-#include "llvm/Analysis/Verifier.h"
-#include "llvm/Assembly/PrintModulePass.h"
-#include "llvm/Support/IRBuilder.h"
-#include "llvm/Support/raw_ostream.h"
-
-using namespace llvm;
-
-Module* makeLLVMModule();
-
-int main(int argc, char**argv) {
-  Module* Mod = makeLLVMModule();
-  
-  verifyModule(*Mod, PrintMessageAction);
-  
-  PassManager PM;
-  PM.add(createPrintModulePass(&outs()));
-  PM.run(*Mod);
-
-  delete Mod;  
-  return 0;
-}
-
-Module* makeLLVMModule() {
-  Module* mod = new Module("tut2");
-  
-  Constant* c = mod->getOrInsertFunction("gcd",
-                                         IntegerType::get(32),
-                                         IntegerType::get(32),
-                                         IntegerType::get(32),
-                                         NULL);
-  Function* gcd = cast<Function>(c);
-  
-  Function::arg_iterator args = gcd->arg_begin();
-  Value* x = args++;
-  x->setName("x");
-  Value* y = args++;
-  y->setName("y");
-
-
- -

Here, however, is where our code begins to diverge from the first tutorial. Because gcd has control flow, it is composed of multiple blocks interconnected by branching (br) instructions. For those familiar with assembly language, a block is similar to a labeled set of instructions. For those not familiar with assembly language, a block is basically a set of instructions that can be branched to and is executed linearly until the block is terminated by one of a small number of control flow instructions, such as br or ret.

- -

Blocks correspond to the nodes in the diagram we looked at in the beginning of this tutorial. From the diagram, we can see that this function contains five blocks, so we'll go ahead and create them. Note that we're making use of LLVM's automatic name uniquing in this code sample, since we're giving two blocks the same name.

- -
-
-  BasicBlock* entry = BasicBlock::Create(getGlobalContext(), ("entry", gcd);
-  BasicBlock* ret = BasicBlock::Create(getGlobalContext(), ("return", gcd);
-  BasicBlock* cond_false = BasicBlock::Create(getGlobalContext(), ("cond_false", gcd);
-  BasicBlock* cond_true = BasicBlock::Create(getGlobalContext(), ("cond_true", gcd);
-  BasicBlock* cond_false_2 = BasicBlock::Create(getGlobalContext(), ("cond_false", gcd);
-
-
- -

Now we're ready to begin generating code! We'll start with the entry block. This block corresponds to the top-level if-statement in the original C code, so we need to compare x and y. To achieve this, we perform an explicit comparison using ICmpEQ. ICmpEQ stands for an integer comparison for equality and returns a 1-bit integer result. This 1-bit result is then used as the input to a conditional branch, with ret as the true and cond_false as the false case.

- -
-
-  IRBuilder<> builder(entry);
-  Value* xEqualsY = builder.CreateICmpEQ(x, y, "tmp");
-  builder.CreateCondBr(xEqualsY, ret, cond_false);
-
-
- -

Our next block, ret, is pretty simple: it just returns the value of x. Recall that this block is only reached if x == y, so this is the correct behavior. Notice that instead of creating a new IRBuilder for each block, we can use SetInsertPoint to retarget our existing one. This saves on construction and memory allocation costs.

- -
-
-  builder.SetInsertPoint(ret);
-  builder.CreateRet(x);
-
-
- -

cond_false is a more interesting block: we now know that x -!= y, so we must branch again to determine which of x -and y is larger. This is achieved using the ICmpULT -instruction, which stands for integer comparison for unsigned -less-than. In LLVM, integer types do not carry sign; a 32-bit integer -pseudo-register can be interpreted as signed or unsigned without casting. -Whether a signed or unsigned interpretation is desired is specified in the -instruction. This is why several instructions in the LLVM IR, such as integer -less-than, include a specifier for signed or unsigned.

- -

Also note that we're again making use of LLVM's automatic name uniquing, this time at a register level. We've deliberately chosen to name every instruction "tmp" to illustrate that LLVM will give them all unique names without getting confused.

- -
-
-  builder.SetInsertPoint(cond_false);
-  Value* xLessThanY = builder.CreateICmpULT(x, y, "tmp");
-  builder.CreateCondBr(xLessThanY, cond_true, cond_false_2);
-
-
- -

Our last two blocks are quite similar; they're both recursive calls to gcd with different parameters. To create a call instruction, we have to create a vector (or any other container with InputInterators) to hold the arguments. We then pass in the beginning and ending iterators for this vector.

- -
-
-  builder.SetInsertPoint(cond_true);
-  Value* yMinusX = builder.CreateSub(y, x, "tmp");
-  std::vector<Value*> args1;
-  args1.push_back(x);
-  args1.push_back(yMinusX);
-  Value* recur_1 = builder.CreateCall(gcd, args1.begin(), args1.end(), "tmp");
-  builder.CreateRet(recur_1);
-  
-  builder.SetInsertPoint(cond_false_2);
-  Value* xMinusY = builder.CreateSub(x, y, "tmp");
-  std::vector<Value*> args2;
-  args2.push_back(xMinusY);
-  args2.push_back(y);
-  Value* recur_2 = builder.CreateCall(gcd, args2.begin(), args2.end(), "tmp");
-  builder.CreateRet(recur_2);
-  
-  return mod;
-}
-
-
- -

And that's it! You can compile and execute your code in the same way as before, by doing:

- -
-
-# c++ -g tut2.cpp `llvm-config --cxxflags --ldflags --libs core` -o tut2
-# ./tut2
-
-
- -
- - -
-
- Valid CSS! - Valid HTML 4.01! - - Owen Anderson
- The LLVM Compiler Infrastructure
- Last modified: $Date: 2007-10-17 11:05:13 -0700 (Wed, 17 Oct 2007) $ -
- - - diff --git a/include/llvm/ADT/iterator.cmake b/include/llvm/ADT/iterator.cmake deleted file mode 100644 index 55df8ce2643..00000000000 --- a/include/llvm/ADT/iterator.cmake +++ /dev/null @@ -1,79 +0,0 @@ -//===-- llvm/ADT/iterator - Portable wrapper around --*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file was developed by the LLVM research group and is distributed under -// the University of Illinois Open Source License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file provides a wrapper around the mysterious header file. -// In GCC 2.95.3, the file defines a bidirectional_iterator class (and other -// friends), instead of the standard iterator class. In GCC 3.1, the -// bidirectional_iterator class got moved out and the new, standards compliant, -// iterator<> class was added. Because there is nothing that we can do to get -// correct behavior on both compilers, we have this header with #ifdef's. Gross -// huh? -// -// By #includ'ing this file, you get the contents of plus the -// following classes in the global namespace: -// -// 1. bidirectional_iterator -// 2. forward_iterator -// -// The #if directives' expressions are filled in by Autoconf. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_ADT_ITERATOR -#define LLVM_ADT_ITERATOR - -#include - -#undef HAVE_BI_ITERATOR -#undef HAVE_STD_ITERATOR -#undef HAVE_FWD_ITERATOR - -// defined by Kevin -#define HAVE_STD_ITERATOR 1 - -#ifdef _MSC_VER -# define HAVE_BI_ITERATOR 0 -# define HAVE_STD_ITERATOR 1 -# define HAVE_FWD_ITERATOR 0 -#endif - -#if !HAVE_BI_ITERATOR -# if HAVE_STD_ITERATOR -/// If the bidirectional iterator is not defined, we attempt to define it in -/// terms of the C++ standard iterator. Otherwise, we import it with a "using" -/// statement. -/// -template -struct bidirectional_iterator - : public std::iterator { -}; -# else -# error "Need to have standard iterator to define bidirectional iterator!" -# endif -#else -using std::bidirectional_iterator; -#endif - -#if !HAVE_FWD_ITERATOR -# if HAVE_STD_ITERATOR -/// If the forward iterator is not defined, attempt to define it in terms of -/// the C++ standard iterator. Otherwise, we import it with a "using" statement. -/// -template -struct forward_iterator - : public std::iterator { -}; -# else -# error "Need to have standard iterator to define forward iterator!" -# endif -#else -using std::forward_iterator; -#endif - -#endif diff --git a/include/llvm/ADT/iterator.h.in b/include/llvm/ADT/iterator.h.in deleted file mode 100644 index dce74625118..00000000000 --- a/include/llvm/ADT/iterator.h.in +++ /dev/null @@ -1,76 +0,0 @@ -//==-- llvm/ADT/iterator.h - Portable wrapper around --*- C++ -*-==// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file provides a wrapper around the mysterious header file. -// In GCC 2.95.3, the file defines a bidirectional_iterator class (and other -// friends), instead of the standard iterator class. In GCC 3.1, the -// bidirectional_iterator class got moved out and the new, standards compliant, -// iterator<> class was added. Because there is nothing that we can do to get -// correct behavior on both compilers, we have this header with #ifdef's. Gross -// huh? -// -// By #includ'ing this file, you get the contents of plus the -// following classes in the global namespace: -// -// 1. bidirectional_iterator -// 2. forward_iterator -// -// The #if directives' expressions are filled in by Autoconf. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_ADT_ITERATOR_H -#define LLVM_ADT_ITERATOR_H - -#include - -#undef HAVE_BI_ITERATOR -#undef HAVE_STD_ITERATOR -#undef HAVE_FWD_ITERATOR - -#ifdef _MSC_VER -# define HAVE_BI_ITERATOR 0 -# define HAVE_STD_ITERATOR 1 -# define HAVE_FWD_ITERATOR 0 -#endif - -#if !HAVE_BI_ITERATOR -# if HAVE_STD_ITERATOR -/// If the bidirectional iterator is not defined, we attempt to define it in -/// terms of the C++ standard iterator. Otherwise, we import it with a "using" -/// statement. -/// -template -struct bidirectional_iterator - : public std::iterator { -}; -# else -# error "Need to have standard iterator to define bidirectional iterator!" -# endif -#else -using std::bidirectional_iterator; -#endif - -#if !HAVE_FWD_ITERATOR -# if HAVE_STD_ITERATOR -/// If the forward iterator is not defined, attempt to define it in terms of -/// the C++ standard iterator. Otherwise, we import it with a "using" statement. -/// -template -struct forward_iterator - : public std::iterator { -}; -# else -# error "Need to have standard iterator to define forward iterator!" -# endif -#else -using std::forward_iterator; -#endif - -#endif // LLVM_ADT_ITERATOR_H diff --git a/include/llvm/Support/DataTypes.h.cmake b/include/llvm/Support/DataTypes.h.cmake deleted file mode 100644 index ad210ed3b54..00000000000 --- a/include/llvm/Support/DataTypes.h.cmake +++ /dev/null @@ -1,152 +0,0 @@ -/*===-- include/Support/DataTypes.h - Define fixed size types -----*- C -*-===*\ -|* *| -|* The LLVM Compiler Infrastructure *| -|* *| -|* This file is distributed under the University of Illinois Open Source *| -|* License. See LICENSE.TXT for details. *| -|* *| -|*===----------------------------------------------------------------------===*| -|* *| -|* This file contains definitions to figure out the size of _HOST_ data types.*| -|* This file is important because different host OS's define different macros,*| -|* which makes portability tough. This file exports the following *| -|* definitions: *| -|* *| -|* [u]int(32|64)_t : typedefs for signed and unsigned 32/64 bit system types*| -|* [U]INT(8|16|32|64)_(MIN|MAX) : Constants for the min and max values. *| -|* *| -|* No library is required when using these functinons. *| -|* *| -|*===----------------------------------------------------------------------===*/ - -/* Please leave this file C-compatible. */ - -#ifndef SUPPORT_DATATYPES_H -#define SUPPORT_DATATYPES_H - -#cmakedefine HAVE_SYS_TYPES_H ${HAVE_SYS_TYPES_H} -#cmakedefine HAVE_INTTYPES_H ${HAVE_INTTYPES_H} -#cmakedefine HAVE_STDINT_H ${HAVE_STDINT_H} -#cmakedefine HAVE_UINT64_T ${HAVE_UINT64_T} -#cmakedefine HAVE_U_INT64_T ${HAVE_U_INT64_T} - -#ifdef __cplusplus -#include -#else -#include -#endif - -#ifndef _MSC_VER - -/* Note that this header's correct operation depends on __STDC_LIMIT_MACROS - being defined. We would define it here, but in order to prevent Bad Things - happening when system headers or C++ STL headers include stdint.h before we - define it here, we define it on the g++ command line (in Makefile.rules). */ -#if !defined(__STDC_LIMIT_MACROS) -# error "Must #define __STDC_LIMIT_MACROS before #including Support/DataTypes.h" -#endif - -#if !defined(__STDC_CONSTANT_MACROS) -# error "Must #define __STDC_CONSTANT_MACROS before " \ - "#including Support/DataTypes.h" -#endif - -/* Note that includes , if this is a C99 system. */ -#ifdef HAVE_SYS_TYPES_H -#include -#endif - -#ifdef HAVE_INTTYPES_H -#include -#endif - -#ifdef HAVE_STDINT_H -#include -#endif - -#ifdef _AIX -#include "llvm/Support/AIXDataTypesFix.h" -#endif - -/* Handle incorrect definition of uint64_t as u_int64_t */ -#ifndef HAVE_UINT64_T -#ifdef HAVE_U_INT64_T -typedef u_int64_t uint64_t; -#else -# error "Don't have a definition for uint64_t on this platform" -#endif -#endif - -#ifdef _OpenBSD_ -#define INT8_MAX 127 -#define INT8_MIN -128 -#define UINT8_MAX 255 -#define INT16_MAX 32767 -#define INT16_MIN -32768 -#define UINT16_MAX 65535 -#define INT32_MAX 2147483647 -#define INT32_MIN -2147483648 -#define UINT32_MAX 4294967295U -#endif - -#else /* _MSC_VER */ -/* Visual C++ doesn't provide standard integer headers, but it does provide - built-in data types. */ -#include -#include -#include -#ifdef __cplusplus -#include -#else -#include -#endif -typedef __int64 int64_t; -typedef unsigned __int64 uint64_t; -typedef signed int int32_t; -typedef unsigned int uint32_t; -typedef short int16_t; -typedef unsigned short uint16_t; -typedef signed char int8_t; -typedef unsigned char uint8_t; -typedef signed int ssize_t; -#define INT8_MAX 127 -#define INT8_MIN -128 -#define UINT8_MAX 255 -#define INT16_MAX 32767 -#define INT16_MIN -32768 -#define UINT16_MAX 65535 -#define INT32_MAX 2147483647 -#define INT32_MIN -2147483648 -#define UINT32_MAX 4294967295U -#define INT8_C(C) C -#define UINT8_C(C) C -#define INT16_C(C) C -#define UINT16_C(C) C -#define INT32_C(C) C -#define UINT32_C(C) C ## U -#define INT64_C(C) ((int64_t) C ## LL) -#define UINT64_C(C) ((uint64_t) C ## ULL) -#endif /* _MSC_VER */ - -/* Set defaults for constants which we cannot find. */ -#if !defined(INT64_MAX) -# define INT64_MAX 9223372036854775807LL -#endif -#if !defined(INT64_MIN) -# define INT64_MIN ((-INT64_MAX)-1) -#endif -#if !defined(UINT64_MAX) -# define UINT64_MAX 0xffffffffffffffffULL -#endif - -#if __GNUC__ > 3 -#define END_WITH_NULL __attribute__((sentinel)) -#else -#define END_WITH_NULL -#endif - -#ifndef HUGE_VALF -#define HUGE_VALF (float)HUGE_VAL -#endif - -#endif /* SUPPORT_DATATYPES_H */ diff --git a/include/llvm/Support/DataTypes.h.in b/include/llvm/Support/DataTypes.h.in deleted file mode 100644 index 405f4764c8f..00000000000 --- a/include/llvm/Support/DataTypes.h.in +++ /dev/null @@ -1,147 +0,0 @@ -/*===-- include/Support/DataTypes.h - Define fixed size types -----*- C -*-===*\ -|* *| -|* The LLVM Compiler Infrastructure *| -|* *| -|* This file is distributed under the University of Illinois Open Source *| -|* License. See LICENSE.TXT for details. *| -|* *| -|*===----------------------------------------------------------------------===*| -|* *| -|* This file contains definitions to figure out the size of _HOST_ data types.*| -|* This file is important because different host OS's define different macros,*| -|* which makes portability tough. This file exports the following *| -|* definitions: *| -|* *| -|* [u]int(32|64)_t : typedefs for signed and unsigned 32/64 bit system types*| -|* [U]INT(8|16|32|64)_(MIN|MAX) : Constants for the min and max values. *| -|* *| -|* No library is required when using these functinons. *| -|* *| -|*===----------------------------------------------------------------------===*/ - -/* Please leave this file C-compatible. */ - -#ifndef SUPPORT_DATATYPES_H -#define SUPPORT_DATATYPES_H - -#undef HAVE_SYS_TYPES_H -#undef HAVE_INTTYPES_H -#undef HAVE_STDINT_H -#undef HAVE_UINT64_T -#undef HAVE_U_INT64_T - -#ifdef __cplusplus -#include -#else -#include -#endif - -#ifndef _MSC_VER - -/* Note that this header's correct operation depends on __STDC_LIMIT_MACROS - being defined. We would define it here, but in order to prevent Bad Things - happening when system headers or C++ STL headers include stdint.h before we - define it here, we define it on the g++ command line (in Makefile.rules). */ -#if !defined(__STDC_LIMIT_MACROS) -# error "Must #define __STDC_LIMIT_MACROS before #including Support/DataTypes.h" -#endif - -#if !defined(__STDC_CONSTANT_MACROS) -# error "Must #define __STDC_CONSTANT_MACROS before " \ - "#including Support/DataTypes.h" -#endif - -/* Note that includes , if this is a C99 system. */ -#ifdef HAVE_SYS_TYPES_H -#include -#endif - -#ifdef HAVE_INTTYPES_H -#include -#endif - -#ifdef HAVE_STDINT_H -#include -#endif - -#ifdef _AIX -#include "llvm/Support/AIXDataTypesFix.h" -#endif - -/* Handle incorrect definition of uint64_t as u_int64_t */ -#ifndef HAVE_UINT64_T -#ifdef HAVE_U_INT64_T -typedef u_int64_t uint64_t; -#else -# error "Don't have a definition for uint64_t on this platform" -#endif -#endif - -#ifdef _OpenBSD_ -#define INT8_MAX 127 -#define INT8_MIN -128 -#define UINT8_MAX 255 -#define INT16_MAX 32767 -#define INT16_MIN -32768 -#define UINT16_MAX 65535 -#define INT32_MAX 2147483647 -#define INT32_MIN -2147483648 -#define UINT32_MAX 4294967295U -#endif - -#else /* _MSC_VER */ -/* Visual C++ doesn't provide standard integer headers, but it does provide - built-in data types. */ -#include -#include -#include -typedef __int64 int64_t; -typedef unsigned __int64 uint64_t; -typedef signed int int32_t; -typedef unsigned int uint32_t; -typedef short int16_t; -typedef unsigned short uint16_t; -typedef signed char int8_t; -typedef unsigned char uint8_t; -typedef signed int ssize_t; -#define INT8_MAX 127 -#define INT8_MIN -128 -#define UINT8_MAX 255 -#define INT16_MAX 32767 -#define INT16_MIN -32768 -#define UINT16_MAX 65535 -#define INT32_MAX 2147483647 -#define INT32_MIN -2147483648 -#define UINT32_MAX 4294967295U -#define INT8_C(C) C -#define UINT8_C(C) C -#define INT16_C(C) C -#define UINT16_C(C) C -#define INT32_C(C) C -#define UINT32_C(C) C ## U -#define INT64_C(C) ((int64_t) C ## LL) -#define UINT64_C(C) ((uint64_t) C ## ULL) -#endif /* _MSC_VER */ - -/* Set defaults for constants which we cannot find. */ -#if !defined(INT64_MAX) -# define INT64_MAX 9223372036854775807LL -#endif -#if !defined(INT64_MIN) -# define INT64_MIN ((-INT64_MAX)-1) -#endif -#if !defined(UINT64_MAX) -# define UINT64_MAX 0xffffffffffffffffULL -#endif - -#if __GNUC__ > 3 -#define END_WITH_NULL __attribute__((sentinel)) -#else -#define END_WITH_NULL -#endif - -#ifndef HUGE_VALF -#define HUGE_VALF (float)HUGE_VAL -#endif - -#endif /* SUPPORT_DATATYPES_H */ diff --git a/mklib b/mklib deleted file mode 100755 index f0d27e18b7f..00000000000 --- a/mklib +++ /dev/null @@ -1,7517 +0,0 @@ -#! /bin/sh - -# mklibT - Provide generalized library-building support services. -# Generated automatically by (GNU ) -# NOTE: Changes made to this file will be lost: look at ltmain.sh. -# -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 -# Free Software Foundation, Inc. -# -# This file is part of GNU Libtool: -# Originally by Gordon Matzigkeit , 1996 -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -# A sed program that does not truncate output. -SED="/usr/bin/sed" - -# Sed that helps us avoid accidentally triggering echo(1) options like -n. -Xsed="/usr/bin/sed -e 1s/^X//" - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -# The names of the tagged configurations supported by this script. -available_tags=" CXX" - -# ### BEGIN LIBTOOL CONFIG - -# Libtool was configured on host pes.vlakno.cz: - -# Shell to use when invoking shell scripts. -SHELL="/bin/sh" - -# Whether or not to build shared libraries. -build_libtool_libs=yes - -# Whether or not to build static libraries. -build_old_libs=yes - -# Whether or not to add -lc for building shared libraries. -build_libtool_need_lc=no - -# Whether or not to disallow shared libs when runtime libs are static -allow_libtool_libs_with_static_runtimes=no - -# Whether or not to optimize for fast installation. -fast_install=needless - -# The host system. -host_alias= -host=x86_64-unknown-freebsd7.2 -host_os=freebsd7.2 - -# The build system. -build_alias= -build=x86_64-unknown-freebsd7.2 -build_os=freebsd7.2 - -# An echo program that does not interpret backslashes. -echo="echo" - -# The archiver. -AR="ar" -AR_FLAGS="cru" - -# A C compiler. -LTCC="gcc" - -# LTCC compiler flags. -LTCFLAGS="-g -O2" - -# A language-specific compiler. -CC="gcc" - -# Is the compiler the GNU C compiler? -with_gcc=yes - -# An ERE matcher. -EGREP="/usr/bin/grep -E" - -# The linker used to build libraries. -LD="/usr/bin/ld" - -# Whether we need hard or soft links. -LN_S="ln -s" - -# A BSD-compatible nm program. -NM="/usr/bin/nm -B" - -# A symbol stripping program -STRIP="strip" - -# Used to examine libraries when file_magic_cmd begins "file" -MAGIC_CMD=file - -# Used on cygwin: DLL creation program. -DLLTOOL="dlltool" - -# Used on cygwin: object dumper. -OBJDUMP="objdump" - -# Used on cygwin: assembler. -AS="as" - -# The name of the directory that contains temporary libtool files. -objdir=.libs - -# How to create reloadable object files. -reload_flag=" -r" -reload_cmds="\$LD\$reload_flag -o \$output\$reload_objs" - -# How to pass a linker flag through the compiler. -wl="-Wl," - -# Object file suffix (normally "o"). -objext="o" - -# Old archive suffix (normally "a"). -libext="a" - -# Shared library suffix (normally ".so"). -shrext_cmds='.so' - -# Executable file suffix (normally ""). -exeext="" - -# Additional compiler flags for building library objects. -pic_flag=" -fPIC -DPIC" -pic_mode=default - -# What is the maximum length of a command? -max_cmd_len=196608 - -# Does compiler simultaneously support -c and -o options? -compiler_c_o="yes" - -# Must we lock files when doing compilation? -need_locks="no" - -# Do we need the lib prefix for modules? -need_lib_prefix=no - -# Do we need a version for libraries? -need_version=no - -# Whether dlopen is supported. -dlopen_support=yes - -# Whether dlopen of programs is supported. -dlopen_self=yes - -# Whether dlopen of statically linked programs is supported. -dlopen_self_static=no - -# Compiler flag to prevent dynamic linking. -link_static_flag="-static" - -# Compiler flag to turn off builtin functions. -no_builtin_flag=" -fno-builtin" - -# Compiler flag to allow reflexive dlopens. -export_dynamic_flag_spec="\${wl}--export-dynamic" - -# Compiler flag to generate shared objects directly from archives. -whole_archive_flag_spec="\${wl}--whole-archive\$convenience \${wl}--no-whole-archive" - -# Compiler flag to generate thread-safe objects. -thread_safe_flag_spec="" - -# Library versioning type. -version_type=freebsd-elf - -# Format of library name prefix. -libname_spec="lib\$name" - -# List of archive names. First name is the real one, the rest are links. -# The last name is the one that the linker finds with -lNAME. -library_names_spec="\${libname}\${release}\${shared_ext}\$versuffix \${libname}\${release}\${shared_ext} \$libname\${shared_ext}" - -# The coded name of the library, if different from the real name. -soname_spec="" - -# Commands used to build and install an old-style archive. -RANLIB="ranlib" -old_archive_cmds="\$AR \$AR_FLAGS \$oldlib\$oldobjs\$old_deplibs~\$RANLIB \$oldlib" -old_postinstall_cmds="chmod 644 \$oldlib~\$RANLIB \$oldlib" -old_postuninstall_cmds="" - -# Create an old-style archive from a shared archive. -old_archive_from_new_cmds="" - -# Create a temporary old-style archive to link instead of a shared archive. -old_archive_from_expsyms_cmds="" - -# Commands used to build and install a shared archive. -archive_cmds="\$CC -shared \$libobjs \$deplibs \$compiler_flags \${wl}-soname \$wl\$soname -o \$lib" -archive_expsym_cmds="\$CC -shared \$libobjs \$deplibs \$compiler_flags \${wl}-soname \$wl\$soname \${wl}-retain-symbols-file \$wl\$export_symbols -o \$lib" -postinstall_cmds="" -postuninstall_cmds="" - -# Commands used to build a loadable module (assumed same as above if empty) -module_cmds="" -module_expsym_cmds="" - -# Commands to strip libraries. -old_striplib="strip --strip-debug" -striplib="strip --strip-unneeded" - -# Dependencies to place before the objects being linked to create a -# shared library. -predep_objects="" - -# Dependencies to place after the objects being linked to create a -# shared library. -postdep_objects="" - -# Dependencies to place before the objects being linked to create a -# shared library. -predeps="" - -# Dependencies to place after the objects being linked to create a -# shared library. -postdeps="" - -# The library search path used internally by the compiler when linking -# a shared library. -compiler_lib_search_path="" - -# Method to check whether dependent libraries are shared objects. -deplibs_check_method="pass_all" - -# Command to use when deplibs_check_method == file_magic. -file_magic_cmd="\$MAGIC_CMD" - -# Flag that allows shared libraries with undefined symbols to be built. -allow_undefined_flag="" - -# Flag that forces no undefined symbols. -no_undefined_flag="" - -# Commands used to finish a libtool library installation in a directory. -finish_cmds="" - -# Same as above, but a single script fragment to be evaled but not shown. -finish_eval="" - -# Take the output of nm and produce a listing of raw symbols and C names. -global_symbol_pipe="sed -n -e 's/^.*[ ]\\([ABCDGIRSTW][ABCDGIRSTW]*\\)[ ][ ]*\\([_A-Za-z][_A-Za-z0-9]*\\)\$/\\1 \\2 \\2/p'" - -# Transform the output of nm in a proper C declaration -global_symbol_to_cdecl="sed -n -e 's/^. .* \\(.*\\)\$/extern int \\1;/p'" - -# Transform the output of nm in a C name address pair -global_symbol_to_c_name_address="sed -n -e 's/^: \\([^ ]*\\) \$/ {\\\"\\1\\\", (lt_ptr) 0},/p' -e 's/^[BCDEGRST] \\([^ ]*\\) \\([^ ]*\\)\$/ {\"\\2\", (lt_ptr) \\&\\2},/p'" - -# This is the shared library runtime path variable. -runpath_var=LD_RUN_PATH - -# This is the shared library path variable. -shlibpath_var=LD_LIBRARY_PATH - -# Is shlibpath searched before the hard-coded library search path? -shlibpath_overrides_runpath=yes - -# How to hardcode a shared library path into an executable. -hardcode_action=immediate - -# Whether we should hardcode library paths into libraries. -hardcode_into_libs=yes - -# Flag to hardcode $libdir into a binary during linking. -# This must work even if $libdir does not exist. -hardcode_libdir_flag_spec="\${wl}--rpath \${wl}\$libdir" - -# If ld is used when linking, flag to hardcode $libdir into -# a binary during linking. This must work even if $libdir does -# not exist. -hardcode_libdir_flag_spec_ld="" - -# Whether we need a single -rpath flag with a separated argument. -hardcode_libdir_separator="" - -# Set to yes if using DIR/libNAME during linking hardcodes DIR into the -# resulting binary. -hardcode_direct=no - -# Set to yes if using the -LDIR flag during linking hardcodes DIR into the -# resulting binary. -hardcode_minus_L=no - -# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into -# the resulting binary. -hardcode_shlibpath_var=unsupported - -# Set to yes if building a shared library automatically hardcodes DIR into the library -# and all subsequent libraries and executables linked against it. -hardcode_automatic=no - -# Variables whose values should be saved in libtool wrapper scripts and -# restored at relink time. -variables_saved_for_relink="PATH LD_LIBRARY_PATH LD_RUN_PATH GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" - -# Whether libtool must link a program against all its dependency libraries. -link_all_deplibs=unknown - -# Compile-time system search path for libraries -sys_lib_search_path_spec=" /usr/lib/ /usr/lib/" - -# Run-time system search path for libraries -sys_lib_dlsearch_path_spec="/lib /usr/lib" - -# Fix the shell variable $srcfile for the compiler. -fix_srcfile_path="" - -# Set to yes if exported symbols are required. -always_export_symbols=no - -# The commands to list exported symbols. -export_symbols_cmds="\$NM \$libobjs \$convenience | \$global_symbol_pipe | \$SED 's/.* //' | sort | uniq > \$export_symbols" - -# The commands to extract the exported symbol list from a shared archive. -extract_expsyms_cmds="" - -# Symbols that should not be listed in the preloaded symbols. -exclude_expsyms="_GLOBAL_OFFSET_TABLE_" - -# Symbols that must always be exported. -include_expsyms="" - -# ### END LIBTOOL CONFIG - -# ltmain.sh - Provide generalized library-building support services. -# NOTE: Changing this file will not affect anything until you rerun configure. -# -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005 -# Free Software Foundation, Inc. -# Originally by Gordon Matzigkeit , 1996 -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -basename="s,^.*/,,g" - -# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh -# is ksh but when the shell is invoked as "sh" and the current value of -# the _XPG environment variable is not equal to 1 (one), the special -# positional parameter $0, within a function call, is the name of the -# function. -progpath="$0" - -# The name of this program: -progname=`echo "$progpath" | $SED $basename` -modename="$progname" - -# Global variables: -EXIT_SUCCESS=0 -EXIT_FAILURE=1 - -PROGRAM=ltmain.sh -PACKAGE=libtool -VERSION=1.5.22 -TIMESTAMP=" (1.1220.2.365 2005/12/18 22:14:06)" - -# See if we are running on zsh, and set the options which allow our -# commands through without removal of \ escapes. -if test -n "${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST -fi - -# Check that we have a working $echo. -if test "X$1" = X--no-reexec; then - # Discard the --no-reexec flag, and continue. - shift -elif test "X$1" = X--fallback-echo; then - # Avoid inline document here, it may be left over - : -elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then - # Yippee, $echo works! - : -else - # Restart under the correct shell, and then maybe $echo will work. - exec $SHELL "$progpath" --no-reexec ${1+"$@"} -fi - -if test "X$1" = X--fallback-echo; then - # used as fallback echo - shift - cat <&2 - $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 - exit $EXIT_FAILURE -fi - -# Global variables. -mode=$default_mode -nonopt= -prev= -prevopt= -run= -show="$echo" -show_help= -execute_dlfiles= -duplicate_deps=no -preserve_args= -lo2o="s/\\.lo\$/.${objext}/" -o2lo="s/\\.${objext}\$/.lo/" - -##################################### -# Shell function definitions: -# This seems to be the best place for them - -# func_mktempdir [string] -# Make a temporary directory that won't clash with other running -# libtool processes, and avoids race conditions if possible. If -# given, STRING is the basename for that directory. -func_mktempdir () -{ - my_template="${TMPDIR-/tmp}/${1-$progname}" - - if test "$run" = ":"; then - # Return a directory name, but don't create it in dry-run mode - my_tmpdir="${my_template}-$$" - else - - # If mktemp works, use that first and foremost - my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null` - - if test ! -d "$my_tmpdir"; then - # Failing that, at least try and use $RANDOM to avoid a race - my_tmpdir="${my_template}-${RANDOM-0}$$" - - save_mktempdir_umask=`umask` - umask 0077 - $mkdir "$my_tmpdir" - umask $save_mktempdir_umask - fi - - # If we're not in dry-run mode, bomb out on failure - test -d "$my_tmpdir" || { - $echo "cannot create temporary directory \`$my_tmpdir'" 1>&2 - exit $EXIT_FAILURE - } - fi - - $echo "X$my_tmpdir" | $Xsed -} - - -# func_win32_libid arg -# return the library type of file 'arg' -# -# Need a lot of goo to handle *both* DLLs and import libs -# Has to be a shell function in order to 'eat' the argument -# that is supplied when $file_magic_command is called. -func_win32_libid () -{ - win32_libid_type="unknown" - win32_fileres=`file -L $1 2>/dev/null` - case $win32_fileres in - *ar\ archive\ import\ library*) # definitely import - win32_libid_type="x86 archive import" - ;; - *ar\ archive*) # could be an import, or static - if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | \ - $EGREP -e 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then - win32_nmres=`eval $NM -f posix -A $1 | \ - $SED -n -e '1,100{/ I /{s,.*,import,;p;q;};}'` - case $win32_nmres in - import*) win32_libid_type="x86 archive import";; - *) win32_libid_type="x86 archive static";; - esac - fi - ;; - *DLL*) - win32_libid_type="x86 DLL" - ;; - *executable*) # but shell scripts are "executable" too... - case $win32_fileres in - *MS\ Windows\ PE\ Intel*) - win32_libid_type="x86 DLL" - ;; - esac - ;; - esac - $echo $win32_libid_type -} - - -# func_infer_tag arg -# Infer tagged configuration to use if any are available and -# if one wasn't chosen via the "--tag" command line option. -# Only attempt this if the compiler in the base compile -# command doesn't match the default compiler. -# arg is usually of the form 'gcc ...' -func_infer_tag () -{ - if test -n "$available_tags" && test -z "$tagname"; then - CC_quoted= - for arg in $CC; do - case $arg in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - arg="\"$arg\"" - ;; - esac - CC_quoted="$CC_quoted $arg" - done - case $@ in - # Blanks in the command may have been stripped by the calling shell, - # but not from the CC environment variable when configure was run. - " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*) ;; - # Blanks at the start of $base_compile will cause this to fail - # if we don't check for them as well. - *) - for z in $available_tags; do - if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then - # Evaluate the configuration. - eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`" - CC_quoted= - for arg in $CC; do - # Double-quote args containing other shell metacharacters. - case $arg in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - arg="\"$arg\"" - ;; - esac - CC_quoted="$CC_quoted $arg" - done - case "$@ " in - " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*) - # The compiler in the base compile command matches - # the one in the tagged configuration. - # Assume this is the tagged configuration we want. - tagname=$z - break - ;; - esac - fi - done - # If $tagname still isn't set, then no tagged configuration - # was found and let the user know that the "--tag" command - # line option must be used. - if test -z "$tagname"; then - $echo "$modename: unable to infer tagged configuration" - $echo "$modename: specify a tag with \`--tag'" 1>&2 - exit $EXIT_FAILURE -# else -# $echo "$modename: using $tagname tagged configuration" - fi - ;; - esac - fi -} - - -# func_extract_an_archive dir oldlib -func_extract_an_archive () -{ - f_ex_an_ar_dir="$1"; shift - f_ex_an_ar_oldlib="$1" - - $show "(cd $f_ex_an_ar_dir && $AR x $f_ex_an_ar_oldlib)" - $run eval "(cd \$f_ex_an_ar_dir && $AR x \$f_ex_an_ar_oldlib)" || exit $? - if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then - : - else - $echo "$modename: ERROR: object name conflicts: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" 1>&2 - exit $EXIT_FAILURE - fi -} - -# func_extract_archives gentop oldlib ... -func_extract_archives () -{ - my_gentop="$1"; shift - my_oldlibs=${1+"$@"} - my_oldobjs="" - my_xlib="" - my_xabs="" - my_xdir="" - my_status="" - - $show "${rm}r $my_gentop" - $run ${rm}r "$my_gentop" - $show "$mkdir $my_gentop" - $run $mkdir "$my_gentop" - my_status=$? - if test "$my_status" -ne 0 && test ! -d "$my_gentop"; then - exit $my_status - fi - - for my_xlib in $my_oldlibs; do - # Extract the objects. - case $my_xlib in - [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;; - *) my_xabs=`pwd`"/$my_xlib" ;; - esac - my_xlib=`$echo "X$my_xlib" | $Xsed -e 's%^.*/%%'` - my_xdir="$my_gentop/$my_xlib" - - $show "${rm}r $my_xdir" - $run ${rm}r "$my_xdir" - $show "$mkdir $my_xdir" - $run $mkdir "$my_xdir" - exit_status=$? - if test "$exit_status" -ne 0 && test ! -d "$my_xdir"; then - exit $exit_status - fi - case $host in - *-darwin*) - $show "Extracting $my_xabs" - # Do not bother doing anything if just a dry run - if test -z "$run"; then - darwin_orig_dir=`pwd` - cd $my_xdir || exit $? - darwin_archive=$my_xabs - darwin_curdir=`pwd` - darwin_base_archive=`$echo "X$darwin_archive" | $Xsed -e 's%^.*/%%'` - darwin_arches=`lipo -info "$darwin_archive" 2>/dev/null | $EGREP Architectures 2>/dev/null` - if test -n "$darwin_arches"; then - darwin_arches=`echo "$darwin_arches" | $SED -e 's/.*are://'` - darwin_arch= - $show "$darwin_base_archive has multiple architectures $darwin_arches" - for darwin_arch in $darwin_arches ; do - mkdir -p "unfat-$$/${darwin_base_archive}-${darwin_arch}" - lipo -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}" - cd "unfat-$$/${darwin_base_archive}-${darwin_arch}" - func_extract_an_archive "`pwd`" "${darwin_base_archive}" - cd "$darwin_curdir" - $rm "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" - done # $darwin_arches - ## Okay now we have a bunch of thin objects, gotta fatten them up :) - darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print| xargs basename | sort -u | $NL2SP` - darwin_file= - darwin_files= - for darwin_file in $darwin_filelist; do - darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP` - lipo -create -output "$darwin_file" $darwin_files - done # $darwin_filelist - ${rm}r unfat-$$ - cd "$darwin_orig_dir" - else - cd "$darwin_orig_dir" - func_extract_an_archive "$my_xdir" "$my_xabs" - fi # $darwin_arches - fi # $run - ;; - *) - func_extract_an_archive "$my_xdir" "$my_xabs" - ;; - esac - my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP` - done - func_extract_archives_result="$my_oldobjs" -} -# End of Shell function definitions -##################################### - -# Darwin sucks -eval std_shrext=\"$shrext_cmds\" - -disable_libs=no - -# Parse our command line options once, thoroughly. -while test "$#" -gt 0 -do - arg="$1" - shift - - case $arg in - -*=*) optarg=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;; - *) optarg= ;; - esac - - # If the previous option needs an argument, assign it. - if test -n "$prev"; then - case $prev in - execute_dlfiles) - execute_dlfiles="$execute_dlfiles $arg" - ;; - tag) - tagname="$arg" - preserve_args="${preserve_args}=$arg" - - # Check whether tagname contains only valid characters - case $tagname in - *[!-_A-Za-z0-9,/]*) - $echo "$progname: invalid tag name: $tagname" 1>&2 - exit $EXIT_FAILURE - ;; - esac - - case $tagname in - CC) - # Don't test for the "default" C tag, as we know, it's there, but - # not specially marked. - ;; - *) - if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "$progpath" > /dev/null; then - taglist="$taglist $tagname" - # Evaluate the configuration. - eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$tagname'$/,/^# ### END LIBTOOL TAG CONFIG: '$tagname'$/p' < $progpath`" - else - $echo "$progname: ignoring unknown tag $tagname" 1>&2 - fi - ;; - esac - ;; - *) - eval "$prev=\$arg" - ;; - esac - - prev= - prevopt= - continue - fi - - # Have we seen a non-optional argument yet? - case $arg in - --help) - show_help=yes - ;; - - --version) - $echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP" - $echo - $echo "Copyright (C) 2005 Free Software Foundation, Inc." - $echo "This is free software; see the source for copying conditions. There is NO" - $echo "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." - exit $? - ;; - - --config) - ${SED} -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $progpath - # Now print the configurations for the tags. - for tagname in $taglist; do - ${SED} -n -e "/^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$/,/^# ### END LIBTOOL TAG CONFIG: $tagname$/p" < "$progpath" - done - exit $? - ;; - - --debug) - $echo "$progname: enabling shell trace mode" - set -x - preserve_args="$preserve_args $arg" - ;; - - --dry-run | -n) - run=: - ;; - - --features) - $echo "host: $host" - if test "$build_libtool_libs" = yes; then - $echo "enable shared libraries" - else - $echo "disable shared libraries" - fi - if test "$build_old_libs" = yes; then - $echo "enable static libraries" - else - $echo "disable static libraries" - fi - exit $? - ;; - - --finish) mode="finish" ;; - - --mode) prevopt="--mode" prev=mode ;; - --mode=*) mode="$optarg" ;; - - --preserve-dup-deps) duplicate_deps="yes" ;; - - --quiet | --silent) - show=: - preserve_args="$preserve_args $arg" - ;; - - --tag) - prevopt="--tag" - prev=tag - preserve_args="$preserve_args --tag" - ;; - --tag=*) - set tag "$optarg" ${1+"$@"} - shift - prev=tag - preserve_args="$preserve_args --tag" - ;; - - -dlopen) - prevopt="-dlopen" - prev=execute_dlfiles - ;; - - -*) - $echo "$modename: unrecognized option \`$arg'" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - ;; - - *) - nonopt="$arg" - break - ;; - esac -done - -if test -n "$prevopt"; then - $echo "$modename: option \`$prevopt' requires an argument" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE -fi - -case $disable_libs in -no) - ;; -shared) - build_libtool_libs=no - build_old_libs=yes - ;; -static) - build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac` - ;; -esac - -# If this variable is set in any of the actions, the command in it -# will be execed at the end. This prevents here-documents from being -# left over by shells. -exec_cmd= - -if test -z "$show_help"; then - - # Infer the operation mode. - if test -z "$mode"; then - $echo "*** Warning: inferring the mode of operation is deprecated." 1>&2 - $echo "*** Future versions of Libtool will require --mode=MODE be specified." 1>&2 - case $nonopt in - *cc | cc* | *++ | gcc* | *-gcc* | g++* | xlc*) - mode=link - for arg - do - case $arg in - -c) - mode=compile - break - ;; - esac - done - ;; - *db | *dbx | *strace | *truss) - mode=execute - ;; - *install*|cp|mv) - mode=install - ;; - *rm) - mode=uninstall - ;; - *) - # If we have no mode, but dlfiles were specified, then do execute mode. - test -n "$execute_dlfiles" && mode=execute - - # Just use the default operation mode. - if test -z "$mode"; then - if test -n "$nonopt"; then - $echo "$modename: warning: cannot infer operation mode from \`$nonopt'" 1>&2 - else - $echo "$modename: warning: cannot infer operation mode without MODE-ARGS" 1>&2 - fi - fi - ;; - esac - fi - - # Only execute mode is allowed to have -dlopen flags. - if test -n "$execute_dlfiles" && test "$mode" != execute; then - $echo "$modename: unrecognized option \`-dlopen'" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - fi - - # Change the help message to a mode-specific one. - generic_help="$help" - help="Try \`$modename --help --mode=$mode' for more information." - - # These modes are in order of execution frequency so that they run quickly. - case $mode in - # libtool compile mode - compile) - modename="$modename: compile" - # Get the compilation command and the source file. - base_compile= - srcfile="$nonopt" # always keep a non-empty value in "srcfile" - suppress_opt=yes - suppress_output= - arg_mode=normal - libobj= - later= - - for arg - do - case $arg_mode in - arg ) - # do not "continue". Instead, add this to base_compile - lastarg="$arg" - arg_mode=normal - ;; - - target ) - libobj="$arg" - arg_mode=normal - continue - ;; - - normal ) - # Accept any command-line options. - case $arg in - -o) - if test -n "$libobj" ; then - $echo "$modename: you cannot specify \`-o' more than once" 1>&2 - exit $EXIT_FAILURE - fi - arg_mode=target - continue - ;; - - -static | -prefer-pic | -prefer-non-pic) - later="$later $arg" - continue - ;; - - -no-suppress) - suppress_opt=no - continue - ;; - - -Xcompiler) - arg_mode=arg # the next one goes into the "base_compile" arg list - continue # The current "srcfile" will either be retained or - ;; # replaced later. I would guess that would be a bug. - - -Wc,*) - args=`$echo "X$arg" | $Xsed -e "s/^-Wc,//"` - lastarg= - save_ifs="$IFS"; IFS=',' - for arg in $args; do - IFS="$save_ifs" - - # Double-quote args containing other shell metacharacters. - # Many Bourne shells cannot handle close brackets correctly - # in scan sets, so we specify it separately. - case $arg in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - arg="\"$arg\"" - ;; - esac - lastarg="$lastarg $arg" - done - IFS="$save_ifs" - lastarg=`$echo "X$lastarg" | $Xsed -e "s/^ //"` - - # Add the arguments to base_compile. - base_compile="$base_compile $lastarg" - continue - ;; - - * ) - # Accept the current argument as the source file. - # The previous "srcfile" becomes the current argument. - # - lastarg="$srcfile" - srcfile="$arg" - ;; - esac # case $arg - ;; - esac # case $arg_mode - - # Aesthetically quote the previous argument. - lastarg=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"` - - case $lastarg in - # Double-quote args containing other shell metacharacters. - # Many Bourne shells cannot handle close brackets correctly - # in scan sets, and some SunOS ksh mistreat backslash-escaping - # in scan sets (worked around with variable expansion), - # and furthermore cannot handle '|' '&' '(' ')' in scan sets - # at all, so we specify them separately. - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - lastarg="\"$lastarg\"" - ;; - esac - - base_compile="$base_compile $lastarg" - done # for arg - - case $arg_mode in - arg) - $echo "$modename: you must specify an argument for -Xcompile" - exit $EXIT_FAILURE - ;; - target) - $echo "$modename: you must specify a target with \`-o'" 1>&2 - exit $EXIT_FAILURE - ;; - *) - # Get the name of the library object. - [ -z "$libobj" ] && libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'` - ;; - esac - - # Recognize several different file suffixes. - # If the user specifies -o file.o, it is replaced with file.lo - xform='[cCFSifmso]' - case $libobj in - *.ada) xform=ada ;; - *.adb) xform=adb ;; - *.ads) xform=ads ;; - *.asm) xform=asm ;; - *.c++) xform=c++ ;; - *.cc) xform=cc ;; - *.ii) xform=ii ;; - *.class) xform=class ;; - *.cpp) xform=cpp ;; - *.cxx) xform=cxx ;; - *.f90) xform=f90 ;; - *.for) xform=for ;; - *.java) xform=java ;; - esac - - libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"` - - case $libobj in - *.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;; - *) - $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2 - exit $EXIT_FAILURE - ;; - esac - - func_infer_tag $base_compile - - for arg in $later; do - case $arg in - -static) - build_old_libs=yes - continue - ;; - - -prefer-pic) - pic_mode=yes - continue - ;; - - -prefer-non-pic) - pic_mode=no - continue - ;; - esac - done - - qlibobj=`$echo "X$libobj" | $Xsed -e "$sed_quote_subst"` - case $qlibobj in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - qlibobj="\"$qlibobj\"" ;; - esac - test "X$libobj" != "X$qlibobj" \ - && $echo "X$libobj" | grep '[]~#^*{};<>?"'"'"' &()|`$[]' \ - && $echo "$modename: libobj name \`$libobj' may not contain shell special characters." - objname=`$echo "X$obj" | $Xsed -e 's%^.*/%%'` - xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'` - if test "X$xdir" = "X$obj"; then - xdir= - else - xdir=$xdir/ - fi - lobj=${xdir}$objdir/$objname - - if test -z "$base_compile"; then - $echo "$modename: you must specify a compilation command" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - fi - - # Delete any leftover library objects. - if test "$build_old_libs" = yes; then - removelist="$obj $lobj $libobj ${libobj}T" - else - removelist="$lobj $libobj ${libobj}T" - fi - - $run $rm $removelist - trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15 - - # On Cygwin there's no "real" PIC flag so we must build both object types - case $host_os in - cygwin* | mingw* | pw32* | os2*) - pic_mode=default - ;; - esac - if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then - # non-PIC code in shared libraries is not supported - pic_mode=default - fi - - # Calculate the filename of the output object if compiler does - # not support -o with -c - if test "$compiler_c_o" = no; then - output_obj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext} - lockfile="$output_obj.lock" - removelist="$removelist $output_obj $lockfile" - trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15 - else - output_obj= - need_locks=no - lockfile= - fi - - # Lock this critical section if it is needed - # We use this script file to make the link, it avoids creating a new file - if test "$need_locks" = yes; then - until $run ln "$progpath" "$lockfile" 2>/dev/null; do - $show "Waiting for $lockfile to be removed" - sleep 2 - done - elif test "$need_locks" = warn; then - if test -f "$lockfile"; then - $echo "\ -*** ERROR, $lockfile exists and contains: -`cat $lockfile 2>/dev/null` - -This indicates that another process is trying to use the same -temporary object file, and libtool could not work around it because -your compiler does not support \`-c' and \`-o' together. If you -repeat this compilation, it may succeed, by chance, but you had better -avoid parallel builds (make -j) in this platform, or get a better -compiler." - - $run $rm $removelist - exit $EXIT_FAILURE - fi - $echo "$srcfile" > "$lockfile" - fi - - if test -n "$fix_srcfile_path"; then - eval srcfile=\"$fix_srcfile_path\" - fi - qsrcfile=`$echo "X$srcfile" | $Xsed -e "$sed_quote_subst"` - case $qsrcfile in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - qsrcfile="\"$qsrcfile\"" ;; - esac - - $run $rm "$libobj" "${libobj}T" - - # Create a libtool object file (analogous to a ".la" file), - # but don't create it if we're doing a dry run. - test -z "$run" && cat > ${libobj}T </dev/null`" != "X$srcfile"; then - $echo "\ -*** ERROR, $lockfile contains: -`cat $lockfile 2>/dev/null` - -but it should contain: -$srcfile - -This indicates that another process is trying to use the same -temporary object file, and libtool could not work around it because -your compiler does not support \`-c' and \`-o' together. If you -repeat this compilation, it may succeed, by chance, but you had better -avoid parallel builds (make -j) in this platform, or get a better -compiler." - - $run $rm $removelist - exit $EXIT_FAILURE - fi - - # Just move the object if needed, then go on to compile the next one - if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then - $show "$mv $output_obj $lobj" - if $run $mv $output_obj $lobj; then : - else - error=$? - $run $rm $removelist - exit $error - fi - fi - - # Append the name of the PIC object to the libtool object file. - test -z "$run" && cat >> ${libobj}T <> ${libobj}T </dev/null`" != "X$srcfile"; then - $echo "\ -*** ERROR, $lockfile contains: -`cat $lockfile 2>/dev/null` - -but it should contain: -$srcfile - -This indicates that another process is trying to use the same -temporary object file, and libtool could not work around it because -your compiler does not support \`-c' and \`-o' together. If you -repeat this compilation, it may succeed, by chance, but you had better -avoid parallel builds (make -j) in this platform, or get a better -compiler." - - $run $rm $removelist - exit $EXIT_FAILURE - fi - - # Just move the object if needed - if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then - $show "$mv $output_obj $obj" - if $run $mv $output_obj $obj; then : - else - error=$? - $run $rm $removelist - exit $error - fi - fi - - # Append the name of the non-PIC object the libtool object file. - # Only append if the libtool object file exists. - test -z "$run" && cat >> ${libobj}T <> ${libobj}T <&2 - fi - if test -n "$link_static_flag"; then - dlopen_self=$dlopen_self_static - fi - prefer_static_libs=yes - else - if test -z "$pic_flag" && test -n "$link_static_flag"; then - dlopen_self=$dlopen_self_static - fi - prefer_static_libs=built - fi - build_libtool_libs=no - build_old_libs=yes - break - ;; - esac - done - - # See if our shared archives depend on static archives. - test -n "$old_archive_from_new_cmds" && build_old_libs=yes - - # Go through the arguments, transforming them on the way. - while test "$#" -gt 0; do - arg="$1" - shift - case $arg in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - qarg=\"`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`\" ### testsuite: skip nested quoting test - ;; - *) qarg=$arg ;; - esac - libtool_args="$libtool_args $qarg" - - # If the previous option needs an argument, assign it. - if test -n "$prev"; then - case $prev in - output) - compile_command="$compile_command @OUTPUT@" - finalize_command="$finalize_command @OUTPUT@" - ;; - esac - - case $prev in - dlfiles|dlprefiles) - if test "$preload" = no; then - # Add the symbol object into the linking commands. - compile_command="$compile_command @SYMFILE@" - finalize_command="$finalize_command @SYMFILE@" - preload=yes - fi - case $arg in - *.la | *.lo) ;; # We handle these cases below. - force) - if test "$dlself" = no; then - dlself=needless - export_dynamic=yes - fi - prev= - continue - ;; - self) - if test "$prev" = dlprefiles; then - dlself=yes - elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then - dlself=yes - else - dlself=needless - export_dynamic=yes - fi - prev= - continue - ;; - *) - if test "$prev" = dlfiles; then - dlfiles="$dlfiles $arg" - else - dlprefiles="$dlprefiles $arg" - fi - prev= - continue - ;; - esac - ;; - expsyms) - export_symbols="$arg" - if test ! -f "$arg"; then - $echo "$modename: symbol file \`$arg' does not exist" - exit $EXIT_FAILURE - fi - prev= - continue - ;; - expsyms_regex) - export_symbols_regex="$arg" - prev= - continue - ;; - inst_prefix) - inst_prefix_dir="$arg" - prev= - continue - ;; - precious_regex) - precious_files_regex="$arg" - prev= - continue - ;; - release) - release="-$arg" - prev= - continue - ;; - objectlist) - if test -f "$arg"; then - save_arg=$arg - moreargs= - for fil in `cat $save_arg` - do -# moreargs="$moreargs $fil" - arg=$fil - # A libtool-controlled object. - - # Check to see that this really is a libtool object. - if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then - pic_object= - non_pic_object= - - # Read the .lo file - # If there is no directory component, then add one. - case $arg in - */* | *\\*) . $arg ;; - *) . ./$arg ;; - esac - - if test -z "$pic_object" || \ - test -z "$non_pic_object" || - test "$pic_object" = none && \ - test "$non_pic_object" = none; then - $echo "$modename: cannot find name of object for \`$arg'" 1>&2 - exit $EXIT_FAILURE - fi - - # Extract subdirectory from the argument. - xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` - if test "X$xdir" = "X$arg"; then - xdir= - else - xdir="$xdir/" - fi - - if test "$pic_object" != none; then - # Prepend the subdirectory the object is found in. - pic_object="$xdir$pic_object" - - if test "$prev" = dlfiles; then - if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then - dlfiles="$dlfiles $pic_object" - prev= - continue - else - # If libtool objects are unsupported, then we need to preload. - prev=dlprefiles - fi - fi - - # CHECK ME: I think I busted this. -Ossama - if test "$prev" = dlprefiles; then - # Preload the old-style object. - dlprefiles="$dlprefiles $pic_object" - prev= - fi - - # A PIC object. - libobjs="$libobjs $pic_object" - arg="$pic_object" - fi - - # Non-PIC object. - if test "$non_pic_object" != none; then - # Prepend the subdirectory the object is found in. - non_pic_object="$xdir$non_pic_object" - - # A standard non-PIC object - non_pic_objects="$non_pic_objects $non_pic_object" - if test -z "$pic_object" || test "$pic_object" = none ; then - arg="$non_pic_object" - fi - else - # If the PIC object exists, use it instead. - # $xdir was prepended to $pic_object above. - non_pic_object="$pic_object" - non_pic_objects="$non_pic_objects $non_pic_object" - fi - else - # Only an error if not doing a dry-run. - if test -z "$run"; then - $echo "$modename: \`$arg' is not a valid libtool object" 1>&2 - exit $EXIT_FAILURE - else - # Dry-run case. - - # Extract subdirectory from the argument. - xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` - if test "X$xdir" = "X$arg"; then - xdir= - else - xdir="$xdir/" - fi - - pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"` - non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"` - libobjs="$libobjs $pic_object" - non_pic_objects="$non_pic_objects $non_pic_object" - fi - fi - done - else - $echo "$modename: link input file \`$save_arg' does not exist" - exit $EXIT_FAILURE - fi - arg=$save_arg - prev= - continue - ;; - rpath | xrpath) - # We need an absolute path. - case $arg in - [\\/]* | [A-Za-z]:[\\/]*) ;; - *) - $echo "$modename: only absolute run-paths are allowed" 1>&2 - exit $EXIT_FAILURE - ;; - esac - if test "$prev" = rpath; then - case "$rpath " in - *" $arg "*) ;; - *) rpath="$rpath $arg" ;; - esac - else - case "$xrpath " in - *" $arg "*) ;; - *) xrpath="$xrpath $arg" ;; - esac - fi - prev= - continue - ;; - xcompiler) - compiler_flags="$compiler_flags $qarg" - prev= - compile_command="$compile_command $qarg" - finalize_command="$finalize_command $qarg" - continue - ;; - xlinker) - linker_flags="$linker_flags $qarg" - compiler_flags="$compiler_flags $wl$qarg" - prev= - compile_command="$compile_command $wl$qarg" - finalize_command="$finalize_command $wl$qarg" - continue - ;; - xcclinker) - linker_flags="$linker_flags $qarg" - compiler_flags="$compiler_flags $qarg" - prev= - compile_command="$compile_command $qarg" - finalize_command="$finalize_command $qarg" - continue - ;; - shrext) - shrext_cmds="$arg" - prev= - continue - ;; - darwin_framework|darwin_framework_skip) - test "$prev" = "darwin_framework" && compiler_flags="$compiler_flags $arg" - compile_command="$compile_command $arg" - finalize_command="$finalize_command $arg" - prev= - continue - ;; - *) - eval "$prev=\"\$arg\"" - prev= - continue - ;; - esac - fi # test -n "$prev" - - prevarg="$arg" - - case $arg in - -all-static) - if test -n "$link_static_flag"; then - compile_command="$compile_command $link_static_flag" - finalize_command="$finalize_command $link_static_flag" - fi - continue - ;; - - -allow-undefined) - # FIXME: remove this flag sometime in the future. - $echo "$modename: \`-allow-undefined' is deprecated because it is the default" 1>&2 - continue - ;; - - -avoid-version) - avoid_version=yes - continue - ;; - - -dlopen) - prev=dlfiles - continue - ;; - - -dlpreopen) - prev=dlprefiles - continue - ;; - - -export-dynamic) - export_dynamic=yes - continue - ;; - - -export-symbols | -export-symbols-regex) - if test -n "$export_symbols" || test -n "$export_symbols_regex"; then - $echo "$modename: more than one -exported-symbols argument is not allowed" - exit $EXIT_FAILURE - fi - if test "X$arg" = "X-export-symbols"; then - prev=expsyms - else - prev=expsyms_regex - fi - continue - ;; - - -framework|-arch|-isysroot) - case " $CC " in - *" ${arg} ${1} "* | *" ${arg} ${1} "*) - prev=darwin_framework_skip ;; - *) compiler_flags="$compiler_flags $arg" - prev=darwin_framework ;; - esac - compile_command="$compile_command $arg" - finalize_command="$finalize_command $arg" - continue - ;; - - -inst-prefix-dir) - prev=inst_prefix - continue - ;; - - # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:* - # so, if we see these flags be careful not to treat them like -L - -L[A-Z][A-Z]*:*) - case $with_gcc/$host in - no/*-*-irix* | /*-*-irix*) - compile_command="$compile_command $arg" - finalize_command="$finalize_command $arg" - ;; - esac - continue - ;; - - -L*) - dir=`$echo "X$arg" | $Xsed -e 's/^-L//'` - # We need an absolute path. - case $dir in - [\\/]* | [A-Za-z]:[\\/]*) ;; - *) - absdir=`cd "$dir" && pwd` - if test -z "$absdir"; then - $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2 - absdir="$dir" - notinst_path="$notinst_path $dir" - fi - dir="$absdir" - ;; - esac - case "$deplibs " in - *" -L$dir "*) ;; - *) - deplibs="$deplibs -L$dir" - lib_search_path="$lib_search_path $dir" - ;; - esac - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) - testbindir=`$echo "X$dir" | $Xsed -e 's*/lib$*/bin*'` - case :$dllsearchpath: in - *":$dir:"*) ;; - *) dllsearchpath="$dllsearchpath:$dir";; - esac - case :$dllsearchpath: in - *":$testbindir:"*) ;; - *) dllsearchpath="$dllsearchpath:$testbindir";; - esac - ;; - esac - continue - ;; - - -l*) - if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos*) - # These systems don't actually have a C or math library (as such) - continue - ;; - *-*-os2*) - # These systems don't actually have a C library (as such) - test "X$arg" = "X-lc" && continue - ;; - *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) - # Do not include libc due to us having libc/libc_r. - test "X$arg" = "X-lc" && continue - ;; - *-*-rhapsody* | *-*-darwin1.[012]) - # Rhapsody C and math libraries are in the System framework - deplibs="$deplibs -framework System" - continue - ;; - *-*-sco3.2v5* | *-*-sco5v6*) - # Causes problems with __ctype - test "X$arg" = "X-lc" && continue - ;; - *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) - # Compiler inserts libc in the correct place for threads to work - test "X$arg" = "X-lc" && continue - ;; - esac - elif test "X$arg" = "X-lc_r"; then - case $host in - *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) - # Do not include libc_r directly, use -pthread flag. - continue - ;; - esac - fi - deplibs="$deplibs $arg" - continue - ;; - - # Tru64 UNIX uses -model [arg] to determine the layout of C++ - # classes, name mangling, and exception handling. - -model) - compile_command="$compile_command $arg" - compiler_flags="$compiler_flags $arg" - finalize_command="$finalize_command $arg" - prev=xcompiler - continue - ;; - - -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe) - compiler_flags="$compiler_flags $arg" - compile_command="$compile_command $arg" - finalize_command="$finalize_command $arg" - continue - ;; - - -module) - module=yes - continue - ;; - - # -64, -mips[0-9] enable 64-bit mode on the SGI compiler - # -r[0-9][0-9]* specifies the processor on the SGI compiler - # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler - # +DA*, +DD* enable 64-bit mode on the HP compiler - # -q* pass through compiler args for the IBM compiler - # -m* pass through architecture-specific compiler args for GCC - # -m*, -t[45]*, -txscale* pass through architecture-specific - # compiler args for GCC - # -pg pass through profiling flag for GCC - # @file GCC response files - -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*|-pg| \ - -t[45]*|-txscale*|@*) - - # Unknown arguments in both finalize_command and compile_command need - # to be aesthetically quoted because they are evaled later. - arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` - case $arg in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - arg="\"$arg\"" - ;; - esac - compile_command="$compile_command $arg" - finalize_command="$finalize_command $arg" - compiler_flags="$compiler_flags $arg" - continue - ;; - - -shrext) - prev=shrext - continue - ;; - - -no-fast-install) - fast_install=no - continue - ;; - - -no-install) - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) - # The PATH hackery in wrapper scripts is required on Windows - # in order for the loader to find any dlls it needs. - $echo "$modename: warning: \`-no-install' is ignored for $host" 1>&2 - $echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2 - fast_install=no - ;; - *) no_install=yes ;; - esac - continue - ;; - - -no-undefined) - allow_undefined=no - continue - ;; - - -objectlist) - prev=objectlist - continue - ;; - - -o) prev=output ;; - - -precious-files-regex) - prev=precious_regex - continue - ;; - - -release) - prev=release - continue - ;; - - -rpath) - prev=rpath - continue - ;; - - -R) - prev=xrpath - continue - ;; - - -R*) - dir=`$echo "X$arg" | $Xsed -e 's/^-R//'` - # We need an absolute path. - case $dir in - [\\/]* | [A-Za-z]:[\\/]*) ;; - *) - $echo "$modename: only absolute run-paths are allowed" 1>&2 - exit $EXIT_FAILURE - ;; - esac - case "$xrpath " in - *" $dir "*) ;; - *) xrpath="$xrpath $dir" ;; - esac - continue - ;; - - -static) - # The effects of -static are defined in a previous loop. - # We used to do the same as -all-static on platforms that - # didn't have a PIC flag, but the assumption that the effects - # would be equivalent was wrong. It would break on at least - # Digital Unix and AIX. - continue - ;; - - -thread-safe) - thread_safe=yes - continue - ;; - - -version-info) - prev=vinfo - continue - ;; - -version-number) - prev=vinfo - vinfo_number=yes - continue - ;; - - -Wc,*) - args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wc,//'` - arg= - save_ifs="$IFS"; IFS=',' - for flag in $args; do - IFS="$save_ifs" - case $flag in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - flag="\"$flag\"" - ;; - esac - arg="$arg $wl$flag" - compiler_flags="$compiler_flags $flag" - done - IFS="$save_ifs" - arg=`$echo "X$arg" | $Xsed -e "s/^ //"` - ;; - - -Wl,*) - args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wl,//'` - arg= - save_ifs="$IFS"; IFS=',' - for flag in $args; do - IFS="$save_ifs" - case $flag in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - flag="\"$flag\"" - ;; - esac - arg="$arg $wl$flag" - compiler_flags="$compiler_flags $wl$flag" - linker_flags="$linker_flags $flag" - done - IFS="$save_ifs" - arg=`$echo "X$arg" | $Xsed -e "s/^ //"` - ;; - - -Xcompiler) - prev=xcompiler - continue - ;; - - -Xlinker) - prev=xlinker - continue - ;; - - -XCClinker) - prev=xcclinker - continue - ;; - - # Some other compiler flag. - -* | +*) - # Unknown arguments in both finalize_command and compile_command need - # to be aesthetically quoted because they are evaled later. - arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` - case $arg in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - arg="\"$arg\"" - ;; - esac - ;; - - *.$objext) - # A standard object. - objs="$objs $arg" - ;; - - *.lo) - # A libtool-controlled object. - - # Check to see that this really is a libtool object. - if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then - pic_object= - non_pic_object= - - # Read the .lo file - # If there is no directory component, then add one. - case $arg in - */* | *\\*) . $arg ;; - *) . ./$arg ;; - esac - - if test -z "$pic_object" || \ - test -z "$non_pic_object" || - test "$pic_object" = none && \ - test "$non_pic_object" = none; then - $echo "$modename: cannot find name of object for \`$arg'" 1>&2 - exit $EXIT_FAILURE - fi - - # Extract subdirectory from the argument. - xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` - if test "X$xdir" = "X$arg"; then - xdir= - else - xdir="$xdir/" - fi - - if test "$pic_object" != none; then - # Prepend the subdirectory the object is found in. - pic_object="$xdir$pic_object" - - if test "$prev" = dlfiles; then - if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then - dlfiles="$dlfiles $pic_object" - prev= - continue - else - # If libtool objects are unsupported, then we need to preload. - prev=dlprefiles - fi - fi - - # CHECK ME: I think I busted this. -Ossama - if test "$prev" = dlprefiles; then - # Preload the old-style object. - dlprefiles="$dlprefiles $pic_object" - prev= - fi - - # A PIC object. - libobjs="$libobjs $pic_object" - arg="$pic_object" - fi - - # Non-PIC object. - if test "$non_pic_object" != none; then - # Prepend the subdirectory the object is found in. - non_pic_object="$xdir$non_pic_object" - - # A standard non-PIC object - non_pic_objects="$non_pic_objects $non_pic_object" - if test -z "$pic_object" || test "$pic_object" = none ; then - arg="$non_pic_object" - fi - else - # If the PIC object exists, use it instead. - # $xdir was prepended to $pic_object above. - non_pic_object="$pic_object" - non_pic_objects="$non_pic_objects $non_pic_object" - fi - else - # Only an error if not doing a dry-run. - if test -z "$run"; then - $echo "$modename: \`$arg' is not a valid libtool object" 1>&2 - exit $EXIT_FAILURE - else - # Dry-run case. - - # Extract subdirectory from the argument. - xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` - if test "X$xdir" = "X$arg"; then - xdir= - else - xdir="$xdir/" - fi - - pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"` - non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"` - libobjs="$libobjs $pic_object" - non_pic_objects="$non_pic_objects $non_pic_object" - fi - fi - ;; - - *.$libext) - # An archive. - deplibs="$deplibs $arg" - old_deplibs="$old_deplibs $arg" - continue - ;; - - *.la) - # A libtool-controlled library. - - if test "$prev" = dlfiles; then - # This library was specified with -dlopen. - dlfiles="$dlfiles $arg" - prev= - elif test "$prev" = dlprefiles; then - # The library was specified with -dlpreopen. - dlprefiles="$dlprefiles $arg" - prev= - else - deplibs="$deplibs $arg" - fi - continue - ;; - - # Some other compiler argument. - *) - # Unknown arguments in both finalize_command and compile_command need - # to be aesthetically quoted because they are evaled later. - arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` - case $arg in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - arg="\"$arg\"" - ;; - esac - ;; - esac # arg - - # Now actually substitute the argument into the commands. - if test -n "$arg"; then - compile_command="$compile_command $arg" - finalize_command="$finalize_command $arg" - fi - done # argument parsing loop - - if test -n "$prev"; then - $echo "$modename: the \`$prevarg' option requires an argument" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - fi - - if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then - eval arg=\"$export_dynamic_flag_spec\" - compile_command="$compile_command $arg" - finalize_command="$finalize_command $arg" - fi - - oldlibs= - # calculate the name of the file, without its directory - outputname=`$echo "X$output" | $Xsed -e 's%^.*/%%'` - libobjs_save="$libobjs" - - if test -n "$shlibpath_var"; then - # get the directories listed in $shlibpath_var - eval shlib_search_path=\`\$echo \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\` - else - shlib_search_path= - fi - eval sys_lib_search_path=\"$sys_lib_search_path_spec\" - eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" - - output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'` - if test "X$output_objdir" = "X$output"; then - output_objdir="$objdir" - else - output_objdir="$output_objdir/$objdir" - fi - # Create the object directory. - if test ! -d "$output_objdir"; then - $show "$mkdir $output_objdir" - $run $mkdir $output_objdir - exit_status=$? - if test "$exit_status" -ne 0 && test ! -d "$output_objdir"; then - exit $exit_status - fi - fi - - # Determine the type of output - case $output in - "") - $echo "$modename: you must specify an output file" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - ;; - *.$libext) linkmode=oldlib ;; - *.lo | *.$objext) linkmode=obj ;; - *.la) linkmode=lib ;; - *) linkmode=prog ;; # Anything else should be a program. - esac - - case $host in - *cygwin* | *mingw* | *pw32*) - # don't eliminate duplications in $postdeps and $predeps - duplicate_compiler_generated_deps=yes - ;; - *) - duplicate_compiler_generated_deps=$duplicate_deps - ;; - esac - specialdeplibs= - - libs= - # Find all interdependent deplibs by searching for libraries - # that are linked more than once (e.g. -la -lb -la) - for deplib in $deplibs; do - if test "X$duplicate_deps" = "Xyes" ; then - case "$libs " in - *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; - esac - fi - libs="$libs $deplib" - done - - if test "$linkmode" = lib; then - libs="$predeps $libs $compiler_lib_search_path $postdeps" - - # Compute libraries that are listed more than once in $predeps - # $postdeps and mark them as special (i.e., whose duplicates are - # not to be eliminated). - pre_post_deps= - if test "X$duplicate_compiler_generated_deps" = "Xyes" ; then - for pre_post_dep in $predeps $postdeps; do - case "$pre_post_deps " in - *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;; - esac - pre_post_deps="$pre_post_deps $pre_post_dep" - done - fi - pre_post_deps= - fi - - deplibs= - newdependency_libs= - newlib_search_path= - need_relink=no # whether we're linking any uninstalled libtool libraries - notinst_deplibs= # not-installed libtool libraries - case $linkmode in - lib) - passes="conv link" - for file in $dlfiles $dlprefiles; do - case $file in - *.la) ;; - *) - $echo "$modename: libraries can \`-dlopen' only libtool libraries: $file" 1>&2 - exit $EXIT_FAILURE - ;; - esac - done - ;; - prog) - compile_deplibs= - finalize_deplibs= - alldeplibs=no - newdlfiles= - newdlprefiles= - passes="conv scan dlopen dlpreopen link" - ;; - *) passes="conv" - ;; - esac - for pass in $passes; do - if test "$linkmode,$pass" = "lib,link" || - test "$linkmode,$pass" = "prog,scan"; then - libs="$deplibs" - deplibs= - fi - if test "$linkmode" = prog; then - case $pass in - dlopen) libs="$dlfiles" ;; - dlpreopen) libs="$dlprefiles" ;; - link) libs="$deplibs %DEPLIBS% $dependency_libs" ;; - esac - fi - if test "$pass" = dlopen; then - # Collect dlpreopened libraries - save_deplibs="$deplibs" - deplibs= - fi - for deplib in $libs; do - lib= - found=no - case $deplib in - -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe) - if test "$linkmode,$pass" = "prog,link"; then - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - compiler_flags="$compiler_flags $deplib" - fi - continue - ;; - -l*) - if test "$linkmode" != lib && test "$linkmode" != prog; then - $echo "$modename: warning: \`-l' is ignored for archives/objects" 1>&2 - continue - fi - name=`$echo "X$deplib" | $Xsed -e 's/^-l//'` - for searchdir in $newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path; do - for search_ext in .la $std_shrext .so .a; do - # Search the libtool library - lib="$searchdir/lib${name}${search_ext}" - if test -f "$lib"; then - if test "$search_ext" = ".la"; then - found=yes - else - found=no - fi - break 2 - fi - done - done - if test "$found" != yes; then - # deplib doesn't seem to be a libtool library - if test "$linkmode,$pass" = "prog,link"; then - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - deplibs="$deplib $deplibs" - test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" - fi - continue - else # deplib is a libtool library - # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib, - # We need to do some special things here, and not later. - if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then - case " $predeps $postdeps " in - *" $deplib "*) - if (${SED} -e '2q' $lib | - grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then - library_names= - old_library= - case $lib in - */* | *\\*) . $lib ;; - *) . ./$lib ;; - esac - for l in $old_library $library_names; do - ll="$l" - done - if test "X$ll" = "X$old_library" ; then # only static version available - found=no - ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'` - test "X$ladir" = "X$lib" && ladir="." - lib=$ladir/$old_library - if test "$linkmode,$pass" = "prog,link"; then - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - deplibs="$deplib $deplibs" - test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" - fi - continue - fi - fi - ;; - *) ;; - esac - fi - fi - ;; # -l - -L*) - case $linkmode in - lib) - deplibs="$deplib $deplibs" - test "$pass" = conv && continue - newdependency_libs="$deplib $newdependency_libs" - newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'` - ;; - prog) - if test "$pass" = conv; then - deplibs="$deplib $deplibs" - continue - fi - if test "$pass" = scan; then - deplibs="$deplib $deplibs" - else - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - fi - newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'` - ;; - *) - $echo "$modename: warning: \`-L' is ignored for archives/objects" 1>&2 - ;; - esac # linkmode - continue - ;; # -L - -R*) - if test "$pass" = link; then - dir=`$echo "X$deplib" | $Xsed -e 's/^-R//'` - # Make sure the xrpath contains only unique directories. - case "$xrpath " in - *" $dir "*) ;; - *) xrpath="$xrpath $dir" ;; - esac - fi - deplibs="$deplib $deplibs" - continue - ;; - *.la) lib="$deplib" ;; - *.$libext) - if test "$pass" = conv; then - deplibs="$deplib $deplibs" - continue - fi - case $linkmode in - lib) - valid_a_lib=no - case $deplibs_check_method in - match_pattern*) - set dummy $deplibs_check_method - match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"` - if eval $echo \"$deplib\" 2>/dev/null \ - | $SED 10q \ - | $EGREP "$match_pattern_regex" > /dev/null; then - valid_a_lib=yes - fi - ;; - pass_all) - valid_a_lib=yes - ;; - esac - if test "$valid_a_lib" != yes; then - $echo - $echo "*** Warning: Trying to link with static lib archive $deplib." - $echo "*** I have the capability to make that library automatically link in when" - $echo "*** you link to this library. But I can only do this if you have a" - $echo "*** shared version of the library, which you do not appear to have" - $echo "*** because the file extensions .$libext of this argument makes me believe" - $echo "*** that it is just a static archive that I should not used here." - else - $echo - $echo "*** Warning: Linking the shared library $output against the" - $echo "*** static library $deplib is not portable!" - deplibs="$deplib $deplibs" - fi - continue - ;; - prog) - if test "$pass" != link; then - deplibs="$deplib $deplibs" - else - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - fi - continue - ;; - esac # linkmode - ;; # *.$libext - *.lo | *.$objext) - if test "$pass" = conv; then - deplibs="$deplib $deplibs" - elif test "$linkmode" = prog; then - if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then - # If there is no dlopen support or we're linking statically, - # we need to preload. - newdlprefiles="$newdlprefiles $deplib" - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - newdlfiles="$newdlfiles $deplib" - fi - fi - continue - ;; - %DEPLIBS%) - alldeplibs=yes - continue - ;; - esac # case $deplib - if test "$found" = yes || test -f "$lib"; then : - else - $echo "$modename: cannot find the library \`$lib' or unhandled argument \`$deplib'" 1>&2 - exit $EXIT_FAILURE - fi - - # Check to see that this really is a libtool archive. - if (${SED} -e '2q' $lib | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : - else - $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 - exit $EXIT_FAILURE - fi - - ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'` - test "X$ladir" = "X$lib" && ladir="." - - dlname= - dlopen= - dlpreopen= - libdir= - library_names= - old_library= - # If the library was installed with an old release of libtool, - # it will not redefine variables installed, or shouldnotlink - installed=yes - shouldnotlink=no - avoidtemprpath= - - - # Read the .la file - case $lib in - */* | *\\*) . $lib ;; - *) . ./$lib ;; - esac - - if test "$linkmode,$pass" = "lib,link" || - test "$linkmode,$pass" = "prog,scan" || - { test "$linkmode" != prog && test "$linkmode" != lib; }; then - test -n "$dlopen" && dlfiles="$dlfiles $dlopen" - test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen" - fi - - if test "$pass" = conv; then - # Only check for convenience libraries - deplibs="$lib $deplibs" - if test -z "$libdir"; then - if test -z "$old_library"; then - $echo "$modename: cannot find name of link library for \`$lib'" 1>&2 - exit $EXIT_FAILURE - fi - # It is a libtool convenience library, so add in its objects. - convenience="$convenience $ladir/$objdir/$old_library" - old_convenience="$old_convenience $ladir/$objdir/$old_library" - tmp_libs= - for deplib in $dependency_libs; do - deplibs="$deplib $deplibs" - if test "X$duplicate_deps" = "Xyes" ; then - case "$tmp_libs " in - *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; - esac - fi - tmp_libs="$tmp_libs $deplib" - done - elif test "$linkmode" != prog && test "$linkmode" != lib; then - $echo "$modename: \`$lib' is not a convenience library" 1>&2 - exit $EXIT_FAILURE - fi - continue - fi # $pass = conv - - - # Get the name of the library we link against. - linklib= - for l in $old_library $library_names; do - linklib="$l" - done - if test -z "$linklib"; then - $echo "$modename: cannot find name of link library for \`$lib'" 1>&2 - exit $EXIT_FAILURE - fi - - # This library was specified with -dlopen. - if test "$pass" = dlopen; then - if test -z "$libdir"; then - $echo "$modename: cannot -dlopen a convenience library: \`$lib'" 1>&2 - exit $EXIT_FAILURE - fi - if test -z "$dlname" || - test "$dlopen_support" != yes || - test "$build_libtool_libs" = no; then - # If there is no dlname, no dlopen support or we're linking - # statically, we need to preload. We also need to preload any - # dependent libraries so libltdl's deplib preloader doesn't - # bomb out in the load deplibs phase. - dlprefiles="$dlprefiles $lib $dependency_libs" - else - newdlfiles="$newdlfiles $lib" - fi - continue - fi # $pass = dlopen - - # We need an absolute path. - case $ladir in - [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;; - *) - abs_ladir=`cd "$ladir" && pwd` - if test -z "$abs_ladir"; then - $echo "$modename: warning: cannot determine absolute directory name of \`$ladir'" 1>&2 - $echo "$modename: passing it literally to the linker, although it might fail" 1>&2 - abs_ladir="$ladir" - fi - ;; - esac - laname=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` - - # Find the relevant object directory and library name. - if test "X$installed" = Xyes; then - if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then - $echo "$modename: warning: library \`$lib' was moved." 1>&2 - dir="$ladir" - absdir="$abs_ladir" - libdir="$abs_ladir" - else - dir="$libdir" - absdir="$libdir" - fi - test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes - else - if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then - dir="$ladir" - absdir="$abs_ladir" - # Remove this search path later - notinst_path="$notinst_path $abs_ladir" - else - dir="$ladir/$objdir" - absdir="$abs_ladir/$objdir" - # Remove this search path later - notinst_path="$notinst_path $abs_ladir" - fi - fi # $installed = yes - name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` - - # This library was specified with -dlpreopen. - if test "$pass" = dlpreopen; then - if test -z "$libdir"; then - $echo "$modename: cannot -dlpreopen a convenience library: \`$lib'" 1>&2 - exit $EXIT_FAILURE - fi - # Prefer using a static library (so that no silly _DYNAMIC symbols - # are required to link). - if test -n "$old_library"; then - newdlprefiles="$newdlprefiles $dir/$old_library" - # Otherwise, use the dlname, so that lt_dlopen finds it. - elif test -n "$dlname"; then - newdlprefiles="$newdlprefiles $dir/$dlname" - else - newdlprefiles="$newdlprefiles $dir/$linklib" - fi - fi # $pass = dlpreopen - - if test -z "$libdir"; then - # Link the convenience library - if test "$linkmode" = lib; then - deplibs="$dir/$old_library $deplibs" - elif test "$linkmode,$pass" = "prog,link"; then - compile_deplibs="$dir/$old_library $compile_deplibs" - finalize_deplibs="$dir/$old_library $finalize_deplibs" - else - deplibs="$lib $deplibs" # used for prog,scan pass - fi - continue - fi - - - if test "$linkmode" = prog && test "$pass" != link; then - newlib_search_path="$newlib_search_path $ladir" - deplibs="$lib $deplibs" - - linkalldeplibs=no - if test "$link_all_deplibs" != no || test -z "$library_names" || - test "$build_libtool_libs" = no; then - linkalldeplibs=yes - fi - - tmp_libs= - for deplib in $dependency_libs; do - case $deplib in - -L*) newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`;; ### testsuite: skip nested quoting test - esac - # Need to link against all dependency_libs? - if test "$linkalldeplibs" = yes; then - deplibs="$deplib $deplibs" - else - # Need to hardcode shared library paths - # or/and link against static libraries - newdependency_libs="$deplib $newdependency_libs" - fi - if test "X$duplicate_deps" = "Xyes" ; then - case "$tmp_libs " in - *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; - esac - fi - tmp_libs="$tmp_libs $deplib" - done # for deplib - continue - fi # $linkmode = prog... - - if test "$linkmode,$pass" = "prog,link"; then - if test -n "$library_names" && - { test "$prefer_static_libs" = no || test -z "$old_library"; }; then - # We need to hardcode the library path - if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then - # Make sure the rpath contains only unique directories. - case "$temp_rpath " in - *" $dir "*) ;; - *" $absdir "*) ;; - *) temp_rpath="$temp_rpath $absdir" ;; - esac - fi - - # Hardcode the library path. - # Skip directories that are in the system default run-time - # search path. - case " $sys_lib_dlsearch_path " in - *" $absdir "*) ;; - *) - case "$compile_rpath " in - *" $absdir "*) ;; - *) compile_rpath="$compile_rpath $absdir" - esac - ;; - esac - case " $sys_lib_dlsearch_path " in - *" $libdir "*) ;; - *) - case "$finalize_rpath " in - *" $libdir "*) ;; - *) finalize_rpath="$finalize_rpath $libdir" - esac - ;; - esac - fi # $linkmode,$pass = prog,link... - - if test "$alldeplibs" = yes && - { test "$deplibs_check_method" = pass_all || - { test "$build_libtool_libs" = yes && - test -n "$library_names"; }; }; then - # We only need to search for static libraries - continue - fi - fi - - link_static=no # Whether the deplib will be linked statically - use_static_libs=$prefer_static_libs - if test "$use_static_libs" = built && test "$installed" = yes ; then - use_static_libs=no - fi - if test -n "$library_names" && - { test "$use_static_libs" = no || test -z "$old_library"; }; then - if test "$installed" = no; then - notinst_deplibs="$notinst_deplibs $lib" - need_relink=yes - fi - # This is a shared library - - # Warn about portability, can't link against -module's on - # some systems (darwin) - if test "$shouldnotlink" = yes && test "$pass" = link ; then - $echo - if test "$linkmode" = prog; then - $echo "*** Warning: Linking the executable $output against the loadable module" - else - $echo "*** Warning: Linking the shared library $output against the loadable module" - fi - $echo "*** $linklib is not portable!" - fi - if test "$linkmode" = lib && - test "$hardcode_into_libs" = yes; then - # Hardcode the library path. - # Skip directories that are in the system default run-time - # search path. - case " $sys_lib_dlsearch_path " in - *" $absdir "*) ;; - *) - case "$compile_rpath " in - *" $absdir "*) ;; - *) compile_rpath="$compile_rpath $absdir" - esac - ;; - esac - case " $sys_lib_dlsearch_path " in - *" $libdir "*) ;; - *) - case "$finalize_rpath " in - *" $libdir "*) ;; - *) finalize_rpath="$finalize_rpath $libdir" - esac - ;; - esac - fi - - if test -n "$old_archive_from_expsyms_cmds"; then - # figure out the soname - set dummy $library_names - realname="$2" - shift; shift - libname=`eval \\$echo \"$libname_spec\"` - # use dlname if we got it. it's perfectly good, no? - if test -n "$dlname"; then - soname="$dlname" - elif test -n "$soname_spec"; then - # bleh windows - case $host in - *cygwin* | mingw*) - major=`expr $current - $age` - versuffix="-$major" - ;; - esac - eval soname=\"$soname_spec\" - else - soname="$realname" - fi - - # Make a new name for the extract_expsyms_cmds to use - soroot="$soname" - soname=`$echo $soroot | ${SED} -e 's/^.*\///'` - newlib="libimp-`$echo $soname | ${SED} 's/^lib//;s/\.dll$//'`.a" - - # If the library has no export list, then create one now - if test -f "$output_objdir/$soname-def"; then : - else - $show "extracting exported symbol list from \`$soname'" - save_ifs="$IFS"; IFS='~' - cmds=$extract_expsyms_cmds - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - $show "$cmd" - $run eval "$cmd" || exit $? - done - IFS="$save_ifs" - fi - - # Create $newlib - if test -f "$output_objdir/$newlib"; then :; else - $show "generating import library for \`$soname'" - save_ifs="$IFS"; IFS='~' - cmds=$old_archive_from_expsyms_cmds - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - $show "$cmd" - $run eval "$cmd" || exit $? - done - IFS="$save_ifs" - fi - # make sure the library variables are pointing to the new library - dir=$output_objdir - linklib=$newlib - fi # test -n "$old_archive_from_expsyms_cmds" - - if test "$linkmode" = prog || test "$mode" != relink; then - add_shlibpath= - add_dir= - add= - lib_linked=yes - case $hardcode_action in - immediate | unsupported) - if test "$hardcode_direct" = no; then - add="$dir/$linklib" - case $host in - *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;; - *-*-sysv4*uw2*) add_dir="-L$dir" ;; - *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \ - *-*-unixware7*) add_dir="-L$dir" ;; - *-*-darwin* ) - # if the lib is a module then we can not link against - # it, someone is ignoring the new warnings I added - if /usr/bin/file -L $add 2> /dev/null | - $EGREP ": [^:]* bundle" >/dev/null ; then - $echo "** Warning, lib $linklib is a module, not a shared library" - if test -z "$old_library" ; then - $echo - $echo "** And there doesn't seem to be a static archive available" - $echo "** The link will probably fail, sorry" - else - add="$dir/$old_library" - fi - fi - esac - elif test "$hardcode_minus_L" = no; then - case $host in - *-*-sunos*) add_shlibpath="$dir" ;; - esac - add_dir="-L$dir" - add="-l$name" - elif test "$hardcode_shlibpath_var" = no; then - add_shlibpath="$dir" - add="-l$name" - else - lib_linked=no - fi - ;; - relink) - if test "$hardcode_direct" = yes; then - add="$dir/$linklib" - elif test "$hardcode_minus_L" = yes; then - add_dir="-L$dir" - # Try looking first in the location we're being installed to. - if test -n "$inst_prefix_dir"; then - case $libdir in - [\\/]*) - add_dir="$add_dir -L$inst_prefix_dir$libdir" - ;; - esac - fi - add="-l$name" - elif test "$hardcode_shlibpath_var" = yes; then - add_shlibpath="$dir" - add="-l$name" - else - lib_linked=no - fi - ;; - *) lib_linked=no ;; - esac - - if test "$lib_linked" != yes; then - $echo "$modename: configuration error: unsupported hardcode properties" - exit $EXIT_FAILURE - fi - - if test -n "$add_shlibpath"; then - case :$compile_shlibpath: in - *":$add_shlibpath:"*) ;; - *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;; - esac - fi - if test "$linkmode" = prog; then - test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs" - test -n "$add" && compile_deplibs="$add $compile_deplibs" - else - test -n "$add_dir" && deplibs="$add_dir $deplibs" - test -n "$add" && deplibs="$add $deplibs" - if test "$hardcode_direct" != yes && \ - test "$hardcode_minus_L" != yes && \ - test "$hardcode_shlibpath_var" = yes; then - case :$finalize_shlibpath: in - *":$libdir:"*) ;; - *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; - esac - fi - fi - fi - - if test "$linkmode" = prog || test "$mode" = relink; then - add_shlibpath= - add_dir= - add= - # Finalize command for both is simple: just hardcode it. - if test "$hardcode_direct" = yes; then - add="$libdir/$linklib" - elif test "$hardcode_minus_L" = yes; then - add_dir="-L$libdir" - add="-l$name" - elif test "$hardcode_shlibpath_var" = yes; then - case :$finalize_shlibpath: in - *":$libdir:"*) ;; - *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; - esac - add="-l$name" - elif test "$hardcode_automatic" = yes; then - if test -n "$inst_prefix_dir" && - test -f "$inst_prefix_dir$libdir/$linklib" ; then - add="$inst_prefix_dir$libdir/$linklib" - else - add="$libdir/$linklib" - fi - else - # We cannot seem to hardcode it, guess we'll fake it. - add_dir="-L$libdir" - # Try looking first in the location we're being installed to. - if test -n "$inst_prefix_dir"; then - case $libdir in - [\\/]*) - add_dir="$add_dir -L$inst_prefix_dir$libdir" - ;; - esac - fi - add="-l$name" - fi - - if test "$linkmode" = prog; then - test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs" - test -n "$add" && finalize_deplibs="$add $finalize_deplibs" - else - test -n "$add_dir" && deplibs="$add_dir $deplibs" - test -n "$add" && deplibs="$add $deplibs" - fi - fi - elif test "$linkmode" = prog; then - # Here we assume that one of hardcode_direct or hardcode_minus_L - # is not unsupported. This is valid on all known static and - # shared platforms. - if test "$hardcode_direct" != unsupported; then - test -n "$old_library" && linklib="$old_library" - compile_deplibs="$dir/$linklib $compile_deplibs" - finalize_deplibs="$dir/$linklib $finalize_deplibs" - else - compile_deplibs="-l$name -L$dir $compile_deplibs" - finalize_deplibs="-l$name -L$dir $finalize_deplibs" - fi - elif test "$build_libtool_libs" = yes; then - # Not a shared library - if test "$deplibs_check_method" != pass_all; then - # We're trying link a shared library against a static one - # but the system doesn't support it. - - # Just print a warning and add the library to dependency_libs so - # that the program can be linked against the static library. - $echo - $echo "*** Warning: This system can not link to static lib archive $lib." - $echo "*** I have the capability to make that library automatically link in when" - $echo "*** you link to this library. But I can only do this if you have a" - $echo "*** shared version of the library, which you do not appear to have." - if test "$module" = yes; then - $echo "*** But as you try to build a module library, libtool will still create " - $echo "*** a static module, that should work as long as the dlopening application" - $echo "*** is linked with the -dlopen flag to resolve symbols at runtime." - if test -z "$global_symbol_pipe"; then - $echo - $echo "*** However, this would only work if libtool was able to extract symbol" - $echo "*** lists from a program, using \`nm' or equivalent, but libtool could" - $echo "*** not find such a program. So, this module is probably useless." - $echo "*** \`nm' from GNU binutils and a full rebuild may help." - fi - if test "$build_old_libs" = no; then - build_libtool_libs=module - build_old_libs=yes - else - build_libtool_libs=no - fi - fi - else - deplibs="$dir/$old_library $deplibs" - link_static=yes - fi - fi # link shared/static library? - - if test "$linkmode" = lib; then - if test -n "$dependency_libs" && - { test "$hardcode_into_libs" != yes || - test "$build_old_libs" = yes || - test "$link_static" = yes; }; then - # Extract -R from dependency_libs - temp_deplibs= - for libdir in $dependency_libs; do - case $libdir in - -R*) temp_xrpath=`$echo "X$libdir" | $Xsed -e 's/^-R//'` - case " $xrpath " in - *" $temp_xrpath "*) ;; - *) xrpath="$xrpath $temp_xrpath";; - esac;; - *) temp_deplibs="$temp_deplibs $libdir";; - esac - done - dependency_libs="$temp_deplibs" - fi - - newlib_search_path="$newlib_search_path $absdir" - # Link against this library - test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs" - # ... and its dependency_libs - tmp_libs= - for deplib in $dependency_libs; do - newdependency_libs="$deplib $newdependency_libs" - if test "X$duplicate_deps" = "Xyes" ; then - case "$tmp_libs " in - *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; - esac - fi - tmp_libs="$tmp_libs $deplib" - done - - if test "$link_all_deplibs" != no; then - # Add the search paths of all dependency libraries - for deplib in $dependency_libs; do - case $deplib in - -L*) path="$deplib" ;; - *.la) - dir=`$echo "X$deplib" | $Xsed -e 's%/[^/]*$%%'` - test "X$dir" = "X$deplib" && dir="." - # We need an absolute path. - case $dir in - [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;; - *) - absdir=`cd "$dir" && pwd` - if test -z "$absdir"; then - $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2 - absdir="$dir" - fi - ;; - esac - if grep "^installed=no" $deplib > /dev/null; then - path="$absdir/$objdir" - else - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` - if test -z "$libdir"; then - $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2 - exit $EXIT_FAILURE - fi - if test "$absdir" != "$libdir"; then - $echo "$modename: warning: \`$deplib' seems to be moved" 1>&2 - fi - path="$absdir" - fi - depdepl= - case $host in - *-*-darwin*) - # we do not want to link against static libs, - # but need to link against shared - eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` - if test -n "$deplibrary_names" ; then - for tmp in $deplibrary_names ; do - depdepl=$tmp - done - if test -f "$path/$depdepl" ; then - depdepl="$path/$depdepl" - fi - # do not add paths which are already there - case " $newlib_search_path " in - *" $path "*) ;; - *) newlib_search_path="$newlib_search_path $path";; - esac - fi - path="" - ;; - *) - path="-L$path" - ;; - esac - ;; - -l*) - case $host in - *-*-darwin*) - # Again, we only want to link against shared libraries - eval tmp_libs=`$echo "X$deplib" | $Xsed -e "s,^\-l,,"` - for tmp in $newlib_search_path ; do - if test -f "$tmp/lib$tmp_libs.dylib" ; then - eval depdepl="$tmp/lib$tmp_libs.dylib" - break - fi - done - path="" - ;; - *) continue ;; - esac - ;; - *) continue ;; - esac - case " $deplibs " in - *" $path "*) ;; - *) deplibs="$path $deplibs" ;; - esac - case " $deplibs " in - *" $depdepl "*) ;; - *) deplibs="$depdepl $deplibs" ;; - esac - done - fi # link_all_deplibs != no - fi # linkmode = lib - done # for deplib in $libs - dependency_libs="$newdependency_libs" - if test "$pass" = dlpreopen; then - # Link the dlpreopened libraries before other libraries - for deplib in $save_deplibs; do - deplibs="$deplib $deplibs" - done - fi - if test "$pass" != dlopen; then - if test "$pass" != conv; then - # Make sure lib_search_path contains only unique directories. - lib_search_path= - for dir in $newlib_search_path; do - case "$lib_search_path " in - *" $dir "*) ;; - *) lib_search_path="$lib_search_path $dir" ;; - esac - done - newlib_search_path= - fi - - if test "$linkmode,$pass" != "prog,link"; then - vars="deplibs" - else - vars="compile_deplibs finalize_deplibs" - fi - for var in $vars dependency_libs; do - # Add libraries to $var in reverse order - eval tmp_libs=\"\$$var\" - new_libs= - for deplib in $tmp_libs; do - # FIXME: Pedantically, this is the right thing to do, so - # that some nasty dependency loop isn't accidentally - # broken: - #new_libs="$deplib $new_libs" - # Pragmatically, this seems to cause very few problems in - # practice: - case $deplib in - -L*) new_libs="$deplib $new_libs" ;; - -R*) ;; - *) - # And here is the reason: when a library appears more - # than once as an explicit dependence of a library, or - # is implicitly linked in more than once by the - # compiler, it is considered special, and multiple - # occurrences thereof are not removed. Compare this - # with having the same library being listed as a - # dependency of multiple other libraries: in this case, - # we know (pedantically, we assume) the library does not - # need to be listed more than once, so we keep only the - # last copy. This is not always right, but it is rare - # enough that we require users that really mean to play - # such unportable linking tricks to link the library - # using -Wl,-lname, so that libtool does not consider it - # for duplicate removal. - case " $specialdeplibs " in - *" $deplib "*) new_libs="$deplib $new_libs" ;; - *) - case " $new_libs " in - *" $deplib "*) ;; - *) new_libs="$deplib $new_libs" ;; - esac - ;; - esac - ;; - esac - done - tmp_libs= - for deplib in $new_libs; do - case $deplib in - -L*) - case " $tmp_libs " in - *" $deplib "*) ;; - *) tmp_libs="$tmp_libs $deplib" ;; - esac - ;; - *) tmp_libs="$tmp_libs $deplib" ;; - esac - done - eval $var=\"$tmp_libs\" - done # for var - fi - # Last step: remove runtime libs from dependency_libs - # (they stay in deplibs) - tmp_libs= - for i in $dependency_libs ; do - case " $predeps $postdeps $compiler_lib_search_path " in - *" $i "*) - i="" - ;; - esac - if test -n "$i" ; then - tmp_libs="$tmp_libs $i" - fi - done - dependency_libs=$tmp_libs - done # for pass - if test "$linkmode" = prog; then - dlfiles="$newdlfiles" - dlprefiles="$newdlprefiles" - fi - - case $linkmode in - oldlib) - if test -n "$deplibs"; then - $echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2 - fi - - if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then - $echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2 - fi - - if test -n "$rpath"; then - $echo "$modename: warning: \`-rpath' is ignored for archives" 1>&2 - fi - - if test -n "$xrpath"; then - $echo "$modename: warning: \`-R' is ignored for archives" 1>&2 - fi - - if test -n "$vinfo"; then - $echo "$modename: warning: \`-version-info/-version-number' is ignored for archives" 1>&2 - fi - - if test -n "$release"; then - $echo "$modename: warning: \`-release' is ignored for archives" 1>&2 - fi - - if test -n "$export_symbols" || test -n "$export_symbols_regex"; then - $echo "$modename: warning: \`-export-symbols' is ignored for archives" 1>&2 - fi - - # Now set the variables for building old libraries. - build_libtool_libs=no - oldlibs="$output" - objs="$objs$old_deplibs" - ;; - - lib) - # Make sure we only generate libraries of the form `libNAME.la'. - case $outputname in - lib*) - name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` - eval shared_ext=\"$shrext_cmds\" - eval libname=\"$libname_spec\" - ;; - *) - if test "$module" = no; then - $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - fi - if test "$need_lib_prefix" != no; then - # Add the "lib" prefix for modules if required - name=`$echo "X$outputname" | $Xsed -e 's/\.la$//'` - eval shared_ext=\"$shrext_cmds\" - eval libname=\"$libname_spec\" - else - libname=`$echo "X$outputname" | $Xsed -e 's/\.la$//'` - fi - ;; - esac - - if test -n "$objs"; then - if test "$deplibs_check_method" != pass_all; then - $echo "$modename: cannot build libtool library \`$output' from non-libtool objects on this host:$objs" 2>&1 - exit $EXIT_FAILURE - else - $echo - $echo "*** Warning: Linking the shared library $output against the non-libtool" - $echo "*** objects $objs is not portable!" - libobjs="$libobjs $objs" - fi - fi - - if test "$dlself" != no; then - $echo "$modename: warning: \`-dlopen self' is ignored for libtool libraries" 1>&2 - fi - - set dummy $rpath - if test "$#" -gt 2; then - $echo "$modename: warning: ignoring multiple \`-rpath's for a libtool library" 1>&2 - fi - install_libdir="$2" - - oldlibs= - if test -z "$rpath"; then - if test "$build_libtool_libs" = yes; then - # Building a libtool convenience library. - # Some compilers have problems with a `.al' extension so - # convenience libraries should have the same extension an - # archive normally would. - oldlibs="$output_objdir/$libname.$libext $oldlibs" - build_libtool_libs=convenience - build_old_libs=yes - fi - - if test -n "$vinfo"; then - $echo "$modename: warning: \`-version-info/-version-number' is ignored for convenience libraries" 1>&2 - fi - - if test -n "$release"; then - $echo "$modename: warning: \`-release' is ignored for convenience libraries" 1>&2 - fi - else - - # Parse the version information argument. - save_ifs="$IFS"; IFS=':' - set dummy $vinfo 0 0 0 - IFS="$save_ifs" - - if test -n "$8"; then - $echo "$modename: too many parameters to \`-version-info'" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - fi - - # convert absolute version numbers to libtool ages - # this retains compatibility with .la files and attempts - # to make the code below a bit more comprehensible - - case $vinfo_number in - yes) - number_major="$2" - number_minor="$3" - number_revision="$4" - # - # There are really only two kinds -- those that - # use the current revision as the major version - # and those that subtract age and use age as - # a minor version. But, then there is irix - # which has an extra 1 added just for fun - # - case $version_type in - darwin|linux|osf|windows) - current=`expr $number_major + $number_minor` - age="$number_minor" - revision="$number_revision" - ;; - freebsd-aout|freebsd-elf|sunos) - current="$number_major" - revision="$number_minor" - age="0" - ;; - irix|nonstopux) - current=`expr $number_major + $number_minor - 1` - age="$number_minor" - revision="$number_minor" - ;; - esac - ;; - no) - current="$2" - revision="$3" - age="$4" - ;; - esac - - # Check that each of the things are valid numbers. - case $current in - 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; - *) - $echo "$modename: CURRENT \`$current' must be a nonnegative integer" 1>&2 - $echo "$modename: \`$vinfo' is not valid version information" 1>&2 - exit $EXIT_FAILURE - ;; - esac - - case $revision in - 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; - *) - $echo "$modename: REVISION \`$revision' must be a nonnegative integer" 1>&2 - $echo "$modename: \`$vinfo' is not valid version information" 1>&2 - exit $EXIT_FAILURE - ;; - esac - - case $age in - 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; - *) - $echo "$modename: AGE \`$age' must be a nonnegative integer" 1>&2 - $echo "$modename: \`$vinfo' is not valid version information" 1>&2 - exit $EXIT_FAILURE - ;; - esac - - if test "$age" -gt "$current"; then - $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2 - $echo "$modename: \`$vinfo' is not valid version information" 1>&2 - exit $EXIT_FAILURE - fi - - # Calculate the version variables. - major= - versuffix= - verstring= - case $version_type in - none) ;; - - darwin) - # Like Linux, but with the current version available in - # verstring for coding it into the library header - major=.`expr $current - $age` - versuffix="$major.$age.$revision" - # Darwin ld doesn't like 0 for these options... - minor_current=`expr $current + 1` - verstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision" - ;; - - freebsd-aout) - major=".$current" - versuffix=".$current.$revision"; - ;; - - freebsd-elf) - major=".$current" - versuffix=".$current"; - ;; - - irix | nonstopux) - major=`expr $current - $age + 1` - - case $version_type in - nonstopux) verstring_prefix=nonstopux ;; - *) verstring_prefix=sgi ;; - esac - verstring="$verstring_prefix$major.$revision" - - # Add in all the interfaces that we are compatible with. - loop=$revision - while test "$loop" -ne 0; do - iface=`expr $revision - $loop` - loop=`expr $loop - 1` - verstring="$verstring_prefix$major.$iface:$verstring" - done - - # Before this point, $major must not contain `.'. - major=.$major - versuffix="$major.$revision" - ;; - - linux) - major=.`expr $current - $age` - versuffix="$major.$age.$revision" - ;; - - osf) - major=.`expr $current - $age` - versuffix=".$current.$age.$revision" - verstring="$current.$age.$revision" - - # Add in all the interfaces that we are compatible with. - loop=$age - while test "$loop" -ne 0; do - iface=`expr $current - $loop` - loop=`expr $loop - 1` - verstring="$verstring:${iface}.0" - done - - # Make executables depend on our current version. - verstring="$verstring:${current}.0" - ;; - - sunos) - major=".$current" - versuffix=".$current.$revision" - ;; - - windows) - # Use '-' rather than '.', since we only want one - # extension on DOS 8.3 filesystems. - major=`expr $current - $age` - versuffix="-$major" - ;; - - *) - $echo "$modename: unknown library version type \`$version_type'" 1>&2 - $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 - exit $EXIT_FAILURE - ;; - esac - - # Clear the version info if we defaulted, and they specified a release. - if test -z "$vinfo" && test -n "$release"; then - major= - case $version_type in - darwin) - # we can't check for "0.0" in archive_cmds due to quoting - # problems, so we reset it completely - verstring= - ;; - *) - verstring="0.0" - ;; - esac - if test "$need_version" = no; then - versuffix= - else - versuffix=".0.0" - fi - fi - - # Remove version info from name if versioning should be avoided - if test "$avoid_version" = yes && test "$need_version" = no; then - major= - versuffix= - verstring="" - fi - - # Check to see if the archive will have undefined symbols. - if test "$allow_undefined" = yes; then - if test "$allow_undefined_flag" = unsupported; then - $echo "$modename: warning: undefined symbols not allowed in $host shared libraries" 1>&2 - build_libtool_libs=no - build_old_libs=yes - fi - else - # Don't allow undefined symbols. - allow_undefined_flag="$no_undefined_flag" - fi - fi - - if test "$mode" != relink; then - # Remove our outputs, but don't remove object files since they - # may have been created when compiling PIC objects. - removelist= - tempremovelist=`$echo "$output_objdir/*"` - for p in $tempremovelist; do - case $p in - *.$objext) - ;; - $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*) - if test "X$precious_files_regex" != "X"; then - if echo $p | $EGREP -e "$precious_files_regex" >/dev/null 2>&1 - then - continue - fi - fi - removelist="$removelist $p" - ;; - *) ;; - esac - done - if test -n "$removelist"; then - $show "${rm}r $removelist" - $run ${rm}r $removelist - fi - fi - - # Now set the variables for building old libraries. - if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then - oldlibs="$oldlibs $output_objdir/$libname.$libext" - - # Transform .lo files to .o files. - oldobjs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP` - fi - - # Eliminate all temporary directories. - for path in $notinst_path; do - lib_search_path=`$echo "$lib_search_path " | ${SED} -e "s% $path % %g"` - deplibs=`$echo "$deplibs " | ${SED} -e "s% -L$path % %g"` - dependency_libs=`$echo "$dependency_libs " | ${SED} -e "s% -L$path % %g"` - done - - if test -n "$xrpath"; then - # If the user specified any rpath flags, then add them. - temp_xrpath= - for libdir in $xrpath; do - temp_xrpath="$temp_xrpath -R$libdir" - case "$finalize_rpath " in - *" $libdir "*) ;; - *) finalize_rpath="$finalize_rpath $libdir" ;; - esac - done - if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then - dependency_libs="$temp_xrpath $dependency_libs" - fi - fi - - # Make sure dlfiles contains only unique files that won't be dlpreopened - old_dlfiles="$dlfiles" - dlfiles= - for lib in $old_dlfiles; do - case " $dlprefiles $dlfiles " in - *" $lib "*) ;; - *) dlfiles="$dlfiles $lib" ;; - esac - done - - # Make sure dlprefiles contains only unique files - old_dlprefiles="$dlprefiles" - dlprefiles= - for lib in $old_dlprefiles; do - case "$dlprefiles " in - *" $lib "*) ;; - *) dlprefiles="$dlprefiles $lib" ;; - esac - done - - if test "$build_libtool_libs" = yes; then - if test -n "$rpath"; then - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos*) - # these systems don't actually have a c library (as such)! - ;; - *-*-rhapsody* | *-*-darwin1.[012]) - # Rhapsody C library is in the System framework - deplibs="$deplibs -framework System" - ;; - *-*-netbsd*) - # Don't link with libc until the a.out ld.so is fixed. - ;; - *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) - # Do not include libc due to us having libc/libc_r. - ;; - *-*-sco3.2v5* | *-*-sco5v6*) - # Causes problems with __ctype - ;; - *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) - # Compiler inserts libc in the correct place for threads to work - ;; - *) - # Add libc to deplibs on all other systems if necessary. - if test "$build_libtool_need_lc" = "yes"; then - deplibs="$deplibs -lc" - fi - ;; - esac - fi - - # Transform deplibs into only deplibs that can be linked in shared. - name_save=$name - libname_save=$libname - release_save=$release - versuffix_save=$versuffix - major_save=$major - # I'm not sure if I'm treating the release correctly. I think - # release should show up in the -l (ie -lgmp5) so we don't want to - # add it in twice. Is that correct? - release="" - versuffix="" - major="" - newdeplibs= - droppeddeps=no - case $deplibs_check_method in - pass_all) - # Don't check for shared/static. Everything works. - # This might be a little naive. We might want to check - # whether the library exists or not. But this is on - # osf3 & osf4 and I'm not really sure... Just - # implementing what was already the behavior. - newdeplibs=$deplibs - ;; - test_compile) - # This code stresses the "libraries are programs" paradigm to its - # limits. Maybe even breaks it. We compile a program, linking it - # against the deplibs as a proxy for the library. Then we can check - # whether they linked in statically or dynamically with ldd. - $rm conftest.c - cat > conftest.c </dev/null` - for potent_lib in $potential_libs; do - # Follow soft links. - if ls -lLd "$potent_lib" 2>/dev/null \ - | grep " -> " >/dev/null; then - continue - fi - # The statement above tries to avoid entering an - # endless loop below, in case of cyclic links. - # We might still enter an endless loop, since a link - # loop can be closed while we follow links, - # but so what? - potlib="$potent_lib" - while test -h "$potlib" 2>/dev/null; do - potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'` - case $potliblink in - [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";; - *) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";; - esac - done - if eval $file_magic_cmd \"\$potlib\" 2>/dev/null \ - | ${SED} 10q \ - | $EGREP "$file_magic_regex" > /dev/null; then - newdeplibs="$newdeplibs $a_deplib" - a_deplib="" - break 2 - fi - done - done - fi - if test -n "$a_deplib" ; then - droppeddeps=yes - $echo - $echo "*** Warning: linker path does not have real file for library $a_deplib." - $echo "*** I have the capability to make that library automatically link in when" - $echo "*** you link to this library. But I can only do this if you have a" - $echo "*** shared version of the library, which you do not appear to have" - $echo "*** because I did check the linker path looking for a file starting" - if test -z "$potlib" ; then - $echo "*** with $libname but no candidates were found. (...for file magic test)" - else - $echo "*** with $libname and none of the candidates passed a file format test" - $echo "*** using a file magic. Last file checked: $potlib" - fi - fi - else - # Add a -L argument. - newdeplibs="$newdeplibs $a_deplib" - fi - done # Gone through all deplibs. - ;; - match_pattern*) - set dummy $deplibs_check_method - match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"` - for a_deplib in $deplibs; do - name=`expr $a_deplib : '-l\(.*\)'` - # If $name is empty we are operating on a -L argument. - if test -n "$name" && test "$name" != "0"; then - if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then - case " $predeps $postdeps " in - *" $a_deplib "*) - newdeplibs="$newdeplibs $a_deplib" - a_deplib="" - ;; - esac - fi - if test -n "$a_deplib" ; then - libname=`eval \\$echo \"$libname_spec\"` - for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do - potential_libs=`ls $i/$libname[.-]* 2>/dev/null` - for potent_lib in $potential_libs; do - potlib="$potent_lib" # see symlink-check above in file_magic test - if eval $echo \"$potent_lib\" 2>/dev/null \ - | ${SED} 10q \ - | $EGREP "$match_pattern_regex" > /dev/null; then - newdeplibs="$newdeplibs $a_deplib" - a_deplib="" - break 2 - fi - done - done - fi - if test -n "$a_deplib" ; then - droppeddeps=yes - $echo - $echo "*** Warning: linker path does not have real file for library $a_deplib." - $echo "*** I have the capability to make that library automatically link in when" - $echo "*** you link to this library. But I can only do this if you have a" - $echo "*** shared version of the library, which you do not appear to have" - $echo "*** because I did check the linker path looking for a file starting" - if test -z "$potlib" ; then - $echo "*** with $libname but no candidates were found. (...for regex pattern test)" - else - $echo "*** with $libname and none of the candidates passed a file format test" - $echo "*** using a regex pattern. Last file checked: $potlib" - fi - fi - else - # Add a -L argument. - newdeplibs="$newdeplibs $a_deplib" - fi - done # Gone through all deplibs. - ;; - none | unknown | *) - newdeplibs="" - tmp_deplibs=`$echo "X $deplibs" | $Xsed -e 's/ -lc$//' \ - -e 's/ -[LR][^ ]*//g'` - if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then - for i in $predeps $postdeps ; do - # can't use Xsed below, because $i might contain '/' - tmp_deplibs=`$echo "X $tmp_deplibs" | ${SED} -e "1s,^X,," -e "s,$i,,"` - done - fi - if $echo "X $tmp_deplibs" | $Xsed -e 's/[ ]//g' \ - | grep . >/dev/null; then - $echo - if test "X$deplibs_check_method" = "Xnone"; then - $echo "*** Warning: inter-library dependencies are not supported in this platform." - else - $echo "*** Warning: inter-library dependencies are not known to be supported." - fi - $echo "*** All declared inter-library dependencies are being dropped." - droppeddeps=yes - fi - ;; - esac - versuffix=$versuffix_save - major=$major_save - release=$release_save - libname=$libname_save - name=$name_save - - case $host in - *-*-rhapsody* | *-*-darwin1.[012]) - # On Rhapsody replace the C library is the System framework - newdeplibs=`$echo "X $newdeplibs" | $Xsed -e 's/ -lc / -framework System /'` - ;; - esac - - if test "$droppeddeps" = yes; then - if test "$module" = yes; then - $echo - $echo "*** Warning: libtool could not satisfy all declared inter-library" - $echo "*** dependencies of module $libname. Therefore, libtool will create" - $echo "*** a static module, that should work as long as the dlopening" - $echo "*** application is linked with the -dlopen flag." - if test -z "$global_symbol_pipe"; then - $echo - $echo "*** However, this would only work if libtool was able to extract symbol" - $echo "*** lists from a program, using \`nm' or equivalent, but libtool could" - $echo "*** not find such a program. So, this module is probably useless." - $echo "*** \`nm' from GNU binutils and a full rebuild may help." - fi - if test "$build_old_libs" = no; then - oldlibs="$output_objdir/$libname.$libext" - build_libtool_libs=module - build_old_libs=yes - else - build_libtool_libs=no - fi - else - $echo "*** The inter-library dependencies that have been dropped here will be" - $echo "*** automatically added whenever a program is linked with this library" - $echo "*** or is declared to -dlopen it." - - if test "$allow_undefined" = no; then - $echo - $echo "*** Since this library must not contain undefined symbols," - $echo "*** because either the platform does not support them or" - $echo "*** it was explicitly requested with -no-undefined," - $echo "*** libtool will only create a static version of it." - if test "$build_old_libs" = no; then - oldlibs="$output_objdir/$libname.$libext" - build_libtool_libs=module - build_old_libs=yes - else - build_libtool_libs=no - fi - fi - fi - fi - # Done checking deplibs! - deplibs=$newdeplibs - fi - - - # move library search paths that coincide with paths to not yet - # installed libraries to the beginning of the library search list - new_libs= - for path in $notinst_path; do - case " $new_libs " in - *" -L$path/$objdir "*) ;; - *) - case " $deplibs " in - *" -L$path/$objdir "*) - new_libs="$new_libs -L$path/$objdir" ;; - esac - ;; - esac - done - for deplib in $deplibs; do - case $deplib in - -L*) - case " $new_libs " in - *" $deplib "*) ;; - *) new_libs="$new_libs $deplib" ;; - esac - ;; - *) new_libs="$new_libs $deplib" ;; - esac - done - deplibs="$new_libs" - - - # All the library-specific variables (install_libdir is set above). - library_names= - old_library= - dlname= - - # Test again, we may have decided not to build it any more - if test "$build_libtool_libs" = yes; then - if test "$hardcode_into_libs" = yes; then - # Hardcode the library paths - hardcode_libdirs= - dep_rpath= - rpath="$finalize_rpath" - test "$mode" != relink && rpath="$compile_rpath$rpath" - for libdir in $rpath; do - if test -n "$hardcode_libdir_flag_spec"; then - if test -n "$hardcode_libdir_separator"; then - if test -z "$hardcode_libdirs"; then - hardcode_libdirs="$libdir" - else - # Just accumulate the unique libdirs. - case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in - *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) - ;; - *) - hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" - ;; - esac - fi - else - eval flag=\"$hardcode_libdir_flag_spec\" - dep_rpath="$dep_rpath $flag" - fi - elif test -n "$runpath_var"; then - case "$perm_rpath " in - *" $libdir "*) ;; - *) perm_rpath="$perm_rpath $libdir" ;; - esac - fi - done - # Substitute the hardcoded libdirs into the rpath. - if test -n "$hardcode_libdir_separator" && - test -n "$hardcode_libdirs"; then - libdir="$hardcode_libdirs" - if test -n "$hardcode_libdir_flag_spec_ld"; then - eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\" - else - eval dep_rpath=\"$hardcode_libdir_flag_spec\" - fi - fi - if test -n "$runpath_var" && test -n "$perm_rpath"; then - # We should set the runpath_var. - rpath= - for dir in $perm_rpath; do - rpath="$rpath$dir:" - done - eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var" - fi - test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs" - fi - - shlibpath="$finalize_shlibpath" - test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath" - if test -n "$shlibpath"; then - eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" - fi - - # Get the real and link names of the library. - eval shared_ext=\"$shrext_cmds\" - eval library_names=\"$library_names_spec\" - set dummy $library_names - realname="$2" - shift; shift - - if test -n "$soname_spec"; then - eval soname=\"$soname_spec\" - else - soname="$realname" - fi - if test -z "$dlname"; then - dlname=$soname - fi - - lib="$output_objdir/$realname" - linknames= - for link - do - linknames="$linknames $link" - done - - # Use standard objects if they are pic - test -z "$pic_flag" && libobjs=`$echo "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` - - # Prepare the list of exported symbols - if test -z "$export_symbols"; then - if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then - $show "generating symbol list for \`$libname.la'" - export_symbols="$output_objdir/$libname.exp" - $run $rm $export_symbols - cmds=$export_symbols_cmds - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - if len=`expr "X$cmd" : ".*"` && - test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then - $show "$cmd" - $run eval "$cmd" || exit $? - skipped_export=false - else - # The command line is too long to execute in one step. - $show "using reloadable object file for export list..." - skipped_export=: - # Break out early, otherwise skipped_export may be - # set to false by a later but shorter cmd. - break - fi - done - IFS="$save_ifs" - if test -n "$export_symbols_regex"; then - $show "$EGREP -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\"" - $run eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' - $show "$mv \"${export_symbols}T\" \"$export_symbols\"" - $run eval '$mv "${export_symbols}T" "$export_symbols"' - fi - fi - fi - - if test -n "$export_symbols" && test -n "$include_expsyms"; then - $run eval '$echo "X$include_expsyms" | $SP2NL >> "$export_symbols"' - fi - - tmp_deplibs= - for test_deplib in $deplibs; do - case " $convenience " in - *" $test_deplib "*) ;; - *) - tmp_deplibs="$tmp_deplibs $test_deplib" - ;; - esac - done - deplibs="$tmp_deplibs" - - if test -n "$convenience"; then - if test -n "$whole_archive_flag_spec"; then - save_libobjs=$libobjs - eval libobjs=\"\$libobjs $whole_archive_flag_spec\" - else - gentop="$output_objdir/${outputname}x" - generated="$generated $gentop" - - func_extract_archives $gentop $convenience - libobjs="$libobjs $func_extract_archives_result" - fi - fi - - if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then - eval flag=\"$thread_safe_flag_spec\" - linker_flags="$linker_flags $flag" - fi - - # Make a backup of the uninstalled library when relinking - if test "$mode" = relink; then - $run eval '(cd $output_objdir && $rm ${realname}U && $mv $realname ${realname}U)' || exit $? - fi - - # Do each of the archive commands. - if test "$module" = yes && test -n "$module_cmds" ; then - if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then - eval test_cmds=\"$module_expsym_cmds\" - cmds=$module_expsym_cmds - else - eval test_cmds=\"$module_cmds\" - cmds=$module_cmds - fi - else - if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then - eval test_cmds=\"$archive_expsym_cmds\" - cmds=$archive_expsym_cmds - else - eval test_cmds=\"$archive_cmds\" - cmds=$archive_cmds - fi - fi - - if test "X$skipped_export" != "X:" && - len=`expr "X$test_cmds" : ".*" 2>/dev/null` && - test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then - : - else - # The command line is too long to link in one step, link piecewise. - $echo "creating reloadable object files..." - - # Save the value of $output and $libobjs because we want to - # use them later. If we have whole_archive_flag_spec, we - # want to use save_libobjs as it was before - # whole_archive_flag_spec was expanded, because we can't - # assume the linker understands whole_archive_flag_spec. - # This may have to be revisited, in case too many - # convenience libraries get linked in and end up exceeding - # the spec. - if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then - save_libobjs=$libobjs - fi - save_output=$output - output_la=`$echo "X$output" | $Xsed -e "$basename"` - - # Clear the reloadable object creation command queue and - # initialize k to one. - test_cmds= - concat_cmds= - objlist= - delfiles= - last_robj= - k=1 - output=$output_objdir/$output_la-${k}.$objext - # Loop over the list of objects to be linked. - for obj in $save_libobjs - do - eval test_cmds=\"$reload_cmds $objlist $last_robj\" - if test "X$objlist" = X || - { len=`expr "X$test_cmds" : ".*" 2>/dev/null` && - test "$len" -le "$max_cmd_len"; }; then - objlist="$objlist $obj" - else - # The command $test_cmds is almost too long, add a - # command to the queue. - if test "$k" -eq 1 ; then - # The first file doesn't have a previous command to add. - eval concat_cmds=\"$reload_cmds $objlist $last_robj\" - else - # All subsequent reloadable object files will link in - # the last one created. - eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj\" - fi - last_robj=$output_objdir/$output_la-${k}.$objext - k=`expr $k + 1` - output=$output_objdir/$output_la-${k}.$objext - objlist=$obj - len=1 - fi - done - # Handle the remaining objects by creating one last - # reloadable object file. All subsequent reloadable object - # files will link in the last one created. - test -z "$concat_cmds" || concat_cmds=$concat_cmds~ - eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\" - - if ${skipped_export-false}; then - $show "generating symbol list for \`$libname.la'" - export_symbols="$output_objdir/$libname.exp" - $run $rm $export_symbols - libobjs=$output - # Append the command to create the export file. - eval concat_cmds=\"\$concat_cmds~$export_symbols_cmds\" - fi - - # Set up a command to remove the reloadable object files - # after they are used. - i=0 - while test "$i" -lt "$k" - do - i=`expr $i + 1` - delfiles="$delfiles $output_objdir/$output_la-${i}.$objext" - done - - $echo "creating a temporary reloadable object file: $output" - - # Loop through the commands generated above and execute them. - save_ifs="$IFS"; IFS='~' - for cmd in $concat_cmds; do - IFS="$save_ifs" - $show "$cmd" - $run eval "$cmd" || exit $? - done - IFS="$save_ifs" - - libobjs=$output - # Restore the value of output. - output=$save_output - - if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then - eval libobjs=\"\$libobjs $whole_archive_flag_spec\" - fi - # Expand the library linking commands again to reset the - # value of $libobjs for piecewise linking. - - # Do each of the archive commands. - if test "$module" = yes && test -n "$module_cmds" ; then - if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then - cmds=$module_expsym_cmds - else - cmds=$module_cmds - fi - else - if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then - cmds=$archive_expsym_cmds - else - cmds=$archive_cmds - fi - fi - - # Append the command to remove the reloadable object files - # to the just-reset $cmds. - eval cmds=\"\$cmds~\$rm $delfiles\" - fi - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - $show "$cmd" - $run eval "$cmd" || { - lt_exit=$? - - # Restore the uninstalled library and exit - if test "$mode" = relink; then - $run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)' - fi - - exit $lt_exit - } - done - IFS="$save_ifs" - - # Restore the uninstalled library and exit - if test "$mode" = relink; then - $run eval '(cd $output_objdir && $rm ${realname}T && $mv $realname ${realname}T && $mv "$realname"U $realname)' || exit $? - - if test -n "$convenience"; then - if test -z "$whole_archive_flag_spec"; then - $show "${rm}r $gentop" - $run ${rm}r "$gentop" - fi - fi - - exit $EXIT_SUCCESS - fi - - # Create links to the real library. - for linkname in $linknames; do - if test "$realname" != "$linkname"; then - $show "(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)" - $run eval '(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)' || exit $? - fi - done - - # If -module or -export-dynamic was specified, set the dlname. - if test "$module" = yes || test "$export_dynamic" = yes; then - # On all known operating systems, these are identical. - dlname="$soname" - fi - fi - ;; - - obj) - if test -n "$deplibs"; then - $echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2 - fi - - if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then - $echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2 - fi - - if test -n "$rpath"; then - $echo "$modename: warning: \`-rpath' is ignored for objects" 1>&2 - fi - - if test -n "$xrpath"; then - $echo "$modename: warning: \`-R' is ignored for objects" 1>&2 - fi - - if test -n "$vinfo"; then - $echo "$modename: warning: \`-version-info' is ignored for objects" 1>&2 - fi - - if test -n "$release"; then - $echo "$modename: warning: \`-release' is ignored for objects" 1>&2 - fi - - case $output in - *.lo) - if test -n "$objs$old_deplibs"; then - $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2 - exit $EXIT_FAILURE - fi - libobj="$output" - obj=`$echo "X$output" | $Xsed -e "$lo2o"` - ;; - *) - libobj= - obj="$output" - ;; - esac - - # Delete the old objects. - $run $rm $obj $libobj - - # Objects from convenience libraries. This assumes - # single-version convenience libraries. Whenever we create - # different ones for PIC/non-PIC, this we'll have to duplicate - # the extraction. - reload_conv_objs= - gentop= - # reload_cmds runs $LD directly, so let us get rid of - # -Wl from whole_archive_flag_spec - wl= - - if test -n "$convenience"; then - if test -n "$whole_archive_flag_spec"; then - eval reload_conv_objs=\"\$reload_objs $whole_archive_flag_spec\" - else - gentop="$output_objdir/${obj}x" - generated="$generated $gentop" - - func_extract_archives $gentop $convenience - reload_conv_objs="$reload_objs $func_extract_archives_result" - fi - fi - - # Create the old-style object. - reload_objs="$objs$old_deplibs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test - - output="$obj" - cmds=$reload_cmds - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - $show "$cmd" - $run eval "$cmd" || exit $? - done - IFS="$save_ifs" - - # Exit if we aren't doing a library object file. - if test -z "$libobj"; then - if test -n "$gentop"; then - $show "${rm}r $gentop" - $run ${rm}r $gentop - fi - - exit $EXIT_SUCCESS - fi - - if test "$build_libtool_libs" != yes; then - if test -n "$gentop"; then - $show "${rm}r $gentop" - $run ${rm}r $gentop - fi - - # Create an invalid libtool object if no PIC, so that we don't - # accidentally link it into a program. - # $show "echo timestamp > $libobj" - # $run eval "echo timestamp > $libobj" || exit $? - exit $EXIT_SUCCESS - fi - - if test -n "$pic_flag" || test "$pic_mode" != default; then - # Only do commands if we really have different PIC objects. - reload_objs="$libobjs $reload_conv_objs" - output="$libobj" - cmds=$reload_cmds - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - $show "$cmd" - $run eval "$cmd" || exit $? - done - IFS="$save_ifs" - fi - - if test -n "$gentop"; then - $show "${rm}r $gentop" - $run ${rm}r $gentop - fi - - exit $EXIT_SUCCESS - ;; - - prog) - case $host in - *cygwin*) output=`$echo $output | ${SED} -e 's,.exe$,,;s,$,.exe,'` ;; - esac - if test -n "$vinfo"; then - $echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2 - fi - - if test -n "$release"; then - $echo "$modename: warning: \`-release' is ignored for programs" 1>&2 - fi - - if test "$preload" = yes; then - if test "$dlopen_support" = unknown && test "$dlopen_self" = unknown && - test "$dlopen_self_static" = unknown; then - $echo "$modename: warning: \`AC_LIBTOOL_DLOPEN' not used. Assuming no dlopen support." - fi - fi - - case $host in - *-*-rhapsody* | *-*-darwin1.[012]) - # On Rhapsody replace the C library is the System framework - compile_deplibs=`$echo "X $compile_deplibs" | $Xsed -e 's/ -lc / -framework System /'` - finalize_deplibs=`$echo "X $finalize_deplibs" | $Xsed -e 's/ -lc / -framework System /'` - ;; - esac - - case $host in - *darwin*) - # Don't allow lazy linking, it breaks C++ global constructors - if test "$tagname" = CXX ; then - compile_command="$compile_command ${wl}-bind_at_load" - finalize_command="$finalize_command ${wl}-bind_at_load" - fi - ;; - esac - - - # move library search paths that coincide with paths to not yet - # installed libraries to the beginning of the library search list - new_libs= - for path in $notinst_path; do - case " $new_libs " in - *" -L$path/$objdir "*) ;; - *) - case " $compile_deplibs " in - *" -L$path/$objdir "*) - new_libs="$new_libs -L$path/$objdir" ;; - esac - ;; - esac - done - for deplib in $compile_deplibs; do - case $deplib in - -L*) - case " $new_libs " in - *" $deplib "*) ;; - *) new_libs="$new_libs $deplib" ;; - esac - ;; - *) new_libs="$new_libs $deplib" ;; - esac - done - compile_deplibs="$new_libs" - - - compile_command="$compile_command $compile_deplibs" - finalize_command="$finalize_command $finalize_deplibs" - - if test -n "$rpath$xrpath"; then - # If the user specified any rpath flags, then add them. - for libdir in $rpath $xrpath; do - # This is the magic to use -rpath. - case "$finalize_rpath " in - *" $libdir "*) ;; - *) finalize_rpath="$finalize_rpath $libdir" ;; - esac - done - fi - - # Now hardcode the library paths - rpath= - hardcode_libdirs= - for libdir in $compile_rpath $finalize_rpath; do - if test -n "$hardcode_libdir_flag_spec"; then - if test -n "$hardcode_libdir_separator"; then - if test -z "$hardcode_libdirs"; then - hardcode_libdirs="$libdir" - else - # Just accumulate the unique libdirs. - case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in - *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) - ;; - *) - hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" - ;; - esac - fi - else - eval flag=\"$hardcode_libdir_flag_spec\" - rpath="$rpath $flag" - fi - elif test -n "$runpath_var"; then - case "$perm_rpath " in - *" $libdir "*) ;; - *) perm_rpath="$perm_rpath $libdir" ;; - esac - fi - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) - testbindir=`$echo "X$libdir" | $Xsed -e 's*/lib$*/bin*'` - case :$dllsearchpath: in - *":$libdir:"*) ;; - *) dllsearchpath="$dllsearchpath:$libdir";; - esac - case :$dllsearchpath: in - *":$testbindir:"*) ;; - *) dllsearchpath="$dllsearchpath:$testbindir";; - esac - ;; - esac - done - # Substitute the hardcoded libdirs into the rpath. - if test -n "$hardcode_libdir_separator" && - test -n "$hardcode_libdirs"; then - libdir="$hardcode_libdirs" - eval rpath=\" $hardcode_libdir_flag_spec\" - fi - compile_rpath="$rpath" - - rpath= - hardcode_libdirs= - for libdir in $finalize_rpath; do - if test -n "$hardcode_libdir_flag_spec"; then - if test -n "$hardcode_libdir_separator"; then - if test -z "$hardcode_libdirs"; then - hardcode_libdirs="$libdir" - else - # Just accumulate the unique libdirs. - case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in - *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) - ;; - *) - hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" - ;; - esac - fi - else - eval flag=\"$hardcode_libdir_flag_spec\" - rpath="$rpath $flag" - fi - elif test -n "$runpath_var"; then - case "$finalize_perm_rpath " in - *" $libdir "*) ;; - *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;; - esac - fi - done - # Substitute the hardcoded libdirs into the rpath. - if test -n "$hardcode_libdir_separator" && - test -n "$hardcode_libdirs"; then - libdir="$hardcode_libdirs" - eval rpath=\" $hardcode_libdir_flag_spec\" - fi - finalize_rpath="$rpath" - - if test -n "$libobjs" && test "$build_old_libs" = yes; then - # Transform all the library objects into standard objects. - compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` - finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` - fi - - dlsyms= - if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then - if test -n "$NM" && test -n "$global_symbol_pipe"; then - dlsyms="${outputname}S.c" - else - $echo "$modename: not configured to extract global symbols from dlpreopened files" 1>&2 - fi - fi - - if test -n "$dlsyms"; then - case $dlsyms in - "") ;; - *.c) - # Discover the nlist of each of the dlfiles. - nlist="$output_objdir/${outputname}.nm" - - $show "$rm $nlist ${nlist}S ${nlist}T" - $run $rm "$nlist" "${nlist}S" "${nlist}T" - - # Parse the name list into a source file. - $show "creating $output_objdir/$dlsyms" - - test -z "$run" && $echo > "$output_objdir/$dlsyms" "\ -/* $dlsyms - symbol resolution table for \`$outputname' dlsym emulation. */ -/* Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP */ - -#ifdef __cplusplus -extern \"C\" { -#endif - -/* Prevent the only kind of declaration conflicts we can make. */ -#define lt_preloaded_symbols some_other_symbol - -/* External symbol declarations for the compiler. */\ -" - - if test "$dlself" = yes; then - $show "generating symbol list for \`$output'" - - test -z "$run" && $echo ': @PROGRAM@ ' > "$nlist" - - # Add our own program objects to the symbol list. - progfiles=`$echo "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` - for arg in $progfiles; do - $show "extracting global C symbols from \`$arg'" - $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'" - done - - if test -n "$exclude_expsyms"; then - $run eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' - $run eval '$mv "$nlist"T "$nlist"' - fi - - if test -n "$export_symbols_regex"; then - $run eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' - $run eval '$mv "$nlist"T "$nlist"' - fi - - # Prepare the list of exported symbols - if test -z "$export_symbols"; then - export_symbols="$output_objdir/$outputname.exp" - $run $rm $export_symbols - $run eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' - case $host in - *cygwin* | *mingw* ) - $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' - $run eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' - ;; - esac - else - $run eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' - $run eval 'grep -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' - $run eval 'mv "$nlist"T "$nlist"' - case $host in - *cygwin* | *mingw* ) - $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' - $run eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' - ;; - esac - fi - fi - - for arg in $dlprefiles; do - $show "extracting global C symbols from \`$arg'" - name=`$echo "$arg" | ${SED} -e 's%^.*/%%'` - $run eval '$echo ": $name " >> "$nlist"' - $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'" - done - - if test -z "$run"; then - # Make sure we have at least an empty file. - test -f "$nlist" || : > "$nlist" - - if test -n "$exclude_expsyms"; then - $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T - $mv "$nlist"T "$nlist" - fi - - # Try sorting and uniquifying the output. - if grep -v "^: " < "$nlist" | - if sort -k 3 /dev/null 2>&1; then - sort -k 3 - else - sort +2 - fi | - uniq > "$nlist"S; then - : - else - grep -v "^: " < "$nlist" > "$nlist"S - fi - - if test -f "$nlist"S; then - eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$dlsyms"' - else - $echo '/* NONE */' >> "$output_objdir/$dlsyms" - fi - - $echo >> "$output_objdir/$dlsyms" "\ - -#undef lt_preloaded_symbols - -#if defined (__STDC__) && __STDC__ -# define lt_ptr void * -#else -# define lt_ptr char * -# define const -#endif - -/* The mapping between symbol names and symbols. */ -" - - case $host in - *cygwin* | *mingw* ) - $echo >> "$output_objdir/$dlsyms" "\ -/* DATA imports from DLLs on WIN32 can't be const, because - runtime relocations are performed -- see ld's documentation - on pseudo-relocs */ -struct { -" - ;; - * ) - $echo >> "$output_objdir/$dlsyms" "\ -const struct { -" - ;; - esac - - - $echo >> "$output_objdir/$dlsyms" "\ - const char *name; - lt_ptr address; -} -lt_preloaded_symbols[] = -{\ -" - - eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$dlsyms" - - $echo >> "$output_objdir/$dlsyms" "\ - {0, (lt_ptr) 0} -}; - -/* This works around a problem in FreeBSD linker */ -#ifdef FREEBSD_WORKAROUND -static const void *lt_preloaded_setup() { - return lt_preloaded_symbols; -} -#endif - -#ifdef __cplusplus -} -#endif\ -" - fi - - pic_flag_for_symtable= - case $host in - # compiling the symbol table file with pic_flag works around - # a FreeBSD bug that causes programs to crash when -lm is - # linked before any other PIC object. But we must not use - # pic_flag when linking with -static. The problem exists in - # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. - *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) - case "$compile_command " in - *" -static "*) ;; - *) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND";; - esac;; - *-*-hpux*) - case "$compile_command " in - *" -static "*) ;; - *) pic_flag_for_symtable=" $pic_flag";; - esac - esac - - # Now compile the dynamic symbol file. - $show "(cd $output_objdir && $LTCC $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")" - $run eval '(cd $output_objdir && $LTCC $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $? - - # Clean up the generated files. - $show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T" - $run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T" - - # Transform the symbol file into the correct name. - case $host in - *cygwin* | *mingw* ) - if test -f "$output_objdir/${outputname}.def" ; then - compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%"` - finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%"` - else - compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` - finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` - fi - ;; - * ) - compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` - finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` - ;; - esac - ;; - *) - $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2 - exit $EXIT_FAILURE - ;; - esac - else - # We keep going just in case the user didn't refer to - # lt_preloaded_symbols. The linker will fail if global_symbol_pipe - # really was required. - - # Nullify the symbol file. - compile_command=`$echo "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"` - finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"` - fi - - if test "$need_relink" = no || test "$build_libtool_libs" != yes; then - # Replace the output file specification. - compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` - link_command="$compile_command$compile_rpath" - - # We have no uninstalled library dependencies, so finalize right now. - $show "$link_command" - $run eval "$link_command" - exit_status=$? - - # Delete the generated files. - if test -n "$dlsyms"; then - $show "$rm $output_objdir/${outputname}S.${objext}" - $run $rm "$output_objdir/${outputname}S.${objext}" - fi - - exit $exit_status - fi - - if test -n "$shlibpath_var"; then - # We should set the shlibpath_var - rpath= - for dir in $temp_rpath; do - case $dir in - [\\/]* | [A-Za-z]:[\\/]*) - # Absolute path. - rpath="$rpath$dir:" - ;; - *) - # Relative path: add a thisdir entry. - rpath="$rpath\$thisdir/$dir:" - ;; - esac - done - temp_rpath="$rpath" - fi - - if test -n "$compile_shlibpath$finalize_shlibpath"; then - compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command" - fi - if test -n "$finalize_shlibpath"; then - finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command" - fi - - compile_var= - finalize_var= - if test -n "$runpath_var"; then - if test -n "$perm_rpath"; then - # We should set the runpath_var. - rpath= - for dir in $perm_rpath; do - rpath="$rpath$dir:" - done - compile_var="$runpath_var=\"$rpath\$$runpath_var\" " - fi - if test -n "$finalize_perm_rpath"; then - # We should set the runpath_var. - rpath= - for dir in $finalize_perm_rpath; do - rpath="$rpath$dir:" - done - finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " - fi - fi - - if test "$no_install" = yes; then - # We don't need to create a wrapper script. - link_command="$compile_var$compile_command$compile_rpath" - # Replace the output file specification. - link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` - # Delete the old output file. - $run $rm $output - # Link the executable and exit - $show "$link_command" - $run eval "$link_command" || exit $? - exit $EXIT_SUCCESS - fi - - if test "$hardcode_action" = relink; then - # Fast installation is not supported - link_command="$compile_var$compile_command$compile_rpath" - relink_command="$finalize_var$finalize_command$finalize_rpath" - - $echo "$modename: warning: this platform does not like uninstalled shared libraries" 1>&2 - $echo "$modename: \`$output' will be relinked during installation" 1>&2 - else - if test "$fast_install" != no; then - link_command="$finalize_var$compile_command$finalize_rpath" - if test "$fast_install" = yes; then - relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'` - else - # fast_install is set to needless - relink_command= - fi - else - link_command="$compile_var$compile_command$compile_rpath" - relink_command="$finalize_var$finalize_command$finalize_rpath" - fi - fi - - # Replace the output file specification. - link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` - - # Delete the old output files. - $run $rm $output $output_objdir/$outputname $output_objdir/lt-$outputname - - $show "$link_command" - $run eval "$link_command" || exit $? - - # Now create the wrapper script. - $show "creating $output" - - # Quote the relink command for shipping. - if test -n "$relink_command"; then - # Preserve any variables that may affect compiler behavior - for var in $variables_saved_for_relink; do - if eval test -z \"\${$var+set}\"; then - relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command" - elif eval var_value=\$$var; test -z "$var_value"; then - relink_command="$var=; export $var; $relink_command" - else - var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"` - relink_command="$var=\"$var_value\"; export $var; $relink_command" - fi - done - relink_command="(cd `pwd`; $relink_command)" - relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"` - fi - - # Quote $echo for shipping. - if test "X$echo" = "X$SHELL $progpath --fallback-echo"; then - case $progpath in - [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";; - *) qecho="$SHELL `pwd`/$progpath --fallback-echo";; - esac - qecho=`$echo "X$qecho" | $Xsed -e "$sed_quote_subst"` - else - qecho=`$echo "X$echo" | $Xsed -e "$sed_quote_subst"` - fi - - # Only actually do things if our run command is non-null. - if test -z "$run"; then - # win32 will think the script is a binary if it has - # a .exe suffix, so we strip it off here. - case $output in - *.exe) output=`$echo $output|${SED} 's,.exe$,,'` ;; - esac - # test for cygwin because mv fails w/o .exe extensions - case $host in - *cygwin*) - exeext=.exe - outputname=`$echo $outputname|${SED} 's,.exe$,,'` ;; - *) exeext= ;; - esac - case $host in - *cygwin* | *mingw* ) - output_name=`basename $output` - output_path=`dirname $output` - cwrappersource="$output_path/$objdir/lt-$output_name.c" - cwrapper="$output_path/$output_name.exe" - $rm $cwrappersource $cwrapper - trap "$rm $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 - - cat > $cwrappersource <> $cwrappersource<<"EOF" -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#if defined(PATH_MAX) -# define LT_PATHMAX PATH_MAX -#elif defined(MAXPATHLEN) -# define LT_PATHMAX MAXPATHLEN -#else -# define LT_PATHMAX 1024 -#endif - -#ifndef DIR_SEPARATOR -# define DIR_SEPARATOR '/' -# define PATH_SEPARATOR ':' -#endif - -#if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \ - defined (__OS2__) -# define HAVE_DOS_BASED_FILE_SYSTEM -# ifndef DIR_SEPARATOR_2 -# define DIR_SEPARATOR_2 '\\' -# endif -# ifndef PATH_SEPARATOR_2 -# define PATH_SEPARATOR_2 ';' -# endif -#endif - -#ifndef DIR_SEPARATOR_2 -# define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR) -#else /* DIR_SEPARATOR_2 */ -# define IS_DIR_SEPARATOR(ch) \ - (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2)) -#endif /* DIR_SEPARATOR_2 */ - -#ifndef PATH_SEPARATOR_2 -# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR) -#else /* PATH_SEPARATOR_2 */ -# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2) -#endif /* PATH_SEPARATOR_2 */ - -#define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) -#define XFREE(stale) do { \ - if (stale) { free ((void *) stale); stale = 0; } \ -} while (0) - -/* -DDEBUG is fairly common in CFLAGS. */ -#undef DEBUG -#if defined DEBUGWRAPPER -# define DEBUG(format, ...) fprintf(stderr, format, __VA_ARGS__) -#else -# define DEBUG(format, ...) -#endif - -const char *program_name = NULL; - -void * xmalloc (size_t num); -char * xstrdup (const char *string); -const char * base_name (const char *name); -char * find_executable(const char *wrapper); -int check_executable(const char *path); -char * strendzap(char *str, const char *pat); -void lt_fatal (const char *message, ...); - -int -main (int argc, char *argv[]) -{ - char **newargz; - int i; - - program_name = (char *) xstrdup (base_name (argv[0])); - DEBUG("(main) argv[0] : %s\n",argv[0]); - DEBUG("(main) program_name : %s\n",program_name); - newargz = XMALLOC(char *, argc+2); -EOF - - cat >> $cwrappersource <> $cwrappersource <<"EOF" - newargz[1] = find_executable(argv[0]); - if (newargz[1] == NULL) - lt_fatal("Couldn't find %s", argv[0]); - DEBUG("(main) found exe at : %s\n",newargz[1]); - /* we know the script has the same name, without the .exe */ - /* so make sure newargz[1] doesn't end in .exe */ - strendzap(newargz[1],".exe"); - for (i = 1; i < argc; i++) - newargz[i+1] = xstrdup(argv[i]); - newargz[argc+1] = NULL; - - for (i=0; i> $cwrappersource <> $cwrappersource <> $cwrappersource <<"EOF" - return 127; -} - -void * -xmalloc (size_t num) -{ - void * p = (void *) malloc (num); - if (!p) - lt_fatal ("Memory exhausted"); - - return p; -} - -char * -xstrdup (const char *string) -{ - return string ? strcpy ((char *) xmalloc (strlen (string) + 1), string) : NULL -; -} - -const char * -base_name (const char *name) -{ - const char *base; - -#if defined (HAVE_DOS_BASED_FILE_SYSTEM) - /* Skip over the disk name in MSDOS pathnames. */ - if (isalpha ((unsigned char)name[0]) && name[1] == ':') - name += 2; -#endif - - for (base = name; *name; name++) - if (IS_DIR_SEPARATOR (*name)) - base = name + 1; - return base; -} - -int -check_executable(const char * path) -{ - struct stat st; - - DEBUG("(check_executable) : %s\n", path ? (*path ? path : "EMPTY!") : "NULL!"); - if ((!path) || (!*path)) - return 0; - - if ((stat (path, &st) >= 0) && - ( - /* MinGW & native WIN32 do not support S_IXOTH or S_IXGRP */ -#if defined (S_IXOTH) - ((st.st_mode & S_IXOTH) == S_IXOTH) || -#endif -#if defined (S_IXGRP) - ((st.st_mode & S_IXGRP) == S_IXGRP) || -#endif - ((st.st_mode & S_IXUSR) == S_IXUSR)) - ) - return 1; - else - return 0; -} - -/* Searches for the full path of the wrapper. Returns - newly allocated full path name if found, NULL otherwise */ -char * -find_executable (const char* wrapper) -{ - int has_slash = 0; - const char* p; - const char* p_next; - /* static buffer for getcwd */ - char tmp[LT_PATHMAX + 1]; - int tmp_len; - char* concat_name; - - DEBUG("(find_executable) : %s\n", wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!"); - - if ((wrapper == NULL) || (*wrapper == '\0')) - return NULL; - - /* Absolute path? */ -#if defined (HAVE_DOS_BASED_FILE_SYSTEM) - if (isalpha ((unsigned char)wrapper[0]) && wrapper[1] == ':') - { - concat_name = xstrdup (wrapper); - if (check_executable(concat_name)) - return concat_name; - XFREE(concat_name); - } - else - { -#endif - if (IS_DIR_SEPARATOR (wrapper[0])) - { - concat_name = xstrdup (wrapper); - if (check_executable(concat_name)) - return concat_name; - XFREE(concat_name); - } -#if defined (HAVE_DOS_BASED_FILE_SYSTEM) - } -#endif - - for (p = wrapper; *p; p++) - if (*p == '/') - { - has_slash = 1; - break; - } - if (!has_slash) - { - /* no slashes; search PATH */ - const char* path = getenv ("PATH"); - if (path != NULL) - { - for (p = path; *p; p = p_next) - { - const char* q; - size_t p_len; - for (q = p; *q; q++) - if (IS_PATH_SEPARATOR(*q)) - break; - p_len = q - p; - p_next = (*q == '\0' ? q : q + 1); - if (p_len == 0) - { - /* empty path: current directory */ - if (getcwd (tmp, LT_PATHMAX) == NULL) - lt_fatal ("getcwd failed"); - tmp_len = strlen(tmp); - concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1); - memcpy (concat_name, tmp, tmp_len); - concat_name[tmp_len] = '/'; - strcpy (concat_name + tmp_len + 1, wrapper); - } - else - { - concat_name = XMALLOC(char, p_len + 1 + strlen(wrapper) + 1); - memcpy (concat_name, p, p_len); - concat_name[p_len] = '/'; - strcpy (concat_name + p_len + 1, wrapper); - } - if (check_executable(concat_name)) - return concat_name; - XFREE(concat_name); - } - } - /* not found in PATH; assume curdir */ - } - /* Relative path | not found in path: prepend cwd */ - if (getcwd (tmp, LT_PATHMAX) == NULL) - lt_fatal ("getcwd failed"); - tmp_len = strlen(tmp); - concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1); - memcpy (concat_name, tmp, tmp_len); - concat_name[tmp_len] = '/'; - strcpy (concat_name + tmp_len + 1, wrapper); - - if (check_executable(concat_name)) - return concat_name; - XFREE(concat_name); - return NULL; -} - -char * -strendzap(char *str, const char *pat) -{ - size_t len, patlen; - - assert(str != NULL); - assert(pat != NULL); - - len = strlen(str); - patlen = strlen(pat); - - if (patlen <= len) - { - str += len - patlen; - if (strcmp(str, pat) == 0) - *str = '\0'; - } - return str; -} - -static void -lt_error_core (int exit_status, const char * mode, - const char * message, va_list ap) -{ - fprintf (stderr, "%s: %s: ", program_name, mode); - vfprintf (stderr, message, ap); - fprintf (stderr, ".\n"); - - if (exit_status >= 0) - exit (exit_status); -} - -void -lt_fatal (const char *message, ...) -{ - va_list ap; - va_start (ap, message); - lt_error_core (EXIT_FAILURE, "FATAL", message, ap); - va_end (ap); -} -EOF - # we should really use a build-platform specific compiler - # here, but OTOH, the wrappers (shell script and this C one) - # are only useful if you want to execute the "real" binary. - # Since the "real" binary is built for $host, then this - # wrapper might as well be built for $host, too. - $run $LTCC $LTCFLAGS -s -o $cwrapper $cwrappersource - ;; - esac - $rm $output - trap "$rm $output; exit $EXIT_FAILURE" 1 2 15 - - $echo > $output "\ -#! $SHELL - -# $output - temporary wrapper script for $objdir/$outputname -# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP -# -# The $output program cannot be directly executed until all the libtool -# libraries that it depends on are installed. -# -# This wrapper script should never be moved out of the build directory. -# If it is, it will not operate correctly. - -# Sed substitution that helps us do robust quoting. It backslashifies -# metacharacters that are still active within double-quoted strings. -Xsed='${SED} -e 1s/^X//' -sed_quote_subst='$sed_quote_subst' - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -relink_command=\"$relink_command\" - -# This environment variable determines our operation mode. -if test \"\$libtool_install_magic\" = \"$magic\"; then - # install mode needs the following variable: - notinst_deplibs='$notinst_deplibs' -else - # When we are sourced in execute mode, \$file and \$echo are already set. - if test \"\$libtool_execute_magic\" != \"$magic\"; then - echo=\"$qecho\" - file=\"\$0\" - # Make sure echo works. - if test \"X\$1\" = X--no-reexec; then - # Discard the --no-reexec flag, and continue. - shift - elif test \"X\`(\$echo '\t') 2>/dev/null\`\" = 'X\t'; then - # Yippee, \$echo works! - : - else - # Restart under the correct shell, and then maybe \$echo will work. - exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"} - fi - fi\ -" - $echo >> $output "\ - - # Find the directory that this script lives in. - thisdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\` - test \"x\$thisdir\" = \"x\$file\" && thisdir=. - - # Follow symbolic links until we get to the real thisdir. - file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\` - while test -n \"\$file\"; do - destdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\` - - # If there was a directory component, then change thisdir. - if test \"x\$destdir\" != \"x\$file\"; then - case \"\$destdir\" in - [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;; - *) thisdir=\"\$thisdir/\$destdir\" ;; - esac - fi - - file=\`\$echo \"X\$file\" | \$Xsed -e 's%^.*/%%'\` - file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\` - done - - # Try to get the absolute directory name. - absdir=\`cd \"\$thisdir\" && pwd\` - test -n \"\$absdir\" && thisdir=\"\$absdir\" -" - - if test "$fast_install" = yes; then - $echo >> $output "\ - program=lt-'$outputname'$exeext - progdir=\"\$thisdir/$objdir\" - - if test ! -f \"\$progdir/\$program\" || \\ - { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\ - test \"X\$file\" != \"X\$progdir/\$program\"; }; then - - file=\"\$\$-\$program\" - - if test ! -d \"\$progdir\"; then - $mkdir \"\$progdir\" - else - $rm \"\$progdir/\$file\" - fi" - - $echo >> $output "\ - - # relink executable if necessary - if test -n \"\$relink_command\"; then - if relink_command_output=\`eval \$relink_command 2>&1\`; then : - else - $echo \"\$relink_command_output\" >&2 - $rm \"\$progdir/\$file\" - exit $EXIT_FAILURE - fi - fi - - $mv \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || - { $rm \"\$progdir/\$program\"; - $mv \"\$progdir/\$file\" \"\$progdir/\$program\"; } - $rm \"\$progdir/\$file\" - fi" - else - $echo >> $output "\ - program='$outputname' - progdir=\"\$thisdir/$objdir\" -" - fi - - $echo >> $output "\ - - if test -f \"\$progdir/\$program\"; then" - - # Export our shlibpath_var if we have one. - if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then - $echo >> $output "\ - # Add our own library path to $shlibpath_var - $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" - - # Some systems cannot cope with colon-terminated $shlibpath_var - # The second colon is a workaround for a bug in BeOS R4 sed - $shlibpath_var=\`\$echo \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\` - - export $shlibpath_var -" - fi - - # fixup the dll searchpath if we need to. - if test -n "$dllsearchpath"; then - $echo >> $output "\ - # Add the dll search path components to the executable PATH - PATH=$dllsearchpath:\$PATH -" - fi - - $echo >> $output "\ - if test \"\$libtool_execute_magic\" != \"$magic\"; then - # Run the actual program with our arguments. -" - case $host in - # Backslashes separate directories on plain windows - *-*-mingw | *-*-os2*) - $echo >> $output "\ - exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} -" - ;; - - *) - $echo >> $output "\ - exec \"\$progdir/\$program\" \${1+\"\$@\"} -" - ;; - esac - $echo >> $output "\ - \$echo \"\$0: cannot exec \$program \${1+\"\$@\"}\" - exit $EXIT_FAILURE - fi - else - # The program doesn't exist. - \$echo \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2 - \$echo \"This script is just a wrapper for \$program.\" 1>&2 - $echo \"See the $PACKAGE documentation for more information.\" 1>&2 - exit $EXIT_FAILURE - fi -fi\ -" - chmod +x $output - fi - exit $EXIT_SUCCESS - ;; - esac - - # See if we need to build an old-fashioned archive. - for oldlib in $oldlibs; do - - if test "$build_libtool_libs" = convenience; then - oldobjs="$libobjs_save" - addlibs="$convenience" - build_libtool_libs=no - else - if test "$build_libtool_libs" = module; then - oldobjs="$libobjs_save" - build_libtool_libs=no - else - oldobjs="$old_deplibs $non_pic_objects" - fi - addlibs="$old_convenience" - fi - - if test -n "$addlibs"; then - gentop="$output_objdir/${outputname}x" - generated="$generated $gentop" - - func_extract_archives $gentop $addlibs - oldobjs="$oldobjs $func_extract_archives_result" - fi - - # Do each command in the archive commands. - if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then - cmds=$old_archive_from_new_cmds - else - # POSIX demands no paths to be encoded in archives. We have - # to avoid creating archives with duplicate basenames if we - # might have to extract them afterwards, e.g., when creating a - # static archive out of a convenience library, or when linking - # the entirety of a libtool archive into another (currently - # not supported by libtool). - if (for obj in $oldobjs - do - $echo "X$obj" | $Xsed -e 's%^.*/%%' - done | sort | sort -uc >/dev/null 2>&1); then - : - else - $echo "copying selected object files to avoid basename conflicts..." - - if test -z "$gentop"; then - gentop="$output_objdir/${outputname}x" - generated="$generated $gentop" - - $show "${rm}r $gentop" - $run ${rm}r "$gentop" - $show "$mkdir $gentop" - $run $mkdir "$gentop" - exit_status=$? - if test "$exit_status" -ne 0 && test ! -d "$gentop"; then - exit $exit_status - fi - fi - - save_oldobjs=$oldobjs - oldobjs= - counter=1 - for obj in $save_oldobjs - do - objbase=`$echo "X$obj" | $Xsed -e 's%^.*/%%'` - case " $oldobjs " in - " ") oldobjs=$obj ;; - *[\ /]"$objbase "*) - while :; do - # Make sure we don't pick an alternate name that also - # overlaps. - newobj=lt$counter-$objbase - counter=`expr $counter + 1` - case " $oldobjs " in - *[\ /]"$newobj "*) ;; - *) if test ! -f "$gentop/$newobj"; then break; fi ;; - esac - done - $show "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" - $run ln "$obj" "$gentop/$newobj" || - $run cp "$obj" "$gentop/$newobj" - oldobjs="$oldobjs $gentop/$newobj" - ;; - *) oldobjs="$oldobjs $obj" ;; - esac - done - fi - - eval cmds=\"$old_archive_cmds\" - - if len=`expr "X$cmds" : ".*"` && - test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then - cmds=$old_archive_cmds - else - # the command line is too long to link in one step, link in parts - $echo "using piecewise archive linking..." - save_RANLIB=$RANLIB - RANLIB=: - objlist= - concat_cmds= - save_oldobjs=$oldobjs - - # Is there a better way of finding the last object in the list? - for obj in $save_oldobjs - do - last_oldobj=$obj - done - for obj in $save_oldobjs - do - oldobjs="$objlist $obj" - objlist="$objlist $obj" - eval test_cmds=\"$old_archive_cmds\" - if len=`expr "X$test_cmds" : ".*" 2>/dev/null` && - test "$len" -le "$max_cmd_len"; then - : - else - # the above command should be used before it gets too long - oldobjs=$objlist - if test "$obj" = "$last_oldobj" ; then - RANLIB=$save_RANLIB - fi - test -z "$concat_cmds" || concat_cmds=$concat_cmds~ - eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\" - objlist= - fi - done - RANLIB=$save_RANLIB - oldobjs=$objlist - if test "X$oldobjs" = "X" ; then - eval cmds=\"\$concat_cmds\" - else - eval cmds=\"\$concat_cmds~\$old_archive_cmds\" - fi - fi - fi - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - eval cmd=\"$cmd\" - IFS="$save_ifs" - $show "$cmd" - $run eval "$cmd" || exit $? - done - IFS="$save_ifs" - done - - if test -n "$generated"; then - $show "${rm}r$generated" - $run ${rm}r$generated - fi - - # Now create the libtool archive. - case $output in - *.la) - old_library= - test "$build_old_libs" = yes && old_library="$libname.$libext" - $show "creating $output" - - # Preserve any variables that may affect compiler behavior - for var in $variables_saved_for_relink; do - if eval test -z \"\${$var+set}\"; then - relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command" - elif eval var_value=\$$var; test -z "$var_value"; then - relink_command="$var=; export $var; $relink_command" - else - var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"` - relink_command="$var=\"$var_value\"; export $var; $relink_command" - fi - done - # Quote the link command for shipping. - relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" - relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"` - if test "$hardcode_automatic" = yes ; then - relink_command= - fi - - - # Only create the output if not a dry run. - if test -z "$run"; then - for installed in no yes; do - if test "$installed" = yes; then - if test -z "$install_libdir"; then - break - fi - output="$output_objdir/$outputname"i - # Replace all uninstalled libtool libraries with the installed ones - newdependency_libs= - for deplib in $dependency_libs; do - case $deplib in - *.la) - name=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'` - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` - if test -z "$libdir"; then - $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2 - exit $EXIT_FAILURE - fi - newdependency_libs="$newdependency_libs $libdir/$name" - ;; - *) newdependency_libs="$newdependency_libs $deplib" ;; - esac - done - dependency_libs="$newdependency_libs" - newdlfiles= - for lib in $dlfiles; do - name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` - if test -z "$libdir"; then - $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 - exit $EXIT_FAILURE - fi - newdlfiles="$newdlfiles $libdir/$name" - done - dlfiles="$newdlfiles" - newdlprefiles= - for lib in $dlprefiles; do - name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` - if test -z "$libdir"; then - $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 - exit $EXIT_FAILURE - fi - newdlprefiles="$newdlprefiles $libdir/$name" - done - dlprefiles="$newdlprefiles" - else - newdlfiles= - for lib in $dlfiles; do - case $lib in - [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; - *) abs=`pwd`"/$lib" ;; - esac - newdlfiles="$newdlfiles $abs" - done - dlfiles="$newdlfiles" - newdlprefiles= - for lib in $dlprefiles; do - case $lib in - [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; - *) abs=`pwd`"/$lib" ;; - esac - newdlprefiles="$newdlprefiles $abs" - done - dlprefiles="$newdlprefiles" - fi - $rm $output - # place dlname in correct position for cygwin - tdlname=$dlname - case $host,$output,$installed,$module,$dlname in - *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;; - esac - $echo > $output "\ -# $outputname - a libtool library file -# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP -# -# Please DO NOT delete this file! -# It is necessary for linking the library. - -# The name that we can dlopen(3). -dlname='$tdlname' - -# Names of this library. -library_names='$library_names' - -# The name of the static archive. -old_library='$old_library' - -# Libraries that this one depends upon. -dependency_libs='$dependency_libs' - -# Version information for $libname. -current=$current -age=$age -revision=$revision - -# Is this an already installed library? -installed=$installed - -# Should we warn about portability when linking against -modules? -shouldnotlink=$module - -# Files to dlopen/dlpreopen -dlopen='$dlfiles' -dlpreopen='$dlprefiles' - -# Directory that this library needs to be installed in: -libdir='$install_libdir'" - if test "$installed" = no && test "$need_relink" = yes; then - $echo >> $output "\ -relink_command=\"$relink_command\"" - fi - done - fi - - # Do a symbolic link so that the libtool archive can be found in - # LD_LIBRARY_PATH before the program is installed. - $show "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)" - $run eval '(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)' || exit $? - ;; - esac - exit $EXIT_SUCCESS - ;; - - # libtool install mode - install) - modename="$modename: install" - - # There may be an optional sh(1) argument at the beginning of - # install_prog (especially on Windows NT). - if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh || - # Allow the use of GNU shtool's install command. - $echo "X$nonopt" | grep shtool > /dev/null; then - # Aesthetically quote it. - arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"` - case $arg in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - arg="\"$arg\"" - ;; - esac - install_prog="$arg " - arg="$1" - shift - else - install_prog= - arg=$nonopt - fi - - # The real first argument should be the name of the installation program. - # Aesthetically quote it. - arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` - case $arg in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - arg="\"$arg\"" - ;; - esac - install_prog="$install_prog$arg" - - # We need to accept at least all the BSD install flags. - dest= - files= - opts= - prev= - install_type= - isdir=no - stripme= - for arg - do - if test -n "$dest"; then - files="$files $dest" - dest=$arg - continue - fi - - case $arg in - -d) isdir=yes ;; - -f) - case " $install_prog " in - *[\\\ /]cp\ *) ;; - *) prev=$arg ;; - esac - ;; - -g | -m | -o) prev=$arg ;; - -s) - stripme=" -s" - continue - ;; - -*) - ;; - *) - # If the previous option needed an argument, then skip it. - if test -n "$prev"; then - prev= - else - dest=$arg - continue - fi - ;; - esac - - # Aesthetically quote the argument. - arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` - case $arg in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - arg="\"$arg\"" - ;; - esac - install_prog="$install_prog $arg" - done - - if test -z "$install_prog"; then - $echo "$modename: you must specify an install program" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - fi - - if test -n "$prev"; then - $echo "$modename: the \`$prev' option requires an argument" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - fi - - if test -z "$files"; then - if test -z "$dest"; then - $echo "$modename: no file or destination specified" 1>&2 - else - $echo "$modename: you must specify a destination" 1>&2 - fi - $echo "$help" 1>&2 - exit $EXIT_FAILURE - fi - - # Strip any trailing slash from the destination. - dest=`$echo "X$dest" | $Xsed -e 's%/$%%'` - - # Check to see that the destination is a directory. - test -d "$dest" && isdir=yes - if test "$isdir" = yes; then - destdir="$dest" - destname= - else - destdir=`$echo "X$dest" | $Xsed -e 's%/[^/]*$%%'` - test "X$destdir" = "X$dest" && destdir=. - destname=`$echo "X$dest" | $Xsed -e 's%^.*/%%'` - - # Not a directory, so check to see that there is only one file specified. - set dummy $files - if test "$#" -gt 2; then - $echo "$modename: \`$dest' is not a directory" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - fi - fi - case $destdir in - [\\/]* | [A-Za-z]:[\\/]*) ;; - *) - for file in $files; do - case $file in - *.lo) ;; - *) - $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - ;; - esac - done - ;; - esac - - # This variable tells wrapper scripts just to set variables rather - # than running their programs. - libtool_install_magic="$magic" - - staticlibs= - future_libdirs= - current_libdirs= - for file in $files; do - - # Do each installation. - case $file in - *.$libext) - # Do the static libraries later. - staticlibs="$staticlibs $file" - ;; - - *.la) - # Check to see that this really is a libtool archive. - if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : - else - $echo "$modename: \`$file' is not a valid libtool archive" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - fi - - library_names= - old_library= - relink_command= - # If there is no directory component, then add one. - case $file in - */* | *\\*) . $file ;; - *) . ./$file ;; - esac - - # Add the libdir to current_libdirs if it is the destination. - if test "X$destdir" = "X$libdir"; then - case "$current_libdirs " in - *" $libdir "*) ;; - *) current_libdirs="$current_libdirs $libdir" ;; - esac - else - # Note the libdir as a future libdir. - case "$future_libdirs " in - *" $libdir "*) ;; - *) future_libdirs="$future_libdirs $libdir" ;; - esac - fi - - dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`/ - test "X$dir" = "X$file/" && dir= - dir="$dir$objdir" - - if test -n "$relink_command"; then - # Determine the prefix the user has applied to our future dir. - inst_prefix_dir=`$echo "$destdir" | $SED "s%$libdir\$%%"` - - # Don't allow the user to place us outside of our expected - # location b/c this prevents finding dependent libraries that - # are installed to the same prefix. - # At present, this check doesn't affect windows .dll's that - # are installed into $libdir/../bin (currently, that works fine) - # but it's something to keep an eye on. - if test "$inst_prefix_dir" = "$destdir"; then - $echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2 - exit $EXIT_FAILURE - fi - - if test -n "$inst_prefix_dir"; then - # Stick the inst_prefix_dir data into the link command. - relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"` - else - relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%%"` - fi - - $echo "$modename: warning: relinking \`$file'" 1>&2 - $show "$relink_command" - if $run eval "$relink_command"; then : - else - $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2 - exit $EXIT_FAILURE - fi - fi - - # See the names of the shared library. - set dummy $library_names - if test -n "$2"; then - realname="$2" - shift - shift - - srcname="$realname" - test -n "$relink_command" && srcname="$realname"T - - # Install the shared library and build the symlinks. - $show "$install_prog $dir/$srcname $destdir/$realname" - $run eval "$install_prog $dir/$srcname $destdir/$realname" || exit $? - if test -n "$stripme" && test -n "$striplib"; then - $show "$striplib $destdir/$realname" - $run eval "$striplib $destdir/$realname" || exit $? - fi - - if test "$#" -gt 0; then - # Delete the old symlinks, and create new ones. - # Try `ln -sf' first, because the `ln' binary might depend on - # the symlink we replace! Solaris /bin/ln does not understand -f, - # so we also need to try rm && ln -s. - for linkname - do - if test "$linkname" != "$realname"; then - $show "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })" - $run eval "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })" - fi - done - fi - - # Do each command in the postinstall commands. - lib="$destdir/$realname" - cmds=$postinstall_cmds - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - $show "$cmd" - $run eval "$cmd" || { - lt_exit=$? - - # Restore the uninstalled library and exit - if test "$mode" = relink; then - $run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)' - fi - - exit $lt_exit - } - done - IFS="$save_ifs" - fi - - # Install the pseudo-library for information purposes. - name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` - instname="$dir/$name"i - $show "$install_prog $instname $destdir/$name" - $run eval "$install_prog $instname $destdir/$name" || exit $? - - # Maybe install the static library, too. - test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library" - ;; - - *.lo) - # Install (i.e. copy) a libtool object. - - # Figure out destination file name, if it wasn't already specified. - if test -n "$destname"; then - destfile="$destdir/$destname" - else - destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'` - destfile="$destdir/$destfile" - fi - - # Deduce the name of the destination old-style object file. - case $destfile in - *.lo) - staticdest=`$echo "X$destfile" | $Xsed -e "$lo2o"` - ;; - *.$objext) - staticdest="$destfile" - destfile= - ;; - *) - $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - ;; - esac - - # Install the libtool object if requested. - if test -n "$destfile"; then - $show "$install_prog $file $destfile" - $run eval "$install_prog $file $destfile" || exit $? - fi - - # Install the old object if enabled. - if test "$build_old_libs" = yes; then - # Deduce the name of the old-style object file. - staticobj=`$echo "X$file" | $Xsed -e "$lo2o"` - - $show "$install_prog $staticobj $staticdest" - $run eval "$install_prog \$staticobj \$staticdest" || exit $? - fi - exit $EXIT_SUCCESS - ;; - - *) - # Figure out destination file name, if it wasn't already specified. - if test -n "$destname"; then - destfile="$destdir/$destname" - else - destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'` - destfile="$destdir/$destfile" - fi - - # If the file is missing, and there is a .exe on the end, strip it - # because it is most likely a libtool script we actually want to - # install - stripped_ext="" - case $file in - *.exe) - if test ! -f "$file"; then - file=`$echo $file|${SED} 's,.exe$,,'` - stripped_ext=".exe" - fi - ;; - esac - - # Do a test to see if this is really a libtool program. - case $host in - *cygwin*|*mingw*) - wrapper=`$echo $file | ${SED} -e 's,.exe$,,'` - ;; - *) - wrapper=$file - ;; - esac - if (${SED} -e '4q' $wrapper | grep "^# Generated by .*$PACKAGE")>/dev/null 2>&1; then - notinst_deplibs= - relink_command= - - # Note that it is not necessary on cygwin/mingw to append a dot to - # foo even if both foo and FILE.exe exist: automatic-append-.exe - # behavior happens only for exec(3), not for open(2)! Also, sourcing - # `FILE.' does not work on cygwin managed mounts. - # - # If there is no directory component, then add one. - case $wrapper in - */* | *\\*) . ${wrapper} ;; - *) . ./${wrapper} ;; - esac - - # Check the variables that should have been set. - if test -z "$notinst_deplibs"; then - $echo "$modename: invalid libtool wrapper script \`$wrapper'" 1>&2 - exit $EXIT_FAILURE - fi - - finalize=yes - for lib in $notinst_deplibs; do - # Check to see that each library is installed. - libdir= - if test -f "$lib"; then - # If there is no directory component, then add one. - case $lib in - */* | *\\*) . $lib ;; - *) . ./$lib ;; - esac - fi - libfile="$libdir/"`$echo "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test - if test -n "$libdir" && test ! -f "$libfile"; then - $echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2 - finalize=no - fi - done - - relink_command= - # Note that it is not necessary on cygwin/mingw to append a dot to - # foo even if both foo and FILE.exe exist: automatic-append-.exe - # behavior happens only for exec(3), not for open(2)! Also, sourcing - # `FILE.' does not work on cygwin managed mounts. - # - # If there is no directory component, then add one. - case $wrapper in - */* | *\\*) . ${wrapper} ;; - *) . ./${wrapper} ;; - esac - - outputname= - if test "$fast_install" = no && test -n "$relink_command"; then - if test "$finalize" = yes && test -z "$run"; then - tmpdir=`func_mktempdir` - file=`$echo "X$file$stripped_ext" | $Xsed -e 's%^.*/%%'` - outputname="$tmpdir/$file" - # Replace the output file specification. - relink_command=`$echo "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'` - - $show "$relink_command" - if $run eval "$relink_command"; then : - else - $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2 - ${rm}r "$tmpdir" - continue - fi - file="$outputname" - else - $echo "$modename: warning: cannot relink \`$file'" 1>&2 - fi - else - # Install the binary that we compiled earlier. - file=`$echo "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"` - fi - fi - - # remove .exe since cygwin /usr/bin/install will append another - # one anyway - case $install_prog,$host in - */usr/bin/install*,*cygwin*) - case $file:$destfile in - *.exe:*.exe) - # this is ok - ;; - *.exe:*) - destfile=$destfile.exe - ;; - *:*.exe) - destfile=`$echo $destfile | ${SED} -e 's,.exe$,,'` - ;; - esac - ;; - esac - $show "$install_prog$stripme $file $destfile" - $run eval "$install_prog\$stripme \$file \$destfile" || exit $? - test -n "$outputname" && ${rm}r "$tmpdir" - ;; - esac - done - - for file in $staticlibs; do - name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` - - # Set up the ranlib parameters. - oldlib="$destdir/$name" - - $show "$install_prog $file $oldlib" - $run eval "$install_prog \$file \$oldlib" || exit $? - - if test -n "$stripme" && test -n "$old_striplib"; then - $show "$old_striplib $oldlib" - $run eval "$old_striplib $oldlib" || exit $? - fi - - # Do each command in the postinstall commands. - cmds=$old_postinstall_cmds - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - $show "$cmd" - $run eval "$cmd" || exit $? - done - IFS="$save_ifs" - done - - if test -n "$future_libdirs"; then - $echo "$modename: warning: remember to run \`$progname --finish$future_libdirs'" 1>&2 - fi - - if test -n "$current_libdirs"; then - # Maybe just do a dry run. - test -n "$run" && current_libdirs=" -n$current_libdirs" - exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs' - else - exit $EXIT_SUCCESS - fi - ;; - - # libtool finish mode - finish) - modename="$modename: finish" - libdirs="$nonopt" - admincmds= - - if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then - for dir - do - libdirs="$libdirs $dir" - done - - for libdir in $libdirs; do - if test -n "$finish_cmds"; then - # Do each command in the finish commands. - cmds=$finish_cmds - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - $show "$cmd" - $run eval "$cmd" || admincmds="$admincmds - $cmd" - done - IFS="$save_ifs" - fi - if test -n "$finish_eval"; then - # Do the single finish_eval. - eval cmds=\"$finish_eval\" - $run eval "$cmds" || admincmds="$admincmds - $cmds" - fi - done - fi - - # Exit here if they wanted silent mode. - test "$show" = : && exit $EXIT_SUCCESS - - $echo "X----------------------------------------------------------------------" | $Xsed - $echo "Libraries have been installed in:" - for libdir in $libdirs; do - $echo " $libdir" - done - $echo - $echo "If you ever happen to want to link against installed libraries" - $echo "in a given directory, LIBDIR, you must either use libtool, and" - $echo "specify the full pathname of the library, or use the \`-LLIBDIR'" - $echo "flag during linking and do at least one of the following:" - if test -n "$shlibpath_var"; then - $echo " - add LIBDIR to the \`$shlibpath_var' environment variable" - $echo " during execution" - fi - if test -n "$runpath_var"; then - $echo " - add LIBDIR to the \`$runpath_var' environment variable" - $echo " during linking" - fi - if test -n "$hardcode_libdir_flag_spec"; then - libdir=LIBDIR - eval flag=\"$hardcode_libdir_flag_spec\" - - $echo " - use the \`$flag' linker flag" - fi - if test -n "$admincmds"; then - $echo " - have your system administrator run these commands:$admincmds" - fi - if test -f /etc/ld.so.conf; then - $echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" - fi - $echo - $echo "See any operating system documentation about shared libraries for" - $echo "more information, such as the ld(1) and ld.so(8) manual pages." - $echo "X----------------------------------------------------------------------" | $Xsed - exit $EXIT_SUCCESS - ;; - - # libtool execute mode - execute) - modename="$modename: execute" - - # The first argument is the command name. - cmd="$nonopt" - if test -z "$cmd"; then - $echo "$modename: you must specify a COMMAND" 1>&2 - $echo "$help" - exit $EXIT_FAILURE - fi - - # Handle -dlopen flags immediately. - for file in $execute_dlfiles; do - if test ! -f "$file"; then - $echo "$modename: \`$file' is not a file" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - fi - - dir= - case $file in - *.la) - # Check to see that this really is a libtool archive. - if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : - else - $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - fi - - # Read the libtool library. - dlname= - library_names= - - # If there is no directory component, then add one. - case $file in - */* | *\\*) . $file ;; - *) . ./$file ;; - esac - - # Skip this library if it cannot be dlopened. - if test -z "$dlname"; then - # Warn if it was a shared library. - test -n "$library_names" && $echo "$modename: warning: \`$file' was not linked with \`-export-dynamic'" - continue - fi - - dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` - test "X$dir" = "X$file" && dir=. - - if test -f "$dir/$objdir/$dlname"; then - dir="$dir/$objdir" - else - $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2 - exit $EXIT_FAILURE - fi - ;; - - *.lo) - # Just add the directory containing the .lo file. - dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` - test "X$dir" = "X$file" && dir=. - ;; - - *) - $echo "$modename: warning \`-dlopen' is ignored for non-libtool libraries and objects" 1>&2 - continue - ;; - esac - - # Get the absolute pathname. - absdir=`cd "$dir" && pwd` - test -n "$absdir" && dir="$absdir" - - # Now add the directory to shlibpath_var. - if eval "test -z \"\$$shlibpath_var\""; then - eval "$shlibpath_var=\"\$dir\"" - else - eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\"" - fi - done - - # This variable tells wrapper scripts just to set shlibpath_var - # rather than running their programs. - libtool_execute_magic="$magic" - - # Check if any of the arguments is a wrapper script. - args= - for file - do - case $file in - -*) ;; - *) - # Do a test to see if this is really a libtool program. - if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then - # If there is no directory component, then add one. - case $file in - */* | *\\*) . $file ;; - *) . ./$file ;; - esac - - # Transform arg to wrapped name. - file="$progdir/$program" - fi - ;; - esac - # Quote arguments (to preserve shell metacharacters). - file=`$echo "X$file" | $Xsed -e "$sed_quote_subst"` - args="$args \"$file\"" - done - - if test -z "$run"; then - if test -n "$shlibpath_var"; then - # Export the shlibpath_var. - eval "export $shlibpath_var" - fi - - # Restore saved environment variables - if test "${save_LC_ALL+set}" = set; then - LC_ALL="$save_LC_ALL"; export LC_ALL - fi - if test "${save_LANG+set}" = set; then - LANG="$save_LANG"; export LANG - fi - - # Now prepare to actually exec the command. - exec_cmd="\$cmd$args" - else - # Display what would be done. - if test -n "$shlibpath_var"; then - eval "\$echo \"\$shlibpath_var=\$$shlibpath_var\"" - $echo "export $shlibpath_var" - fi - $echo "$cmd$args" - exit $EXIT_SUCCESS - fi - ;; - - # libtool clean and uninstall mode - clean | uninstall) - modename="$modename: $mode" - rm="$nonopt" - files= - rmforce= - exit_status=0 - - # This variable tells wrapper scripts just to set variables rather - # than running their programs. - libtool_install_magic="$magic" - - for arg - do - case $arg in - -f) rm="$rm $arg"; rmforce=yes ;; - -*) rm="$rm $arg" ;; - *) files="$files $arg" ;; - esac - done - - if test -z "$rm"; then - $echo "$modename: you must specify an RM program" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - fi - - rmdirs= - - origobjdir="$objdir" - for file in $files; do - dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` - if test "X$dir" = "X$file"; then - dir=. - objdir="$origobjdir" - else - objdir="$dir/$origobjdir" - fi - name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` - test "$mode" = uninstall && objdir="$dir" - - # Remember objdir for removal later, being careful to avoid duplicates - if test "$mode" = clean; then - case " $rmdirs " in - *" $objdir "*) ;; - *) rmdirs="$rmdirs $objdir" ;; - esac - fi - - # Don't error if the file doesn't exist and rm -f was used. - if (test -L "$file") >/dev/null 2>&1 \ - || (test -h "$file") >/dev/null 2>&1 \ - || test -f "$file"; then - : - elif test -d "$file"; then - exit_status=1 - continue - elif test "$rmforce" = yes; then - continue - fi - - rmfiles="$file" - - case $name in - *.la) - # Possibly a libtool archive, so verify it. - if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then - . $dir/$name - - # Delete the libtool libraries and symlinks. - for n in $library_names; do - rmfiles="$rmfiles $objdir/$n" - done - test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library" - - case "$mode" in - clean) - case " $library_names " in - # " " in the beginning catches empty $dlname - *" $dlname "*) ;; - *) rmfiles="$rmfiles $objdir/$dlname" ;; - esac - test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${name}i" - ;; - uninstall) - if test -n "$library_names"; then - # Do each command in the postuninstall commands. - cmds=$postuninstall_cmds - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - $show "$cmd" - $run eval "$cmd" - if test "$?" -ne 0 && test "$rmforce" != yes; then - exit_status=1 - fi - done - IFS="$save_ifs" - fi - - if test -n "$old_library"; then - # Do each command in the old_postuninstall commands. - cmds=$old_postuninstall_cmds - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - $show "$cmd" - $run eval "$cmd" - if test "$?" -ne 0 && test "$rmforce" != yes; then - exit_status=1 - fi - done - IFS="$save_ifs" - fi - # FIXME: should reinstall the best remaining shared library. - ;; - esac - fi - ;; - - *.lo) - # Possibly a libtool object, so verify it. - if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then - - # Read the .lo file - . $dir/$name - - # Add PIC object to the list of files to remove. - if test -n "$pic_object" \ - && test "$pic_object" != none; then - rmfiles="$rmfiles $dir/$pic_object" - fi - - # Add non-PIC object to the list of files to remove. - if test -n "$non_pic_object" \ - && test "$non_pic_object" != none; then - rmfiles="$rmfiles $dir/$non_pic_object" - fi - fi - ;; - - *) - if test "$mode" = clean ; then - noexename=$name - case $file in - *.exe) - file=`$echo $file|${SED} 's,.exe$,,'` - noexename=`$echo $name|${SED} 's,.exe$,,'` - # $file with .exe has already been added to rmfiles, - # add $file without .exe - rmfiles="$rmfiles $file" - ;; - esac - # Do a test to see if this is a libtool program. - if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then - relink_command= - . $dir/$noexename - - # note $name still contains .exe if it was in $file originally - # as does the version of $file that was added into $rmfiles - rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}" - if test "$fast_install" = yes && test -n "$relink_command"; then - rmfiles="$rmfiles $objdir/lt-$name" - fi - if test "X$noexename" != "X$name" ; then - rmfiles="$rmfiles $objdir/lt-${noexename}.c" - fi - fi - fi - ;; - esac - $show "$rm $rmfiles" - $run $rm $rmfiles || exit_status=1 - done - objdir="$origobjdir" - - # Try to remove the ${objdir}s in the directories where we deleted files - for dir in $rmdirs; do - if test -d "$dir"; then - $show "rmdir $dir" - $run rmdir $dir >/dev/null 2>&1 - fi - done - - exit $exit_status - ;; - - "") - $echo "$modename: you must specify a MODE" 1>&2 - $echo "$generic_help" 1>&2 - exit $EXIT_FAILURE - ;; - esac - - if test -z "$exec_cmd"; then - $echo "$modename: invalid operation mode \`$mode'" 1>&2 - $echo "$generic_help" 1>&2 - exit $EXIT_FAILURE - fi -fi # test -z "$show_help" - -if test -n "$exec_cmd"; then - eval exec $exec_cmd - exit $EXIT_FAILURE -fi - -# We need to display help for each of the modes. -case $mode in -"") $echo \ -"Usage: $modename [OPTION]... [MODE-ARG]... - -Provide generalized library-building support services. - - --config show all configuration variables - --debug enable verbose shell tracing --n, --dry-run display commands without modifying any files - --features display basic configuration information and exit - --finish same as \`--mode=finish' - --help display this help message and exit - --mode=MODE use operation mode MODE [default=inferred from MODE-ARGS] - --quiet same as \`--silent' - --silent don't print informational messages - --tag=TAG use configuration variables from tag TAG - --version print version information - -MODE must be one of the following: - - clean remove files from the build directory - compile compile a source file into a libtool object - execute automatically set library path, then run a program - finish complete the installation of libtool libraries - install install libraries or executables - link create a library or an executable - uninstall remove libraries from an installed directory - -MODE-ARGS vary depending on the MODE. Try \`$modename --help --mode=MODE' for -a more detailed description of MODE. - -Report bugs to ." - exit $EXIT_SUCCESS - ;; - -clean) - $echo \ -"Usage: $modename [OPTION]... --mode=clean RM [RM-OPTION]... FILE... - -Remove files from the build directory. - -RM is the name of the program to use to delete files associated with each FILE -(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed -to RM. - -If FILE is a libtool library, object or program, all the files associated -with it are deleted. Otherwise, only FILE itself is deleted using RM." - ;; - -compile) - $echo \ -"Usage: $modename [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE - -Compile a source file into a libtool library object. - -This mode accepts the following additional options: - - -o OUTPUT-FILE set the output file name to OUTPUT-FILE - -prefer-pic try to building PIC objects only - -prefer-non-pic try to building non-PIC objects only - -static always build a \`.o' file suitable for static linking - -COMPILE-COMMAND is a command to be used in creating a \`standard' object file -from the given SOURCEFILE. - -The output file name is determined by removing the directory component from -SOURCEFILE, then substituting the C source code suffix \`.c' with the -library object suffix, \`.lo'." - ;; - -execute) - $echo \ -"Usage: $modename [OPTION]... --mode=execute COMMAND [ARGS]... - -Automatically set library path, then run a program. - -This mode accepts the following additional options: - - -dlopen FILE add the directory containing FILE to the library path - -This mode sets the library path environment variable according to \`-dlopen' -flags. - -If any of the ARGS are libtool executable wrappers, then they are translated -into their corresponding uninstalled binary, and any of their required library -directories are added to the library path. - -Then, COMMAND is executed, with ARGS as arguments." - ;; - -finish) - $echo \ -"Usage: $modename [OPTION]... --mode=finish [LIBDIR]... - -Complete the installation of libtool libraries. - -Each LIBDIR is a directory that contains libtool libraries. - -The commands that this mode executes may require superuser privileges. Use -the \`--dry-run' option if you just want to see what would be executed." - ;; - -install) - $echo \ -"Usage: $modename [OPTION]... --mode=install INSTALL-COMMAND... - -Install executables or libraries. - -INSTALL-COMMAND is the installation command. The first component should be -either the \`install' or \`cp' program. - -The rest of the components are interpreted as arguments to that command (only -BSD-compatible install options are recognized)." - ;; - -link) - $echo \ -"Usage: $modename [OPTION]... --mode=link LINK-COMMAND... - -Link object files or libraries together to form another library, or to -create an executable program. - -LINK-COMMAND is a command using the C compiler that you would use to create -a program from several object files. - -The following components of LINK-COMMAND are treated specially: - - -all-static do not do any dynamic linking at all - -avoid-version do not add a version suffix if possible - -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime - -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols - -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) - -export-symbols SYMFILE - try to export only the symbols listed in SYMFILE - -export-symbols-regex REGEX - try to export only the symbols matching REGEX - -LLIBDIR search LIBDIR for required installed libraries - -lNAME OUTPUT-FILE requires the installed library libNAME - -module build a library that can dlopened - -no-fast-install disable the fast-install mode - -no-install link a not-installable executable - -no-undefined declare that a library does not refer to external symbols - -o OUTPUT-FILE create OUTPUT-FILE from the specified objects - -objectlist FILE Use a list of object files found in FILE to specify objects - -precious-files-regex REGEX - don't remove output files matching REGEX - -release RELEASE specify package release information - -rpath LIBDIR the created library will eventually be installed in LIBDIR - -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries - -static do not do any dynamic linking of libtool libraries - -version-info CURRENT[:REVISION[:AGE]] - specify library version info [each variable defaults to 0] - -All other options (arguments beginning with \`-') are ignored. - -Every other argument is treated as a filename. Files ending in \`.la' are -treated as uninstalled libtool libraries, other files are standard or library -object files. - -If the OUTPUT-FILE ends in \`.la', then a libtool library is created, -only library objects (\`.lo' files) may be specified, and \`-rpath' is -required, except when creating a convenience library. - -If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created -using \`ar' and \`ranlib', or on Windows using \`lib'. - -If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file -is created, otherwise an executable program is created." - ;; - -uninstall) - $echo \ -"Usage: $modename [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE... - -Remove libraries from an installation directory. - -RM is the name of the program to use to delete files associated with each FILE -(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed -to RM. - -If FILE is a libtool library, all the files associated with it are deleted. -Otherwise, only FILE itself is deleted using RM." - ;; - -*) - $echo "$modename: invalid operation mode \`$mode'" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - ;; -esac - -$echo -$echo "Try \`$modename --help' for more information about other modes." - -exit $? - -# The TAGs below are defined such that we never get into a situation -# in which we disable both kinds of libraries. Given conflicting -# choices, we go for a static library, that is the most portable, -# since we can't tell whether shared libraries were disabled because -# the user asked for that or because the platform doesn't support -# them. This is particularly important on AIX, because we don't -# support having both static and shared libraries enabled at the same -# time on that platform, so we default to a shared-only configuration. -# If a disable-shared tag is given, we'll fallback to a static-only -# configuration. But we'll never go from static-only to shared-only. - -# ### BEGIN LIBTOOL TAG CONFIG: disable-shared -disable_libs=shared -# ### END LIBTOOL TAG CONFIG: disable-shared - -# ### BEGIN LIBTOOL TAG CONFIG: disable-static -disable_libs=static -# ### END LIBTOOL TAG CONFIG: disable-static - -# Local Variables: -# mode:shell-script -# sh-indentation:2 -# End: -# ### BEGIN LIBTOOL TAG CONFIG: CXX - -# Libtool was configured on host pes.vlakno.cz: - -# Shell to use when invoking shell scripts. -SHELL="/bin/sh" - -# Whether or not to build shared libraries. -build_libtool_libs=yes - -# Whether or not to build static libraries. -build_old_libs=yes - -# Whether or not to add -lc for building shared libraries. -build_libtool_need_lc=no - -# Whether or not to disallow shared libs when runtime libs are static -allow_libtool_libs_with_static_runtimes=no - -# Whether or not to optimize for fast installation. -fast_install=needless - -# The host system. -host_alias= -host=x86_64-unknown-freebsd7.2 -host_os=freebsd7.2 - -# The build system. -build_alias= -build=x86_64-unknown-freebsd7.2 -build_os=freebsd7.2 - -# An echo program that does not interpret backslashes. -echo="echo" - -# The archiver. -AR="ar" -AR_FLAGS="cru" - -# A C compiler. -LTCC="gcc" - -# LTCC compiler flags. -LTCFLAGS="-g -O2" - -# A language-specific compiler. -CC="g++" - -# Is the compiler the GNU C compiler? -with_gcc=yes - -# An ERE matcher. -EGREP="/usr/bin/grep -E" - -# The linker used to build libraries. -LD="/usr/bin/ld" - -# Whether we need hard or soft links. -LN_S="ln -s" - -# A BSD-compatible nm program. -NM="/usr/bin/nm -B" - -# A symbol stripping program -STRIP="strip" - -# Used to examine libraries when file_magic_cmd begins "file" -MAGIC_CMD=file - -# Used on cygwin: DLL creation program. -DLLTOOL="dlltool" - -# Used on cygwin: object dumper. -OBJDUMP="objdump" - -# Used on cygwin: assembler. -AS="as" - -# The name of the directory that contains temporary libtool files. -objdir=.libs - -# How to create reloadable object files. -reload_flag=" -r" -reload_cmds="\$LD\$reload_flag -o \$output\$reload_objs" - -# How to pass a linker flag through the compiler. -wl="-Wl," - -# Object file suffix (normally "o"). -objext="o" - -# Old archive suffix (normally "a"). -libext="a" - -# Shared library suffix (normally ".so"). -shrext_cmds='.so' - -# Executable file suffix (normally ""). -exeext="" - -# Additional compiler flags for building library objects. -pic_flag=" -fPIC -DPIC" -pic_mode=default - -# What is the maximum length of a command? -max_cmd_len=196608 - -# Does compiler simultaneously support -c and -o options? -compiler_c_o="yes" - -# Must we lock files when doing compilation? -need_locks="no" - -# Do we need the lib prefix for modules? -need_lib_prefix=no - -# Do we need a version for libraries? -need_version=no - -# Whether dlopen is supported. -dlopen_support=yes - -# Whether dlopen of programs is supported. -dlopen_self=yes - -# Whether dlopen of statically linked programs is supported. -dlopen_self_static=no - -# Compiler flag to prevent dynamic linking. -link_static_flag="-static" - -# Compiler flag to turn off builtin functions. -no_builtin_flag=" -fno-builtin" - -# Compiler flag to allow reflexive dlopens. -export_dynamic_flag_spec="\${wl}--export-dynamic" - -# Compiler flag to generate shared objects directly from archives. -whole_archive_flag_spec="\${wl}--whole-archive\$convenience \${wl}--no-whole-archive" - -# Compiler flag to generate thread-safe objects. -thread_safe_flag_spec="" - -# Library versioning type. -version_type=freebsd-elf - -# Format of library name prefix. -libname_spec="lib\$name" - -# List of archive names. First name is the real one, the rest are links. -# The last name is the one that the linker finds with -lNAME. -library_names_spec="\${libname}\${release}\${shared_ext}\$versuffix \${libname}\${release}\${shared_ext} \$libname\${shared_ext}" - -# The coded name of the library, if different from the real name. -soname_spec="" - -# Commands used to build and install an old-style archive. -RANLIB="ranlib" -old_archive_cmds="\$AR \$AR_FLAGS \$oldlib\$oldobjs\$old_deplibs~\$RANLIB \$oldlib" -old_postinstall_cmds="chmod 644 \$oldlib~\$RANLIB \$oldlib" -old_postuninstall_cmds="" - -# Create an old-style archive from a shared archive. -old_archive_from_new_cmds="" - -# Create a temporary old-style archive to link instead of a shared archive. -old_archive_from_expsyms_cmds="" - -# Commands used to build and install a shared archive. -archive_cmds="\$CC -shared -nostdlib \$predep_objects \$libobjs \$deplibs \$postdep_objects \$compiler_flags \${wl}-soname \$wl\$soname -o \$lib" -archive_expsym_cmds="\$CC -shared -nostdlib \$predep_objects \$libobjs \$deplibs \$postdep_objects \$compiler_flags \${wl}-soname \$wl\$soname \${wl}-retain-symbols-file \$wl\$export_symbols -o \$lib" -postinstall_cmds="" -postuninstall_cmds="" - -# Commands used to build a loadable module (assumed same as above if empty) -module_cmds="" -module_expsym_cmds="" - -# Commands to strip libraries. -old_striplib="strip --strip-debug" -striplib="strip --strip-unneeded" - -# Dependencies to place before the objects being linked to create a -# shared library. -predep_objects="/usr/lib/crti.o /usr/lib/crtbeginS.o" - -# Dependencies to place after the objects being linked to create a -# shared library. -postdep_objects="/usr/lib/crtendS.o /usr/lib/crtn.o" - -# Dependencies to place before the objects being linked to create a -# shared library. -predeps="" - -# Dependencies to place after the objects being linked to create a -# shared library. -postdeps="-lstdc++ -lm -lgcc_s -lc -lgcc_s" - -# The library search path used internally by the compiler when linking -# a shared library. -compiler_lib_search_path="-L/usr/lib -L/usr/lib" - -# Method to check whether dependent libraries are shared objects. -deplibs_check_method="pass_all" - -# Command to use when deplibs_check_method == file_magic. -file_magic_cmd="\$MAGIC_CMD" - -# Flag that allows shared libraries with undefined symbols to be built. -allow_undefined_flag="" - -# Flag that forces no undefined symbols. -no_undefined_flag="" - -# Commands used to finish a libtool library installation in a directory. -finish_cmds="" - -# Same as above, but a single script fragment to be evaled but not shown. -finish_eval="" - -# Take the output of nm and produce a listing of raw symbols and C names. -global_symbol_pipe="sed -n -e 's/^.*[ ]\\([ABCDGIRSTW][ABCDGIRSTW]*\\)[ ][ ]*\\([_A-Za-z][_A-Za-z0-9]*\\)\$/\\1 \\2 \\2/p'" - -# Transform the output of nm in a proper C declaration -global_symbol_to_cdecl="sed -n -e 's/^. .* \\(.*\\)\$/extern int \\1;/p'" - -# Transform the output of nm in a C name address pair -global_symbol_to_c_name_address="sed -n -e 's/^: \\([^ ]*\\) \$/ {\\\"\\1\\\", (lt_ptr) 0},/p' -e 's/^[BCDEGRST] \\([^ ]*\\) \\([^ ]*\\)\$/ {\"\\2\", (lt_ptr) \\&\\2},/p'" - -# This is the shared library runtime path variable. -runpath_var=LD_RUN_PATH - -# This is the shared library path variable. -shlibpath_var=LD_LIBRARY_PATH - -# Is shlibpath searched before the hard-coded library search path? -shlibpath_overrides_runpath=yes - -# How to hardcode a shared library path into an executable. -hardcode_action=immediate - -# Whether we should hardcode library paths into libraries. -hardcode_into_libs=yes - -# Flag to hardcode $libdir into a binary during linking. -# This must work even if $libdir does not exist. -hardcode_libdir_flag_spec="\${wl}--rpath \${wl}\$libdir" - -# If ld is used when linking, flag to hardcode $libdir into -# a binary during linking. This must work even if $libdir does -# not exist. -hardcode_libdir_flag_spec_ld="" - -# Whether we need a single -rpath flag with a separated argument. -hardcode_libdir_separator="" - -# Set to yes if using DIR/libNAME during linking hardcodes DIR into the -# resulting binary. -hardcode_direct=no - -# Set to yes if using the -LDIR flag during linking hardcodes DIR into the -# resulting binary. -hardcode_minus_L=no - -# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into -# the resulting binary. -hardcode_shlibpath_var=unsupported - -# Set to yes if building a shared library automatically hardcodes DIR into the library -# and all subsequent libraries and executables linked against it. -hardcode_automatic=no - -# Variables whose values should be saved in libtool wrapper scripts and -# restored at relink time. -variables_saved_for_relink="PATH LD_LIBRARY_PATH LD_RUN_PATH GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" - -# Whether libtool must link a program against all its dependency libraries. -link_all_deplibs=unknown - -# Compile-time system search path for libraries -sys_lib_search_path_spec=" /usr/lib/ /usr/lib/" - -# Run-time system search path for libraries -sys_lib_dlsearch_path_spec="/lib /usr/lib" - -# Fix the shell variable $srcfile for the compiler. -fix_srcfile_path="" - -# Set to yes if exported symbols are required. -always_export_symbols=no - -# The commands to list exported symbols. -export_symbols_cmds="\$NM \$libobjs \$convenience | \$global_symbol_pipe | \$SED 's/.* //' | sort | uniq > \$export_symbols" - -# The commands to extract the exported symbol list from a shared archive. -extract_expsyms_cmds="" - -# Symbols that should not be listed in the preloaded symbols. -exclude_expsyms="" - -# Symbols that must always be exported. -include_expsyms="" - -# ### END LIBTOOL TAG CONFIG: CXX - diff --git a/runtime/libprofile/BlockProfiling.c b/runtime/libprofile/BlockProfiling.c deleted file mode 100644 index db80bffe56d..00000000000 --- a/runtime/libprofile/BlockProfiling.c +++ /dev/null @@ -1,45 +0,0 @@ -/*===-- BlockProfiling.c - Support library for block profiling ------------===*\ -|* -|* The LLVM Compiler Infrastructure -|* -|* This file is distributed under the University of Illinois Open Source -|* License. See LICENSE.TXT for details. -|* -|*===----------------------------------------------------------------------===*| -|* -|* This file implements the call back routines for the block profiling -|* instrumentation pass. This should be used with the -insert-block-profiling -|* LLVM pass. -|* -\*===----------------------------------------------------------------------===*/ - -#include "Profiling.h" -#include - -static unsigned *ArrayStart; -static unsigned NumElements; - -/* BlockProfAtExitHandler - When the program exits, just write out the profiling - * data. - */ -static void BlockProfAtExitHandler() { - /* Note that if this were doing something more intelligent with the - * instrumentation, we could do some computation here to expand what we - * collected into simple block profiles. (Or we could do it in llvm-prof.) - * Regardless, we directly count each block, so no expansion is necessary. - */ - write_profiling_data(BlockInfo, ArrayStart, NumElements); -} - - -/* llvm_start_block_profiling - This is the main entry point of the block - * profiling library. It is responsible for setting up the atexit handler. - */ -int llvm_start_block_profiling(int argc, const char **argv, - unsigned *arrayStart, unsigned numElements) { - int Ret = save_arguments(argc, argv); - ArrayStart = arrayStart; - NumElements = numElements; - atexit(BlockProfAtExitHandler); - return Ret; -} diff --git a/runtime/libprofile/FunctionProfiling.c b/runtime/libprofile/FunctionProfiling.c deleted file mode 100644 index 24aa2061307..00000000000 --- a/runtime/libprofile/FunctionProfiling.c +++ /dev/null @@ -1,42 +0,0 @@ -/*===-- FunctionProfiling.c - Support library for function profiling ------===*\ -|* -|* The LLVM Compiler Infrastructure -|* -|* This file is distributed under the University of Illinois Open Source -|* License. See LICENSE.TXT for details. -|* -|*===----------------------------------------------------------------------===*| -|* -|* This file implements the call back routines for the function profiling -|* instrumentation pass. This should be used with the -|* -insert-function-profiling LLVM pass. -|* -\*===----------------------------------------------------------------------===*/ - -#include "Profiling.h" -#include - -static unsigned *ArrayStart; -static unsigned NumElements; - -/* FuncProfAtExitHandler - When the program exits, just write out the profiling - * data. - */ -static void FuncProfAtExitHandler() { - /* Just write out the data we collected. - */ - write_profiling_data(FunctionInfo, ArrayStart, NumElements); -} - - -/* llvm_start_func_profiling - This is the main entry point of the function - * profiling library. It is responsible for setting up the atexit handler. - */ -int llvm_start_func_profiling(int argc, const char **argv, - unsigned *arrayStart, unsigned numElements) { - int Ret = save_arguments(argc, argv); - ArrayStart = arrayStart; - NumElements = numElements; - atexit(FuncProfAtExitHandler); - return Ret; -} diff --git a/utils/valgrind/x86_64-pc-linux-gnu_gcc-4.3.3.supp b/utils/valgrind/x86_64-pc-linux-gnu_gcc-4.3.3.supp deleted file mode 100644 index a86be6cb5dd..00000000000 --- a/utils/valgrind/x86_64-pc-linux-gnu_gcc-4.3.3.supp +++ /dev/null @@ -1,23 +0,0 @@ -{ - libstdcxx_overlapped_memcpy_in_stable_sort_1 - Memcheck:Overlap - fun:memcpy - ... - fun:_ZSt11stable_sortIN9__gnu_cxx17__normal_iteratorIPSt4pairIPKN4llvm5ValueEjESt6vectorIS7_SaIS7_EEEEN12_GLOBAL__N_116CstSortPredicateEEvT_SF_T0_ -} - -{ - libstdcxx_overlapped_memcpy_in_stable_sort_2 - Memcheck:Overlap - fun:memcpy - ... - fun:_ZSt11stable_sortIN9__gnu_cxx17__normal_iteratorIPSt4pairIPKN4llvm5ValueEjESt6vectorIS7_SaIS7_EEEEN12_GLOBAL__N_116CstSortPredicateEEvT_SF_T0_ -} - -{ - libstdcxx_overlapped_memcpy_in_stable_sort_3 - Memcheck:Overlap - fun:memcpy - ... - fun:_ZSt11stable_sortIN9__gnu_cxx17__normal_iteratorIPSt4pairIPKN4llvm4TypeEjESt6vectorIS7_SaIS7_EEEEPFbRKS7_SE_EEvT_SH_T0_ -} diff --git a/win32/Analysis/Analysis.vcproj b/win32/Analysis/Analysis.vcproj deleted file mode 100644 index e116aa384d9..00000000000 --- a/win32/Analysis/Analysis.vcproj +++ /dev/null @@ -1,573 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/win32/Archive/Archive.vcproj b/win32/Archive/Archive.vcproj deleted file mode 100644 index efd2f378769..00000000000 --- a/win32/Archive/Archive.vcproj +++ /dev/null @@ -1,337 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/win32/AsmParser/AsmParser.vcproj b/win32/AsmParser/AsmParser.vcproj deleted file mode 100644 index 96ca6d172b6..00000000000 --- a/win32/AsmParser/AsmParser.vcproj +++ /dev/null @@ -1,346 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/win32/Bitcode/Bitcode.vcproj b/win32/Bitcode/Bitcode.vcproj deleted file mode 100644 index 06bc4f0149c..00000000000 --- a/win32/Bitcode/Bitcode.vcproj +++ /dev/null @@ -1,422 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/win32/CBackend/CBackend.vcproj b/win32/CBackend/CBackend.vcproj deleted file mode 100644 index 14047590edf..00000000000 --- a/win32/CBackend/CBackend.vcproj +++ /dev/null @@ -1,325 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/win32/CodeGen/CodeGen.vcproj b/win32/CodeGen/CodeGen.vcproj deleted file mode 100644 index d7c913857da..00000000000 --- a/win32/CodeGen/CodeGen.vcproj +++ /dev/null @@ -1,849 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/win32/Configure/Configure.vcproj b/win32/Configure/Configure.vcproj deleted file mode 100644 index 6e504b03b04..00000000000 --- a/win32/Configure/Configure.vcproj +++ /dev/null @@ -1,319 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/win32/ExecutionEngine/ExecutionEngine.vcproj b/win32/ExecutionEngine/ExecutionEngine.vcproj deleted file mode 100644 index b86db6f994b..00000000000 --- a/win32/ExecutionEngine/ExecutionEngine.vcproj +++ /dev/null @@ -1,429 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/win32/Fibonacci/Fibonacci.vcproj b/win32/Fibonacci/Fibonacci.vcproj deleted file mode 100644 index a2575639873..00000000000 --- a/win32/Fibonacci/Fibonacci.vcproj +++ /dev/null @@ -1,386 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/win32/Linker/Linker.vcproj b/win32/Linker/Linker.vcproj deleted file mode 100644 index e88566ae671..00000000000 --- a/win32/Linker/Linker.vcproj +++ /dev/null @@ -1,337 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/win32/Support/Support.vcproj b/win32/Support/Support.vcproj deleted file mode 100644 index 027668d686c..00000000000 --- a/win32/Support/Support.vcproj +++ /dev/null @@ -1,743 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/win32/System/System.vcproj b/win32/System/System.vcproj deleted file mode 100644 index f72a754a3cd..00000000000 --- a/win32/System/System.vcproj +++ /dev/null @@ -1,462 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/win32/TableGen/TableGen.vcproj b/win32/TableGen/TableGen.vcproj deleted file mode 100644 index 4dd189910f4..00000000000 --- a/win32/TableGen/TableGen.vcproj +++ /dev/null @@ -1,538 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/win32/Target/Target.vcproj b/win32/Target/Target.vcproj deleted file mode 100644 index 05eea5b2f9b..00000000000 --- a/win32/Target/Target.vcproj +++ /dev/null @@ -1,433 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/win32/Transforms/Transforms.vcproj b/win32/Transforms/Transforms.vcproj deleted file mode 100644 index 2554a4ea3b6..00000000000 --- a/win32/Transforms/Transforms.vcproj +++ /dev/null @@ -1,759 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/win32/VMCore/VMCore.vcproj b/win32/VMCore/VMCore.vcproj deleted file mode 100644 index 4accd55b02e..00000000000 --- a/win32/VMCore/VMCore.vcproj +++ /dev/null @@ -1,650 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/win32/bugpoint/bugpoint.vcproj b/win32/bugpoint/bugpoint.vcproj deleted file mode 100644 index 1c8a7d7e17b..00000000000 --- a/win32/bugpoint/bugpoint.vcproj +++ /dev/null @@ -1,429 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/win32/clang.sln b/win32/clang.sln deleted file mode 100644 index 1c6967f36c4..00000000000 --- a/win32/clang.sln +++ /dev/null @@ -1,591 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 9.00 -# Visual Studio 2005 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "support", "Support\Support.vcproj", "{28AA9146-3482-4F41-9CC6-407B1D258508}" - ProjectSection(ProjectDependencies) = postProject - {19514E48-456C-4B9D-8637-F2285476461E} = {19514E48-456C-4B9D-8637-F2285476461E} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TableGen", "TableGen\TableGen.vcproj", "{339C2249-26B6-4172-B484-85653029AF57}" - ProjectSection(ProjectDependencies) = postProject - {28AA9146-3482-4F41-9CC6-407B1D258508} = {28AA9146-3482-4F41-9CC6-407B1D258508} - {19514E48-456C-4B9D-8637-F2285476461E} = {19514E48-456C-4B9D-8637-F2285476461E} - {0F8407F3-FA23-4CF1-83A9-DCBE0B361489} = {0F8407F3-FA23-4CF1-83A9-DCBE0B361489} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Fibonacci", "Fibonacci\Fibonacci.vcproj", "{48FB551D-E37E-42EC-BC97-FF7219774867}" - ProjectSection(ProjectDependencies) = postProject - {0622E827-8464-489D-8B1C-B0B496F35C08} = {0622E827-8464-489D-8B1C-B0B496F35C08} - {28AA9146-3482-4F41-9CC6-407B1D258508} = {28AA9146-3482-4F41-9CC6-407B1D258508} - {059FBAB8-C76D-48A0-AA75-3C57BD3EAFE4} = {059FBAB8-C76D-48A0-AA75-3C57BD3EAFE4} - {08CEB1BB-C2A4-4587-B9A9-AEDB8FB44897} = {08CEB1BB-C2A4-4587-B9A9-AEDB8FB44897} - {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB} = {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB} - {76295AE8-A083-460E-9F80-6F2B8923264A} = {76295AE8-A083-460E-9F80-6F2B8923264A} - {0F8407F3-FA23-4CF1-83A9-DCBE0B361489} = {0F8407F3-FA23-4CF1-83A9-DCBE0B361489} - {144EEBF6-8C9B-4473-B715-2C821666AF6C} = {144EEBF6-8C9B-4473-B715-2C821666AF6C} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ExecutionEngine", "ExecutionEngine\ExecutionEngine.vcproj", "{76295AE8-A083-460E-9F80-6F2B8923264A}" - ProjectSection(ProjectDependencies) = postProject - {19514E48-456C-4B9D-8637-F2285476461E} = {19514E48-456C-4B9D-8637-F2285476461E} - {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB} = {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "VMCore", "VMCore\VMCore.vcproj", "{45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB}" - ProjectSection(ProjectDependencies) = postProject - {19514E48-456C-4B9D-8637-F2285476461E} = {19514E48-456C-4B9D-8637-F2285476461E} - {339C2249-26B6-4172-B484-85653029AF57} = {339C2249-26B6-4172-B484-85653029AF57} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Target", "Target\Target.vcproj", "{059FBAB8-C76D-48A0-AA75-3C57BD3EAFE4}" - ProjectSection(ProjectDependencies) = postProject - {19514E48-456C-4B9D-8637-F2285476461E} = {19514E48-456C-4B9D-8637-F2285476461E} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CodeGen", "CodeGen\CodeGen.vcproj", "{08CEB1BB-C2A4-4587-B9A9-AEDB8FB44897}" - ProjectSection(ProjectDependencies) = postProject - {19514E48-456C-4B9D-8637-F2285476461E} = {19514E48-456C-4B9D-8637-F2285476461E} - {339C2249-26B6-4172-B484-85653029AF57} = {339C2249-26B6-4172-B484-85653029AF57} - {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB} = {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "System", "System\System.vcproj", "{0F8407F3-FA23-4CF1-83A9-DCBE0B361489}" - ProjectSection(ProjectDependencies) = postProject - {19514E48-456C-4B9D-8637-F2285476461E} = {19514E48-456C-4B9D-8637-F2285476461E} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Analysis", "Analysis\Analysis.vcproj", "{0622E827-8464-489D-8B1C-B0B496F35C08}" - ProjectSection(ProjectDependencies) = postProject - {19514E48-456C-4B9D-8637-F2285476461E} = {19514E48-456C-4B9D-8637-F2285476461E} - {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB} = {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "x86", "x86\x86.vcproj", "{144EEBF6-8C9B-4473-B715-2C821666AF6C}" - ProjectSection(ProjectDependencies) = postProject - {19514E48-456C-4B9D-8637-F2285476461E} = {19514E48-456C-4B9D-8637-F2285476461E} - {339C2249-26B6-4172-B484-85653029AF57} = {339C2249-26B6-4172-B484-85653029AF57} - {059FBAB8-C76D-48A0-AA75-3C57BD3EAFE4} = {059FBAB8-C76D-48A0-AA75-3C57BD3EAFE4} - {08CEB1BB-C2A4-4587-B9A9-AEDB8FB44897} = {08CEB1BB-C2A4-4587-B9A9-AEDB8FB44897} - {C59374C1-9FC0-4147-B836-327DFDC52D99} = {C59374C1-9FC0-4147-B836-327DFDC52D99} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Transforms", "Transforms\Transforms.vcproj", "{C59374C1-9FC0-4147-B836-327DFDC52D99}" - ProjectSection(ProjectDependencies) = postProject - {19514E48-456C-4B9D-8637-F2285476461E} = {19514E48-456C-4B9D-8637-F2285476461E} - {339C2249-26B6-4172-B484-85653029AF57} = {339C2249-26B6-4172-B484-85653029AF57} - {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB} = {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Configure", "Configure\Configure.vcproj", "{19514E48-456C-4B9D-8637-F2285476461E}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "lli", "lli\lli.vcproj", "{FB6FFD68-C1E4-4DCF-AB02-36D205D5263E}" - ProjectSection(ProjectDependencies) = postProject - {0622E827-8464-489D-8B1C-B0B496F35C08} = {0622E827-8464-489D-8B1C-B0B496F35C08} - {28AA9146-3482-4F41-9CC6-407B1D258508} = {28AA9146-3482-4F41-9CC6-407B1D258508} - {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D62} = {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D62} - {059FBAB8-C76D-48A0-AA75-3C57BD3EAFE4} = {059FBAB8-C76D-48A0-AA75-3C57BD3EAFE4} - {08CEB1BB-C2A4-4587-B9A9-AEDB8FB44897} = {08CEB1BB-C2A4-4587-B9A9-AEDB8FB44897} - {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB} = {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB} - {76295AE8-A083-460E-9F80-6F2B8923264A} = {76295AE8-A083-460E-9F80-6F2B8923264A} - {0F8407F3-FA23-4CF1-83A9-DCBE0B361489} = {0F8407F3-FA23-4CF1-83A9-DCBE0B361489} - {144EEBF6-8C9B-4473-B715-2C821666AF6C} = {144EEBF6-8C9B-4473-B715-2C821666AF6C} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "llc", "llc\llc.vcproj", "{ADE86BDC-B04C-43DF-B9BB-90492C7B14AC}" - ProjectSection(ProjectDependencies) = postProject - {0622E827-8464-489D-8B1C-B0B496F35C08} = {0622E827-8464-489D-8B1C-B0B496F35C08} - {28AA9146-3482-4F41-9CC6-407B1D258508} = {28AA9146-3482-4F41-9CC6-407B1D258508} - {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D62} = {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D62} - {059FBAB8-C76D-48A0-AA75-3C57BD3EAFE4} = {059FBAB8-C76D-48A0-AA75-3C57BD3EAFE4} - {08CEB1BB-C2A4-4587-B9A9-AEDB8FB44897} = {08CEB1BB-C2A4-4587-B9A9-AEDB8FB44897} - {057777CD-DED5-46DF-BF9A-6B76DE212549} = {057777CD-DED5-46DF-BF9A-6B76DE212549} - {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB} = {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB} - {0F8407F3-FA23-4CF1-83A9-DCBE0B361489} = {0F8407F3-FA23-4CF1-83A9-DCBE0B361489} - {144EEBF6-8C9B-4473-B715-2C821666AF6C} = {144EEBF6-8C9B-4473-B715-2C821666AF6C} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "llvm-dis", "llvm-dis\llvm-dis.vcproj", "{B13476BC-30AB-4EA0-BC1E-212C0A459405}" - ProjectSection(ProjectDependencies) = postProject - {28AA9146-3482-4F41-9CC6-407B1D258508} = {28AA9146-3482-4F41-9CC6-407B1D258508} - {19514E48-456C-4B9D-8637-F2285476461E} = {19514E48-456C-4B9D-8637-F2285476461E} - {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D62} = {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D62} - {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB} = {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB} - {0F8407F3-FA23-4CF1-83A9-DCBE0B361489} = {0F8407F3-FA23-4CF1-83A9-DCBE0B361489} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "llvm-as", "llvm-as\llvm-as.vcproj", "{4FBC40A5-E626-4A6C-A9D3-FAE5C28D30CC}" - ProjectSection(ProjectDependencies) = postProject - {28AA9146-3482-4F41-9CC6-407B1D258508} = {28AA9146-3482-4F41-9CC6-407B1D258508} - {19514E48-456C-4B9D-8637-F2285476461E} = {19514E48-456C-4B9D-8637-F2285476461E} - {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D62} = {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D62} - {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB} = {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB} - {0F8407F3-FA23-4CF1-83A9-DCBE0B361489} = {0F8407F3-FA23-4CF1-83A9-DCBE0B361489} - {3DC216F5-1DDD-478A-84F8-C124E5C31982} = {3DC216F5-1DDD-478A-84F8-C124E5C31982} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AsmParser", "AsmParser\AsmParser.vcproj", "{3DC216F5-1DDD-478A-84F8-C124E5C31982}" - ProjectSection(ProjectDependencies) = postProject - {19514E48-456C-4B9D-8637-F2285476461E} = {19514E48-456C-4B9D-8637-F2285476461E} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "llvm-ar", "llvm-ar\llvm-ar.vcproj", "{0FF2B75C-49C1-4B49-A44A-531C93000296}" - ProjectSection(ProjectDependencies) = postProject - {28AA9146-3482-4F41-9CC6-407B1D258508} = {28AA9146-3482-4F41-9CC6-407B1D258508} - {19514E48-456C-4B9D-8637-F2285476461E} = {19514E48-456C-4B9D-8637-F2285476461E} - {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D61} = {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D61} - {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D62} = {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D62} - {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB} = {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB} - {0F8407F3-FA23-4CF1-83A9-DCBE0B361489} = {0F8407F3-FA23-4CF1-83A9-DCBE0B361489} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "llvm-ranlib", "llvm-ranlib\llvm-ranlib.vcproj", "{BB16C7EE-B4ED-4714-B5ED-B775C62A6612}" - ProjectSection(ProjectDependencies) = postProject - {28AA9146-3482-4F41-9CC6-407B1D258508} = {28AA9146-3482-4F41-9CC6-407B1D258508} - {19514E48-456C-4B9D-8637-F2285476461E} = {19514E48-456C-4B9D-8637-F2285476461E} - {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D61} = {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D61} - {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D62} = {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D62} - {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB} = {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB} - {0F8407F3-FA23-4CF1-83A9-DCBE0B361489} = {0F8407F3-FA23-4CF1-83A9-DCBE0B361489} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "llvm-link", "llvm-link\llvm-link.vcproj", "{5E249789-49E1-4600-B12B-8AD2BB6439B2}" - ProjectSection(ProjectDependencies) = postProject - {28AA9146-3482-4F41-9CC6-407B1D258508} = {28AA9146-3482-4F41-9CC6-407B1D258508} - {19514E48-456C-4B9D-8637-F2285476461E} = {19514E48-456C-4B9D-8637-F2285476461E} - {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D62} = {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D62} - {342CF48F-760A-4040-A9A1-7D75AA2471CE} = {342CF48F-760A-4040-A9A1-7D75AA2471CE} - {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB} = {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB} - {0F8407F3-FA23-4CF1-83A9-DCBE0B361489} = {0F8407F3-FA23-4CF1-83A9-DCBE0B361489} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Linker", "Linker\Linker.vcproj", "{342CF48F-760A-4040-A9A1-7D75AA2471CE}" - ProjectSection(ProjectDependencies) = postProject - {28AA9146-3482-4F41-9CC6-407B1D258508} = {28AA9146-3482-4F41-9CC6-407B1D258508} - {19514E48-456C-4B9D-8637-F2285476461E} = {19514E48-456C-4B9D-8637-F2285476461E} - {0F8407F3-FA23-4CF1-83A9-DCBE0B361489} = {0F8407F3-FA23-4CF1-83A9-DCBE0B361489} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CBackend", "CBackend\CBackend.vcproj", "{057777CD-DED5-46DF-BF9A-6B76DE212549}" - ProjectSection(ProjectDependencies) = postProject - {19514E48-456C-4B9D-8637-F2285476461E} = {19514E48-456C-4B9D-8637-F2285476461E} - {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB} = {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "opt", "opt\opt.vcproj", "{006D8B41-C3C7-4448-85E1-AF8907E591E5}" - ProjectSection(ProjectDependencies) = postProject - {0622E827-8464-489D-8B1C-B0B496F35C08} = {0622E827-8464-489D-8B1C-B0B496F35C08} - {28AA9146-3482-4F41-9CC6-407B1D258508} = {28AA9146-3482-4F41-9CC6-407B1D258508} - {19514E48-456C-4B9D-8637-F2285476461E} = {19514E48-456C-4B9D-8637-F2285476461E} - {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D62} = {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D62} - {059FBAB8-C76D-48A0-AA75-3C57BD3EAFE4} = {059FBAB8-C76D-48A0-AA75-3C57BD3EAFE4} - {C59374C1-9FC0-4147-B836-327DFDC52D99} = {C59374C1-9FC0-4147-B836-327DFDC52D99} - {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB} = {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB} - {0F8407F3-FA23-4CF1-83A9-DCBE0B361489} = {0F8407F3-FA23-4CF1-83A9-DCBE0B361489} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "llvm-bcanalyzer", "llvm-bcanalyzer\llvm-bcanalyzer.vcproj", "{E0B1E329-BE3E-456D-B372-5F397BE42C84}" - ProjectSection(ProjectDependencies) = postProject - {28AA9146-3482-4F41-9CC6-407B1D258508} = {28AA9146-3482-4F41-9CC6-407B1D258508} - {19514E48-456C-4B9D-8637-F2285476461E} = {19514E48-456C-4B9D-8637-F2285476461E} - {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB} = {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB} - {0F8407F3-FA23-4CF1-83A9-DCBE0B361489} = {0F8407F3-FA23-4CF1-83A9-DCBE0B361489} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "llvm-ld", "llvm-ld\llvm-ld.vcproj", "{64D8AA46-88DB-41F4-B837-053AE02406B8}" - ProjectSection(ProjectDependencies) = postProject - {0622E827-8464-489D-8B1C-B0B496F35C08} = {0622E827-8464-489D-8B1C-B0B496F35C08} - {28AA9146-3482-4F41-9CC6-407B1D258508} = {28AA9146-3482-4F41-9CC6-407B1D258508} - {19514E48-456C-4B9D-8637-F2285476461E} = {19514E48-456C-4B9D-8637-F2285476461E} - {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D61} = {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D61} - {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D62} = {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D62} - {342CF48F-760A-4040-A9A1-7D75AA2471CE} = {342CF48F-760A-4040-A9A1-7D75AA2471CE} - {059FBAB8-C76D-48A0-AA75-3C57BD3EAFE4} = {059FBAB8-C76D-48A0-AA75-3C57BD3EAFE4} - {C59374C1-9FC0-4147-B836-327DFDC52D99} = {C59374C1-9FC0-4147-B836-327DFDC52D99} - {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB} = {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB} - {0F8407F3-FA23-4CF1-83A9-DCBE0B361489} = {0F8407F3-FA23-4CF1-83A9-DCBE0B361489} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "llvm-nm", "llvm-nm\llvm-nm.vcproj", "{5FF862CE-80A0-4B48-A80B-68AE325A0432}" - ProjectSection(ProjectDependencies) = postProject - {28AA9146-3482-4F41-9CC6-407B1D258508} = {28AA9146-3482-4F41-9CC6-407B1D258508} - {19514E48-456C-4B9D-8637-F2285476461E} = {19514E48-456C-4B9D-8637-F2285476461E} - {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D61} = {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D61} - {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D62} = {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D62} - {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB} = {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB} - {0F8407F3-FA23-4CF1-83A9-DCBE0B361489} = {0F8407F3-FA23-4CF1-83A9-DCBE0B361489} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "llvm-prof", "llvm-prof\llvm-prof.vcproj", "{ACBE81D9-64B1-4133-823A-807A4E60B454}" - ProjectSection(ProjectDependencies) = postProject - {0622E827-8464-489D-8B1C-B0B496F35C08} = {0622E827-8464-489D-8B1C-B0B496F35C08} - {28AA9146-3482-4F41-9CC6-407B1D258508} = {28AA9146-3482-4F41-9CC6-407B1D258508} - {19514E48-456C-4B9D-8637-F2285476461E} = {19514E48-456C-4B9D-8637-F2285476461E} - {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D62} = {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D62} - {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB} = {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB} - {0F8407F3-FA23-4CF1-83A9-DCBE0B361489} = {0F8407F3-FA23-4CF1-83A9-DCBE0B361489} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "bugpoint", "bugpoint\bugpoint.vcproj", "{57249192-8E29-4D85-8B7A-FEFF1760B1DA}" - ProjectSection(ProjectDependencies) = postProject - {0622E827-8464-489D-8B1C-B0B496F35C08} = {0622E827-8464-489D-8B1C-B0B496F35C08} - {28AA9146-3482-4F41-9CC6-407B1D258508} = {28AA9146-3482-4F41-9CC6-407B1D258508} - {19514E48-456C-4B9D-8637-F2285476461E} = {19514E48-456C-4B9D-8637-F2285476461E} - {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D62} = {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D62} - {342CF48F-760A-4040-A9A1-7D75AA2471CE} = {342CF48F-760A-4040-A9A1-7D75AA2471CE} - {059FBAB8-C76D-48A0-AA75-3C57BD3EAFE4} = {059FBAB8-C76D-48A0-AA75-3C57BD3EAFE4} - {C59374C1-9FC0-4147-B836-327DFDC52D99} = {C59374C1-9FC0-4147-B836-327DFDC52D99} - {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB} = {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB} - {0F8407F3-FA23-4CF1-83A9-DCBE0B361489} = {0F8407F3-FA23-4CF1-83A9-DCBE0B361489} - {3DC216F5-1DDD-478A-84F8-C124E5C31982} = {3DC216F5-1DDD-478A-84F8-C124E5C31982} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Bitcode", "Bitcode\Bitcode.vcproj", "{F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D62}" - ProjectSection(ProjectDependencies) = postProject - {28AA9146-3482-4F41-9CC6-407B1D258508} = {28AA9146-3482-4F41-9CC6-407B1D258508} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Archive", "Archive\Archive.vcproj", "{F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D61}" - ProjectSection(ProjectDependencies) = postProject - {19514E48-456C-4B9D-8637-F2285476461E} = {19514E48-456C-4B9D-8637-F2285476461E} - {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB} = {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB} - EndProjectSection -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "LLVM", "LLVM", "{455BCF47-13B6-451E-8321-8ED9C4866BAA}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Clang", "Clang", "{DAC2AB11-F09C-454B-86FD-9BDBBA25827F}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "clangLex", "..\tools\clang\win32\clangLex\clangLex.vcproj", "{030F6909-B2FA-4E53-BEA7-9A559CFC2F73}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "clangParse", "..\tools\clang\win32\clangParse\clangParse.vcproj", "{05DF3074-11AF-491A-B078-83BD2EDC31F6}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "clangAST", "..\tools\clang\win32\clangAST\clangAST.vcproj", "{5125C3DB-FBD6-4BF8-8D8B-CE51D6E93BCD}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "clangSema", "..\tools\clang\win32\clangSema\clangSema.vcproj", "{4727E8B7-AA99-41C9-AB09-A8A862595DB7}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "clangCodeGen", "..\tools\clang\win32\clangCodeGen\clangCodeGen.vcproj", "{4CEC5897-D957-47E7-A6AE-2021D4F44A8F}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "clangDriver", "..\tools\clang\win32\clangDriver\clangDriver.vcproj", "{7E7DA455-C276-4B93-8D02-8F7E2F629BAF}" - ProjectSection(ProjectDependencies) = postProject - {030F6909-B2FA-4E53-BEA7-9A559CFC2F73} = {030F6909-B2FA-4E53-BEA7-9A559CFC2F73} - {6C98551A-4C36-4E74-8419-4D3EEEC9D8E0} = {6C98551A-4C36-4E74-8419-4D3EEEC9D8E0} - {0622E827-8464-489D-8B1C-B0B496F35C08} = {0622E827-8464-489D-8B1C-B0B496F35C08} - {28AA9146-3482-4F41-9CC6-407B1D258508} = {28AA9146-3482-4F41-9CC6-407B1D258508} - {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D62} = {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D62} - {05DF3074-11AF-491A-B078-83BD2EDC31F6} = {05DF3074-11AF-491A-B078-83BD2EDC31F6} - {298B4876-6EF1-4E80-85D7-72F80693BBEB} = {298B4876-6EF1-4E80-85D7-72F80693BBEB} - {4CEC5897-D957-47E7-A6AE-2021D4F44A8F} = {4CEC5897-D957-47E7-A6AE-2021D4F44A8F} - {F9FBDDA2-9EE1-473C-A456-BE20B7B2439D} = {F9FBDDA2-9EE1-473C-A456-BE20B7B2439D} - {4727E8B7-AA99-41C9-AB09-A8A862595DB7} = {4727E8B7-AA99-41C9-AB09-A8A862595DB7} - {059FBAB8-C76D-48A0-AA75-3C57BD3EAFE4} = {059FBAB8-C76D-48A0-AA75-3C57BD3EAFE4} - {08CEB1BB-C2A4-4587-B9A9-AEDB8FB44897} = {08CEB1BB-C2A4-4587-B9A9-AEDB8FB44897} - {C59374C1-9FC0-4147-B836-327DFDC52D99} = {C59374C1-9FC0-4147-B836-327DFDC52D99} - {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB} = {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB} - {5125C3DB-FBD6-4BF8-8D8B-CE51D6E93BCD} = {5125C3DB-FBD6-4BF8-8D8B-CE51D6E93BCD} - {AECB78DF-C319-4D49-B2FD-F98F62EBBDF4} = {AECB78DF-C319-4D49-B2FD-F98F62EBBDF4} - {0F8407F3-FA23-4CF1-83A9-DCBE0B361489} = {0F8407F3-FA23-4CF1-83A9-DCBE0B361489} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "clangBasic", "..\tools\clang\win32\clangBasic\clangBasic.vcproj", "{298B4876-6EF1-4E80-85D7-72F80693BBEB}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "clangAnalysis", "..\tools\clang\win32\clangAnalysis\clangAnalysis.vcproj", "{6C98551A-4C36-4E74-8419-4D3EEEC9D8E0}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "clangRewrite", "..\tools\clang\win32\clangRewrite\clangRewrite.vcproj", "{F9FBDDA2-9EE1-473C-A456-BE20B7B2439D}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "clangLibDriver", "..\tools\clang\win32\clangLibDriver\clangLibDriver.vcproj", "{AECB78DF-C319-4D49-B2FD-F98F62EBBDF4}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Configure|Win32 = Configure|Win32 - Debug|Win32 = Debug|Win32 - Release|Win32 = Release|Win32 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {28AA9146-3482-4F41-9CC6-407B1D258508}.Configure|Win32.ActiveCfg = Release|Win32 - {28AA9146-3482-4F41-9CC6-407B1D258508}.Configure|Win32.Build.0 = Release|Win32 - {28AA9146-3482-4F41-9CC6-407B1D258508}.Debug|Win32.ActiveCfg = Debug|Win32 - {28AA9146-3482-4F41-9CC6-407B1D258508}.Debug|Win32.Build.0 = Debug|Win32 - {28AA9146-3482-4F41-9CC6-407B1D258508}.Release|Win32.ActiveCfg = Release|Win32 - {28AA9146-3482-4F41-9CC6-407B1D258508}.Release|Win32.Build.0 = Release|Win32 - {339C2249-26B6-4172-B484-85653029AF57}.Configure|Win32.ActiveCfg = Release|Win32 - {339C2249-26B6-4172-B484-85653029AF57}.Configure|Win32.Build.0 = Release|Win32 - {339C2249-26B6-4172-B484-85653029AF57}.Debug|Win32.ActiveCfg = Debug|Win32 - {339C2249-26B6-4172-B484-85653029AF57}.Debug|Win32.Build.0 = Debug|Win32 - {339C2249-26B6-4172-B484-85653029AF57}.Release|Win32.ActiveCfg = Release|Win32 - {339C2249-26B6-4172-B484-85653029AF57}.Release|Win32.Build.0 = Release|Win32 - {48FB551D-E37E-42EC-BC97-FF7219774867}.Configure|Win32.ActiveCfg = Release|Win32 - {48FB551D-E37E-42EC-BC97-FF7219774867}.Configure|Win32.Build.0 = Release|Win32 - {48FB551D-E37E-42EC-BC97-FF7219774867}.Debug|Win32.ActiveCfg = Debug|Win32 - {48FB551D-E37E-42EC-BC97-FF7219774867}.Debug|Win32.Build.0 = Debug|Win32 - {48FB551D-E37E-42EC-BC97-FF7219774867}.Release|Win32.ActiveCfg = Release|Win32 - {48FB551D-E37E-42EC-BC97-FF7219774867}.Release|Win32.Build.0 = Release|Win32 - {76295AE8-A083-460E-9F80-6F2B8923264A}.Configure|Win32.ActiveCfg = Release|Win32 - {76295AE8-A083-460E-9F80-6F2B8923264A}.Configure|Win32.Build.0 = Release|Win32 - {76295AE8-A083-460E-9F80-6F2B8923264A}.Debug|Win32.ActiveCfg = Debug|Win32 - {76295AE8-A083-460E-9F80-6F2B8923264A}.Debug|Win32.Build.0 = Debug|Win32 - {76295AE8-A083-460E-9F80-6F2B8923264A}.Release|Win32.ActiveCfg = Release|Win32 - {76295AE8-A083-460E-9F80-6F2B8923264A}.Release|Win32.Build.0 = Release|Win32 - {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB}.Configure|Win32.ActiveCfg = Release|Win32 - {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB}.Configure|Win32.Build.0 = Release|Win32 - {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB}.Debug|Win32.ActiveCfg = Debug|Win32 - {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB}.Debug|Win32.Build.0 = Debug|Win32 - {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB}.Release|Win32.ActiveCfg = Release|Win32 - {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB}.Release|Win32.Build.0 = Release|Win32 - {059FBAB8-C76D-48A0-AA75-3C57BD3EAFE4}.Configure|Win32.ActiveCfg = Release|Win32 - {059FBAB8-C76D-48A0-AA75-3C57BD3EAFE4}.Configure|Win32.Build.0 = Release|Win32 - {059FBAB8-C76D-48A0-AA75-3C57BD3EAFE4}.Debug|Win32.ActiveCfg = Debug|Win32 - {059FBAB8-C76D-48A0-AA75-3C57BD3EAFE4}.Debug|Win32.Build.0 = Debug|Win32 - {059FBAB8-C76D-48A0-AA75-3C57BD3EAFE4}.Release|Win32.ActiveCfg = Release|Win32 - {059FBAB8-C76D-48A0-AA75-3C57BD3EAFE4}.Release|Win32.Build.0 = Release|Win32 - {08CEB1BB-C2A4-4587-B9A9-AEDB8FB44897}.Configure|Win32.ActiveCfg = Release|Win32 - {08CEB1BB-C2A4-4587-B9A9-AEDB8FB44897}.Configure|Win32.Build.0 = Release|Win32 - {08CEB1BB-C2A4-4587-B9A9-AEDB8FB44897}.Debug|Win32.ActiveCfg = Debug|Win32 - {08CEB1BB-C2A4-4587-B9A9-AEDB8FB44897}.Debug|Win32.Build.0 = Debug|Win32 - {08CEB1BB-C2A4-4587-B9A9-AEDB8FB44897}.Release|Win32.ActiveCfg = Release|Win32 - {08CEB1BB-C2A4-4587-B9A9-AEDB8FB44897}.Release|Win32.Build.0 = Release|Win32 - {0F8407F3-FA23-4CF1-83A9-DCBE0B361489}.Configure|Win32.ActiveCfg = Release|Win32 - {0F8407F3-FA23-4CF1-83A9-DCBE0B361489}.Configure|Win32.Build.0 = Release|Win32 - {0F8407F3-FA23-4CF1-83A9-DCBE0B361489}.Debug|Win32.ActiveCfg = Debug|Win32 - {0F8407F3-FA23-4CF1-83A9-DCBE0B361489}.Debug|Win32.Build.0 = Debug|Win32 - {0F8407F3-FA23-4CF1-83A9-DCBE0B361489}.Release|Win32.ActiveCfg = Release|Win32 - {0F8407F3-FA23-4CF1-83A9-DCBE0B361489}.Release|Win32.Build.0 = Release|Win32 - {0622E827-8464-489D-8B1C-B0B496F35C08}.Configure|Win32.ActiveCfg = Release|Win32 - {0622E827-8464-489D-8B1C-B0B496F35C08}.Configure|Win32.Build.0 = Release|Win32 - {0622E827-8464-489D-8B1C-B0B496F35C08}.Debug|Win32.ActiveCfg = Debug|Win32 - {0622E827-8464-489D-8B1C-B0B496F35C08}.Debug|Win32.Build.0 = Debug|Win32 - {0622E827-8464-489D-8B1C-B0B496F35C08}.Release|Win32.ActiveCfg = Release|Win32 - {0622E827-8464-489D-8B1C-B0B496F35C08}.Release|Win32.Build.0 = Release|Win32 - {144EEBF6-8C9B-4473-B715-2C821666AF6C}.Configure|Win32.ActiveCfg = Release|Win32 - {144EEBF6-8C9B-4473-B715-2C821666AF6C}.Configure|Win32.Build.0 = Release|Win32 - {144EEBF6-8C9B-4473-B715-2C821666AF6C}.Debug|Win32.ActiveCfg = Debug|Win32 - {144EEBF6-8C9B-4473-B715-2C821666AF6C}.Debug|Win32.Build.0 = Debug|Win32 - {144EEBF6-8C9B-4473-B715-2C821666AF6C}.Release|Win32.ActiveCfg = Release|Win32 - {144EEBF6-8C9B-4473-B715-2C821666AF6C}.Release|Win32.Build.0 = Release|Win32 - {C59374C1-9FC0-4147-B836-327DFDC52D99}.Configure|Win32.ActiveCfg = Release|Win32 - {C59374C1-9FC0-4147-B836-327DFDC52D99}.Configure|Win32.Build.0 = Release|Win32 - {C59374C1-9FC0-4147-B836-327DFDC52D99}.Debug|Win32.ActiveCfg = Debug|Win32 - {C59374C1-9FC0-4147-B836-327DFDC52D99}.Debug|Win32.Build.0 = Debug|Win32 - {C59374C1-9FC0-4147-B836-327DFDC52D99}.Release|Win32.ActiveCfg = Release|Win32 - {C59374C1-9FC0-4147-B836-327DFDC52D99}.Release|Win32.Build.0 = Release|Win32 - {19514E48-456C-4B9D-8637-F2285476461E}.Configure|Win32.ActiveCfg = Configure|Win32 - {19514E48-456C-4B9D-8637-F2285476461E}.Configure|Win32.Build.0 = Configure|Win32 - {19514E48-456C-4B9D-8637-F2285476461E}.Debug|Win32.ActiveCfg = Configure|Win32 - {19514E48-456C-4B9D-8637-F2285476461E}.Debug|Win32.Build.0 = Configure|Win32 - {19514E48-456C-4B9D-8637-F2285476461E}.Release|Win32.ActiveCfg = Configure|Win32 - {19514E48-456C-4B9D-8637-F2285476461E}.Release|Win32.Build.0 = Configure|Win32 - {FB6FFD68-C1E4-4DCF-AB02-36D205D5263E}.Configure|Win32.ActiveCfg = Release|Win32 - {FB6FFD68-C1E4-4DCF-AB02-36D205D5263E}.Configure|Win32.Build.0 = Release|Win32 - {FB6FFD68-C1E4-4DCF-AB02-36D205D5263E}.Debug|Win32.ActiveCfg = Debug|Win32 - {FB6FFD68-C1E4-4DCF-AB02-36D205D5263E}.Debug|Win32.Build.0 = Debug|Win32 - {FB6FFD68-C1E4-4DCF-AB02-36D205D5263E}.Release|Win32.ActiveCfg = Release|Win32 - {FB6FFD68-C1E4-4DCF-AB02-36D205D5263E}.Release|Win32.Build.0 = Release|Win32 - {ADE86BDC-B04C-43DF-B9BB-90492C7B14AC}.Configure|Win32.ActiveCfg = Release|Win32 - {ADE86BDC-B04C-43DF-B9BB-90492C7B14AC}.Configure|Win32.Build.0 = Release|Win32 - {ADE86BDC-B04C-43DF-B9BB-90492C7B14AC}.Debug|Win32.ActiveCfg = Debug|Win32 - {ADE86BDC-B04C-43DF-B9BB-90492C7B14AC}.Debug|Win32.Build.0 = Debug|Win32 - {ADE86BDC-B04C-43DF-B9BB-90492C7B14AC}.Release|Win32.ActiveCfg = Release|Win32 - {ADE86BDC-B04C-43DF-B9BB-90492C7B14AC}.Release|Win32.Build.0 = Release|Win32 - {B13476BC-30AB-4EA0-BC1E-212C0A459405}.Configure|Win32.ActiveCfg = Release|Win32 - {B13476BC-30AB-4EA0-BC1E-212C0A459405}.Configure|Win32.Build.0 = Release|Win32 - {B13476BC-30AB-4EA0-BC1E-212C0A459405}.Debug|Win32.ActiveCfg = Debug|Win32 - {B13476BC-30AB-4EA0-BC1E-212C0A459405}.Debug|Win32.Build.0 = Debug|Win32 - {B13476BC-30AB-4EA0-BC1E-212C0A459405}.Release|Win32.ActiveCfg = Release|Win32 - {B13476BC-30AB-4EA0-BC1E-212C0A459405}.Release|Win32.Build.0 = Release|Win32 - {4FBC40A5-E626-4A6C-A9D3-FAE5C28D30CC}.Configure|Win32.ActiveCfg = Release|Win32 - {4FBC40A5-E626-4A6C-A9D3-FAE5C28D30CC}.Configure|Win32.Build.0 = Release|Win32 - {4FBC40A5-E626-4A6C-A9D3-FAE5C28D30CC}.Debug|Win32.ActiveCfg = Debug|Win32 - {4FBC40A5-E626-4A6C-A9D3-FAE5C28D30CC}.Debug|Win32.Build.0 = Debug|Win32 - {4FBC40A5-E626-4A6C-A9D3-FAE5C28D30CC}.Release|Win32.ActiveCfg = Release|Win32 - {4FBC40A5-E626-4A6C-A9D3-FAE5C28D30CC}.Release|Win32.Build.0 = Release|Win32 - {3DC216F5-1DDD-478A-84F8-C124E5C31982}.Configure|Win32.ActiveCfg = Release|Win32 - {3DC216F5-1DDD-478A-84F8-C124E5C31982}.Configure|Win32.Build.0 = Release|Win32 - {3DC216F5-1DDD-478A-84F8-C124E5C31982}.Debug|Win32.ActiveCfg = Debug|Win32 - {3DC216F5-1DDD-478A-84F8-C124E5C31982}.Debug|Win32.Build.0 = Debug|Win32 - {3DC216F5-1DDD-478A-84F8-C124E5C31982}.Release|Win32.ActiveCfg = Release|Win32 - {3DC216F5-1DDD-478A-84F8-C124E5C31982}.Release|Win32.Build.0 = Release|Win32 - {0FF2B75C-49C1-4B49-A44A-531C93000296}.Configure|Win32.ActiveCfg = Release|Win32 - {0FF2B75C-49C1-4B49-A44A-531C93000296}.Configure|Win32.Build.0 = Release|Win32 - {0FF2B75C-49C1-4B49-A44A-531C93000296}.Debug|Win32.ActiveCfg = Debug|Win32 - {0FF2B75C-49C1-4B49-A44A-531C93000296}.Debug|Win32.Build.0 = Debug|Win32 - {0FF2B75C-49C1-4B49-A44A-531C93000296}.Release|Win32.ActiveCfg = Release|Win32 - {0FF2B75C-49C1-4B49-A44A-531C93000296}.Release|Win32.Build.0 = Release|Win32 - {BB16C7EE-B4ED-4714-B5ED-B775C62A6612}.Configure|Win32.ActiveCfg = Release|Win32 - {BB16C7EE-B4ED-4714-B5ED-B775C62A6612}.Configure|Win32.Build.0 = Release|Win32 - {BB16C7EE-B4ED-4714-B5ED-B775C62A6612}.Debug|Win32.ActiveCfg = Debug|Win32 - {BB16C7EE-B4ED-4714-B5ED-B775C62A6612}.Debug|Win32.Build.0 = Debug|Win32 - {BB16C7EE-B4ED-4714-B5ED-B775C62A6612}.Release|Win32.ActiveCfg = Release|Win32 - {BB16C7EE-B4ED-4714-B5ED-B775C62A6612}.Release|Win32.Build.0 = Release|Win32 - {5E249789-49E1-4600-B12B-8AD2BB6439B2}.Configure|Win32.ActiveCfg = Release|Win32 - {5E249789-49E1-4600-B12B-8AD2BB6439B2}.Configure|Win32.Build.0 = Release|Win32 - {5E249789-49E1-4600-B12B-8AD2BB6439B2}.Debug|Win32.ActiveCfg = Debug|Win32 - {5E249789-49E1-4600-B12B-8AD2BB6439B2}.Debug|Win32.Build.0 = Debug|Win32 - {5E249789-49E1-4600-B12B-8AD2BB6439B2}.Release|Win32.ActiveCfg = Release|Win32 - {5E249789-49E1-4600-B12B-8AD2BB6439B2}.Release|Win32.Build.0 = Release|Win32 - {342CF48F-760A-4040-A9A1-7D75AA2471CE}.Configure|Win32.ActiveCfg = Release|Win32 - {342CF48F-760A-4040-A9A1-7D75AA2471CE}.Configure|Win32.Build.0 = Release|Win32 - {342CF48F-760A-4040-A9A1-7D75AA2471CE}.Debug|Win32.ActiveCfg = Debug|Win32 - {342CF48F-760A-4040-A9A1-7D75AA2471CE}.Debug|Win32.Build.0 = Debug|Win32 - {342CF48F-760A-4040-A9A1-7D75AA2471CE}.Release|Win32.ActiveCfg = Release|Win32 - {342CF48F-760A-4040-A9A1-7D75AA2471CE}.Release|Win32.Build.0 = Release|Win32 - {057777CD-DED5-46DF-BF9A-6B76DE212549}.Configure|Win32.ActiveCfg = Release|Win32 - {057777CD-DED5-46DF-BF9A-6B76DE212549}.Configure|Win32.Build.0 = Release|Win32 - {057777CD-DED5-46DF-BF9A-6B76DE212549}.Debug|Win32.ActiveCfg = Debug|Win32 - {057777CD-DED5-46DF-BF9A-6B76DE212549}.Debug|Win32.Build.0 = Debug|Win32 - {057777CD-DED5-46DF-BF9A-6B76DE212549}.Release|Win32.ActiveCfg = Release|Win32 - {057777CD-DED5-46DF-BF9A-6B76DE212549}.Release|Win32.Build.0 = Release|Win32 - {006D8B41-C3C7-4448-85E1-AF8907E591E5}.Configure|Win32.ActiveCfg = Release|Win32 - {006D8B41-C3C7-4448-85E1-AF8907E591E5}.Configure|Win32.Build.0 = Release|Win32 - {006D8B41-C3C7-4448-85E1-AF8907E591E5}.Debug|Win32.ActiveCfg = Debug|Win32 - {006D8B41-C3C7-4448-85E1-AF8907E591E5}.Debug|Win32.Build.0 = Debug|Win32 - {006D8B41-C3C7-4448-85E1-AF8907E591E5}.Release|Win32.ActiveCfg = Release|Win32 - {006D8B41-C3C7-4448-85E1-AF8907E591E5}.Release|Win32.Build.0 = Release|Win32 - {E0B1E329-BE3E-456D-B372-5F397BE42C84}.Configure|Win32.ActiveCfg = Release|Win32 - {E0B1E329-BE3E-456D-B372-5F397BE42C84}.Configure|Win32.Build.0 = Release|Win32 - {E0B1E329-BE3E-456D-B372-5F397BE42C84}.Debug|Win32.ActiveCfg = Debug|Win32 - {E0B1E329-BE3E-456D-B372-5F397BE42C84}.Debug|Win32.Build.0 = Debug|Win32 - {E0B1E329-BE3E-456D-B372-5F397BE42C84}.Release|Win32.ActiveCfg = Release|Win32 - {E0B1E329-BE3E-456D-B372-5F397BE42C84}.Release|Win32.Build.0 = Release|Win32 - {64D8AA46-88DB-41F4-B837-053AE02406B8}.Configure|Win32.ActiveCfg = Release|Win32 - {64D8AA46-88DB-41F4-B837-053AE02406B8}.Configure|Win32.Build.0 = Release|Win32 - {64D8AA46-88DB-41F4-B837-053AE02406B8}.Debug|Win32.ActiveCfg = Debug|Win32 - {64D8AA46-88DB-41F4-B837-053AE02406B8}.Debug|Win32.Build.0 = Debug|Win32 - {64D8AA46-88DB-41F4-B837-053AE02406B8}.Release|Win32.ActiveCfg = Release|Win32 - {64D8AA46-88DB-41F4-B837-053AE02406B8}.Release|Win32.Build.0 = Release|Win32 - {5FF862CE-80A0-4B48-A80B-68AE325A0432}.Configure|Win32.ActiveCfg = Release|Win32 - {5FF862CE-80A0-4B48-A80B-68AE325A0432}.Configure|Win32.Build.0 = Release|Win32 - {5FF862CE-80A0-4B48-A80B-68AE325A0432}.Debug|Win32.ActiveCfg = Debug|Win32 - {5FF862CE-80A0-4B48-A80B-68AE325A0432}.Debug|Win32.Build.0 = Debug|Win32 - {5FF862CE-80A0-4B48-A80B-68AE325A0432}.Release|Win32.ActiveCfg = Release|Win32 - {5FF862CE-80A0-4B48-A80B-68AE325A0432}.Release|Win32.Build.0 = Release|Win32 - {ACBE81D9-64B1-4133-823A-807A4E60B454}.Configure|Win32.ActiveCfg = Release|Win32 - {ACBE81D9-64B1-4133-823A-807A4E60B454}.Configure|Win32.Build.0 = Release|Win32 - {ACBE81D9-64B1-4133-823A-807A4E60B454}.Debug|Win32.ActiveCfg = Debug|Win32 - {ACBE81D9-64B1-4133-823A-807A4E60B454}.Debug|Win32.Build.0 = Debug|Win32 - {ACBE81D9-64B1-4133-823A-807A4E60B454}.Release|Win32.ActiveCfg = Release|Win32 - {ACBE81D9-64B1-4133-823A-807A4E60B454}.Release|Win32.Build.0 = Release|Win32 - {57249192-8E29-4D85-8B7A-FEFF1760B1DA}.Configure|Win32.ActiveCfg = Release|Win32 - {57249192-8E29-4D85-8B7A-FEFF1760B1DA}.Configure|Win32.Build.0 = Release|Win32 - {57249192-8E29-4D85-8B7A-FEFF1760B1DA}.Debug|Win32.ActiveCfg = Debug|Win32 - {57249192-8E29-4D85-8B7A-FEFF1760B1DA}.Debug|Win32.Build.0 = Debug|Win32 - {57249192-8E29-4D85-8B7A-FEFF1760B1DA}.Release|Win32.ActiveCfg = Release|Win32 - {57249192-8E29-4D85-8B7A-FEFF1760B1DA}.Release|Win32.Build.0 = Release|Win32 - {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D62}.Configure|Win32.ActiveCfg = Release|Win32 - {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D62}.Configure|Win32.Build.0 = Release|Win32 - {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D62}.Debug|Win32.ActiveCfg = Debug|Win32 - {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D62}.Debug|Win32.Build.0 = Debug|Win32 - {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D62}.Release|Win32.ActiveCfg = Release|Win32 - {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D62}.Release|Win32.Build.0 = Release|Win32 - {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D61}.Configure|Win32.ActiveCfg = Release|Win32 - {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D61}.Configure|Win32.Build.0 = Release|Win32 - {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D61}.Debug|Win32.ActiveCfg = Debug|Win32 - {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D61}.Debug|Win32.Build.0 = Debug|Win32 - {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D61}.Release|Win32.ActiveCfg = Release|Win32 - {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D61}.Release|Win32.Build.0 = Release|Win32 - {030F6909-B2FA-4E53-BEA7-9A559CFC2F73}.Configure|Win32.ActiveCfg = Release|Win32 - {030F6909-B2FA-4E53-BEA7-9A559CFC2F73}.Configure|Win32.Build.0 = Release|Win32 - {030F6909-B2FA-4E53-BEA7-9A559CFC2F73}.Debug|Win32.ActiveCfg = Debug|Win32 - {030F6909-B2FA-4E53-BEA7-9A559CFC2F73}.Debug|Win32.Build.0 = Debug|Win32 - {030F6909-B2FA-4E53-BEA7-9A559CFC2F73}.Release|Win32.ActiveCfg = Release|Win32 - {030F6909-B2FA-4E53-BEA7-9A559CFC2F73}.Release|Win32.Build.0 = Release|Win32 - {05DF3074-11AF-491A-B078-83BD2EDC31F6}.Configure|Win32.ActiveCfg = Release|Win32 - {05DF3074-11AF-491A-B078-83BD2EDC31F6}.Configure|Win32.Build.0 = Release|Win32 - {05DF3074-11AF-491A-B078-83BD2EDC31F6}.Debug|Win32.ActiveCfg = Debug|Win32 - {05DF3074-11AF-491A-B078-83BD2EDC31F6}.Debug|Win32.Build.0 = Debug|Win32 - {05DF3074-11AF-491A-B078-83BD2EDC31F6}.Release|Win32.ActiveCfg = Release|Win32 - {05DF3074-11AF-491A-B078-83BD2EDC31F6}.Release|Win32.Build.0 = Release|Win32 - {5125C3DB-FBD6-4BF8-8D8B-CE51D6E93BCD}.Configure|Win32.ActiveCfg = Release|Win32 - {5125C3DB-FBD6-4BF8-8D8B-CE51D6E93BCD}.Configure|Win32.Build.0 = Release|Win32 - {5125C3DB-FBD6-4BF8-8D8B-CE51D6E93BCD}.Debug|Win32.ActiveCfg = Debug|Win32 - {5125C3DB-FBD6-4BF8-8D8B-CE51D6E93BCD}.Debug|Win32.Build.0 = Debug|Win32 - {5125C3DB-FBD6-4BF8-8D8B-CE51D6E93BCD}.Release|Win32.ActiveCfg = Release|Win32 - {5125C3DB-FBD6-4BF8-8D8B-CE51D6E93BCD}.Release|Win32.Build.0 = Release|Win32 - {4727E8B7-AA99-41C9-AB09-A8A862595DB7}.Configure|Win32.ActiveCfg = Release|Win32 - {4727E8B7-AA99-41C9-AB09-A8A862595DB7}.Configure|Win32.Build.0 = Release|Win32 - {4727E8B7-AA99-41C9-AB09-A8A862595DB7}.Debug|Win32.ActiveCfg = Debug|Win32 - {4727E8B7-AA99-41C9-AB09-A8A862595DB7}.Debug|Win32.Build.0 = Debug|Win32 - {4727E8B7-AA99-41C9-AB09-A8A862595DB7}.Release|Win32.ActiveCfg = Release|Win32 - {4727E8B7-AA99-41C9-AB09-A8A862595DB7}.Release|Win32.Build.0 = Release|Win32 - {4CEC5897-D957-47E7-A6AE-2021D4F44A8F}.Configure|Win32.ActiveCfg = Release|Win32 - {4CEC5897-D957-47E7-A6AE-2021D4F44A8F}.Configure|Win32.Build.0 = Release|Win32 - {4CEC5897-D957-47E7-A6AE-2021D4F44A8F}.Debug|Win32.ActiveCfg = Debug|Win32 - {4CEC5897-D957-47E7-A6AE-2021D4F44A8F}.Debug|Win32.Build.0 = Debug|Win32 - {4CEC5897-D957-47E7-A6AE-2021D4F44A8F}.Release|Win32.ActiveCfg = Release|Win32 - {4CEC5897-D957-47E7-A6AE-2021D4F44A8F}.Release|Win32.Build.0 = Release|Win32 - {7E7DA455-C276-4B93-8D02-8F7E2F629BAF}.Configure|Win32.ActiveCfg = Release|Win32 - {7E7DA455-C276-4B93-8D02-8F7E2F629BAF}.Configure|Win32.Build.0 = Release|Win32 - {7E7DA455-C276-4B93-8D02-8F7E2F629BAF}.Debug|Win32.ActiveCfg = Debug|Win32 - {7E7DA455-C276-4B93-8D02-8F7E2F629BAF}.Debug|Win32.Build.0 = Debug|Win32 - {7E7DA455-C276-4B93-8D02-8F7E2F629BAF}.Release|Win32.ActiveCfg = Release|Win32 - {7E7DA455-C276-4B93-8D02-8F7E2F629BAF}.Release|Win32.Build.0 = Release|Win32 - {298B4876-6EF1-4E80-85D7-72F80693BBEB}.Configure|Win32.ActiveCfg = Release|Win32 - {298B4876-6EF1-4E80-85D7-72F80693BBEB}.Configure|Win32.Build.0 = Release|Win32 - {298B4876-6EF1-4E80-85D7-72F80693BBEB}.Debug|Win32.ActiveCfg = Debug|Win32 - {298B4876-6EF1-4E80-85D7-72F80693BBEB}.Debug|Win32.Build.0 = Debug|Win32 - {298B4876-6EF1-4E80-85D7-72F80693BBEB}.Release|Win32.ActiveCfg = Release|Win32 - {298B4876-6EF1-4E80-85D7-72F80693BBEB}.Release|Win32.Build.0 = Release|Win32 - {6C98551A-4C36-4E74-8419-4D3EEEC9D8E0}.Configure|Win32.ActiveCfg = Release|Win32 - {6C98551A-4C36-4E74-8419-4D3EEEC9D8E0}.Configure|Win32.Build.0 = Release|Win32 - {6C98551A-4C36-4E74-8419-4D3EEEC9D8E0}.Debug|Win32.ActiveCfg = Debug|Win32 - {6C98551A-4C36-4E74-8419-4D3EEEC9D8E0}.Debug|Win32.Build.0 = Debug|Win32 - {6C98551A-4C36-4E74-8419-4D3EEEC9D8E0}.Release|Win32.ActiveCfg = Release|Win32 - {6C98551A-4C36-4E74-8419-4D3EEEC9D8E0}.Release|Win32.Build.0 = Release|Win32 - {F9FBDDA2-9EE1-473C-A456-BE20B7B2439D}.Configure|Win32.ActiveCfg = Release|Win32 - {F9FBDDA2-9EE1-473C-A456-BE20B7B2439D}.Configure|Win32.Build.0 = Release|Win32 - {F9FBDDA2-9EE1-473C-A456-BE20B7B2439D}.Debug|Win32.ActiveCfg = Debug|Win32 - {F9FBDDA2-9EE1-473C-A456-BE20B7B2439D}.Debug|Win32.Build.0 = Debug|Win32 - {F9FBDDA2-9EE1-473C-A456-BE20B7B2439D}.Release|Win32.ActiveCfg = Release|Win32 - {F9FBDDA2-9EE1-473C-A456-BE20B7B2439D}.Release|Win32.Build.0 = Release|Win32 - {AECB78DF-C319-4D49-B2FD-F98F62EBBDF4}.Configure|Win32.ActiveCfg = Release|Win32 - {AECB78DF-C319-4D49-B2FD-F98F62EBBDF4}.Configure|Win32.Build.0 = Release|Win32 - {AECB78DF-C319-4D49-B2FD-F98F62EBBDF4}.Debug|Win32.ActiveCfg = Debug|Win32 - {AECB78DF-C319-4D49-B2FD-F98F62EBBDF4}.Debug|Win32.Build.0 = Debug|Win32 - {AECB78DF-C319-4D49-B2FD-F98F62EBBDF4}.Release|Win32.ActiveCfg = Release|Win32 - {AECB78DF-C319-4D49-B2FD-F98F62EBBDF4}.Release|Win32.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(NestedProjects) = preSolution - {339C2249-26B6-4172-B484-85653029AF57} = {455BCF47-13B6-451E-8321-8ED9C4866BAA} - {48FB551D-E37E-42EC-BC97-FF7219774867} = {455BCF47-13B6-451E-8321-8ED9C4866BAA} - {76295AE8-A083-460E-9F80-6F2B8923264A} = {455BCF47-13B6-451E-8321-8ED9C4866BAA} - {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB} = {455BCF47-13B6-451E-8321-8ED9C4866BAA} - {059FBAB8-C76D-48A0-AA75-3C57BD3EAFE4} = {455BCF47-13B6-451E-8321-8ED9C4866BAA} - {08CEB1BB-C2A4-4587-B9A9-AEDB8FB44897} = {455BCF47-13B6-451E-8321-8ED9C4866BAA} - {0F8407F3-FA23-4CF1-83A9-DCBE0B361489} = {455BCF47-13B6-451E-8321-8ED9C4866BAA} - {0622E827-8464-489D-8B1C-B0B496F35C08} = {455BCF47-13B6-451E-8321-8ED9C4866BAA} - {144EEBF6-8C9B-4473-B715-2C821666AF6C} = {455BCF47-13B6-451E-8321-8ED9C4866BAA} - {C59374C1-9FC0-4147-B836-327DFDC52D99} = {455BCF47-13B6-451E-8321-8ED9C4866BAA} - {19514E48-456C-4B9D-8637-F2285476461E} = {455BCF47-13B6-451E-8321-8ED9C4866BAA} - {FB6FFD68-C1E4-4DCF-AB02-36D205D5263E} = {455BCF47-13B6-451E-8321-8ED9C4866BAA} - {ADE86BDC-B04C-43DF-B9BB-90492C7B14AC} = {455BCF47-13B6-451E-8321-8ED9C4866BAA} - {B13476BC-30AB-4EA0-BC1E-212C0A459405} = {455BCF47-13B6-451E-8321-8ED9C4866BAA} - {4FBC40A5-E626-4A6C-A9D3-FAE5C28D30CC} = {455BCF47-13B6-451E-8321-8ED9C4866BAA} - {3DC216F5-1DDD-478A-84F8-C124E5C31982} = {455BCF47-13B6-451E-8321-8ED9C4866BAA} - {0FF2B75C-49C1-4B49-A44A-531C93000296} = {455BCF47-13B6-451E-8321-8ED9C4866BAA} - {BB16C7EE-B4ED-4714-B5ED-B775C62A6612} = {455BCF47-13B6-451E-8321-8ED9C4866BAA} - {5E249789-49E1-4600-B12B-8AD2BB6439B2} = {455BCF47-13B6-451E-8321-8ED9C4866BAA} - {342CF48F-760A-4040-A9A1-7D75AA2471CE} = {455BCF47-13B6-451E-8321-8ED9C4866BAA} - {057777CD-DED5-46DF-BF9A-6B76DE212549} = {455BCF47-13B6-451E-8321-8ED9C4866BAA} - {006D8B41-C3C7-4448-85E1-AF8907E591E5} = {455BCF47-13B6-451E-8321-8ED9C4866BAA} - {E0B1E329-BE3E-456D-B372-5F397BE42C84} = {455BCF47-13B6-451E-8321-8ED9C4866BAA} - {64D8AA46-88DB-41F4-B837-053AE02406B8} = {455BCF47-13B6-451E-8321-8ED9C4866BAA} - {5FF862CE-80A0-4B48-A80B-68AE325A0432} = {455BCF47-13B6-451E-8321-8ED9C4866BAA} - {ACBE81D9-64B1-4133-823A-807A4E60B454} = {455BCF47-13B6-451E-8321-8ED9C4866BAA} - {57249192-8E29-4D85-8B7A-FEFF1760B1DA} = {455BCF47-13B6-451E-8321-8ED9C4866BAA} - {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D62} = {455BCF47-13B6-451E-8321-8ED9C4866BAA} - {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D61} = {455BCF47-13B6-451E-8321-8ED9C4866BAA} - {28AA9146-3482-4F41-9CC6-407B1D258508} = {455BCF47-13B6-451E-8321-8ED9C4866BAA} - {030F6909-B2FA-4E53-BEA7-9A559CFC2F73} = {DAC2AB11-F09C-454B-86FD-9BDBBA25827F} - {05DF3074-11AF-491A-B078-83BD2EDC31F6} = {DAC2AB11-F09C-454B-86FD-9BDBBA25827F} - {5125C3DB-FBD6-4BF8-8D8B-CE51D6E93BCD} = {DAC2AB11-F09C-454B-86FD-9BDBBA25827F} - {4727E8B7-AA99-41C9-AB09-A8A862595DB7} = {DAC2AB11-F09C-454B-86FD-9BDBBA25827F} - {4CEC5897-D957-47E7-A6AE-2021D4F44A8F} = {DAC2AB11-F09C-454B-86FD-9BDBBA25827F} - {7E7DA455-C276-4B93-8D02-8F7E2F629BAF} = {DAC2AB11-F09C-454B-86FD-9BDBBA25827F} - {298B4876-6EF1-4E80-85D7-72F80693BBEB} = {DAC2AB11-F09C-454B-86FD-9BDBBA25827F} - {6C98551A-4C36-4E74-8419-4D3EEEC9D8E0} = {DAC2AB11-F09C-454B-86FD-9BDBBA25827F} - {F9FBDDA2-9EE1-473C-A456-BE20B7B2439D} = {DAC2AB11-F09C-454B-86FD-9BDBBA25827F} - {AECB78DF-C319-4D49-B2FD-F98F62EBBDF4} = {DAC2AB11-F09C-454B-86FD-9BDBBA25827F} - EndGlobalSection - GlobalSection(DPCodeReviewSolutionGUID) = preSolution - DPCodeReviewSolutionGUID = {00000000-0000-0000-0000-000000000000} - EndGlobalSection -EndGlobal diff --git a/win32/common.vsprops b/win32/common.vsprops deleted file mode 100644 index 80eb0425dbc..00000000000 --- a/win32/common.vsprops +++ /dev/null @@ -1,11 +0,0 @@ - - - - diff --git a/win32/config.h b/win32/config.h deleted file mode 100644 index 62d4c05d62a..00000000000 --- a/win32/config.h +++ /dev/null @@ -1,30 +0,0 @@ -/* This file is appended to config.h.in to form the Windows version of - * config.h */ - -#define PACKAGE_NAME "LLVM (win32 vc8.0)" -#define PACKAGE_VERSION 2.4 -#define PACKAGE_STRING "llvm 2.6svn" -#define LLVM_HOSTTRIPLE "i686-pc-win32" -#define HAVE_WINDOWS_H 1 -#define HAVE_LIMITS_H 1 -#define HAVE_SYS_STAT_H 1 -#define HAVE_STDLIB_H 1 -#define HAVE_STDIO_H 1 -#define HAVE_STRING_H 1 -#define HAVE_CEILF 1 -#define HAVE_FLOORF 1 -#define SHLIBEXT ".lib" -#define error_t int -#define HAVE_ERRNO_H 1 -#define LTDL_DLOPEN_DEPLIBS 1 -#define LTDL_OBJDIR "_libs" -#define LTDL_SHLIBPATH_VAR "PATH" -#define LTDL_SHLIB_EXT ".dll" -#define LTDL_SYSSEARCHPATH "" -#define LLVM_ON_WIN32 1 - -#define strtoll _strtoi64 -#define strtoull _strtoui64 -#define stricmp _stricmp -#define strdup _strdup - diff --git a/win32/dobison.cmd b/win32/dobison.cmd deleted file mode 100755 index 03d56ab4058..00000000000 --- a/win32/dobison.cmd +++ /dev/null @@ -1,29 +0,0 @@ -@echo off -rem dobison.cmd prefix mode target source -rem prefix - passed to bison as -p -rem mode - either debug or release -rem target - generated parser file name without extension -rem source - input to bison -rem headercopydir - directory to receive a copy of the header - -if "%2"=="debug" (set flags=-tvdo) else (set flags=-vdo) - -rem Test for presence of bison. -bison --help >NUL -if errorlevel 1 goto nobison - -rem Run bison. -echo bison -p%1 %flags%%3.cpp %4 -echo move %3.hpp %3.h -bison -p%1 %flags%%3.cpp %4 && move %3.hpp %3.h -echo copy %3.h %5 -copy %3.h %5 -exit - -:nobison -echo Bison not found. Using pre-generated files. -copy %~pn4.cpp.cvs .\%3.cpp -copy %~pn4.cpp.cvs %5\%3.cpp -copy %~pn4.h.cvs .\%3.h -copy %~pn4.h.cvs %5\%3.h -exit diff --git a/win32/doflex.cmd b/win32/doflex.cmd deleted file mode 100755 index 8f32fbdaa4a..00000000000 --- a/win32/doflex.cmd +++ /dev/null @@ -1,20 +0,0 @@ -@echo off -rem doflex.cmd prefix mode target source -rem mode - either debug or release -rem target - generated parser file name without extension -rem source - input to bison - -if "%1"=="debug" (set flags=-t) else (set flags=-t) - -rem Test for presence of flex. -flex --help >NUL -if errorlevel 1 goto noflex - -rem Run flex. -flex %flags% >%2.cpp %3 -exit - -:noflex -echo Flex not found. Using pre-generated files. -copy %~pn3.cpp.cvs %2.cpp -exit diff --git a/win32/llc/llc.vcproj b/win32/llc/llc.vcproj deleted file mode 100644 index 2ce6f460428..00000000000 --- a/win32/llc/llc.vcproj +++ /dev/null @@ -1,385 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/win32/lli/lli.vcproj b/win32/lli/lli.vcproj deleted file mode 100644 index 0bcee7ed117..00000000000 --- a/win32/lli/lli.vcproj +++ /dev/null @@ -1,385 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/win32/llvm-ar/llvm-ar.vcproj b/win32/llvm-ar/llvm-ar.vcproj deleted file mode 100644 index 1235ef13a44..00000000000 --- a/win32/llvm-ar/llvm-ar.vcproj +++ /dev/null @@ -1,381 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/win32/llvm-as/llvm-as.vcproj b/win32/llvm-as/llvm-as.vcproj deleted file mode 100644 index e65070664e4..00000000000 --- a/win32/llvm-as/llvm-as.vcproj +++ /dev/null @@ -1,381 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/win32/llvm-bcanalyzer/llvm-bcanalyzer.vcproj b/win32/llvm-bcanalyzer/llvm-bcanalyzer.vcproj deleted file mode 100644 index 18254c78788..00000000000 --- a/win32/llvm-bcanalyzer/llvm-bcanalyzer.vcproj +++ /dev/null @@ -1,381 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/win32/llvm-dis/llvm-dis.vcproj b/win32/llvm-dis/llvm-dis.vcproj deleted file mode 100644 index be2261bf2bc..00000000000 --- a/win32/llvm-dis/llvm-dis.vcproj +++ /dev/null @@ -1,381 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/win32/llvm-ld/llvm-ld.vcproj b/win32/llvm-ld/llvm-ld.vcproj deleted file mode 100644 index a2b4a541c55..00000000000 --- a/win32/llvm-ld/llvm-ld.vcproj +++ /dev/null @@ -1,385 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/win32/llvm-link/llvm-link.vcproj b/win32/llvm-link/llvm-link.vcproj deleted file mode 100644 index 2624698eb70..00000000000 --- a/win32/llvm-link/llvm-link.vcproj +++ /dev/null @@ -1,381 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/win32/llvm-nm/llvm-nm.vcproj b/win32/llvm-nm/llvm-nm.vcproj deleted file mode 100644 index 3c402a084aa..00000000000 --- a/win32/llvm-nm/llvm-nm.vcproj +++ /dev/null @@ -1,381 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/win32/llvm-prof/llvm-prof.vcproj b/win32/llvm-prof/llvm-prof.vcproj deleted file mode 100644 index 77608abc9c9..00000000000 --- a/win32/llvm-prof/llvm-prof.vcproj +++ /dev/null @@ -1,381 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/win32/llvm-ranlib/llvm-ranlib.vcproj b/win32/llvm-ranlib/llvm-ranlib.vcproj deleted file mode 100644 index 2398ececc72..00000000000 --- a/win32/llvm-ranlib/llvm-ranlib.vcproj +++ /dev/null @@ -1,381 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/win32/llvm.sln b/win32/llvm.sln deleted file mode 100644 index 8aab563f6c6..00000000000 --- a/win32/llvm.sln +++ /dev/null @@ -1,719 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 9.00 -# Visual Studio 2005 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "support", "Support\Support.vcproj", "{28AA9146-3482-4F41-9CC6-407B1D258508}" - ProjectSection(WebsiteProperties) = preProject - Debug.AspNetCompiler.Debug = "True" - Release.AspNetCompiler.Debug = "False" - EndProjectSection - ProjectSection(ProjectDependencies) = postProject - {19514E48-456C-4B9D-8637-F2285476461E} = {19514E48-456C-4B9D-8637-F2285476461E} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TableGen", "TableGen\TableGen.vcproj", "{339C2249-26B6-4172-B484-85653029AF57}" - ProjectSection(WebsiteProperties) = preProject - Debug.AspNetCompiler.Debug = "True" - Release.AspNetCompiler.Debug = "False" - EndProjectSection - ProjectSection(ProjectDependencies) = postProject - {28AA9146-3482-4F41-9CC6-407B1D258508} = {28AA9146-3482-4F41-9CC6-407B1D258508} - {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D62} = {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D62} - {0F8407F3-FA23-4CF1-83A9-DCBE0B361489} = {0F8407F3-FA23-4CF1-83A9-DCBE0B361489} - {19514E48-456C-4B9D-8637-F2285476461E} = {19514E48-456C-4B9D-8637-F2285476461E} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Fibonacci", "Fibonacci\Fibonacci.vcproj", "{48FB551D-E37E-42EC-BC97-FF7219774867}" - ProjectSection(WebsiteProperties) = preProject - Debug.AspNetCompiler.Debug = "True" - Release.AspNetCompiler.Debug = "False" - EndProjectSection - ProjectSection(ProjectDependencies) = postProject - {144EEBF6-8C9B-4473-B715-2C821666AF6C} = {144EEBF6-8C9B-4473-B715-2C821666AF6C} - {0F8407F3-FA23-4CF1-83A9-DCBE0B361489} = {0F8407F3-FA23-4CF1-83A9-DCBE0B361489} - {76295AE8-A083-460E-9F80-6F2B8923264A} = {76295AE8-A083-460E-9F80-6F2B8923264A} - {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB} = {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB} - {08CEB1BB-C2A4-4587-B9A9-AEDB8FB44897} = {08CEB1BB-C2A4-4587-B9A9-AEDB8FB44897} - {059FBAB8-C76D-48A0-AA75-3C57BD3EAFE4} = {059FBAB8-C76D-48A0-AA75-3C57BD3EAFE4} - {28AA9146-3482-4F41-9CC6-407B1D258508} = {28AA9146-3482-4F41-9CC6-407B1D258508} - {0622E827-8464-489D-8B1C-B0B496F35C08} = {0622E827-8464-489D-8B1C-B0B496F35C08} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ExecutionEngine", "ExecutionEngine\ExecutionEngine.vcproj", "{76295AE8-A083-460E-9F80-6F2B8923264A}" - ProjectSection(WebsiteProperties) = preProject - Debug.AspNetCompiler.Debug = "True" - Release.AspNetCompiler.Debug = "False" - EndProjectSection - ProjectSection(ProjectDependencies) = postProject - {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB} = {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB} - {19514E48-456C-4B9D-8637-F2285476461E} = {19514E48-456C-4B9D-8637-F2285476461E} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "VMCore", "VMCore\VMCore.vcproj", "{45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB}" - ProjectSection(WebsiteProperties) = preProject - Debug.AspNetCompiler.Debug = "True" - Release.AspNetCompiler.Debug = "False" - EndProjectSection - ProjectSection(ProjectDependencies) = postProject - {339C2249-26B6-4172-B484-85653029AF57} = {339C2249-26B6-4172-B484-85653029AF57} - {19514E48-456C-4B9D-8637-F2285476461E} = {19514E48-456C-4B9D-8637-F2285476461E} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Target", "Target\Target.vcproj", "{059FBAB8-C76D-48A0-AA75-3C57BD3EAFE4}" - ProjectSection(WebsiteProperties) = preProject - Debug.AspNetCompiler.Debug = "True" - Release.AspNetCompiler.Debug = "False" - EndProjectSection - ProjectSection(ProjectDependencies) = postProject - {19514E48-456C-4B9D-8637-F2285476461E} = {19514E48-456C-4B9D-8637-F2285476461E} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CodeGen", "CodeGen\CodeGen.vcproj", "{08CEB1BB-C2A4-4587-B9A9-AEDB8FB44897}" - ProjectSection(WebsiteProperties) = preProject - Debug.AspNetCompiler.Debug = "True" - Release.AspNetCompiler.Debug = "False" - EndProjectSection - ProjectSection(ProjectDependencies) = postProject - {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB} = {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB} - {339C2249-26B6-4172-B484-85653029AF57} = {339C2249-26B6-4172-B484-85653029AF57} - {19514E48-456C-4B9D-8637-F2285476461E} = {19514E48-456C-4B9D-8637-F2285476461E} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "System", "System\System.vcproj", "{0F8407F3-FA23-4CF1-83A9-DCBE0B361489}" - ProjectSection(WebsiteProperties) = preProject - Debug.AspNetCompiler.Debug = "True" - Release.AspNetCompiler.Debug = "False" - EndProjectSection - ProjectSection(ProjectDependencies) = postProject - {19514E48-456C-4B9D-8637-F2285476461E} = {19514E48-456C-4B9D-8637-F2285476461E} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Analysis", "Analysis\Analysis.vcproj", "{0622E827-8464-489D-8B1C-B0B496F35C08}" - ProjectSection(WebsiteProperties) = preProject - Debug.AspNetCompiler.Debug = "True" - Release.AspNetCompiler.Debug = "False" - EndProjectSection - ProjectSection(ProjectDependencies) = postProject - {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB} = {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB} - {19514E48-456C-4B9D-8637-F2285476461E} = {19514E48-456C-4B9D-8637-F2285476461E} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "x86", "x86\x86.vcproj", "{144EEBF6-8C9B-4473-B715-2C821666AF6C}" - ProjectSection(WebsiteProperties) = preProject - Debug.AspNetCompiler.Debug = "True" - Release.AspNetCompiler.Debug = "False" - EndProjectSection - ProjectSection(ProjectDependencies) = postProject - {C59374C1-9FC0-4147-B836-327DFDC52D99} = {C59374C1-9FC0-4147-B836-327DFDC52D99} - {08CEB1BB-C2A4-4587-B9A9-AEDB8FB44897} = {08CEB1BB-C2A4-4587-B9A9-AEDB8FB44897} - {339C2249-26B6-4172-B484-85653029AF57} = {339C2249-26B6-4172-B484-85653029AF57} - {19514E48-456C-4B9D-8637-F2285476461E} = {19514E48-456C-4B9D-8637-F2285476461E} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Transforms", "Transforms\Transforms.vcproj", "{C59374C1-9FC0-4147-B836-327DFDC52D99}" - ProjectSection(WebsiteProperties) = preProject - Debug.AspNetCompiler.Debug = "True" - Release.AspNetCompiler.Debug = "False" - EndProjectSection - ProjectSection(ProjectDependencies) = postProject - {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB} = {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB} - {339C2249-26B6-4172-B484-85653029AF57} = {339C2249-26B6-4172-B484-85653029AF57} - {19514E48-456C-4B9D-8637-F2285476461E} = {19514E48-456C-4B9D-8637-F2285476461E} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Configure", "Configure\Configure.vcproj", "{19514E48-456C-4B9D-8637-F2285476461E}" - ProjectSection(WebsiteProperties) = preProject - Debug.AspNetCompiler.Debug = "True" - Release.AspNetCompiler.Debug = "False" - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "lli", "lli\lli.vcproj", "{FB6FFD68-C1E4-4DCF-AB02-36D205D5263E}" - ProjectSection(WebsiteProperties) = preProject - Debug.AspNetCompiler.Debug = "True" - Release.AspNetCompiler.Debug = "False" - EndProjectSection - ProjectSection(ProjectDependencies) = postProject - {144EEBF6-8C9B-4473-B715-2C821666AF6C} = {144EEBF6-8C9B-4473-B715-2C821666AF6C} - {0F8407F3-FA23-4CF1-83A9-DCBE0B361489} = {0F8407F3-FA23-4CF1-83A9-DCBE0B361489} - {76295AE8-A083-460E-9F80-6F2B8923264A} = {76295AE8-A083-460E-9F80-6F2B8923264A} - {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB} = {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB} - {08CEB1BB-C2A4-4587-B9A9-AEDB8FB44897} = {08CEB1BB-C2A4-4587-B9A9-AEDB8FB44897} - {059FBAB8-C76D-48A0-AA75-3C57BD3EAFE4} = {059FBAB8-C76D-48A0-AA75-3C57BD3EAFE4} - {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D62} = {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D62} - {28AA9146-3482-4F41-9CC6-407B1D258508} = {28AA9146-3482-4F41-9CC6-407B1D258508} - {0622E827-8464-489D-8B1C-B0B496F35C08} = {0622E827-8464-489D-8B1C-B0B496F35C08} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "llc", "llc\llc.vcproj", "{ADE86BDC-B04C-43DF-B9BB-90492C7B14AC}" - ProjectSection(WebsiteProperties) = preProject - Debug.AspNetCompiler.Debug = "True" - Release.AspNetCompiler.Debug = "False" - EndProjectSection - ProjectSection(ProjectDependencies) = postProject - {144EEBF6-8C9B-4473-B715-2C821666AF6C} = {144EEBF6-8C9B-4473-B715-2C821666AF6C} - {0F8407F3-FA23-4CF1-83A9-DCBE0B361489} = {0F8407F3-FA23-4CF1-83A9-DCBE0B361489} - {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB} = {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB} - {057777CD-DED5-46DF-BF9A-6B76DE212549} = {057777CD-DED5-46DF-BF9A-6B76DE212549} - {08CEB1BB-C2A4-4587-B9A9-AEDB8FB44897} = {08CEB1BB-C2A4-4587-B9A9-AEDB8FB44897} - {059FBAB8-C76D-48A0-AA75-3C57BD3EAFE4} = {059FBAB8-C76D-48A0-AA75-3C57BD3EAFE4} - {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D62} = {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D62} - {28AA9146-3482-4F41-9CC6-407B1D258508} = {28AA9146-3482-4F41-9CC6-407B1D258508} - {0622E827-8464-489D-8B1C-B0B496F35C08} = {0622E827-8464-489D-8B1C-B0B496F35C08} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "llvm-dis", "llvm-dis\llvm-dis.vcproj", "{B13476BC-30AB-4EA0-BC1E-212C0A459405}" - ProjectSection(WebsiteProperties) = preProject - Debug.AspNetCompiler.Debug = "True" - Release.AspNetCompiler.Debug = "False" - EndProjectSection - ProjectSection(ProjectDependencies) = postProject - {0F8407F3-FA23-4CF1-83A9-DCBE0B361489} = {0F8407F3-FA23-4CF1-83A9-DCBE0B361489} - {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB} = {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB} - {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D62} = {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D62} - {19514E48-456C-4B9D-8637-F2285476461E} = {19514E48-456C-4B9D-8637-F2285476461E} - {28AA9146-3482-4F41-9CC6-407B1D258508} = {28AA9146-3482-4F41-9CC6-407B1D258508} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "llvm-as", "llvm-as\llvm-as.vcproj", "{4FBC40A5-E626-4A6C-A9D3-FAE5C28D30CC}" - ProjectSection(WebsiteProperties) = preProject - Debug.AspNetCompiler.Debug = "True" - Release.AspNetCompiler.Debug = "False" - EndProjectSection - ProjectSection(ProjectDependencies) = postProject - {3DC216F5-1DDD-478A-84F8-C124E5C31982} = {3DC216F5-1DDD-478A-84F8-C124E5C31982} - {0F8407F3-FA23-4CF1-83A9-DCBE0B361489} = {0F8407F3-FA23-4CF1-83A9-DCBE0B361489} - {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB} = {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB} - {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D62} = {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D62} - {19514E48-456C-4B9D-8637-F2285476461E} = {19514E48-456C-4B9D-8637-F2285476461E} - {28AA9146-3482-4F41-9CC6-407B1D258508} = {28AA9146-3482-4F41-9CC6-407B1D258508} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AsmParser", "AsmParser\AsmParser.vcproj", "{3DC216F5-1DDD-478A-84F8-C124E5C31982}" - ProjectSection(WebsiteProperties) = preProject - Debug.AspNetCompiler.Debug = "True" - Release.AspNetCompiler.Debug = "False" - EndProjectSection - ProjectSection(ProjectDependencies) = postProject - {19514E48-456C-4B9D-8637-F2285476461E} = {19514E48-456C-4B9D-8637-F2285476461E} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "llvm-ar", "llvm-ar\llvm-ar.vcproj", "{0FF2B75C-49C1-4B49-A44A-531C93000296}" - ProjectSection(WebsiteProperties) = preProject - Debug.AspNetCompiler.Debug = "True" - Release.AspNetCompiler.Debug = "False" - EndProjectSection - ProjectSection(ProjectDependencies) = postProject - {0F8407F3-FA23-4CF1-83A9-DCBE0B361489} = {0F8407F3-FA23-4CF1-83A9-DCBE0B361489} - {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB} = {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB} - {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D62} = {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D62} - {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D61} = {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D61} - {19514E48-456C-4B9D-8637-F2285476461E} = {19514E48-456C-4B9D-8637-F2285476461E} - {28AA9146-3482-4F41-9CC6-407B1D258508} = {28AA9146-3482-4F41-9CC6-407B1D258508} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "llvm-ranlib", "llvm-ranlib\llvm-ranlib.vcproj", "{BB16C7EE-B4ED-4714-B5ED-B775C62A6612}" - ProjectSection(WebsiteProperties) = preProject - Debug.AspNetCompiler.Debug = "True" - Release.AspNetCompiler.Debug = "False" - EndProjectSection - ProjectSection(ProjectDependencies) = postProject - {0F8407F3-FA23-4CF1-83A9-DCBE0B361489} = {0F8407F3-FA23-4CF1-83A9-DCBE0B361489} - {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB} = {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB} - {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D62} = {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D62} - {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D61} = {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D61} - {19514E48-456C-4B9D-8637-F2285476461E} = {19514E48-456C-4B9D-8637-F2285476461E} - {28AA9146-3482-4F41-9CC6-407B1D258508} = {28AA9146-3482-4F41-9CC6-407B1D258508} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "llvm-link", "llvm-link\llvm-link.vcproj", "{5E249789-49E1-4600-B12B-8AD2BB6439B2}" - ProjectSection(WebsiteProperties) = preProject - Debug.AspNetCompiler.Debug = "True" - Release.AspNetCompiler.Debug = "False" - EndProjectSection - ProjectSection(ProjectDependencies) = postProject - {0F8407F3-FA23-4CF1-83A9-DCBE0B361489} = {0F8407F3-FA23-4CF1-83A9-DCBE0B361489} - {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB} = {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB} - {342CF48F-760A-4040-A9A1-7D75AA2471CE} = {342CF48F-760A-4040-A9A1-7D75AA2471CE} - {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D62} = {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D62} - {19514E48-456C-4B9D-8637-F2285476461E} = {19514E48-456C-4B9D-8637-F2285476461E} - {28AA9146-3482-4F41-9CC6-407B1D258508} = {28AA9146-3482-4F41-9CC6-407B1D258508} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Linker", "Linker\Linker.vcproj", "{342CF48F-760A-4040-A9A1-7D75AA2471CE}" - ProjectSection(WebsiteProperties) = preProject - Debug.AspNetCompiler.Debug = "True" - Release.AspNetCompiler.Debug = "False" - EndProjectSection - ProjectSection(ProjectDependencies) = postProject - {0F8407F3-FA23-4CF1-83A9-DCBE0B361489} = {0F8407F3-FA23-4CF1-83A9-DCBE0B361489} - {19514E48-456C-4B9D-8637-F2285476461E} = {19514E48-456C-4B9D-8637-F2285476461E} - {28AA9146-3482-4F41-9CC6-407B1D258508} = {28AA9146-3482-4F41-9CC6-407B1D258508} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CBackend", "CBackend\CBackend.vcproj", "{057777CD-DED5-46DF-BF9A-6B76DE212549}" - ProjectSection(WebsiteProperties) = preProject - Debug.AspNetCompiler.Debug = "True" - Release.AspNetCompiler.Debug = "False" - EndProjectSection - ProjectSection(ProjectDependencies) = postProject - {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB} = {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB} - {19514E48-456C-4B9D-8637-F2285476461E} = {19514E48-456C-4B9D-8637-F2285476461E} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "opt", "opt\opt.vcproj", "{006D8B41-C3C7-4448-85E1-AF8907E591E5}" - ProjectSection(WebsiteProperties) = preProject - Debug.AspNetCompiler.Debug = "True" - Release.AspNetCompiler.Debug = "False" - EndProjectSection - ProjectSection(ProjectDependencies) = postProject - {0F8407F3-FA23-4CF1-83A9-DCBE0B361489} = {0F8407F3-FA23-4CF1-83A9-DCBE0B361489} - {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB} = {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB} - {C59374C1-9FC0-4147-B836-327DFDC52D99} = {C59374C1-9FC0-4147-B836-327DFDC52D99} - {059FBAB8-C76D-48A0-AA75-3C57BD3EAFE4} = {059FBAB8-C76D-48A0-AA75-3C57BD3EAFE4} - {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D62} = {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D62} - {19514E48-456C-4B9D-8637-F2285476461E} = {19514E48-456C-4B9D-8637-F2285476461E} - {28AA9146-3482-4F41-9CC6-407B1D258508} = {28AA9146-3482-4F41-9CC6-407B1D258508} - {0622E827-8464-489D-8B1C-B0B496F35C08} = {0622E827-8464-489D-8B1C-B0B496F35C08} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "llvm-bcanalyzer", "llvm-bcanalyzer\llvm-bcanalyzer.vcproj", "{E0B1E329-BE3E-456D-B372-5F397BE42C84}" - ProjectSection(WebsiteProperties) = preProject - Debug.AspNetCompiler.Debug = "True" - Release.AspNetCompiler.Debug = "False" - EndProjectSection - ProjectSection(ProjectDependencies) = postProject - {0F8407F3-FA23-4CF1-83A9-DCBE0B361489} = {0F8407F3-FA23-4CF1-83A9-DCBE0B361489} - {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB} = {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB} - {19514E48-456C-4B9D-8637-F2285476461E} = {19514E48-456C-4B9D-8637-F2285476461E} - {28AA9146-3482-4F41-9CC6-407B1D258508} = {28AA9146-3482-4F41-9CC6-407B1D258508} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "llvm-ld", "llvm-ld\llvm-ld.vcproj", "{64D8AA46-88DB-41F4-B837-053AE02406B8}" - ProjectSection(WebsiteProperties) = preProject - Debug.AspNetCompiler.Debug = "True" - Release.AspNetCompiler.Debug = "False" - EndProjectSection - ProjectSection(ProjectDependencies) = postProject - {0F8407F3-FA23-4CF1-83A9-DCBE0B361489} = {0F8407F3-FA23-4CF1-83A9-DCBE0B361489} - {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB} = {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB} - {C59374C1-9FC0-4147-B836-327DFDC52D99} = {C59374C1-9FC0-4147-B836-327DFDC52D99} - {059FBAB8-C76D-48A0-AA75-3C57BD3EAFE4} = {059FBAB8-C76D-48A0-AA75-3C57BD3EAFE4} - {342CF48F-760A-4040-A9A1-7D75AA2471CE} = {342CF48F-760A-4040-A9A1-7D75AA2471CE} - {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D62} = {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D62} - {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D61} = {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D61} - {19514E48-456C-4B9D-8637-F2285476461E} = {19514E48-456C-4B9D-8637-F2285476461E} - {28AA9146-3482-4F41-9CC6-407B1D258508} = {28AA9146-3482-4F41-9CC6-407B1D258508} - {0622E827-8464-489D-8B1C-B0B496F35C08} = {0622E827-8464-489D-8B1C-B0B496F35C08} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "llvm-nm", "llvm-nm\llvm-nm.vcproj", "{5FF862CE-80A0-4B48-A80B-68AE325A0432}" - ProjectSection(WebsiteProperties) = preProject - Debug.AspNetCompiler.Debug = "True" - Release.AspNetCompiler.Debug = "False" - EndProjectSection - ProjectSection(ProjectDependencies) = postProject - {0F8407F3-FA23-4CF1-83A9-DCBE0B361489} = {0F8407F3-FA23-4CF1-83A9-DCBE0B361489} - {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB} = {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB} - {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D62} = {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D62} - {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D61} = {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D61} - {19514E48-456C-4B9D-8637-F2285476461E} = {19514E48-456C-4B9D-8637-F2285476461E} - {28AA9146-3482-4F41-9CC6-407B1D258508} = {28AA9146-3482-4F41-9CC6-407B1D258508} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "llvm-prof", "llvm-prof\llvm-prof.vcproj", "{ACBE81D9-64B1-4133-823A-807A4E60B454}" - ProjectSection(WebsiteProperties) = preProject - Debug.AspNetCompiler.Debug = "True" - Release.AspNetCompiler.Debug = "False" - EndProjectSection - ProjectSection(ProjectDependencies) = postProject - {0F8407F3-FA23-4CF1-83A9-DCBE0B361489} = {0F8407F3-FA23-4CF1-83A9-DCBE0B361489} - {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB} = {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB} - {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D62} = {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D62} - {19514E48-456C-4B9D-8637-F2285476461E} = {19514E48-456C-4B9D-8637-F2285476461E} - {28AA9146-3482-4F41-9CC6-407B1D258508} = {28AA9146-3482-4F41-9CC6-407B1D258508} - {0622E827-8464-489D-8B1C-B0B496F35C08} = {0622E827-8464-489D-8B1C-B0B496F35C08} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "bugpoint", "bugpoint\bugpoint.vcproj", "{57249192-8E29-4D85-8B7A-FEFF1760B1DA}" - ProjectSection(WebsiteProperties) = preProject - Debug.AspNetCompiler.Debug = "True" - Release.AspNetCompiler.Debug = "False" - EndProjectSection - ProjectSection(ProjectDependencies) = postProject - {3DC216F5-1DDD-478A-84F8-C124E5C31982} = {3DC216F5-1DDD-478A-84F8-C124E5C31982} - {0F8407F3-FA23-4CF1-83A9-DCBE0B361489} = {0F8407F3-FA23-4CF1-83A9-DCBE0B361489} - {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB} = {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB} - {C59374C1-9FC0-4147-B836-327DFDC52D99} = {C59374C1-9FC0-4147-B836-327DFDC52D99} - {059FBAB8-C76D-48A0-AA75-3C57BD3EAFE4} = {059FBAB8-C76D-48A0-AA75-3C57BD3EAFE4} - {342CF48F-760A-4040-A9A1-7D75AA2471CE} = {342CF48F-760A-4040-A9A1-7D75AA2471CE} - {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D62} = {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D62} - {19514E48-456C-4B9D-8637-F2285476461E} = {19514E48-456C-4B9D-8637-F2285476461E} - {28AA9146-3482-4F41-9CC6-407B1D258508} = {28AA9146-3482-4F41-9CC6-407B1D258508} - {0622E827-8464-489D-8B1C-B0B496F35C08} = {0622E827-8464-489D-8B1C-B0B496F35C08} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Bitcode", "Bitcode\Bitcode.vcproj", "{F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D62}" - ProjectSection(WebsiteProperties) = preProject - Debug.AspNetCompiler.Debug = "True" - Release.AspNetCompiler.Debug = "False" - EndProjectSection - ProjectSection(ProjectDependencies) = postProject - {28AA9146-3482-4F41-9CC6-407B1D258508} = {28AA9146-3482-4F41-9CC6-407B1D258508} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Archive", "Archive\Archive.vcproj", "{F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D61}" - ProjectSection(WebsiteProperties) = preProject - Debug.AspNetCompiler.Debug = "True" - Release.AspNetCompiler.Debug = "False" - EndProjectSection - ProjectSection(ProjectDependencies) = postProject - {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB} = {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB} - {19514E48-456C-4B9D-8637-F2285476461E} = {19514E48-456C-4B9D-8637-F2285476461E} - EndProjectSection -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Configure|Win32 = Configure|Win32 - Configure|x64 = Configure|x64 - Debug|Win32 = Debug|Win32 - Debug|x64 = Debug|x64 - Release|Win32 = Release|Win32 - Release|x64 = Release|x64 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {28AA9146-3482-4F41-9CC6-407B1D258508}.Configure|Win32.ActiveCfg = Release|Win32 - {28AA9146-3482-4F41-9CC6-407B1D258508}.Configure|Win32.Build.0 = Release|Win32 - {28AA9146-3482-4F41-9CC6-407B1D258508}.Configure|x64.ActiveCfg = Release|Win32 - {28AA9146-3482-4F41-9CC6-407B1D258508}.Debug|Win32.ActiveCfg = Debug|Win32 - {28AA9146-3482-4F41-9CC6-407B1D258508}.Debug|Win32.Build.0 = Debug|Win32 - {28AA9146-3482-4F41-9CC6-407B1D258508}.Debug|x64.ActiveCfg = Debug|x64 - {28AA9146-3482-4F41-9CC6-407B1D258508}.Debug|x64.Build.0 = Debug|x64 - {28AA9146-3482-4F41-9CC6-407B1D258508}.Release|Win32.ActiveCfg = Release|Win32 - {28AA9146-3482-4F41-9CC6-407B1D258508}.Release|Win32.Build.0 = Release|Win32 - {28AA9146-3482-4F41-9CC6-407B1D258508}.Release|x64.ActiveCfg = Release|x64 - {28AA9146-3482-4F41-9CC6-407B1D258508}.Release|x64.Build.0 = Release|x64 - {339C2249-26B6-4172-B484-85653029AF57}.Configure|Win32.ActiveCfg = Release|Win32 - {339C2249-26B6-4172-B484-85653029AF57}.Configure|Win32.Build.0 = Release|Win32 - {339C2249-26B6-4172-B484-85653029AF57}.Configure|x64.ActiveCfg = Release|Win32 - {339C2249-26B6-4172-B484-85653029AF57}.Debug|Win32.ActiveCfg = Debug|Win32 - {339C2249-26B6-4172-B484-85653029AF57}.Debug|Win32.Build.0 = Debug|Win32 - {339C2249-26B6-4172-B484-85653029AF57}.Debug|x64.ActiveCfg = Debug|x64 - {339C2249-26B6-4172-B484-85653029AF57}.Debug|x64.Build.0 = Debug|x64 - {339C2249-26B6-4172-B484-85653029AF57}.Release|Win32.ActiveCfg = Release|Win32 - {339C2249-26B6-4172-B484-85653029AF57}.Release|Win32.Build.0 = Release|Win32 - {339C2249-26B6-4172-B484-85653029AF57}.Release|x64.ActiveCfg = Release|x64 - {339C2249-26B6-4172-B484-85653029AF57}.Release|x64.Build.0 = Release|x64 - {48FB551D-E37E-42EC-BC97-FF7219774867}.Configure|Win32.ActiveCfg = Release|Win32 - {48FB551D-E37E-42EC-BC97-FF7219774867}.Configure|Win32.Build.0 = Release|Win32 - {48FB551D-E37E-42EC-BC97-FF7219774867}.Configure|x64.ActiveCfg = Release|Win32 - {48FB551D-E37E-42EC-BC97-FF7219774867}.Debug|Win32.ActiveCfg = Debug|Win32 - {48FB551D-E37E-42EC-BC97-FF7219774867}.Debug|Win32.Build.0 = Debug|Win32 - {48FB551D-E37E-42EC-BC97-FF7219774867}.Debug|x64.ActiveCfg = Debug|x64 - {48FB551D-E37E-42EC-BC97-FF7219774867}.Debug|x64.Build.0 = Debug|x64 - {48FB551D-E37E-42EC-BC97-FF7219774867}.Release|Win32.ActiveCfg = Release|Win32 - {48FB551D-E37E-42EC-BC97-FF7219774867}.Release|Win32.Build.0 = Release|Win32 - {48FB551D-E37E-42EC-BC97-FF7219774867}.Release|x64.ActiveCfg = Release|x64 - {48FB551D-E37E-42EC-BC97-FF7219774867}.Release|x64.Build.0 = Release|x64 - {76295AE8-A083-460E-9F80-6F2B8923264A}.Configure|Win32.ActiveCfg = Release|Win32 - {76295AE8-A083-460E-9F80-6F2B8923264A}.Configure|Win32.Build.0 = Release|Win32 - {76295AE8-A083-460E-9F80-6F2B8923264A}.Configure|x64.ActiveCfg = Release|Win32 - {76295AE8-A083-460E-9F80-6F2B8923264A}.Debug|Win32.ActiveCfg = Debug|Win32 - {76295AE8-A083-460E-9F80-6F2B8923264A}.Debug|Win32.Build.0 = Debug|Win32 - {76295AE8-A083-460E-9F80-6F2B8923264A}.Debug|x64.ActiveCfg = Debug|x64 - {76295AE8-A083-460E-9F80-6F2B8923264A}.Debug|x64.Build.0 = Debug|x64 - {76295AE8-A083-460E-9F80-6F2B8923264A}.Release|Win32.ActiveCfg = Release|Win32 - {76295AE8-A083-460E-9F80-6F2B8923264A}.Release|Win32.Build.0 = Release|Win32 - {76295AE8-A083-460E-9F80-6F2B8923264A}.Release|x64.ActiveCfg = Release|x64 - {76295AE8-A083-460E-9F80-6F2B8923264A}.Release|x64.Build.0 = Release|x64 - {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB}.Configure|Win32.ActiveCfg = Release|Win32 - {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB}.Configure|Win32.Build.0 = Release|Win32 - {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB}.Configure|x64.ActiveCfg = Release|Win32 - {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB}.Debug|Win32.ActiveCfg = Debug|Win32 - {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB}.Debug|Win32.Build.0 = Debug|Win32 - {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB}.Debug|x64.ActiveCfg = Debug|x64 - {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB}.Debug|x64.Build.0 = Debug|x64 - {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB}.Release|Win32.ActiveCfg = Release|Win32 - {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB}.Release|Win32.Build.0 = Release|Win32 - {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB}.Release|x64.ActiveCfg = Release|x64 - {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB}.Release|x64.Build.0 = Release|x64 - {059FBAB8-C76D-48A0-AA75-3C57BD3EAFE4}.Configure|Win32.ActiveCfg = Release|Win32 - {059FBAB8-C76D-48A0-AA75-3C57BD3EAFE4}.Configure|Win32.Build.0 = Release|Win32 - {059FBAB8-C76D-48A0-AA75-3C57BD3EAFE4}.Configure|x64.ActiveCfg = Release|Win32 - {059FBAB8-C76D-48A0-AA75-3C57BD3EAFE4}.Debug|Win32.ActiveCfg = Debug|Win32 - {059FBAB8-C76D-48A0-AA75-3C57BD3EAFE4}.Debug|Win32.Build.0 = Debug|Win32 - {059FBAB8-C76D-48A0-AA75-3C57BD3EAFE4}.Debug|x64.ActiveCfg = Debug|x64 - {059FBAB8-C76D-48A0-AA75-3C57BD3EAFE4}.Debug|x64.Build.0 = Debug|x64 - {059FBAB8-C76D-48A0-AA75-3C57BD3EAFE4}.Release|Win32.ActiveCfg = Release|Win32 - {059FBAB8-C76D-48A0-AA75-3C57BD3EAFE4}.Release|Win32.Build.0 = Release|Win32 - {059FBAB8-C76D-48A0-AA75-3C57BD3EAFE4}.Release|x64.ActiveCfg = Release|x64 - {059FBAB8-C76D-48A0-AA75-3C57BD3EAFE4}.Release|x64.Build.0 = Release|x64 - {08CEB1BB-C2A4-4587-B9A9-AEDB8FB44897}.Configure|Win32.ActiveCfg = Release|Win32 - {08CEB1BB-C2A4-4587-B9A9-AEDB8FB44897}.Configure|Win32.Build.0 = Release|Win32 - {08CEB1BB-C2A4-4587-B9A9-AEDB8FB44897}.Configure|x64.ActiveCfg = Release|Win32 - {08CEB1BB-C2A4-4587-B9A9-AEDB8FB44897}.Debug|Win32.ActiveCfg = Debug|Win32 - {08CEB1BB-C2A4-4587-B9A9-AEDB8FB44897}.Debug|Win32.Build.0 = Debug|Win32 - {08CEB1BB-C2A4-4587-B9A9-AEDB8FB44897}.Debug|x64.ActiveCfg = Debug|x64 - {08CEB1BB-C2A4-4587-B9A9-AEDB8FB44897}.Debug|x64.Build.0 = Debug|x64 - {08CEB1BB-C2A4-4587-B9A9-AEDB8FB44897}.Release|Win32.ActiveCfg = Release|Win32 - {08CEB1BB-C2A4-4587-B9A9-AEDB8FB44897}.Release|Win32.Build.0 = Release|Win32 - {08CEB1BB-C2A4-4587-B9A9-AEDB8FB44897}.Release|x64.ActiveCfg = Release|x64 - {08CEB1BB-C2A4-4587-B9A9-AEDB8FB44897}.Release|x64.Build.0 = Release|x64 - {0F8407F3-FA23-4CF1-83A9-DCBE0B361489}.Configure|Win32.ActiveCfg = Release|Win32 - {0F8407F3-FA23-4CF1-83A9-DCBE0B361489}.Configure|Win32.Build.0 = Release|Win32 - {0F8407F3-FA23-4CF1-83A9-DCBE0B361489}.Configure|x64.ActiveCfg = Release|Win32 - {0F8407F3-FA23-4CF1-83A9-DCBE0B361489}.Debug|Win32.ActiveCfg = Debug|Win32 - {0F8407F3-FA23-4CF1-83A9-DCBE0B361489}.Debug|Win32.Build.0 = Debug|Win32 - {0F8407F3-FA23-4CF1-83A9-DCBE0B361489}.Debug|x64.ActiveCfg = Debug|x64 - {0F8407F3-FA23-4CF1-83A9-DCBE0B361489}.Debug|x64.Build.0 = Debug|x64 - {0F8407F3-FA23-4CF1-83A9-DCBE0B361489}.Release|Win32.ActiveCfg = Release|Win32 - {0F8407F3-FA23-4CF1-83A9-DCBE0B361489}.Release|Win32.Build.0 = Release|Win32 - {0F8407F3-FA23-4CF1-83A9-DCBE0B361489}.Release|x64.ActiveCfg = Release|x64 - {0F8407F3-FA23-4CF1-83A9-DCBE0B361489}.Release|x64.Build.0 = Release|x64 - {0622E827-8464-489D-8B1C-B0B496F35C08}.Configure|Win32.ActiveCfg = Release|Win32 - {0622E827-8464-489D-8B1C-B0B496F35C08}.Configure|Win32.Build.0 = Release|Win32 - {0622E827-8464-489D-8B1C-B0B496F35C08}.Configure|x64.ActiveCfg = Release|Win32 - {0622E827-8464-489D-8B1C-B0B496F35C08}.Debug|Win32.ActiveCfg = Debug|Win32 - {0622E827-8464-489D-8B1C-B0B496F35C08}.Debug|Win32.Build.0 = Debug|Win32 - {0622E827-8464-489D-8B1C-B0B496F35C08}.Debug|x64.ActiveCfg = Debug|x64 - {0622E827-8464-489D-8B1C-B0B496F35C08}.Debug|x64.Build.0 = Debug|x64 - {0622E827-8464-489D-8B1C-B0B496F35C08}.Release|Win32.ActiveCfg = Release|Win32 - {0622E827-8464-489D-8B1C-B0B496F35C08}.Release|Win32.Build.0 = Release|Win32 - {0622E827-8464-489D-8B1C-B0B496F35C08}.Release|x64.ActiveCfg = Release|x64 - {0622E827-8464-489D-8B1C-B0B496F35C08}.Release|x64.Build.0 = Release|x64 - {144EEBF6-8C9B-4473-B715-2C821666AF6C}.Configure|Win32.ActiveCfg = Release|Win32 - {144EEBF6-8C9B-4473-B715-2C821666AF6C}.Configure|Win32.Build.0 = Release|Win32 - {144EEBF6-8C9B-4473-B715-2C821666AF6C}.Configure|x64.ActiveCfg = Release|Win32 - {144EEBF6-8C9B-4473-B715-2C821666AF6C}.Debug|Win32.ActiveCfg = Debug|Win32 - {144EEBF6-8C9B-4473-B715-2C821666AF6C}.Debug|Win32.Build.0 = Debug|Win32 - {144EEBF6-8C9B-4473-B715-2C821666AF6C}.Debug|x64.ActiveCfg = Debug|x64 - {144EEBF6-8C9B-4473-B715-2C821666AF6C}.Debug|x64.Build.0 = Debug|x64 - {144EEBF6-8C9B-4473-B715-2C821666AF6C}.Release|Win32.ActiveCfg = Release|Win32 - {144EEBF6-8C9B-4473-B715-2C821666AF6C}.Release|Win32.Build.0 = Release|Win32 - {144EEBF6-8C9B-4473-B715-2C821666AF6C}.Release|x64.ActiveCfg = Release|x64 - {144EEBF6-8C9B-4473-B715-2C821666AF6C}.Release|x64.Build.0 = Release|x64 - {C59374C1-9FC0-4147-B836-327DFDC52D99}.Configure|Win32.ActiveCfg = Release|Win32 - {C59374C1-9FC0-4147-B836-327DFDC52D99}.Configure|Win32.Build.0 = Release|Win32 - {C59374C1-9FC0-4147-B836-327DFDC52D99}.Configure|x64.ActiveCfg = Release|Win32 - {C59374C1-9FC0-4147-B836-327DFDC52D99}.Debug|Win32.ActiveCfg = Debug|Win32 - {C59374C1-9FC0-4147-B836-327DFDC52D99}.Debug|Win32.Build.0 = Debug|Win32 - {C59374C1-9FC0-4147-B836-327DFDC52D99}.Debug|x64.ActiveCfg = Debug|x64 - {C59374C1-9FC0-4147-B836-327DFDC52D99}.Debug|x64.Build.0 = Debug|x64 - {C59374C1-9FC0-4147-B836-327DFDC52D99}.Release|Win32.ActiveCfg = Release|Win32 - {C59374C1-9FC0-4147-B836-327DFDC52D99}.Release|Win32.Build.0 = Release|Win32 - {C59374C1-9FC0-4147-B836-327DFDC52D99}.Release|x64.ActiveCfg = Release|x64 - {C59374C1-9FC0-4147-B836-327DFDC52D99}.Release|x64.Build.0 = Release|x64 - {19514E48-456C-4B9D-8637-F2285476461E}.Configure|Win32.ActiveCfg = Configure|Win32 - {19514E48-456C-4B9D-8637-F2285476461E}.Configure|Win32.Build.0 = Configure|Win32 - {19514E48-456C-4B9D-8637-F2285476461E}.Configure|x64.ActiveCfg = Configure|Win32 - {19514E48-456C-4B9D-8637-F2285476461E}.Debug|Win32.ActiveCfg = Configure|Win32 - {19514E48-456C-4B9D-8637-F2285476461E}.Debug|Win32.Build.0 = Configure|Win32 - {19514E48-456C-4B9D-8637-F2285476461E}.Debug|x64.ActiveCfg = Configure|x64 - {19514E48-456C-4B9D-8637-F2285476461E}.Debug|x64.Build.0 = Configure|x64 - {19514E48-456C-4B9D-8637-F2285476461E}.Release|Win32.ActiveCfg = Configure|Win32 - {19514E48-456C-4B9D-8637-F2285476461E}.Release|Win32.Build.0 = Configure|Win32 - {19514E48-456C-4B9D-8637-F2285476461E}.Release|x64.ActiveCfg = Configure|x64 - {19514E48-456C-4B9D-8637-F2285476461E}.Release|x64.Build.0 = Configure|x64 - {FB6FFD68-C1E4-4DCF-AB02-36D205D5263E}.Configure|Win32.ActiveCfg = Release|Win32 - {FB6FFD68-C1E4-4DCF-AB02-36D205D5263E}.Configure|Win32.Build.0 = Release|Win32 - {FB6FFD68-C1E4-4DCF-AB02-36D205D5263E}.Configure|x64.ActiveCfg = Release|Win32 - {FB6FFD68-C1E4-4DCF-AB02-36D205D5263E}.Debug|Win32.ActiveCfg = Debug|Win32 - {FB6FFD68-C1E4-4DCF-AB02-36D205D5263E}.Debug|Win32.Build.0 = Debug|Win32 - {FB6FFD68-C1E4-4DCF-AB02-36D205D5263E}.Debug|x64.ActiveCfg = Debug|x64 - {FB6FFD68-C1E4-4DCF-AB02-36D205D5263E}.Debug|x64.Build.0 = Debug|x64 - {FB6FFD68-C1E4-4DCF-AB02-36D205D5263E}.Release|Win32.ActiveCfg = Release|Win32 - {FB6FFD68-C1E4-4DCF-AB02-36D205D5263E}.Release|Win32.Build.0 = Release|Win32 - {FB6FFD68-C1E4-4DCF-AB02-36D205D5263E}.Release|x64.ActiveCfg = Release|x64 - {FB6FFD68-C1E4-4DCF-AB02-36D205D5263E}.Release|x64.Build.0 = Release|x64 - {ADE86BDC-B04C-43DF-B9BB-90492C7B14AC}.Configure|Win32.ActiveCfg = Release|Win32 - {ADE86BDC-B04C-43DF-B9BB-90492C7B14AC}.Configure|Win32.Build.0 = Release|Win32 - {ADE86BDC-B04C-43DF-B9BB-90492C7B14AC}.Configure|x64.ActiveCfg = Release|Win32 - {ADE86BDC-B04C-43DF-B9BB-90492C7B14AC}.Debug|Win32.ActiveCfg = Debug|Win32 - {ADE86BDC-B04C-43DF-B9BB-90492C7B14AC}.Debug|Win32.Build.0 = Debug|Win32 - {ADE86BDC-B04C-43DF-B9BB-90492C7B14AC}.Debug|x64.ActiveCfg = Debug|x64 - {ADE86BDC-B04C-43DF-B9BB-90492C7B14AC}.Debug|x64.Build.0 = Debug|x64 - {ADE86BDC-B04C-43DF-B9BB-90492C7B14AC}.Release|Win32.ActiveCfg = Release|Win32 - {ADE86BDC-B04C-43DF-B9BB-90492C7B14AC}.Release|Win32.Build.0 = Release|Win32 - {ADE86BDC-B04C-43DF-B9BB-90492C7B14AC}.Release|x64.ActiveCfg = Release|x64 - {ADE86BDC-B04C-43DF-B9BB-90492C7B14AC}.Release|x64.Build.0 = Release|x64 - {B13476BC-30AB-4EA0-BC1E-212C0A459405}.Configure|Win32.ActiveCfg = Release|Win32 - {B13476BC-30AB-4EA0-BC1E-212C0A459405}.Configure|Win32.Build.0 = Release|Win32 - {B13476BC-30AB-4EA0-BC1E-212C0A459405}.Configure|x64.ActiveCfg = Release|Win32 - {B13476BC-30AB-4EA0-BC1E-212C0A459405}.Debug|Win32.ActiveCfg = Debug|Win32 - {B13476BC-30AB-4EA0-BC1E-212C0A459405}.Debug|Win32.Build.0 = Debug|Win32 - {B13476BC-30AB-4EA0-BC1E-212C0A459405}.Debug|x64.ActiveCfg = Debug|x64 - {B13476BC-30AB-4EA0-BC1E-212C0A459405}.Debug|x64.Build.0 = Debug|x64 - {B13476BC-30AB-4EA0-BC1E-212C0A459405}.Release|Win32.ActiveCfg = Release|Win32 - {B13476BC-30AB-4EA0-BC1E-212C0A459405}.Release|Win32.Build.0 = Release|Win32 - {B13476BC-30AB-4EA0-BC1E-212C0A459405}.Release|x64.ActiveCfg = Release|x64 - {B13476BC-30AB-4EA0-BC1E-212C0A459405}.Release|x64.Build.0 = Release|x64 - {4FBC40A5-E626-4A6C-A9D3-FAE5C28D30CC}.Configure|Win32.ActiveCfg = Release|Win32 - {4FBC40A5-E626-4A6C-A9D3-FAE5C28D30CC}.Configure|Win32.Build.0 = Release|Win32 - {4FBC40A5-E626-4A6C-A9D3-FAE5C28D30CC}.Configure|x64.ActiveCfg = Release|Win32 - {4FBC40A5-E626-4A6C-A9D3-FAE5C28D30CC}.Debug|Win32.ActiveCfg = Debug|Win32 - {4FBC40A5-E626-4A6C-A9D3-FAE5C28D30CC}.Debug|Win32.Build.0 = Debug|Win32 - {4FBC40A5-E626-4A6C-A9D3-FAE5C28D30CC}.Debug|x64.ActiveCfg = Debug|x64 - {4FBC40A5-E626-4A6C-A9D3-FAE5C28D30CC}.Debug|x64.Build.0 = Debug|x64 - {4FBC40A5-E626-4A6C-A9D3-FAE5C28D30CC}.Release|Win32.ActiveCfg = Release|Win32 - {4FBC40A5-E626-4A6C-A9D3-FAE5C28D30CC}.Release|Win32.Build.0 = Release|Win32 - {4FBC40A5-E626-4A6C-A9D3-FAE5C28D30CC}.Release|x64.ActiveCfg = Release|x64 - {4FBC40A5-E626-4A6C-A9D3-FAE5C28D30CC}.Release|x64.Build.0 = Release|x64 - {3DC216F5-1DDD-478A-84F8-C124E5C31982}.Configure|Win32.ActiveCfg = Release|Win32 - {3DC216F5-1DDD-478A-84F8-C124E5C31982}.Configure|Win32.Build.0 = Release|Win32 - {3DC216F5-1DDD-478A-84F8-C124E5C31982}.Configure|x64.ActiveCfg = Release|Win32 - {3DC216F5-1DDD-478A-84F8-C124E5C31982}.Debug|Win32.ActiveCfg = Debug|Win32 - {3DC216F5-1DDD-478A-84F8-C124E5C31982}.Debug|Win32.Build.0 = Debug|Win32 - {3DC216F5-1DDD-478A-84F8-C124E5C31982}.Debug|x64.ActiveCfg = Debug|x64 - {3DC216F5-1DDD-478A-84F8-C124E5C31982}.Debug|x64.Build.0 = Debug|x64 - {3DC216F5-1DDD-478A-84F8-C124E5C31982}.Release|Win32.ActiveCfg = Release|Win32 - {3DC216F5-1DDD-478A-84F8-C124E5C31982}.Release|Win32.Build.0 = Release|Win32 - {3DC216F5-1DDD-478A-84F8-C124E5C31982}.Release|x64.ActiveCfg = Release|x64 - {3DC216F5-1DDD-478A-84F8-C124E5C31982}.Release|x64.Build.0 = Release|x64 - {0FF2B75C-49C1-4B49-A44A-531C93000296}.Configure|Win32.ActiveCfg = Release|Win32 - {0FF2B75C-49C1-4B49-A44A-531C93000296}.Configure|Win32.Build.0 = Release|Win32 - {0FF2B75C-49C1-4B49-A44A-531C93000296}.Configure|x64.ActiveCfg = Release|Win32 - {0FF2B75C-49C1-4B49-A44A-531C93000296}.Debug|Win32.ActiveCfg = Debug|Win32 - {0FF2B75C-49C1-4B49-A44A-531C93000296}.Debug|Win32.Build.0 = Debug|Win32 - {0FF2B75C-49C1-4B49-A44A-531C93000296}.Debug|x64.ActiveCfg = Debug|x64 - {0FF2B75C-49C1-4B49-A44A-531C93000296}.Debug|x64.Build.0 = Debug|x64 - {0FF2B75C-49C1-4B49-A44A-531C93000296}.Release|Win32.ActiveCfg = Release|Win32 - {0FF2B75C-49C1-4B49-A44A-531C93000296}.Release|Win32.Build.0 = Release|Win32 - {0FF2B75C-49C1-4B49-A44A-531C93000296}.Release|x64.ActiveCfg = Release|x64 - {0FF2B75C-49C1-4B49-A44A-531C93000296}.Release|x64.Build.0 = Release|x64 - {BB16C7EE-B4ED-4714-B5ED-B775C62A6612}.Configure|Win32.ActiveCfg = Release|Win32 - {BB16C7EE-B4ED-4714-B5ED-B775C62A6612}.Configure|Win32.Build.0 = Release|Win32 - {BB16C7EE-B4ED-4714-B5ED-B775C62A6612}.Configure|x64.ActiveCfg = Release|Win32 - {BB16C7EE-B4ED-4714-B5ED-B775C62A6612}.Debug|Win32.ActiveCfg = Debug|Win32 - {BB16C7EE-B4ED-4714-B5ED-B775C62A6612}.Debug|Win32.Build.0 = Debug|Win32 - {BB16C7EE-B4ED-4714-B5ED-B775C62A6612}.Debug|x64.ActiveCfg = Debug|x64 - {BB16C7EE-B4ED-4714-B5ED-B775C62A6612}.Debug|x64.Build.0 = Debug|x64 - {BB16C7EE-B4ED-4714-B5ED-B775C62A6612}.Release|Win32.ActiveCfg = Release|Win32 - {BB16C7EE-B4ED-4714-B5ED-B775C62A6612}.Release|Win32.Build.0 = Release|Win32 - {BB16C7EE-B4ED-4714-B5ED-B775C62A6612}.Release|x64.ActiveCfg = Release|x64 - {BB16C7EE-B4ED-4714-B5ED-B775C62A6612}.Release|x64.Build.0 = Release|x64 - {5E249789-49E1-4600-B12B-8AD2BB6439B2}.Configure|Win32.ActiveCfg = Release|Win32 - {5E249789-49E1-4600-B12B-8AD2BB6439B2}.Configure|Win32.Build.0 = Release|Win32 - {5E249789-49E1-4600-B12B-8AD2BB6439B2}.Configure|x64.ActiveCfg = Release|Win32 - {5E249789-49E1-4600-B12B-8AD2BB6439B2}.Debug|Win32.ActiveCfg = Debug|Win32 - {5E249789-49E1-4600-B12B-8AD2BB6439B2}.Debug|Win32.Build.0 = Debug|Win32 - {5E249789-49E1-4600-B12B-8AD2BB6439B2}.Debug|x64.ActiveCfg = Debug|x64 - {5E249789-49E1-4600-B12B-8AD2BB6439B2}.Debug|x64.Build.0 = Debug|x64 - {5E249789-49E1-4600-B12B-8AD2BB6439B2}.Release|Win32.ActiveCfg = Release|Win32 - {5E249789-49E1-4600-B12B-8AD2BB6439B2}.Release|Win32.Build.0 = Release|Win32 - {5E249789-49E1-4600-B12B-8AD2BB6439B2}.Release|x64.ActiveCfg = Release|x64 - {5E249789-49E1-4600-B12B-8AD2BB6439B2}.Release|x64.Build.0 = Release|x64 - {342CF48F-760A-4040-A9A1-7D75AA2471CE}.Configure|Win32.ActiveCfg = Release|Win32 - {342CF48F-760A-4040-A9A1-7D75AA2471CE}.Configure|Win32.Build.0 = Release|Win32 - {342CF48F-760A-4040-A9A1-7D75AA2471CE}.Configure|x64.ActiveCfg = Release|Win32 - {342CF48F-760A-4040-A9A1-7D75AA2471CE}.Debug|Win32.ActiveCfg = Debug|Win32 - {342CF48F-760A-4040-A9A1-7D75AA2471CE}.Debug|Win32.Build.0 = Debug|Win32 - {342CF48F-760A-4040-A9A1-7D75AA2471CE}.Debug|x64.ActiveCfg = Debug|x64 - {342CF48F-760A-4040-A9A1-7D75AA2471CE}.Debug|x64.Build.0 = Debug|x64 - {342CF48F-760A-4040-A9A1-7D75AA2471CE}.Release|Win32.ActiveCfg = Release|Win32 - {342CF48F-760A-4040-A9A1-7D75AA2471CE}.Release|Win32.Build.0 = Release|Win32 - {342CF48F-760A-4040-A9A1-7D75AA2471CE}.Release|x64.ActiveCfg = Release|x64 - {342CF48F-760A-4040-A9A1-7D75AA2471CE}.Release|x64.Build.0 = Release|x64 - {057777CD-DED5-46DF-BF9A-6B76DE212549}.Configure|Win32.ActiveCfg = Release|Win32 - {057777CD-DED5-46DF-BF9A-6B76DE212549}.Configure|Win32.Build.0 = Release|Win32 - {057777CD-DED5-46DF-BF9A-6B76DE212549}.Configure|x64.ActiveCfg = Release|Win32 - {057777CD-DED5-46DF-BF9A-6B76DE212549}.Debug|Win32.ActiveCfg = Debug|Win32 - {057777CD-DED5-46DF-BF9A-6B76DE212549}.Debug|Win32.Build.0 = Debug|Win32 - {057777CD-DED5-46DF-BF9A-6B76DE212549}.Debug|x64.ActiveCfg = Debug|x64 - {057777CD-DED5-46DF-BF9A-6B76DE212549}.Debug|x64.Build.0 = Debug|x64 - {057777CD-DED5-46DF-BF9A-6B76DE212549}.Release|Win32.ActiveCfg = Release|Win32 - {057777CD-DED5-46DF-BF9A-6B76DE212549}.Release|Win32.Build.0 = Release|Win32 - {057777CD-DED5-46DF-BF9A-6B76DE212549}.Release|x64.ActiveCfg = Release|x64 - {057777CD-DED5-46DF-BF9A-6B76DE212549}.Release|x64.Build.0 = Release|x64 - {006D8B41-C3C7-4448-85E1-AF8907E591E5}.Configure|Win32.ActiveCfg = Release|Win32 - {006D8B41-C3C7-4448-85E1-AF8907E591E5}.Configure|Win32.Build.0 = Release|Win32 - {006D8B41-C3C7-4448-85E1-AF8907E591E5}.Configure|x64.ActiveCfg = Release|Win32 - {006D8B41-C3C7-4448-85E1-AF8907E591E5}.Debug|Win32.ActiveCfg = Debug|Win32 - {006D8B41-C3C7-4448-85E1-AF8907E591E5}.Debug|Win32.Build.0 = Debug|Win32 - {006D8B41-C3C7-4448-85E1-AF8907E591E5}.Debug|x64.ActiveCfg = Debug|x64 - {006D8B41-C3C7-4448-85E1-AF8907E591E5}.Debug|x64.Build.0 = Debug|x64 - {006D8B41-C3C7-4448-85E1-AF8907E591E5}.Release|Win32.ActiveCfg = Release|Win32 - {006D8B41-C3C7-4448-85E1-AF8907E591E5}.Release|Win32.Build.0 = Release|Win32 - {006D8B41-C3C7-4448-85E1-AF8907E591E5}.Release|x64.ActiveCfg = Release|x64 - {006D8B41-C3C7-4448-85E1-AF8907E591E5}.Release|x64.Build.0 = Release|x64 - {E0B1E329-BE3E-456D-B372-5F397BE42C84}.Configure|Win32.ActiveCfg = Release|Win32 - {E0B1E329-BE3E-456D-B372-5F397BE42C84}.Configure|Win32.Build.0 = Release|Win32 - {E0B1E329-BE3E-456D-B372-5F397BE42C84}.Configure|x64.ActiveCfg = Release|Win32 - {E0B1E329-BE3E-456D-B372-5F397BE42C84}.Debug|Win32.ActiveCfg = Debug|Win32 - {E0B1E329-BE3E-456D-B372-5F397BE42C84}.Debug|Win32.Build.0 = Debug|Win32 - {E0B1E329-BE3E-456D-B372-5F397BE42C84}.Debug|x64.ActiveCfg = Debug|x64 - {E0B1E329-BE3E-456D-B372-5F397BE42C84}.Debug|x64.Build.0 = Debug|x64 - {E0B1E329-BE3E-456D-B372-5F397BE42C84}.Release|Win32.ActiveCfg = Release|Win32 - {E0B1E329-BE3E-456D-B372-5F397BE42C84}.Release|Win32.Build.0 = Release|Win32 - {E0B1E329-BE3E-456D-B372-5F397BE42C84}.Release|x64.ActiveCfg = Release|x64 - {E0B1E329-BE3E-456D-B372-5F397BE42C84}.Release|x64.Build.0 = Release|x64 - {64D8AA46-88DB-41F4-B837-053AE02406B8}.Configure|Win32.ActiveCfg = Release|Win32 - {64D8AA46-88DB-41F4-B837-053AE02406B8}.Configure|Win32.Build.0 = Release|Win32 - {64D8AA46-88DB-41F4-B837-053AE02406B8}.Configure|x64.ActiveCfg = Release|Win32 - {64D8AA46-88DB-41F4-B837-053AE02406B8}.Debug|Win32.ActiveCfg = Debug|Win32 - {64D8AA46-88DB-41F4-B837-053AE02406B8}.Debug|Win32.Build.0 = Debug|Win32 - {64D8AA46-88DB-41F4-B837-053AE02406B8}.Debug|x64.ActiveCfg = Debug|x64 - {64D8AA46-88DB-41F4-B837-053AE02406B8}.Debug|x64.Build.0 = Debug|x64 - {64D8AA46-88DB-41F4-B837-053AE02406B8}.Release|Win32.ActiveCfg = Release|Win32 - {64D8AA46-88DB-41F4-B837-053AE02406B8}.Release|Win32.Build.0 = Release|Win32 - {64D8AA46-88DB-41F4-B837-053AE02406B8}.Release|x64.ActiveCfg = Release|x64 - {64D8AA46-88DB-41F4-B837-053AE02406B8}.Release|x64.Build.0 = Release|x64 - {5FF862CE-80A0-4B48-A80B-68AE325A0432}.Configure|Win32.ActiveCfg = Release|Win32 - {5FF862CE-80A0-4B48-A80B-68AE325A0432}.Configure|Win32.Build.0 = Release|Win32 - {5FF862CE-80A0-4B48-A80B-68AE325A0432}.Configure|x64.ActiveCfg = Release|Win32 - {5FF862CE-80A0-4B48-A80B-68AE325A0432}.Debug|Win32.ActiveCfg = Debug|Win32 - {5FF862CE-80A0-4B48-A80B-68AE325A0432}.Debug|Win32.Build.0 = Debug|Win32 - {5FF862CE-80A0-4B48-A80B-68AE325A0432}.Debug|x64.ActiveCfg = Debug|x64 - {5FF862CE-80A0-4B48-A80B-68AE325A0432}.Debug|x64.Build.0 = Debug|x64 - {5FF862CE-80A0-4B48-A80B-68AE325A0432}.Release|Win32.ActiveCfg = Release|Win32 - {5FF862CE-80A0-4B48-A80B-68AE325A0432}.Release|Win32.Build.0 = Release|Win32 - {5FF862CE-80A0-4B48-A80B-68AE325A0432}.Release|x64.ActiveCfg = Release|x64 - {5FF862CE-80A0-4B48-A80B-68AE325A0432}.Release|x64.Build.0 = Release|x64 - {ACBE81D9-64B1-4133-823A-807A4E60B454}.Configure|Win32.ActiveCfg = Release|Win32 - {ACBE81D9-64B1-4133-823A-807A4E60B454}.Configure|Win32.Build.0 = Release|Win32 - {ACBE81D9-64B1-4133-823A-807A4E60B454}.Configure|x64.ActiveCfg = Release|Win32 - {ACBE81D9-64B1-4133-823A-807A4E60B454}.Debug|Win32.ActiveCfg = Debug|Win32 - {ACBE81D9-64B1-4133-823A-807A4E60B454}.Debug|Win32.Build.0 = Debug|Win32 - {ACBE81D9-64B1-4133-823A-807A4E60B454}.Debug|x64.ActiveCfg = Debug|x64 - {ACBE81D9-64B1-4133-823A-807A4E60B454}.Debug|x64.Build.0 = Debug|x64 - {ACBE81D9-64B1-4133-823A-807A4E60B454}.Release|Win32.ActiveCfg = Release|Win32 - {ACBE81D9-64B1-4133-823A-807A4E60B454}.Release|Win32.Build.0 = Release|Win32 - {ACBE81D9-64B1-4133-823A-807A4E60B454}.Release|x64.ActiveCfg = Release|x64 - {ACBE81D9-64B1-4133-823A-807A4E60B454}.Release|x64.Build.0 = Release|x64 - {57249192-8E29-4D85-8B7A-FEFF1760B1DA}.Configure|Win32.ActiveCfg = Release|Win32 - {57249192-8E29-4D85-8B7A-FEFF1760B1DA}.Configure|Win32.Build.0 = Release|Win32 - {57249192-8E29-4D85-8B7A-FEFF1760B1DA}.Configure|x64.ActiveCfg = Release|Win32 - {57249192-8E29-4D85-8B7A-FEFF1760B1DA}.Debug|Win32.ActiveCfg = Debug|Win32 - {57249192-8E29-4D85-8B7A-FEFF1760B1DA}.Debug|Win32.Build.0 = Debug|Win32 - {57249192-8E29-4D85-8B7A-FEFF1760B1DA}.Debug|x64.ActiveCfg = Debug|x64 - {57249192-8E29-4D85-8B7A-FEFF1760B1DA}.Debug|x64.Build.0 = Debug|x64 - {57249192-8E29-4D85-8B7A-FEFF1760B1DA}.Release|Win32.ActiveCfg = Release|Win32 - {57249192-8E29-4D85-8B7A-FEFF1760B1DA}.Release|Win32.Build.0 = Release|Win32 - {57249192-8E29-4D85-8B7A-FEFF1760B1DA}.Release|x64.ActiveCfg = Release|x64 - {57249192-8E29-4D85-8B7A-FEFF1760B1DA}.Release|x64.Build.0 = Release|x64 - {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D62}.Configure|Win32.ActiveCfg = Release|Win32 - {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D62}.Configure|Win32.Build.0 = Release|Win32 - {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D62}.Configure|x64.ActiveCfg = Release|Win32 - {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D62}.Debug|Win32.ActiveCfg = Debug|Win32 - {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D62}.Debug|Win32.Build.0 = Debug|Win32 - {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D62}.Debug|x64.ActiveCfg = Debug|x64 - {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D62}.Debug|x64.Build.0 = Debug|x64 - {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D62}.Release|Win32.ActiveCfg = Release|Win32 - {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D62}.Release|Win32.Build.0 = Release|Win32 - {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D62}.Release|x64.ActiveCfg = Release|x64 - {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D62}.Release|x64.Build.0 = Release|x64 - {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D61}.Configure|Win32.ActiveCfg = Release|Win32 - {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D61}.Configure|Win32.Build.0 = Release|Win32 - {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D61}.Configure|x64.ActiveCfg = Release|Win32 - {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D61}.Debug|Win32.ActiveCfg = Debug|Win32 - {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D61}.Debug|Win32.Build.0 = Debug|Win32 - {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D61}.Debug|x64.ActiveCfg = Debug|x64 - {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D61}.Debug|x64.Build.0 = Debug|x64 - {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D61}.Release|Win32.ActiveCfg = Release|Win32 - {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D61}.Release|Win32.Build.0 = Release|Win32 - {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D61}.Release|x64.ActiveCfg = Release|x64 - {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D61}.Release|x64.Build.0 = Release|x64 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(DPCodeReviewSolutionGUID) = preSolution - DPCodeReviewSolutionGUID = {00000000-0000-0000-0000-000000000000} - EndGlobalSection -EndGlobal diff --git a/win32/opt/opt.vcproj b/win32/opt/opt.vcproj deleted file mode 100644 index 8ef1629eb7f..00000000000 --- a/win32/opt/opt.vcproj +++ /dev/null @@ -1,393 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/win32/unistd.h b/win32/unistd.h deleted file mode 100644 index 412afcc0a66..00000000000 --- a/win32/unistd.h +++ /dev/null @@ -1 +0,0 @@ -// This file has to be here because it's #included from the auto generated FileLexer.cpp diff --git a/win32/x86/x86.vcproj b/win32/x86/x86.vcproj deleted file mode 100644 index b5d10e8291f..00000000000 --- a/win32/x86/x86.vcproj +++ /dev/null @@ -1,620 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - From a0482fa4e7fa27b01184f938097f0666b78016dd Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Thu, 16 Sep 2010 21:14:28 +0000 Subject: [PATCH 2/4] Make vendor/clang/dist exactly the same as upstream's r108428. Some files and directories were already added/removed in the upstream repository, but were not added/removed here, when the previous snapshot was imported. Note: I did not import the file test/Lexer/conflict-marker.c, because it contains merge conflict markers on purpose, which upsets our pre-commit hooks. Approved by: rpaulo (mentor) --- VER | 1 - docs/BlockImplementation.txt | 647 ----- include/clang/AST/DeclNodes.def | 165 -- include/clang/AST/StmtNodes.def | 165 -- lib/Headers/arm_neon.h | 537 ---- lib/Headers/arm_neon.td | 341 --- tools/CIndex/CIndex.cpp | 2589 -------------------- tools/CIndex/CIndex.darwin.exports | 81 - tools/CIndex/CIndex.exports | 81 - tools/CIndex/CIndexCodeCompletion.cpp | 512 ---- tools/CIndex/CIndexDiagnostic.cpp | 285 --- tools/CIndex/CIndexDiagnostic.h | 53 - tools/CIndex/CIndexInclusionStack.cpp | 67 - tools/CIndex/CIndexUSRs.cpp | 469 ---- tools/CIndex/CIndexer.cpp | 154 -- tools/CIndex/CIndexer.h | 78 - tools/CIndex/CMakeLists.txt | 56 - tools/CIndex/CXCursor.cpp | 369 --- tools/CIndex/CXCursor.h | 112 - tools/CIndex/CXSourceLocation.h | 75 - tools/CIndex/Makefile | 55 - tools/index-test/CMakeLists.txt | 23 - tools/index-test/Makefile | 25 - tools/index-test/index-test.cpp | 334 --- utils/pch-test.pl | 61 - win32/clangAST/clangAST.vcproj | 347 --- win32/clangAnalysis/clangAnalysis.vcproj | 351 --- win32/clangBasic/clangBasic.vcproj | 236 -- win32/clangCodeGen/clangCodeGen.vcproj | 271 -- win32/clangDriver/clangDriver.vcproj | 270 -- win32/clangLex/clangLex.vcproj | 283 --- win32/clangLibDriver/clangLibDriver.vcproj | 205 -- win32/clangParse/clangParse.vcproj | 248 -- win32/clangRewrite/clangRewrite.vcproj | 191 -- win32/clangSema/clangSema.vcproj | 263 -- www/analyzer/menu.js | 17 - 36 files changed, 10017 deletions(-) delete mode 100644 VER delete mode 100644 docs/BlockImplementation.txt delete mode 100644 include/clang/AST/DeclNodes.def delete mode 100644 include/clang/AST/StmtNodes.def delete mode 100644 lib/Headers/arm_neon.h delete mode 100644 lib/Headers/arm_neon.td delete mode 100644 tools/CIndex/CIndex.cpp delete mode 100644 tools/CIndex/CIndex.darwin.exports delete mode 100644 tools/CIndex/CIndex.exports delete mode 100644 tools/CIndex/CIndexCodeCompletion.cpp delete mode 100644 tools/CIndex/CIndexDiagnostic.cpp delete mode 100644 tools/CIndex/CIndexDiagnostic.h delete mode 100644 tools/CIndex/CIndexInclusionStack.cpp delete mode 100644 tools/CIndex/CIndexUSRs.cpp delete mode 100644 tools/CIndex/CIndexer.cpp delete mode 100644 tools/CIndex/CIndexer.h delete mode 100644 tools/CIndex/CMakeLists.txt delete mode 100644 tools/CIndex/CXCursor.cpp delete mode 100644 tools/CIndex/CXCursor.h delete mode 100644 tools/CIndex/CXSourceLocation.h delete mode 100644 tools/CIndex/Makefile delete mode 100644 tools/index-test/CMakeLists.txt delete mode 100644 tools/index-test/Makefile delete mode 100644 tools/index-test/index-test.cpp delete mode 100755 utils/pch-test.pl delete mode 100644 win32/clangAST/clangAST.vcproj delete mode 100644 win32/clangAnalysis/clangAnalysis.vcproj delete mode 100644 win32/clangBasic/clangBasic.vcproj delete mode 100644 win32/clangCodeGen/clangCodeGen.vcproj delete mode 100644 win32/clangDriver/clangDriver.vcproj delete mode 100644 win32/clangLex/clangLex.vcproj delete mode 100644 win32/clangLibDriver/clangLibDriver.vcproj delete mode 100644 win32/clangParse/clangParse.vcproj delete mode 100644 win32/clangRewrite/clangRewrite.vcproj delete mode 100644 win32/clangSema/clangSema.vcproj delete mode 100644 www/analyzer/menu.js diff --git a/VER b/VER deleted file mode 100644 index cd5ac039d67..00000000000 --- a/VER +++ /dev/null @@ -1 +0,0 @@ -2.0 diff --git a/docs/BlockImplementation.txt b/docs/BlockImplementation.txt deleted file mode 100644 index c420455979c..00000000000 --- a/docs/BlockImplementation.txt +++ /dev/null @@ -1,647 +0,0 @@ -Block Implementation Specification - -Copyright 2008-2009 Apple, Inc. -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - -0. History - -2008/7/14 - created -2008/8/21 - revised, C++ -2008/9/24 - add NULL isa field to __block storage -2008/10/1 - revise block layout to use a static descriptor structure -2008/10/6 - revise block layout to use an unsigned long int flags -2008/10/28 - specify use of _Block_object_assign/dispose for all "Object" types in helper functions -2008/10/30 - revise new layout to have invoke function in same place -2008/10/30 - add __weak support - -This document describes the Apple ABI implementation specification of Blocks. - -1. High Level - -A Block consists of a structure of the following form: - -struct Block_literal_1 { - void *isa; // initialized to &_NSConcreteStackBlock or &_NSConcreteGlobalBlock - int flags; - int reserved; - void (*invoke)(void *, ...); - struct Block_descriptor_1 { - unsigned long int reserved; // NULL - unsigned long int size; // sizeof(struct Block_literal_1) - // optional helper functions - void (*copy_helper)(void *dst, void *src); - void (*dispose_helper)(void *src); - } *descriptor; - // imported variables -}; - -The following flags bits are used by the compiler: - -enum { - BLOCK_HAS_COPY_DISPOSE = (1 << 25), - BLOCK_HAS_CTOR = (1 << 26), // helpers have C++ code - BLOCK_IS_GLOBAL = (1 << 28), - BLOCK_HAS_DESCRIPTOR = (1 << 29), // interim until complete world build is accomplished -}; - -Block literals may occur within functions where the structure is created in stack local memory. They may also appear as initialization expressions for Block variables of global or static local variables. - -When a Block literal expression is evaluated the stack based structure is initialized as follows: - -1) static descriptor structure is declared and initialized as follows: -1a) the invoke function pointer is set to a function that takes the Block structure as its first argument and the rest of the arguments (if any) to the Block and executes the Block compound statement. -1b) the size field is set to the size of the following Block literal structure. -1c) the copy_helper and dispose_helper function pointers are set to respective helper functions if they are required by the Block literal -2) a stack (or global) Block literal data structure is created and initialized as follows: -2a) the isa field is set to the address of the external _NSConcreteStackBlock, which is a block of uninitialized memory supplied in libSystem, or _NSConcreteGlobalBlock if this is a static or file level block literal. -2) The flags field is set to zero unless there are variables imported into the block that need helper functions for program level Block_copy() and Block_release() operations, in which case the (1<<25) flags bit is set. - -As an example, the Block literal expression - ^ { printf("hello world\n"); } -would cause to be created on a 32-bit system: - -struct __block_literal_1 { - void *isa; - int flags; - int reserved; - void (*invoke)(struct __block_literal_1 *); - struct __block_descriptor_1 *descriptor; -}; - -void __block_invoke_1(struct __block_literal_1 *_block) { - printf("hello world\n"); -} - -static struct __block_descriptor_1 { - unsigned long int reserved; - unsigned long int Block_size; -} __block_descriptor_1 = { 0, sizeof(struct __block_literal_1), __block_invoke_1 }; - -and where the block literal appeared - - struct __block_literal_1 _block_literal = { - &_NSConcreteStackBlock, - (1<<29), , - __block_invoke_1, - &__block_descriptor_1 - }; - -Blocks import other Block references, const copies of other variables, and variables marked __block. In Objective-C variables may additionally be objects. - -When a Block literal expression used as the initial value of a global or static local variable it is initialized as follows: - struct __block_literal_1 __block_literal_1 = { - &_NSConcreteGlobalBlock, - (1<<28)|(1<<29), , - __block_invoke_1, - &__block_descriptor_1 - }; -that is, a different address is provided as the first value and a particular (1<<28) bit is set in the flags field, and otherwise it is the same as for stack based Block literals. This is an optimization that can be used for any Block literal that imports no const or __block storage variables. - - -2. Imported Variables - -Variables of "auto" storage class are imported as const copies. Variables of "__block" storage class are imported as a pointer to an enclosing data structure. Global variables are simply referenced and not considered as imported. - -2.1 Imported const copy variables - -Automatic storage variables not marked with __block are imported as const copies. - -The simplest example is that of importing a variable of type int. - - int x = 10; - void (^vv)(void) = ^{ printf("x is %d\n", x); } - x = 11; - vv(); - -would be compiled - -struct __block_literal_2 { - void *isa; - int flags; - int reserved; - void (*invoke)(struct __block_literal_2 *); - struct __block_descriptor_2 *descriptor; - const int x; -}; - -void __block_invoke_2(struct __block_literal_2 *_block) { - printf("x is %d\n", _block->x); -} - -static struct __block_descriptor_2 { - unsigned long int reserved; - unsigned long int Block_size; -} __block_descriptor_2 = { 0, sizeof(struct __block_literal_2) }; - -and - - struct __block_literal_2 __block_literal_2 = { - &_NSConcreteStackBlock, - (1<<29), , - __block_invoke_2, - &__block_descriptor_2, - x - }; - -In summary, scalars, structures, unions, and function pointers are generally imported as const copies with no need for helper functions. - -2.2 Imported const copy of Block reference - -The first case where copy and dispose helper functions are required is for the case of when a block itself is imported. In this case both a copy_helper function and a dispose_helper function are needed. The copy_helper function is passed both the existing stack based pointer and the pointer to the new heap version and should call back into the runtime to actually do the copy operation on the imported fields within the block. The runtime functions are all described in Section 5.0 Runtime Helper Functions. - -An example: - - void (^existingBlock)(void) = ...; - void (^vv)(void) = ^{ existingBlock(); } - vv(); - -struct __block_literal_3 { - ...; // existing block -}; - -struct __block_literal_4 { - void *isa; - int flags; - int reserved; - void (*invoke)(struct __block_literal_4 *); - struct __block_literal_3 *const existingBlock; -}; - -void __block_invoke_4(struct __block_literal_2 *_block) { - __block->existingBlock->invoke(__block->existingBlock); -} - -void __block_copy_4(struct __block_literal_4 *dst, struct __block_literal_4 *src) { - //_Block_copy_assign(&dst->existingBlock, src->existingBlock, 0); - _Block_object_assign(&dst->existingBlock, src->existingBlock, BLOCK_FIELD_IS_BLOCK); -} - -void __block_dispose_4(struct __block_literal_4 *src) { - // was _Block_destroy - _Block_object_dispose(src->existingBlock, BLOCK_FIELD_IS_BLOCK); -} - -static struct __block_descriptor_4 { - unsigned long int reserved; - unsigned long int Block_size; - void (*copy_helper)(struct __block_literal_4 *dst, struct __block_literal_4 *src); - void (*dispose_helper)(struct __block_literal_4 *); -} __block_descriptor_4 = { - 0, - sizeof(struct __block_literal_4), - __block_copy_4, - __block_dispose_4, -}; - -and where it is used - - struct __block_literal_4 _block_literal = { - &_NSConcreteStackBlock, - (1<<25)|(1<<29), - __block_invoke_4, - & __block_descriptor_4 - existingBlock, - }; - -2.2.1 Importing __attribute__((NSObject)) variables. - -GCC introduces __attribute__((NSObject)) on structure pointers to mean "this is an object". This is useful because many low level data structures are declared as opaque structure pointers, e.g. CFStringRef, CFArrayRef, etc. When used from C, however, these are still really objects and are the second case where that requires copy and dispose helper functions to be generated. The copy helper functions generated by the compiler should use the _Block_object_assign runtime helper function and in the dispose helper the _Block_object_dispose runtime helper function should be called. - -For example, block xyzzy in the following - - struct Opaque *__attribute__((NSObject)) objectPointer = ...; - ... - void (^xyzzy)(void) = ^{ CFPrint(objectPointer); }; - -would have helper functions - -void __block_copy_xyzzy(struct __block_literal_5 *dst, struct __block_literal_5 *src) { - _Block_object_assign(&dst->objectPointer, src-> objectPointer, BLOCK_FIELD_IS_OBJECT); -} - -void __block_dispose_xyzzy(struct __block_literal_5 *src) { - _Block_object_dispose(src->objectPointer, BLOCK_FIELD_IS_OBJECT); -} - -generated. - - -2.3 Imported __block marked variables. - -2.3.1 Layout of __block marked variables - -The compiler must embed variables that are marked __block in a specialized structure of the form: - -struct _block_byref_xxxx { - void *isa; - struct Block_byref *forwarding; - int flags; //refcount; - int size; - typeof(marked_variable) marked_variable; -}; - -Variables of certain types require helper functions for when Block_copy() and Block_release() are performed upon a referencing Block. At the "C" level only variables that are of type Block or ones that have __attribute__((NSObject)) marked require helper functions. In Objective-C objects require helper functions and in C++ stack based objects require helper functions. Variables that require helper functions use the form: - -struct _block_byref_xxxx { - void *isa; - struct _block_byref_xxxx *forwarding; - int flags; //refcount; - int size; - // helper functions called via Block_copy() and Block_release() - void (*byref_keep)(void *dst, void *src); - void (*byref_dispose)(void *); - typeof(marked_variable) marked_variable; -}; - -The structure is initialized such that - a) the forwarding pointer is set to the beginning of its enclosing structure, - b) the size field is initialized to the total size of the enclosing structure, - c) the flags field is set to either 0 if no helper functions are needed or (1<<25) if they are, - d) the helper functions are initialized (if present) - e) the variable itself is set to its initial value. - f) the isa field is set to NULL - -2.3.2 Access to __block variables from within its lexical scope. - -In order to "move" the variable to the heap upon a copy_helper operation the compiler must rewrite access to such a variable to be indirect through the structures forwarding pointer. For example: - - int __block i = 10; - i = 11; - -would be rewritten to be: - - struct _block_byref_i { - void *isa; - struct _block_byref_i *forwarding; - int flags; //refcount; - int size; - int captured_i; - } i = { NULL, &i, 0, sizeof(struct _block_byref_i), 11 }; - - i.forwarding->captured_i = 11; - -In the case of a Block reference variable being marked __block the helper code generated must use the _Block_object_assign and _Block_object_dispose routines supplied by the runtime to make the copies. For example: - - __block void (voidBlock)(void) = blockA; - voidBlock = blockB; - -would translate into - -struct _block_byref_voidBlock { - void *isa; - struct _block_byref_voidBlock *forwarding; - int flags; //refcount; - int size; - void (*byref_keep)(struct _block_byref_voidBlock *dst, struct _block_byref_voidBlock *src); - void (*byref_dispose)(struct _block_byref_voidBlock *); - void (^captured_voidBlock)(void); -}; - -void _block_byref_keep_helper(struct _block_byref_voidBlock *dst, struct _block_byref_voidBlock *src) { - //_Block_copy_assign(&dst->captured_voidBlock, src->captured_voidBlock, 0); - _Block_object_assign(&dst->captured_voidBlock, src->captured_voidBlock, BLOCK_FIELD_IS_BLOCK | BLOCK_BYREF_CALLER); -} - -void _block_byref_dispose_helper(struct _block_byref_voidBlock *param) { - //_Block_destroy(param->captured_voidBlock, 0); - _Block_object_dispose(param->captured_voidBlock, BLOCK_FIELD_IS_BLOCK | BLOCK_BYREF_CALLER)} - -and - struct _block_byref_voidBlock voidBlock = {( .forwarding=&voidBlock, .flags=(1<<25), .size=sizeof(struct _block_byref_voidBlock *), - .byref_keep=_block_byref_keep_helper, .byref_dispose=_block_byref_dispose_helper, - .captured_voidBlock=blockA }; - - voidBlock.forwarding->captured_voidBlock = blockB; - - -2.3.3 Importing __block variables into Blocks - -A Block that uses a __block variable in its compound statement body must import the variable and emit copy_helper and dispose_helper helper functions that, in turn, call back into the runtime to actually copy or release the byref data block using the functions _Block_object_assign and _Block_object_dispose. - -For example: - - int __block i = 2; - functioncall(^{ i = 10; }); - -would translate to - -struct _block_byref_i { - void *isa; // set to NULL - struct _block_byref_voidBlock *forwarding; - int flags; //refcount; - int size; - void (*byref_keep)(struct _block_byref_i *dst, struct _block_byref_i *src); - void (*byref_dispose)(struct _block_byref_i *); - int captured_i; -}; - - -struct __block_literal_5 { - void *isa; - int flags; - int reserved; - void (*invoke)(struct __block_literal_5 *); - struct __block_descriptor_5 *descriptor; - struct _block_byref_i *i_holder; -}; - -void __block_invoke_5(struct __block_literal_5 *_block) { - _block->forwarding->captured_i = 10; -} - -void __block_copy_5(struct __block_literal_5 *dst, struct __block_literal_5 *src) { - //_Block_byref_assign_copy(&dst->captured_i, src->captured_i); - _Block_object_assign(&dst->captured_i, src->captured_i, BLOCK_FIELD_IS_BYREF | BLOCK_BYREF_CALLER); -} - -void __block_dispose_5(struct __block_literal_5 *src) { - //_Block_byref_release(src->captured_i); - _Block_object_dispose(src->captured_i, BLOCK_FIELD_IS_BYREF | BLOCK_BYREF_CALLER); -} - -static struct __block_descriptor_5 { - unsigned long int reserved; - unsigned long int Block_size; - void (*copy_helper)(struct __block_literal_5 *dst, struct __block_literal_5 *src); - void (*dispose_helper)(struct __block_literal_5 *); -} __block_descriptor_5 = { 0, sizeof(struct __block_literal_5) __block_copy_5, __block_dispose_5 }; - -and - - struct _block_byref_i i = {( .forwarding=&i, .flags=0, .size=sizeof(struct _block_byref_i) )}; - struct __block_literal_5 _block_literal = { - &_NSConcreteStackBlock, - (1<<25)|(1<<29), , - __block_invoke_5, - &__block_descriptor_5, - 2, - }; - -2.3.4 Importing __attribute__((NSObject)) __block variables - -A __block variable that is also marked __attribute__((NSObject)) should have byref_keep and byref_dispose helper functions that use _Block_object_assign and _Block_object_dispose. - -2.3.5 __block escapes - -Because Blocks referencing __block variables may have Block_copy() performed upon them the underlying storage for the variables may move to the heap. In Objective-C Garbage Collection Only compilation environments the heap used is the garbage collected one and no further action is required. Otherwise the compiler must issue a call to potentially release any heap storage for __block variables at all escapes or terminations of their scope. - - -2.3.6 Nesting - -Blocks may contain Block literal expressions. Any variables used within inner blocks are imported into all enclosing Block scopes even if the variables are not used. This includes const imports as well as __block variables. - -3. Objective C Extensions to Blocks - -3.1 Importing Objects - -Objects should be treated as __attribute__((NSObject)) variables; all copy_helper, dispose_helper, byref_keep, and byref_dispose helper functions should use _Block_object_assign and _Block_object_dispose. There should be no code generated that uses -retain or -release methods. - - -3.2 Blocks as Objects - -The compiler will treat Blocks as objects when synthesizing property setters and getters, will characterize them as objects when generating garbage collection strong and weak layout information in the same manner as objects, and will issue strong and weak write-barrier assignments in the same manner as objects. - -3.3 __weak __block Support - -Objective-C (and Objective-C++) support the __weak attribute on __block variables. Under normal circumstances the compiler uses the Objective-C runtime helper support functions objc_assign_weak and objc_read_weak. Both should continue to be used for all reads and writes of __weak __block variables: - objc_read_weak(&block->byref_i->forwarding->i) - -The __weak variable is stored in a _block_byref_xxxx structure and the Block has copy and dispose helpers for this structure that call: - _Block_object_assign(&dest->_block_byref_i, src-> _block_byref_i, BLOCK_FIELD_IS_WEAK | BLOCK_FIELD_IS_BYREF); -and - _Block_object_dispose(src->_block_byref_i, BLOCK_FIELD_IS_WEAK | BLOCK_FIELD_IS_BYREF); - - -In turn, the block_byref copy support helpers distinguish between whether the __block variable is a Block or not and should either call: - _Block_object_assign(&dest->_block_byref_i, src->_block_byref_i, BLOCK_FIELD_IS_WEAK | BLOCK_FIELD_IS_OBJECT | BLOCK_BYREF_CALLER); -for something declared as an object or - _Block_object_assign(&dest->_block_byref_i, src->_block_byref_i, BLOCK_FIELD_IS_WEAK | BLOCK_FIELD_IS_BLOCK | BLOCK_BYREF_CALLER); -for something declared as a Block. - -A full example follows: - - - __block __weak id obj = ; - functioncall(^{ [obj somemessage]; }); - -would translate to - -struct _block_byref_obj { - void *isa; // uninitialized - struct _block_byref_obj *forwarding; - int flags; //refcount; - int size; - void (*byref_keep)(struct _block_byref_i *dst, struct _block_byref_i *src); - void (*byref_dispose)(struct _block_byref_i *); - int captured_obj; -}; - -void _block_byref_obj_keep(struct _block_byref_voidBlock *dst, struct _block_byref_voidBlock *src) { - //_Block_copy_assign(&dst->captured_obj, src->captured_obj, 0); - _Block_object_assign(&dst->captured_obj, src->captured_obj, BLOCK_FIELD_IS_OBJECT | BLOCK_FIELD_IS_WEAK | BLOCK_BYREF_CALLER); -} - -void _block_byref_obj_dispose(struct _block_byref_voidBlock *param) { - //_Block_destroy(param->captured_obj, 0); - _Block_object_dispose(param->captured_obj, BLOCK_FIELD_IS_OBJECT | BLOCK_FIELD_IS_WEAK | BLOCK_BYREF_CALLER); -}; - -for the block byref part and - -struct __block_literal_5 { - void *isa; - int flags; - int reserved; - void (*invoke)(struct __block_literal_5 *); - struct __block_descriptor_5 *descriptor; - struct _block_byref_obj *byref_obj; -}; - -void __block_invoke_5(struct __block_literal_5 *_block) { - [objc_read_weak(&_block->byref_obj->forwarding->captured_obj) somemessage]; -} - -void __block_copy_5(struct __block_literal_5 *dst, struct __block_literal_5 *src) { - //_Block_byref_assign_copy(&dst->byref_obj, src->byref_obj); - _Block_object_assign(&dst->byref_obj, src->byref_obj, BLOCK_FIELD_IS_BYREF | BLOCK_FIELD_IS_WEAK); -} - -void __block_dispose_5(struct __block_literal_5 *src) { - //_Block_byref_release(src->byref_obj); - _Block_object_dispose(src->byref_obj, BLOCK_FIELD_IS_BYREF | BLOCK_FIELD_IS_WEAK); -} - -static struct __block_descriptor_5 { - unsigned long int reserved; - unsigned long int Block_size; - void (*copy_helper)(struct __block_literal_5 *dst, struct __block_literal_5 *src); - void (*dispose_helper)(struct __block_literal_5 *); -} __block_descriptor_5 = { 0, sizeof(struct __block_literal_5), __block_copy_5, __block_dispose_5 }; - -and within the compound statement: - - struct _block_byref_obj obj = {( .forwarding=&obj, .flags=(1<<25), .size=sizeof(struct _block_byref_obj), - .byref_keep=_block_byref_obj_keep, .byref_dispose=_block_byref_obj_dispose, - .captured_obj = )}; - - struct __block_literal_5 _block_literal = { - &_NSConcreteStackBlock, - (1<<25)|(1<<29), , - __block_invoke_5, - &__block_descriptor_5, - &obj, // a reference to the on-stack structure containing "captured_obj" - }; - - - functioncall(_block_literal->invoke(&_block_literal)); - - -4.0 C++ Support - -Within a block stack based C++ objects are copied as const copies using the const copy constructor. It is an error if a stack based C++ object is used within a block if it does not have a const copy constructor. In addition both copy and destroy helper routines must be synthesized for the block to support the Block_copy() operation, and the flags work marked with the (1<<26) bit in addition to the (1<<25) bit. The copy helper should call the constructor using appropriate offsets of the variable within the supplied stack based block source and heap based destination for all const constructed copies, and similarly should call the destructor in the destroy routine. - -As an example, suppose a C++ class FOO existed with a const copy constructor. Within a code block a stack version of a FOO object is declared and used within a Block literal expression: - -{ - FOO foo; - void (^block)(void) = ^{ printf("%d\n", foo.value()); }; -} - -The compiler would synthesize - -struct __block_literal_10 { - void *isa; - int flags; - int reserved; - void (*invoke)(struct __block_literal_10 *); - struct __block_descriptor_10 *descriptor; - const FOO foo; -}; - -void __block_invoke_10(struct __block_literal_10 *_block) { - printf("%d\n", _block->foo.value()); -} - -void __block_literal_10(struct __block_literal_10 *dst, struct __block_literal_10 *src) { - comp_ctor(&dst->foo, &src->foo); -} - -void __block_dispose_10(struct __block_literal_10 *src) { - comp_dtor(&src->foo); -} - -static struct __block_descriptor_10 { - unsigned long int reserved; - unsigned long int Block_size; - void (*copy_helper)(struct __block_literal_10 *dst, struct __block_literal_10 *src); - void (*dispose_helper)(struct __block_literal_10 *); -} __block_descriptor_10 = { 0, sizeof(struct __block_literal_10), __block_copy_10, __block_dispose_10 }; - -and the code would be: -{ - FOO foo; - comp_ctor(&foo); // default constructor - struct __block_literal_10 _block_literal = { - &_NSConcreteStackBlock, - (1<<25)|(1<<26)|(1<<29), , - __block_invoke_10, - &__block_descriptor_10, - }; - comp_ctor(&_block_literal->foo, &foo); // const copy into stack version - struct __block_literal_10 &block = &_block_literal; // assign literal to block variable - block->invoke(block); // invoke block - comp_dtor(&_block_literal->foo); // destroy stack version of const block copy - comp_dtor(&foo); // destroy original version -} - - -C++ objects stored in __block storage start out on the stack in a block_byref data structure as do other variables. Such objects (if not const objects) must support a regular copy constructor. The block_byref data structure will have copy and destroy helper routines synthesized by the compiler. The copy helper will have code created to perform the copy constructor based on the initial stack block_byref data structure, and will also set the (1<<26) bit in addition to the (1<<25) bit. The destroy helper will have code to do the destructor on the object stored within the supplied block_byref heap data structure. - -To support member variable and function access the compiler will synthesize a const pointer to a block version of the this pointer. - -5.0 Runtime Helper Functions - -The runtime helper functions are described in /usr/local/include/Block_private.h. To summarize their use, a block requires copy/dispose helpers if it imports any block variables, __block storage variables, __attribute__((NSObject)) variables, or C++ const copied objects with constructor/destructors. The (1<<26) bit is set and functions are generated. - -The block copy helper function should, for each of the variables of the type mentioned above, call - _Block_object_assign(&dst->target, src->target, BLOCK_FIELD_); -in the copy helper and - _Block_object_dispose(->target, BLOCK_FIELD_); -in the dispose helper where - is - -enum { - BLOCK_FIELD_IS_OBJECT = 3, // id, NSObject, __attribute__((NSObject)), block, ... - BLOCK_FIELD_IS_BLOCK = 7, // a block variable - BLOCK_FIELD_IS_BYREF = 8, // the on stack structure holding the __block variable - - BLOCK_FIELD_IS_WEAK = 16, // declared __weak - - BLOCK_BYREF_CALLER = 128, // called from byref copy/dispose helpers -}; - -and of course the CTORs/DTORs for const copied C++ objects. - -The block_byref data structure similarly requires copy/dispose helpers for block variables, __attribute__((NSObject)) variables, or C++ const copied objects with constructor/destructors, and again the (1<<26) bit is set and functions are generated in the same manner. - -Under ObjC we allow __weak as an attribute on __block variables, and this causes the addition of BLOCK_FIELD_IS_WEAK orred onto the BLOCK_FIELD_IS_BYREF flag when copying the block_byref structure in the block copy helper, and onto the BLOCK_FIELD_ field within the block_byref copy/dispose helper calls. - -The prototypes, and summary, of the helper functions are - -/* Certain field types require runtime assistance when being copied to the heap. The following function is used - to copy fields of types: blocks, pointers to byref structures, and objects (including __attribute__((NSObject)) pointers. - BLOCK_FIELD_IS_WEAK is orthogonal to the other choices which are mutually exclusive. - Only in a Block copy helper will one see BLOCK_FIELD_IS_BYREF. - */ -void _Block_object_assign(void *destAddr, const void *object, const int flags); - -/* Similarly a compiler generated dispose helper needs to call back for each field of the byref data structure. - (Currently the implementation only packs one field into the byref structure but in principle there could be more). - The same flags used in the copy helper should be used for each call generated to this function: - */ -void _Block_object_dispose(const void *object, const int flags); - -The following functions have been used and will continue to be supported until new compiler support is complete. - -// Obsolete functions. -// Copy helper callback for copying a block imported into a Block -// Called by copy_helper helper functions synthesized by the compiler. -// The address in the destination block of an imported Block is provided as the first argument -// and the value of the existing imported Block is the second. -// Use: _Block_object_assign(dest, src, BLOCK_FIELD_IS_BLOCK {| BLOCK_FIELD_IS_WEAK}); -void _Block_copy_assign(struct Block_basic **dest, const struct Block_basic *src, const int flags); - -// Destroy helper callback for releasing Blocks imported into a Block -// Called by dispose_helper helper functions synthesized by the compiler. -// The value of the imported Block variable is passed back. -// Use: _Block_object_dispose(src, BLOCK_FIELD_IS_BLOCK {| BLOCK_FIELD_IS_WEAK}); -void _Block_destroy(const struct Block_basic *src, const int flags); - -// Byref data block copy helper callback -// Called by block copy helpers when copying __block structures -// Use: _Block_object_assign(dest, src, BLOCK_FIELD_IS_BYREF {| BLOCK_FIELD_IS_WEAK}); -void _Block_byref_assign_copy(struct Block_byref **destp, struct Block_byref *src); - -// Byref data block release helper callback -// Called by block release helpers when releasing a Block -// Called at escape points in scope where __block variables live (under non-GC-only conditions) -// Use: _Block_object_dispose(src, BLOCK_FIELD_IS_BYREF {| BLOCK_FIELD_IS_WEAK}); -void §(struct Block_byref *shared_struct); - - diff --git a/include/clang/AST/DeclNodes.def b/include/clang/AST/DeclNodes.def deleted file mode 100644 index 5b03ff8d911..00000000000 --- a/include/clang/AST/DeclNodes.def +++ /dev/null @@ -1,165 +0,0 @@ -//===-- DeclNodes.def - Metadata about Decl AST nodes -----------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file defines the declaration nodes within the AST. The -// description of the declaration nodes uses six macros: -// -// DECL(Derived, Base) describes a normal declaration type Derived -// and specifies its base class. Note that Derived should not have -// the Decl suffix on it, while Base should. -// -// LAST_DECL(Derived, Base) is like DECL, but is used for the last -// declaration in the list. -// -// ABSTRACT_DECL(Derived, Base) describes an abstract class that is -// used to specify a classification of declarations. For example, -// TagDecl is an abstract class used to describe the various kinds of -// "tag" declarations (unions, structs, classes, enums). -// -// DECL_CONTEXT(Decl) specifies that Decl is a kind of declaration -// that is also a DeclContext. -// -// LAST_DECL_CONTEXT(Decl) is like DECL_CONTEXT, but is used for the -// last declaration context. -// -// DECL_RANGE(CommonBase, Start, End) specifies a range of -// declaration values that have a common (potentially indirect) base -// class. -// -// LAST_DECL_RANGE(CommonBase, Start, End) is like DECL_RANGE, but is -// used for the last declaration range. -// -// Note that, due to the use of ranges, the order of the these -// declarations is significant. A declaration should be listed under -// its base class. -// ===----------------------------------------------------------------------===// - -#ifndef DECL -# define DECL(Derived, Base) -#endif - -#ifndef LAST_DECL -# define LAST_DECL(Derived, Base) DECL(Derived, Base) -#endif - -#ifndef ABSTRACT_DECL -# define ABSTRACT_DECL(Derived, Base) -#endif - -#ifndef DECL_CONTEXT -# define DECL_CONTEXT(Decl) -#endif - -#ifndef DECL_CONTEXT_BASE -# define DECL_CONTEXT_BASE(Decl) DECL_CONTEXT(Decl) -#endif - -#ifndef LAST_DECL_CONTEXT -# define LAST_DECL_CONTEXT(Decl) DECL_CONTEXT(Decl) -#endif - -#ifndef DECL_RANGE -# define DECL_RANGE(CommonBase, Start, End) -#endif - -#ifndef LAST_DECL_RANGE -# define LAST_DECL_RANGE(CommonBase, Start, End) \ - DECL_RANGE(CommonBase, Start, End) -#endif - -DECL(TranslationUnit, Decl) -ABSTRACT_DECL(Named, Decl) - DECL(Namespace, NamedDecl) - DECL(UsingDirective, NamedDecl) - DECL(NamespaceAlias, NamedDecl) - ABSTRACT_DECL(Type, NamedDecl) - DECL(Typedef, TypeDecl) - DECL(UnresolvedUsingTypename, TypeDecl) - ABSTRACT_DECL(Tag, TypeDecl) - DECL(Enum, TagDecl) - DECL(Record, TagDecl) - DECL(CXXRecord, RecordDecl) - DECL(ClassTemplateSpecialization, CXXRecordDecl) - DECL(ClassTemplatePartialSpecialization, - ClassTemplateSpecializationDecl) - DECL(TemplateTypeParm, TypeDecl) - ABSTRACT_DECL(Value, NamedDecl) - DECL(EnumConstant, ValueDecl) - DECL(UnresolvedUsingValue, ValueDecl) - ABSTRACT_DECL(Declarator, ValueDecl) - DECL(Function, DeclaratorDecl) - DECL(CXXMethod, FunctionDecl) - DECL(CXXConstructor, CXXMethodDecl) - DECL(CXXDestructor, CXXMethodDecl) - DECL(CXXConversion, CXXMethodDecl) - DECL(Field, DeclaratorDecl) - DECL(ObjCIvar, FieldDecl) - DECL(ObjCAtDefsField, FieldDecl) - DECL(Var, DeclaratorDecl) - DECL(ImplicitParam, VarDecl) - DECL(ParmVar, VarDecl) - DECL(NonTypeTemplateParm, VarDecl) - ABSTRACT_DECL(Template, NamedDecl) - DECL(FunctionTemplate, TemplateDecl) - DECL(ClassTemplate, TemplateDecl) - DECL(TemplateTemplateParm, TemplateDecl) - DECL(Using, NamedDecl) - DECL(UsingShadow, NamedDecl) - DECL(ObjCMethod, NamedDecl) - ABSTRACT_DECL(ObjCContainer, NamedDecl) - DECL(ObjCCategory, ObjCContainerDecl) - DECL(ObjCProtocol, ObjCContainerDecl) - DECL(ObjCInterface, ObjCContainerDecl) - ABSTRACT_DECL(ObjCImpl, ObjCContainerDecl) - DECL(ObjCCategoryImpl, ObjCImplDecl) - DECL(ObjCImplementation, ObjCImplDecl) - DECL(ObjCProperty, NamedDecl) - DECL(ObjCCompatibleAlias, NamedDecl) -DECL(LinkageSpec, Decl) -DECL(ObjCPropertyImpl, Decl) -DECL(ObjCForwardProtocol, Decl) -DECL(ObjCClass, Decl) -DECL(FileScopeAsm, Decl) -DECL(Friend, Decl) -DECL(FriendTemplate, Decl) -DECL(StaticAssert, Decl) -LAST_DECL(Block, Decl) - -// Declaration contexts. DECL_CONTEXT_BASE indicates that it has subclasses. -DECL_CONTEXT(TranslationUnit) -DECL_CONTEXT(Namespace) -DECL_CONTEXT(LinkageSpec) -DECL_CONTEXT(ObjCMethod) -DECL_CONTEXT_BASE(Tag) -DECL_CONTEXT_BASE(Function) -DECL_CONTEXT_BASE(ObjCContainer) -LAST_DECL_CONTEXT(Block) - -// Declaration ranges -DECL_RANGE(Named, Namespace, ObjCCompatibleAlias) -DECL_RANGE(ObjCContainer, ObjCCategory, ObjCImplementation) -DECL_RANGE(Field, Field, ObjCAtDefsField) -DECL_RANGE(Type, Typedef, TemplateTypeParm) -DECL_RANGE(Tag, Enum, ClassTemplatePartialSpecialization) -DECL_RANGE(Record, Record, ClassTemplatePartialSpecialization) -DECL_RANGE(Value, EnumConstant, NonTypeTemplateParm) -DECL_RANGE(Declarator, Function, NonTypeTemplateParm) -DECL_RANGE(Function, Function, CXXConversion) -DECL_RANGE(Template, FunctionTemplate, TemplateTemplateParm) -DECL_RANGE(ObjCImpl, ObjCCategoryImpl, ObjCImplementation) -LAST_DECL_RANGE(Var, Var, NonTypeTemplateParm) - -#undef LAST_DECL_RANGE -#undef DECL_RANGE -#undef LAST_DECL_CONTEXT -#undef DECL_CONTEXT_BASE -#undef DECL_CONTEXT -#undef ABSTRACT_DECL -#undef LAST_DECL -#undef DECL diff --git a/include/clang/AST/StmtNodes.def b/include/clang/AST/StmtNodes.def deleted file mode 100644 index 3a23e49148d..00000000000 --- a/include/clang/AST/StmtNodes.def +++ /dev/null @@ -1,165 +0,0 @@ -//===-- StmtNodes.def - Metadata about Stmt AST nodes -----------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file defines the AST Node info database. -// -//===---------------------------------------------------------------------===// - -#ifndef FIRST_STMT -#define FIRST_STMT(CLASS) -#define LAST_STMT(CLASS) -#endif - -#ifndef FIRST_EXPR -#define FIRST_EXPR(CLASS) -#define LAST_EXPR(CLASS) -#endif - -#ifndef EXPR -# define EXPR(Type, Base) STMT(Type, Base) -#endif - -#ifndef ABSTRACT_EXPR -# define ABSTRACT_EXPR(Type, Base) EXPR(Type, Base) -#endif - -// Normal Statements. -STMT(NullStmt , Stmt) -FIRST_STMT(NullStmt) -STMT(CompoundStmt , Stmt) -STMT(CaseStmt , SwitchCase) -STMT(DefaultStmt , SwitchCase) -STMT(LabelStmt , Stmt) -STMT(IfStmt , Stmt) -STMT(SwitchStmt , Stmt) -STMT(WhileStmt , Stmt) -STMT(DoStmt , Stmt) -STMT(ForStmt , Stmt) -STMT(GotoStmt , Stmt) -STMT(IndirectGotoStmt, Stmt) -STMT(ContinueStmt , Stmt) -STMT(BreakStmt , Stmt) -STMT(ReturnStmt , Stmt) -STMT(DeclStmt , Stmt) -STMT(SwitchCase , Stmt) - -// GNU Stmt Extensions -STMT(AsmStmt , Stmt) - -// Obj-C statements -STMT(ObjCAtTryStmt , Stmt) -STMT(ObjCAtCatchStmt , Stmt) -STMT(ObjCAtFinallyStmt , Stmt) -STMT(ObjCAtThrowStmt , Stmt) -STMT(ObjCAtSynchronizedStmt , Stmt) -// Obj-C2 statements -STMT(ObjCForCollectionStmt, Stmt) - -// C++ statements -STMT(CXXCatchStmt, Stmt) -STMT(CXXTryStmt , Stmt) - -LAST_STMT(CXXTryStmt) - -// Expressions. -ABSTRACT_EXPR(Expr , Stmt) -EXPR(PredefinedExpr , Expr) -EXPR(DeclRefExpr , Expr) -EXPR(IntegerLiteral , Expr) -EXPR(FloatingLiteral , Expr) -EXPR(ImaginaryLiteral , Expr) -EXPR(StringLiteral , Expr) -EXPR(CharacterLiteral , Expr) -EXPR(ParenExpr , Expr) -EXPR(UnaryOperator , Expr) -EXPR(OffsetOfExpr , Expr) -EXPR(SizeOfAlignOfExpr , Expr) -EXPR(ArraySubscriptExpr , Expr) -EXPR(CallExpr , Expr) -EXPR(MemberExpr , Expr) -ABSTRACT_EXPR(CastExpr , Expr) -EXPR(BinaryOperator , Expr) -EXPR(CompoundAssignOperator, BinaryOperator) -EXPR(ConditionalOperator , Expr) -EXPR(ImplicitCastExpr , CastExpr) -ABSTRACT_EXPR(ExplicitCastExpr, CastExpr) -EXPR(CStyleCastExpr , ExplicitCastExpr) -EXPR(CompoundLiteralExpr , Expr) -EXPR(ExtVectorElementExpr , Expr) -EXPR(InitListExpr , Expr) -EXPR(DesignatedInitExpr , Expr) -EXPR(ImplicitValueInitExpr , Expr) -EXPR(ParenListExpr , Expr) -EXPR(VAArgExpr , Expr) - -// GNU Extensions. -EXPR(AddrLabelExpr , Expr) -EXPR(StmtExpr , Expr) -EXPR(TypesCompatibleExpr , Expr) -EXPR(ChooseExpr , Expr) -EXPR(GNUNullExpr , Expr) - -// C++ Expressions. -EXPR(CXXOperatorCallExpr , CallExpr) -EXPR(CXXMemberCallExpr , CallExpr) -ABSTRACT_EXPR(CXXNamedCastExpr , ExplicitCastExpr) -EXPR(CXXStaticCastExpr , CXXNamedCastExpr) -EXPR(CXXDynamicCastExpr , CXXNamedCastExpr) -EXPR(CXXReinterpretCastExpr , CXXNamedCastExpr) -EXPR(CXXConstCastExpr , CXXNamedCastExpr) -EXPR(CXXFunctionalCastExpr , ExplicitCastExpr) -EXPR(CXXTypeidExpr , Expr) -EXPR(CXXBoolLiteralExpr , Expr) -EXPR(CXXNullPtrLiteralExpr , Expr) -EXPR(CXXThisExpr , Expr) -EXPR(CXXThrowExpr , Expr) -EXPR(CXXDefaultArgExpr , Expr) -EXPR(CXXZeroInitValueExpr , Expr) -EXPR(CXXNewExpr , Expr) -EXPR(CXXDeleteExpr , Expr) -EXPR(CXXPseudoDestructorExpr, Expr) -EXPR(UnresolvedLookupExpr , Expr) -EXPR(UnaryTypeTraitExpr , Expr) -EXPR(DependentScopeDeclRefExpr , Expr) -EXPR(CXXConstructExpr , Expr) -EXPR(CXXBindTemporaryExpr , Expr) -EXPR(CXXBindReferenceExpr , Expr) -EXPR(CXXExprWithTemporaries , Expr) -EXPR(CXXTemporaryObjectExpr , CXXConstructExpr) -EXPR(CXXUnresolvedConstructExpr, Expr) -EXPR(CXXDependentScopeMemberExpr, Expr) -EXPR(UnresolvedMemberExpr , Expr) - -// Obj-C Expressions. -EXPR(ObjCStringLiteral , Expr) -EXPR(ObjCEncodeExpr , Expr) -EXPR(ObjCMessageExpr , Expr) -EXPR(ObjCSelectorExpr , Expr) -EXPR(ObjCProtocolExpr , Expr) -EXPR(ObjCIvarRefExpr , Expr) -EXPR(ObjCPropertyRefExpr , Expr) -EXPR(ObjCImplicitSetterGetterRefExpr , Expr) -EXPR(ObjCSuperExpr , Expr) -EXPR(ObjCIsaExpr , Expr) - -// Clang Extensions. -EXPR(ShuffleVectorExpr , Expr) -EXPR(BlockExpr , Expr) -EXPR(BlockDeclRefExpr , Expr) - -FIRST_EXPR(PredefinedExpr) -LAST_EXPR(BlockDeclRefExpr) - -#undef ABSTRACT_EXPR -#undef EXPR -#undef STMT -#undef FIRST_STMT -#undef LAST_STMT -#undef FIRST_EXPR -#undef LAST_EXPR diff --git a/lib/Headers/arm_neon.h b/lib/Headers/arm_neon.h deleted file mode 100644 index 4508a27f36a..00000000000 --- a/lib/Headers/arm_neon.h +++ /dev/null @@ -1,537 +0,0 @@ -/*===---- arm_neon.h - NEON intrinsics --------------------------------------=== - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - * - *===-----------------------------------------------------------------------=== - */ - -#ifndef __ARM_NEON_H -#define __ARM_NEON_H - -#ifndef __ARM_NEON__ -#error "NEON support not enabled" -#endif - -// NEON document appears to be specified in terms of stdint types. -#include - -// Define some NEON-specific scalar types for floats and polynomials. -typedef float float32_t; -typedef uint8_t poly8_t; - -// FIXME: probably need a 'poly' attribute or something for correct codegen to -// disambiguate from uint16_t. -typedef uint16_t poly16_t; - -typedef __attribute__(( __vector_size__(8) )) int8_t __neon_int8x8_t; -typedef __attribute__(( __vector_size__(16) )) int8_t __neon_int8x16_t; -typedef __attribute__(( __vector_size__(8) )) int16_t __neon_int16x4_t; -typedef __attribute__(( __vector_size__(16) )) int16_t __neon_int16x8_t; -typedef __attribute__(( __vector_size__(8) )) int32_t __neon_int32x2_t; -typedef __attribute__(( __vector_size__(16) )) int32_t __neon_int32x4_t; -typedef __attribute__(( __vector_size__(8) )) int64_t __neon_int64x1_t; -typedef __attribute__(( __vector_size__(16) )) int64_t __neon_int64x2_t; -typedef __attribute__(( __vector_size__(8) )) uint8_t __neon_uint8x8_t; -typedef __attribute__(( __vector_size__(16) )) uint8_t __neon_uint8x16_t; -typedef __attribute__(( __vector_size__(8) )) uint16_t __neon_uint16x4_t; -typedef __attribute__(( __vector_size__(16) )) uint16_t __neon_uint16x8_t; -typedef __attribute__(( __vector_size__(8) )) uint32_t __neon_uint32x2_t; -typedef __attribute__(( __vector_size__(16) )) uint32_t __neon_uint32x4_t; -typedef __attribute__(( __vector_size__(8) )) uint64_t __neon_uint64x1_t; -typedef __attribute__(( __vector_size__(16) )) uint64_t __neon_uint64x2_t; -typedef __attribute__(( __vector_size__(8) )) uint16_t __neon_float16x4_t; -typedef __attribute__(( __vector_size__(16) )) uint16_t __neon_float16x8_t; -typedef __attribute__(( __vector_size__(8) )) float32_t __neon_float32x2_t; -typedef __attribute__(( __vector_size__(16) )) float32_t __neon_float32x4_t; -typedef __attribute__(( __vector_size__(8) )) poly8_t __neon_poly8x8_t; -typedef __attribute__(( __vector_size__(16) )) poly8_t __neon_poly8x16_t; -typedef __attribute__(( __vector_size__(8) )) poly16_t __neon_poly16x4_t; -typedef __attribute__(( __vector_size__(16) )) poly16_t __neon_poly16x8_t; - -typedef struct __int8x8_t { - __neon_int8x8_t val; -} int8x8_t; - -typedef struct __int8x16_t { - __neon_int8x16_t val; -} int8x16_t; - -typedef struct __int16x4_t { - __neon_int16x4_t val; -} int16x4_t; - -typedef struct __int16x8_t { - __neon_int16x8_t val; -} int16x8_t; - -typedef struct __int32x2_t { - __neon_int32x2_t val; -} int32x2_t; - -typedef struct __int32x4_t { - __neon_int32x4_t val; -} int32x4_t; - -typedef struct __int64x1_t { - __neon_int64x1_t val; -} int64x1_t; - -typedef struct __int64x2_t { - __neon_int64x2_t val; -} int64x2_t; - -typedef struct __uint8x8_t { - __neon_uint8x8_t val; -} uint8x8_t; - -typedef struct __uint8x16_t { - __neon_uint8x16_t val; -} uint8x16_t; - -typedef struct __uint16x4_t { - __neon_uint16x4_t val; -} uint16x4_t; - -typedef struct __uint16x8_t { - __neon_uint16x8_t val; -} uint16x8_t; - -typedef struct __uint32x2_t { - __neon_uint32x2_t val; -} uint32x2_t; - -typedef struct __uint32x4_t { - __neon_uint32x4_t val; -} uint32x4_t; - -typedef struct __uint64x1_t { - __neon_uint64x1_t val; -} uint64x1_t; - -typedef struct __uint64x2_t { - __neon_uint64x2_t val; -} uint64x2_t; - -typedef struct __float16x4_t { - __neon_float16x4_t val; -} float16x4_t; - -typedef struct __float16x8_t { - __neon_float16x8_t val; -} float16x8_t; - -typedef struct __float32x2_t { - __neon_float32x2_t val; -} float32x2_t; - -typedef struct __float32x4_t { - __neon_float32x4_t val; -} float32x4_t; - -typedef struct __poly8x8_t { - __neon_poly8x8_t val; -} poly8x8_t; - -typedef struct __poly8x16_t { - __neon_poly8x16_t val; -} poly8x16_t; - -typedef struct __poly16x4_t { - __neon_poly16x4_t val; -} poly16x4_t; - -typedef struct __poly16x8_t { - __neon_poly16x8_t val; -} poly16x8_t; - -// FIXME: write tool to stamp out the structure-of-array types, possibly gen this whole file. - -// Intrinsics, per ARM document DUI0348B -#define __ai static __attribute__((__always_inline__)) - -#define INTTYPES_WIDE(op, builtin) \ - __ai int16x8_t op##_s8(int16x8_t a, int8x8_t b) { return (int16x8_t){ builtin(a.val, b.val) }; } \ - __ai int32x4_t op##_s16(int32x4_t a, int16x4_t b) { return (int32x4_t){ builtin(a.val, b.val) }; } \ - __ai int64x2_t op##_s32(int64x2_t a, int32x2_t b) { return (int64x2_t){ builtin(a.val, b.val) }; } \ - __ai uint16x8_t op##_u8(uint16x8_t a, uint8x8_t b) { return (uint16x8_t){ builtin(a.val, b.val) }; } \ - __ai uint32x4_t op##_u16(uint32x4_t a, uint16x4_t b) { return (uint32x4_t){ builtin(a.val, b.val) }; } \ - __ai uint64x2_t op##_u32(uint64x2_t a, uint32x2_t b) { return (uint64x2_t){ builtin(a.val, b.val) }; } - -#define INTTYPES_WIDENING(op, builtin) \ - __ai int16x8_t op##_s8(int8x8_t a, int8x8_t b) { return (int16x8_t){ builtin(a.val, b.val) }; } \ - __ai int32x4_t op##_s16(int16x4_t a, int16x4_t b) { return (int32x4_t){ builtin(a.val, b.val) }; } \ - __ai int64x2_t op##_s32(int32x2_t a, int32x2_t b) { return (int64x2_t){ builtin(a.val, b.val) }; } \ - __ai uint16x8_t op##_u8(uint8x8_t a, uint8x8_t b) { return (uint16x8_t){ builtin(a.val, b.val) }; } \ - __ai uint32x4_t op##_u16(uint16x4_t a, uint16x4_t b) { return (uint32x4_t){ builtin(a.val, b.val) }; } \ - __ai uint64x2_t op##_u32(uint32x2_t a, uint32x2_t b) { return (uint64x2_t){ builtin(a.val, b.val) }; } - -#define INTTYPES_WIDENING_MUL(op, builtin) \ - __ai int16x8_t op##_s8(int16x8_t a, int8x8_t b, int8x8_t c) { return (int16x8_t){ builtin(a.val, b.val, c.val) }; } \ - __ai int32x4_t op##_s16(int32x4_t a, int16x4_t b, int16x4_t c) { return (int32x4_t){ builtin(a.val, b.val, c.val) }; } \ - __ai int64x2_t op##_s32(int64x2_t a, int32x2_t b, int32x2_t c) { return (int64x2_t){ builtin(a.val, b.val, c.val) }; } \ - __ai uint16x8_t op##_u8(uint16x8_t a, uint8x8_t b, uint8x8_t c) { return (uint16x8_t){ builtin(a.val, b.val, c.val) }; } \ - __ai uint32x4_t op##_u16(uint32x4_t a, uint16x4_t b, uint16x4_t c) { return (uint32x4_t){ builtin(a.val, b.val, c.val) }; } \ - __ai uint64x2_t op##_u32(uint64x2_t a, uint32x2_t b, uint32x2_t c) { return (uint64x2_t){ builtin(a.val, b.val, c.val) }; } - -#define INTTYPES_NARROWING(op, builtin) \ - __ai int8x8_t op##_s16(int16x8_t a, int16x8_t b) { return (int8x8_t){ builtin(a.val, b.val) }; } \ - __ai int16x4_t op##_s32(int32x4_t a, int32x4_t b) { return (int16x4_t){ builtin(a.val, b.val) }; } \ - __ai int32x2_t op##_s64(int64x2_t a, int64x2_t b) { return (int32x2_t){ builtin(a.val, b.val) }; } \ - __ai uint8x8_t op##_u16(uint16x8_t a, uint16x8_t b) { return (uint8x8_t){ builtin(a.val, b.val) }; } \ - __ai uint16x4_t op##_u32(uint32x4_t a, uint32x4_t b) { return (uint16x4_t){ builtin(a.val, b.val) }; } \ - __ai uint32x2_t op##_u64(uint64x2_t a, uint64x2_t b) { return (uint32x2_t){ builtin(a.val, b.val) }; } - -#define INTTYPES_ADD_32(op, builtin) \ - __ai int8x8_t op##_s8(int8x8_t a, int8x8_t b) { return (int8x8_t){ builtin(a.val, b.val) }; } \ - __ai int16x4_t op##_s16(int16x4_t a, int16x4_t b) { return (int16x4_t){ builtin(a.val, b.val) }; } \ - __ai int32x2_t op##_s32(int32x2_t a, int32x2_t b) { return (int32x2_t){ builtin(a.val, b.val) }; } \ - __ai uint8x8_t op##_u8(uint8x8_t a, uint8x8_t b) { return (uint8x8_t){ builtin(a.val, b.val) }; } \ - __ai uint16x4_t op##_u16(uint16x4_t a, uint16x4_t b) { return (uint16x4_t){ builtin(a.val, b.val) }; } \ - __ai uint32x2_t op##_u32(uint32x2_t a, uint32x2_t b) { return (uint32x2_t){ builtin(a.val, b.val) }; } \ - __ai int8x16_t op##q_s8(int8x16_t a, int8x16_t b) { return (int8x16_t){ builtin(a.val, b.val) }; } \ - __ai int16x8_t op##q_s16(int16x8_t a, int16x8_t b) { return (int16x8_t){ builtin(a.val, b.val) }; } \ - __ai int32x4_t op##q_s32(int32x4_t a, int32x4_t b) { return (int32x4_t){ builtin(a.val, b.val) }; } \ - __ai uint8x16_t op##q_u8(uint8x16_t a, uint8x16_t b) { return (uint8x16_t){ builtin(a.val, b.val) }; } \ - __ai uint16x8_t op##q_u16(uint16x8_t a, uint16x8_t b) { return (uint16x8_t){ builtin(a.val, b.val) }; } \ - __ai uint32x4_t op##q_u32(uint32x4_t a, uint32x4_t b) { return (uint32x4_t){ builtin(a.val, b.val) }; } - -#define INTTYPES_ADD_64(op, builtin) \ - __ai int64x1_t op##_s64(int64x1_t a, int64x1_t b) { return (int64x1_t){ builtin(a.val, b.val) }; } \ - __ai uint64x1_t op##_u64(uint64x1_t a, uint64x1_t b) { return (uint64x1_t){ builtin(a.val, b.val) }; } \ - __ai int64x2_t op##q_s64(int64x2_t a, int64x2_t b) { return (int64x2_t){ builtin(a.val, b.val) }; } \ - __ai uint64x2_t op##q_u64(uint64x2_t a, uint64x2_t b) { return (uint64x2_t){ builtin(a.val, b.val) }; } - -#define FLOATTYPES_CMP(op, builtin) \ - __ai uint32x2_t op##_f32(float32x2_t a, float32x2_t b) { return (uint32x2_t){ builtin(a.val, b.val) }; } \ - __ai uint32x4_t op##q_f32(float32x4_t a, float32x4_t b) { return (uint32x4_t){ builtin(a.val, b.val) }; } - -#define INT_FLOAT_CMP_OP(op, cc) \ - __ai uint8x8_t op##_s8(int8x8_t a, int8x8_t b) { return (uint8x8_t){(__neon_uint8x8_t)(a.val cc b.val)}; } \ - __ai uint16x4_t op##_s16(int16x4_t a, int16x4_t b) { return (uint16x4_t){(__neon_uint16x4_t)(a.val cc b.val)}; } \ - __ai uint32x2_t op##_s32(int32x2_t a, int32x2_t b) { return (uint32x2_t){(__neon_uint32x2_t)(a.val cc b.val)}; } \ - __ai uint32x2_t op##_f32(float32x2_t a, float32x2_t b) { return (uint32x2_t){(__neon_uint32x2_t)(a.val cc b.val)}; } \ - __ai uint8x8_t op##_u8(uint8x8_t a, uint8x8_t b) { return (uint8x8_t){a.val cc b.val}; } \ - __ai uint16x4_t op##_u16(uint16x4_t a, uint16x4_t b) { return (uint16x4_t){a.val cc b.val}; } \ - __ai uint32x2_t op##_u32(uint32x2_t a, uint32x2_t b) { return (uint32x2_t){a.val cc b.val}; } \ - __ai uint8x16_t op##q_s8(int8x16_t a, int8x16_t b) { return (uint8x16_t){(__neon_uint8x16_t)(a.val cc b.val)}; } \ - __ai uint16x8_t op##q_s16(int16x8_t a, int16x8_t b) { return (uint16x8_t){(__neon_uint16x8_t)(a.val cc b.val)}; } \ - __ai uint32x4_t op##q_s32(int32x4_t a, int32x4_t b) { return (uint32x4_t){(__neon_uint32x4_t)(a.val cc b.val)}; } \ - __ai uint32x4_t op##q_f32(float32x4_t a, float32x4_t b) { return (uint32x4_t){(__neon_uint32x4_t)(a.val cc b.val)}; } \ - __ai uint8x16_t op##q_u8(uint8x16_t a, uint8x16_t b) { return (uint8x16_t){a.val cc b.val}; } \ - __ai uint16x8_t op##q_u16(uint16x8_t a, uint16x8_t b) { return (uint16x8_t){a.val cc b.val}; } \ - __ai uint32x4_t op##q_u32(uint32x4_t a, uint32x4_t b) { return (uint32x4_t){a.val cc b.val}; } - -#define INT_UNARY(op, builtin) \ - __ai int8x8_t op##_s8(int8x8_t a) { return (int8x8_t){ builtin(a.val) }; } \ - __ai int16x4_t op##_s16(int16x4_t a) { return (int16x4_t){ builtin(a.val) }; } \ - __ai int32x2_t op##_s32(int32x2_t a) { return (int32x2_t){ builtin(a.val) }; } \ - __ai int8x16_t op##q_s8(int8x16_t a) { return (int8x16_t){ builtin(a.val) }; } \ - __ai int16x8_t op##q_s16(int16x8_t a) { return (int16x8_t){ builtin(a.val) }; } \ - __ai int32x4_t op##q_s32(int32x4_t a) { return (int32x4_t){ builtin(a.val) }; } - -#define FP_UNARY(op, builtin) \ - __ai float32x2_t op##_f32(float32x2_t a) { return (float32x2_t){ builtin(a.val) }; } \ - __ai float32x4_t op##q_f32(float32x4_t a) { return (float32x4_t){ builtin(a.val) }; } - -#define FP_BINARY(op, builtin) \ - __ai float32x2_t op##_f32(float32x2_t a, float32x2_t b) { return (float32x2_t){ builtin(a.val, b.val) }; } \ - __ai float32x4_t op##q_f32(float32x4_t a, float32x4_t b) { return (float32x4_t){ builtin(a.val, b.val) }; } - -#define INT_FP_PAIRWISE_ADD(op, builtin) \ - __ai int8x8_t op##_s8(int8x8_t a, int8x8_t b) { return (int8x8_t){ builtin(a.val, b.val) }; } \ - __ai int16x4_t op##_s16(int16x4_t a, int16x4_t b) { return (int16x4_t){ builtin(a.val, b.val) }; } \ - __ai int32x2_t op##_s32(int32x2_t a, int32x2_t b) { return (int32x2_t){ builtin(a.val, b.val) }; } \ - __ai uint8x8_t op##_u8(uint8x8_t a, uint8x8_t b) { return (uint8x8_t){ builtin(a.val, b.val) }; } \ - __ai uint16x4_t op##_u16(uint16x4_t a, uint16x4_t b) { return (uint16x4_t){ builtin(a.val, b.val) }; } \ - __ai uint32x2_t op##_u32(uint32x2_t a, uint32x2_t b) { return (uint32x2_t){ builtin(a.val, b.val) }; } \ - __ai float32x2_t op##_f32(float32x2_t a, float32x2_t b) { return (float32x2_t){ builtin(a.val, b.val) }; } - -#define INT_LOGICAL_OP(op, lop) \ - __ai int8x8_t op##_s8(int8x8_t a, int8x8_t b) { return (int8x8_t){ a.val lop b.val }; } \ - __ai int16x4_t op##_s16(int16x4_t a, int16x4_t b) { return (int16x4_t){ a.val lop b.val }; } \ - __ai int32x2_t op##_s32(int32x2_t a, int32x2_t b) { return (int32x2_t){ a.val lop b.val }; } \ - __ai int64x1_t op##_s64(int64x1_t a, int64x1_t b) { return (int64x1_t){ a.val lop b.val }; } \ - __ai uint8x8_t op##_u8(uint8x8_t a, uint8x8_t b) { return (uint8x8_t){ a.val lop b.val }; } \ - __ai uint16x4_t op##_u16(uint16x4_t a, uint16x4_t b) { return (uint16x4_t){ a.val lop b.val }; } \ - __ai uint32x2_t op##_u32(uint32x2_t a, uint32x2_t b) { return (uint32x2_t){ a.val lop b.val }; } \ - __ai uint64x1_t op##_u64(uint64x1_t a, uint64x1_t b) { return (uint64x1_t){ a.val lop b.val }; } \ - __ai int8x16_t op##q_s8(int8x16_t a, int8x16_t b) { return (int8x16_t){ a.val lop b.val }; } \ - __ai int16x8_t op##q_s16(int16x8_t a, int16x8_t b) { return (int16x8_t){ a.val lop b.val }; } \ - __ai int32x4_t op##q_s32(int32x4_t a, int32x4_t b) { return (int32x4_t){ a.val lop b.val }; } \ - __ai int64x2_t op##q_s64(int64x2_t a, int64x2_t b) { return (int64x2_t){ a.val lop b.val }; } \ - __ai uint8x16_t op##q_u8(uint8x16_t a, uint8x16_t b) { return (uint8x16_t){ a.val lop b.val }; } \ - __ai uint16x8_t op##q_u16(uint16x8_t a, uint16x8_t b) { return (uint16x8_t){ a.val lop b.val }; } \ - __ai uint32x4_t op##q_u32(uint32x4_t a, uint32x4_t b) { return (uint32x4_t){ a.val lop b.val }; } \ - __ai uint64x2_t op##q_u64(uint64x2_t a, uint64x2_t b) { return (uint64x2_t){ a.val lop b.val }; } - -// vector add -__ai int8x8_t vadd_s8(int8x8_t a, int8x8_t b) { return (int8x8_t){a.val + b.val}; } -__ai int16x4_t vadd_s16(int16x4_t a, int16x4_t b) { return (int16x4_t){a.val + b.val}; } -__ai int32x2_t vadd_s32(int32x2_t a, int32x2_t b) { return (int32x2_t){a.val + b.val}; } -__ai int64x1_t vadd_s64(int64x1_t a, int64x1_t b) { return (int64x1_t){a.val + b.val}; } -__ai float32x2_t vadd_f32(float32x2_t a, float32x2_t b) { return (float32x2_t){a.val + b.val}; } -__ai uint8x8_t vadd_u8(uint8x8_t a, uint8x8_t b) { return (uint8x8_t){a.val + b.val}; } -__ai uint16x4_t vadd_u16(uint16x4_t a, uint16x4_t b) { return (uint16x4_t){a.val + b.val}; } -__ai uint32x2_t vadd_u32(uint32x2_t a, uint32x2_t b) { return (uint32x2_t){a.val + b.val}; } -__ai uint64x1_t vadd_u64(uint64x1_t a, uint64x1_t b) { return (uint64x1_t){a.val + b.val}; } -__ai int8x16_t vaddq_s8(int8x16_t a, int8x16_t b) { return (int8x16_t){a.val + b.val}; } -__ai int16x8_t vaddq_s16(int16x8_t a, int16x8_t b) { return (int16x8_t){a.val + b.val}; } -__ai int32x4_t vaddq_s32(int32x4_t a, int32x4_t b) { return (int32x4_t){a.val + b.val}; } -__ai int64x2_t vaddq_s64(int64x2_t a, int64x2_t b) { return (int64x2_t){a.val + b.val}; } -__ai float32x4_t vaddq_f32(float32x4_t a, float32x4_t b) { return (float32x4_t){a.val + b.val}; } -__ai uint8x16_t vaddq_u8(uint8x16_t a, uint8x16_t b) { return (uint8x16_t){a.val + b.val}; } -__ai uint16x8_t vaddq_u16(uint16x8_t a, uint16x8_t b) { return (uint16x8_t){a.val + b.val}; } -__ai uint32x4_t vaddq_u32(uint32x4_t a, uint32x4_t b) { return (uint32x4_t){a.val + b.val}; } -__ai uint64x2_t vaddq_u64(uint64x2_t a, uint64x2_t b) { return (uint64x2_t){a.val + b.val}; } - -// vector long add -INTTYPES_WIDENING(vaddl, __builtin_neon_vaddl) - -// vector wide add -INTTYPES_WIDE(vaddw, __builtin_neon_vaddw) - -// halving add -// rounding halving add -INTTYPES_ADD_32(vhadd, __builtin_neon_vhadd) -INTTYPES_ADD_32(vrhadd, __builtin_neon_vrhadd) - -// saturating add -INTTYPES_ADD_32(vqadd, __builtin_neon_vqadd) -INTTYPES_ADD_64(vqadd, __builtin_neon_vqadd) - -// add high half -// rounding add high half -INTTYPES_NARROWING(vaddhn, __builtin_neon_vaddhn) -INTTYPES_NARROWING(vraddhn, __builtin_neon_vraddhn) - -// multiply -// mul-poly - -// multiple accumulate -// multiple subtract - -// multiple accumulate long -// multiple subtract long -INTTYPES_WIDENING_MUL(vmlal, __builtin_neon_vmlal) -INTTYPES_WIDENING_MUL(vmlsl, __builtin_neon_vmlsl) - -// saturating doubling multiply high -// saturating rounding doubling multiply high - -// saturating doubling multiply accumulate long -// saturating doubling multiply subtract long - -// long multiply -// long multiply-poly -INTTYPES_WIDENING(vmull, __builtin_neon_vmull) -__ai poly16x8_t vmull_p8(poly8x8_t a, poly8x8_t b) { return (poly16x8_t){ __builtin_neon_vmull(a.val, b.val) }; } - -// saturating doubling long multiply - -// subtract - -// long subtract -INTTYPES_WIDENING(vsubl, __builtin_neon_vsubl) - -// wide subtract -INTTYPES_WIDE(vsubw, __builtin_neon_vsubw) - -// saturating subtract -INTTYPES_ADD_32(vqsub, __builtin_neon_vqsub) -INTTYPES_ADD_64(vqsub, __builtin_neon_vqsub) - -// halving subtract -INTTYPES_ADD_32(vhsub, __builtin_neon_vhsub) - -// subtract high half -// rounding subtract high half -INTTYPES_NARROWING(vsubhn, __builtin_neon_vsubhn) -INTTYPES_NARROWING(vrsubhn, __builtin_neon_vrsubhn) - -// compare eq -// compare ge -// compare le -// compare gt -// compare lt -INT_FLOAT_CMP_OP(vceq, ==) -INT_FLOAT_CMP_OP(vcge, >=) -INT_FLOAT_CMP_OP(vcle, <=) -INT_FLOAT_CMP_OP(vcgt, >) -INT_FLOAT_CMP_OP(vclt, <) - -// compare eq-poly - -// compare abs ge -// compare abs le -// compare abs gt -// compare abs lt -FLOATTYPES_CMP(vcage, __builtin_neon_vcage) -FLOATTYPES_CMP(vcale, __builtin_neon_vcale) -FLOATTYPES_CMP(vcagt, __builtin_neon_vcagt) -FLOATTYPES_CMP(vcalt, __builtin_neon_vcalt) - -// test bits - -// abs diff -INTTYPES_ADD_32(vabd, __builtin_neon_vabd) -FP_BINARY(vabd, __builtin_neon_vabd) - -// abs diff long -INTTYPES_WIDENING(vabdl, __builtin_neon_vabdl) - -// abs diff accumulate -// abs diff accumulate long - -// max -// min -INTTYPES_ADD_32(vmax, __builtin_neon_vmax) -FP_BINARY(vmax, __builtin_neon_vmax) -INTTYPES_ADD_32(vmin, __builtin_neon_vmin) -FP_BINARY(vmin, __builtin_neon_vmin) - -// pairwise add -// pairwise max -// pairwise min -INT_FP_PAIRWISE_ADD(vpadd, __builtin_neon_vpadd) -INT_FP_PAIRWISE_ADD(vpmax, __builtin_neon_vpmax) -INT_FP_PAIRWISE_ADD(vpmin, __builtin_neon_vpmin) - -// long pairwise add -// long pairwise add accumulate - -// recip -// recip sqrt -FP_BINARY(vrecps, __builtin_neon_vrecps) -FP_BINARY(vrsqrts, __builtin_neon_vrsqrts) - -// shl by vec -// saturating shl by vec -// rounding shl by vec -// saturating rounding shl by vec - -// shr by constant -// shl by constant -// rounding shr by constant -// shr by constant and accumulate -// rounding shr by constant and accumulate -// saturating shl by constant -// s->u saturating shl by constant -// narrowing saturating shr by constant -// s->u narrowing saturating shr by constant -// s->u rounding narrowing saturating shr by constant -// narrowing saturating shr by constant -// rounding narrowing shr by constant -// rounding narrowing saturating shr by constant -// widening shl by constant - -// shr and insert -// shl and insert - -// loads and stores, single vector -// loads and stores, lane -// loads, dupe - -// loads and stores, arrays - -// vget,vgetq lane -// vset, vsetq lane - -// vcreate -// vdup, vdupq -// vmov, vmovq -// vdup_lane, vdupq_lane -// vcombine -// vget_high, vget_low - -// vcvt {u,s} <-> f, f <-> f16 -// narrow -// long move (unpack) -// saturating narrow -// saturating narrow s->u - -// table lookup -// extended table lookup - -// mla with scalar -// widening mla with scalar -// widening saturating doubling mla with scalar -// mls with scalar -// widening mls with scalar -// widening saturating doubling mls with scalar -// mul by scalar -// long mul with scalar -// long mul by scalar -// saturating doubling long mul with scalar -// saturating doubling long mul by scalar -// saturating doubling mul high with scalar -// saturating doubling mul high by scalar -// saturating rounding doubling mul high with scalar -// saturating rounding doubling mul high by scalar -// mla with scalar -// widening mla with sclar -// widening saturating doubling mla with scalar -// mls with scalar -// widening mls with scalar -// widening saturating doubling mls with scalar - -// extract - -// endian swap (vrev) - -// negate - -// abs -// saturating abs -// saturating negate -// count leading signs -INT_UNARY(vabs, __builtin_neon_vabs) -FP_UNARY(vabs, __builtin_neon_vabs) -INT_UNARY(vqabs, __builtin_neon_vqabs) -INT_UNARY(vqneg, __builtin_neon_vqneg) -INT_UNARY(vcls, __builtin_neon_vcls) - -// count leading zeroes -// popcount - -// recip_est -// recip_sqrt_est - -// not-poly -// not - -// and -// or -// xor -// andn -// orn -INT_LOGICAL_OP(vand, &) -INT_LOGICAL_OP(vorr, |) -INT_LOGICAL_OP(veor, ^) -INT_LOGICAL_OP(vbic, &~) -INT_LOGICAL_OP(vorn, |~) - -// bitselect - -// transpose elts -// interleave elts -// deinterleave elts - -// vreinterpret - -#endif /* __ARM_NEON_H */ diff --git a/lib/Headers/arm_neon.td b/lib/Headers/arm_neon.td deleted file mode 100644 index 7ffbfb4a46a..00000000000 --- a/lib/Headers/arm_neon.td +++ /dev/null @@ -1,341 +0,0 @@ -//===--- arm_neon.td - ARM NEON compiler interface ------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file defines the TableGen definitions from which the ARM NEON header -// file will be generated. See ARM document DUI0348B. -// -//===----------------------------------------------------------------------===// - -class Op; - -def OP_NONE : Op; -def OP_ADD : Op; -def OP_SUB : Op; -def OP_MUL : Op; -def OP_MLA : Op; -def OP_MLS : Op; -def OP_MUL_N : Op; -def OP_MLA_N : Op; -def OP_MLS_N : Op; -def OP_EQ : Op; -def OP_GE : Op; -def OP_LE : Op; -def OP_GT : Op; -def OP_LT : Op; -def OP_NEG : Op; -def OP_NOT : Op; -def OP_AND : Op; -def OP_OR : Op; -def OP_XOR : Op; -def OP_ANDN : Op; -def OP_ORN : Op; -def OP_CAST : Op; -def OP_HI : Op; -def OP_LO : Op; -def OP_CONC : Op; -def OP_DUP : Op; -def OP_SEL : Op; -def OP_REV64 : Op; -def OP_REV32 : Op; -def OP_REV16 : Op; - -class Inst { - string Prototype = p; - string Types = t; - Op Operand = o; - bit isShift = 0; -} - -// Used to generate Builtins.def -class SInst : Inst {} -class IInst : Inst {} -class WInst : Inst {} - -// prototype: return (arg, arg, ...) -// v: void -// t: best-fit integer (int/poly args) -// x: signed integer (int/float args) -// u: unsigned integer (int/float args) -// f: float (int args) -// d: default -// w: double width elements, same num elts -// n: double width elements, half num elts -// h: half width elements, double num elts -// e: half width elements, double num elts, unsigned -// i: constant int -// l: constant uint64 -// s: scalar of element type -// a: scalar of element type (splat to vector type) -// k: default elt width, double num elts -// #: array of default vectors -// p: pointer type -// c: const pointer type - -// sizes: -// c: char -// s: short -// i: int -// l: long -// f: float -// h: half-float - -// size modifiers: -// U: unsigned -// Q: 128b -// P: polynomial - -//////////////////////////////////////////////////////////////////////////////// -// E.3.1 Addition -def VADD : Inst<"ddd", "csilfUcUsUiUlQcQsQiQlQfQUcQUsQUiQUl", OP_ADD>; -def VADDL : SInst<"wdd", "csiUcUsUi">; -def VADDW : SInst<"wwd", "csiUcUsUi">; -def VHADD : SInst<"ddd", "csiUcUsUiQcQsQiQUcQUsQUi">; -def VRHADD : SInst<"ddd", "csiUcUsUiQcQsQiQUcQUsQUi">; -def VQADD : SInst<"ddd", "csilUcUsUiUlQcQsQiQlQUcQUsQUiQUl">; -def VADDHN : IInst<"dww", "csiUcUsUi">; -def VRADDHN : IInst<"dww", "csiUcUsUi">; - -//////////////////////////////////////////////////////////////////////////////// -// E.3.2 Multiplication -def VMUL : Inst<"ddd", "csifUcUsUiPcQcQsQiQfQUcQUsQUiQPc", OP_MUL>; -def VMLA : Inst<"dddd", "csifUcUsUiQcQsQiQfQUcQUsQUi", OP_MLA>; -def VMLAL : SInst<"wwdd", "csiUcUsUi">; -def VMLS : Inst<"dddd", "csifUcUsUiQcQsQiQfQUcQUsQUi", OP_MLS>; -def VMLSL : SInst<"wwdd", "csiUcUsUi">; -def VQDMULH : SInst<"ddd", "siQsQi">; -def VQRDMULH : SInst<"ddd", "siQsQi">; -def VQDMLAL : SInst<"wwdd", "si">; -def VQDMLSL : SInst<"wwdd", "si">; -def VMULL : SInst<"wdd", "csiUcUsUiPc">; -def VQDMULL : SInst<"wdd", "si">; - -//////////////////////////////////////////////////////////////////////////////// -// E.3.3 Subtraction -def VSUB : Inst<"ddd", "csilfUcUsUiUlQcQsQiQlQfQUcQUsQUiQUl", OP_SUB>; -def VSUBL : SInst<"wdd", "csiUcUsUi">; -def VSUBW : SInst<"wwd", "csiUcUsUi">; -def VQSUB : SInst<"ddd", "csilUcUsUiUlQcQsQiQlQUcQUsQUiQUl">; -def VHSUB : SInst<"ddd", "csiUcUsUiQcQsQiQUcQUsQUi">; -def VSUBHN : IInst<"dww", "csiUcUsUi">; -def VRSUBHN : IInst<"dww", "csiUcUsUi">; - -//////////////////////////////////////////////////////////////////////////////// -// E.3.4 Comparison -def VCEQ : Inst<"udd", "csifUcUsUiPcQcQsQiQfQUcQUsQUiQPc", OP_EQ>; -def VCGE : Inst<"udd", "csifUcUsUiQcQsQiQfQUcQUsQUi", OP_GE>; -def VCLE : Inst<"udd", "csifUcUsUiQcQsQiQfQUcQUsQUi", OP_LE>; -def VCGT : Inst<"udd", "csifUcUsUiQcQsQiQfQUcQUsQUi", OP_GT>; -def VCLT : Inst<"udd", "csifUcUsUiQcQsQiQfQUcQUsQUi", OP_LT>; -def VCAGE : IInst<"udd", "fQf">; -def VCALE : IInst<"udd", "fQf">; -def VCAGT : IInst<"udd", "fQf">; -def VCALT : IInst<"udd", "fQf">; -def VTST : WInst<"udd", "csiUcUsUiPcQcQsQiQUcQUsQUiQPc">; - -//////////////////////////////////////////////////////////////////////////////// -// E.3.5 Absolute Difference -def VABD : SInst<"ddd", "csiUcUsUifQcQsQiQUcQUsQUiQf">; -def VABDL : SInst<"wdd", "csiUcUsUi">; -def VABA : SInst<"dddd", "csiUcUsUiQcQsQiQUcQUsQUi">; -def VABAL : SInst<"wwdd", "csiUcUsUi">; - -//////////////////////////////////////////////////////////////////////////////// -// E.3.6 Max/Min -def VMAX : SInst<"ddd", "csiUcUsUifQcQsQiQUcQUsQUiQf">; -def VMIN : SInst<"ddd", "csiUcUsUifQcQsQiQUcQUsQUiQf">; - -//////////////////////////////////////////////////////////////////////////////// -// E.3.7 Pairdise Addition -def VPADD : IInst<"ddd", "csiUcUsUif">; -def VPADDL : SInst<"nd", "csiUcUsUiQcQsQiQUcQUsQUi">; -def VPADAL : SInst<"nnd", "csiUcUsUiQcQsQiQUcQUsQUi">; - -//////////////////////////////////////////////////////////////////////////////// -// E.3.8-9 Folding Max/Min -def VPMAX : SInst<"ddd", "csiUcUsUif">; -def VPMIN : SInst<"ddd", "csiUcUsUif">; - -//////////////////////////////////////////////////////////////////////////////// -// E.3.10 Reciprocal/Sqrt -def VRECPS : IInst<"ddd", "fQf">; -def VRSQRTS : IInst<"ddd", "fQf">; - -//////////////////////////////////////////////////////////////////////////////// -// E.3.11 Shifts by signed variable -def VSHL : SInst<"ddd", "csilUcUsUiUlQcQsQiQlQUcQUsQUiQUl">; -def VQSHL : SInst<"ddd", "csilUcUsUiUlQcQsQiQlQUcQUsQUiQUl">; -def VRSHL : SInst<"ddd", "csilUcUsUiUlQcQsQiQlQUcQUsQUiQUl">; -def VQRSHL : SInst<"ddd", "csilUcUsUiUlQcQsQiQlQUcQUsQUiQUl">; - -//////////////////////////////////////////////////////////////////////////////// -// E.3.12 Shifts by constant -let isShift = 1 in { -def VSHR_N : SInst<"ddi", "csilUcUsUiUlQcQsQiQlQUcQUsQUiQUl">; -def VSHL_N : IInst<"ddi", "csilUcUsUiUlQcQsQiQlQUcQUsQUiQUl">; -def VRSHR_N : SInst<"ddi", "csilUcUsUiUlQcQsQiQlQUcQUsQUiQUl">; -def VSRA_N : SInst<"dddi", "csilUcUsUiUlQcQsQiQlQUcQUsQUiQUl">; -def VRSRA_N : SInst<"dddi", "csilUcUsUiUlQcQsQiQlQUcQUsQUiQUl">; -def VQSHL_N : SInst<"ddi", "csilUcUsUiUlQcQsQiQlQUcQUsQUiQUl">; -def VQSHLU_N : SInst<"udi", "csilQcQsQiQl">; -def VSHRN_N : IInst<"hki", "silUsUiUl">; -def VQSHRUN_N : SInst<"eki", "sil">; -def VQRSHRUN_N : SInst<"eki", "sil">; -def VQSHRN_N : SInst<"hki", "silUsUiUl">; -def VRSHRN_N : IInst<"hki", "silUsUiUl">; -def VQRSHRN_N : SInst<"hki", "silUsUiUl">; -def VSHLL_N : SInst<"wdi", "csiUcUsUi">; - -//////////////////////////////////////////////////////////////////////////////// -// E.3.13 Shifts with insert -def VSRI_N : WInst<"dddi", "csilUcUsUiUlPcPsQcQsQiQlQUcQUsQUiQUlQPcQPs">; -def VSLI_N : WInst<"dddi", "csilUcUsUiUlPcPsQcQsQiQlQUcQUsQUiQUlQPcQPs">; -} - -//////////////////////////////////////////////////////////////////////////////// -// E.3.14 Loads and stores of a single vector -def VLD1 : WInst<"dc", "QUcQUsQUiQUlQcQsQiQlQhQfQPcQPsUcUsUiUlcsilhfPcPs">; -def VLD1_LANE : WInst<"dci", "QUcQUsQUiQUlQcQsQiQlQhQfQPcQPsUcUsUiUlcsilhfPcPs">; -def VLD1_DUP : WInst<"dc", "QUcQUsQUiQUlQcQsQiQlQhQfQPcQPsUcUsUiUlcsilhfPcPs">; -def VST1 : WInst<"vpd", "QUcQUsQUiQUlQcQsQiQlQhQfQPcQPsUcUsUiUlcsilhfPcPs">; -def VST1_LANE : WInst<"vpdi", "QUcQUsQUiQUlQcQsQiQlQhQfQPcQPsUcUsUiUlcsilhfPcPs">; - -//////////////////////////////////////////////////////////////////////////////// -// E.3.15 Loads and stores of an N-element structure -def VLD2 : WInst<"2c", "QUcQUsQUiQcQsQiQhQfQPcQPsUcUsUiUlcsilhfPcPs">; -def VLD3 : WInst<"3c", "QUcQUsQUiQcQsQiQhQfQPcQPsUcUsUiUlcsilhfPcPs">; -def VLD4 : WInst<"4c", "QUcQUsQUiQcQsQiQhQfQPcQPsUcUsUiUlcsilhfPcPs">; -def VLD2_DUP : WInst<"2c", "UcUsUiUlcsilhfPcPs">; -def VLD3_DUP : WInst<"3c", "UcUsUiUlcsilhfPcPs">; -def VLD4_DUP : WInst<"4c", "UcUsUiUlcsilhfPcPs">; -def VLD2_LANE : WInst<"2ci", "QUsQUiQsQiQhQfQPsUcUsUicsihfPcPs">; -def VLD3_LANE : WInst<"3ci", "QUsQUiQsQiQhQfQPsUcUsUicsihfPcPs">; -def VLD4_LANE : WInst<"4ci", "QUsQUiQsQiQhQfQPsUcUsUicsihfPcPs">; -def VST2 : WInst<"vp2", "QUcQUsQUiQcQsQiQhQfQPcQPsUcUsUiUlcsilhfPcPs">; -def VST3 : WInst<"vp3", "QUcQUsQUiQcQsQiQhQfQPcQPsUcUsUiUlcsilhfPcPs">; -def VST4 : WInst<"vp4", "QUcQUsQUiQcQsQiQhQfQPcQPsUcUsUiUlcsilhfPcPs">; -def VST2_LANE : WInst<"vp2i", "QUsQUiQsQiQhQfQPsUcUsUicsihfPcPs">; -def VST3_LANE : WInst<"vp3i", "QUsQUiQsQiQhQfQPsUcUsUicsihfPcPs">; -def VST4_LANE : WInst<"vp4i", "QUsQUiQsQiQhQfQPsUcUsUicsihfPcPs">; - -//////////////////////////////////////////////////////////////////////////////// -// E.3.16 Extract lanes from a vector -def VGET_LANE : IInst<"sdi", "UcUsUicsiPcPsfQUcQUsQUiQcQsQiQPcQPsQflUlQlQUl">; - -//////////////////////////////////////////////////////////////////////////////// -// E.3.17 Set lanes within a vector -def VSET_LANE : IInst<"dsdi", "UcUsUicsiPcPsfQUcQUsQUiQcQsQiQPcQPsQflUlQlQUl">; - -//////////////////////////////////////////////////////////////////////////////// -// E.3.18 Initialize a vector from bit pattern -def VCREATE: Inst<"dl", "csihfUcUsUiUlPcPsl", OP_CAST>; - -//////////////////////////////////////////////////////////////////////////////// -// E.3.19 Set all lanes to same value -def VDUP_N : Inst<"ds", "UcUsUicsiPcPsfQUcQUsQUiQcQsQiQPcQPsQflUlQlQUl", OP_DUP>; -def VMOV_N : Inst<"ds", "UcUsUicsiPcPsfQUcQUsQUiQcQsQiQPcQPsQflUlQlQUl", OP_DUP>; - -//////////////////////////////////////////////////////////////////////////////// -// E.3.20 Combining vectors -def VCOMBINE : Inst<"kdd", "csilhfUcUsUiUlPcPs", OP_CONC>; - -//////////////////////////////////////////////////////////////////////////////// -// E.3.21 Splitting vectors -def VGET_HIGH : Inst<"dk", "csilhfUcUsUiUlPcPs", OP_HI>; -def VGET_LOW : Inst<"dk", "csilhfUcUsUiUlPcPs", OP_LO>; - -//////////////////////////////////////////////////////////////////////////////// -// E.3.22 Converting vectors -def VCVT_S32 : SInst<"xd", "fQf">; -def VCVT_U32 : SInst<"ud", "fQf">; -def VCVT_F16 : SInst<"hk", "f">; -def VCVT_N_S32 : SInst<"xdi", "fQf">; -def VCVT_N_U32 : SInst<"udi", "fQf">; -def VCVT_F32 : SInst<"fd", "iUiQiQUi">; -def VCVT_F32_F16 : SInst<"kh", "f">; -def VCVT_N_F32 : SInst<"fdi", "iUiQiQUi">; -def VMOVN : IInst<"hk", "silUsUiUl">; -def VMOVL : SInst<"wd", "csiUcUsUi">; -def VQMOVN : SInst<"hk", "silUsUiUl">; -def VQMOVUN : SInst<"ek", "sil">; - -//////////////////////////////////////////////////////////////////////////////// -// E.3.23-24 Table lookup, Extended table lookup -def VTBL1 : WInst<"ddt", "UccPc">; -def VTBL2 : WInst<"d2t", "UccPc">; -def VTBL3 : WInst<"d3t", "UccPc">; -def VTBL4 : WInst<"d4t", "UccPc">; -def VTBX1 : WInst<"dddt", "UccPc">; -def VTBX2 : WInst<"dd2t", "UccPc">; -def VTBX3 : WInst<"dd3t", "UccPc">; -def VTBX4 : WInst<"dd4t", "UccPc">; - -//////////////////////////////////////////////////////////////////////////////// -// E.3.25 Operations with a scalar value -def VMLA_LANE : IInst<"ddddi", "siUsUifQsQiQUsQUiQf">; -def VMLAL_LANE : SInst<"wwddi", "siUsUi">; -def VQDMLAL_LANE : SInst<"wwddi", "si">; -def VMLS_LANE : IInst<"ddddi", "siUsUifQsQiQUsQUiQf">; -def VMLSL_LANE : SInst<"wwddi", "siUsUi">; -def VQDMLSL_LANE : SInst<"wwddi", "si">; -def VMUL_N : Inst<"dds", "sifUsUiQsQiQfQUsQUi", OP_MUL_N>; -def VMULL_N : SInst<"wda", "siUsUi">; -def VMULL_LANE : SInst<"wddi", "siUsUi">; -def VQDMULL_N : SInst<"wda", "si">; -def VQDMULL_LANE : SInst<"wddi", "si">; -def VQDMULH_N : SInst<"dda", "siQsQi">; -def VQDMULH_LANE : SInst<"dddi", "siQsQi">; -def VQRDMULH_N : SInst<"dda", "siQsQi">; -def VQRDMULH_LANE : SInst<"dddi", "siQsQi">; -def VMLA_N : Inst<"ddda", "siUsUifQsQiQUsQUiQf", OP_MLA_N>; -def VMLAL_N : SInst<"wwda", "siUsUi">; -def VQDMLAL_N : SInst<"wwda", "si">; -def VMLS_N : Inst<"ddds", "siUsUifQsQiQUsQUiQf", OP_MLS_N>; -def VMLSL_N : SInst<"wwda", "siUsUi">; -def VQDMLSL_N : SInst<"wwda", "si">; - -//////////////////////////////////////////////////////////////////////////////// -// E.3.26 Vector Extract -def VEXT : WInst<"dddi", "cUcPcsUsPsiUilUlQcQUcQPcQsQUsQPsQiQUiQlQUl">; - -//////////////////////////////////////////////////////////////////////////////// -// E.3.27 Reverse vector elements (sdap endianness) -def VREV64 : Inst<"dd", "csiUcUsUiPcPsfQcQsQiQUcQUsQUiQPcQPsQf", OP_REV64>; -def VREV32 : Inst<"dd", "csUcUsPcQcQsQUcQUsQPc", OP_REV32>; -def VREV16 : Inst<"dd", "cUcPcQcQUcQPc", OP_REV16>; - -//////////////////////////////////////////////////////////////////////////////// -// E.3.28 Other single operand arithmetic -def VABS : SInst<"dd", "csifQcQsQiQf">; -def VQABS : SInst<"dd", "csiQcQsQi">; -def VNEG : Inst<"dd", "csifQcQsQiQf", OP_NEG>; -def VQNEG : SInst<"dd", "csiQcQsQi">; -def VCLS : SInst<"dd", "csiQcQsQi">; -def VCLZ : IInst<"dd", "csiUcUsUiQcQsQiQUcQUsQUi">; -def VCNT : WInst<"dd", "UccPcQUcQcQPc">; -def VRECPE : SInst<"dd", "fUiQfQUi">; -def VRSQRTE : SInst<"dd", "fUiQfQUi">; - -//////////////////////////////////////////////////////////////////////////////// -// E.3.29 Logical operations -def VMVN : Inst<"dd", "csiUcUsUiPcQcQsQiQUcQUsQUiQPc", OP_NOT>; -def VAND : Inst<"ddd", "csilUcUsUiUlQcQsQiQlQUcQUsQUiQUl", OP_AND>; -def VORR : Inst<"ddd", "csilUcUsUiUlQcQsQiQlQUcQUsQUiQUl", OP_OR>; -def VEOR : Inst<"ddd", "csilUcUsUiUlQcQsQiQlQUcQUsQUiQUl", OP_XOR>; -def VBIC : Inst<"ddd", "csilUcUsUiUlQcQsQiQlQUcQUsQUiQUl", OP_ANDN>; -def VORN : Inst<"ddd", "csilUcUsUiUlQcQsQiQlQUcQUsQUiQUl", OP_ORN>; -def VBSL : Inst<"dudd", "csilUcUsUiUlfPcPsQcQsQiQlQUcQUsQUiQUlQfQPcQPs", OP_SEL>; - -//////////////////////////////////////////////////////////////////////////////// -// E.3.30 Transposition operations -def VTRN: WInst<"2dd", "csiUcUsUifPcPsQcQsQiQUcQUsQUiQfQPcQPs">; -def VZIP: WInst<"2dd", "csUcUsfPcPsQcQsQiQUcQUsQUiQfQPcQPs">; -def VUZP: WInst<"2dd", "csiUcUsUifPcPsQcQsQiQUcQUsQUiQfQPcQPs">; - -//////////////////////////////////////////////////////////////////////////////// -// E.3.31 Vector reinterpret cast operations diff --git a/tools/CIndex/CIndex.cpp b/tools/CIndex/CIndex.cpp deleted file mode 100644 index 9cdb9659fe9..00000000000 --- a/tools/CIndex/CIndex.cpp +++ /dev/null @@ -1,2589 +0,0 @@ -//===- CIndex.cpp - Clang-C Source Indexing Library -----------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file implements the main API hooks in the Clang-C Source Indexing -// library. -// -//===----------------------------------------------------------------------===// - -#include "CIndexer.h" -#include "CXCursor.h" -#include "CXSourceLocation.h" -#include "CIndexDiagnostic.h" - -#include "clang/Basic/Version.h" - -#include "clang/AST/DeclVisitor.h" -#include "clang/AST/StmtVisitor.h" -#include "clang/AST/TypeLocVisitor.h" -#include "clang/Basic/Diagnostic.h" -#include "clang/Frontend/ASTUnit.h" -#include "clang/Frontend/CompilerInstance.h" -#include "clang/Frontend/FrontendDiagnostic.h" -#include "clang/Lex/Lexer.h" -#include "clang/Lex/PreprocessingRecord.h" -#include "clang/Lex/Preprocessor.h" -#include "llvm/Support/MemoryBuffer.h" -#include "llvm/System/Program.h" -#include "llvm/System/Signals.h" - -// Needed to define L_TMPNAM on some systems. -#include - -using namespace clang; -using namespace clang::cxcursor; -using namespace clang::cxstring; - -//===----------------------------------------------------------------------===// -// Crash Reporting. -//===----------------------------------------------------------------------===// - -#ifdef __APPLE__ -#define USE_CRASHTRACER -#include "clang/Analysis/Support/SaveAndRestore.h" -// Integrate with crash reporter. -extern "C" const char *__crashreporter_info__; -#define NUM_CRASH_STRINGS 32 -static unsigned crashtracer_counter = 0; -static unsigned crashtracer_counter_id[NUM_CRASH_STRINGS] = { 0 }; -static const char *crashtracer_strings[NUM_CRASH_STRINGS] = { 0 }; -static const char *agg_crashtracer_strings[NUM_CRASH_STRINGS] = { 0 }; - -static unsigned SetCrashTracerInfo(const char *str, - llvm::SmallString<1024> &AggStr) { - - unsigned slot = 0; - while (crashtracer_strings[slot]) { - if (++slot == NUM_CRASH_STRINGS) - slot = 0; - } - crashtracer_strings[slot] = str; - crashtracer_counter_id[slot] = ++crashtracer_counter; - - // We need to create an aggregate string because multiple threads - // may be in this method at one time. The crash reporter string - // will attempt to overapproximate the set of in-flight invocations - // of this function. Race conditions can still cause this goal - // to not be achieved. - { - llvm::raw_svector_ostream Out(AggStr); - for (unsigned i = 0; i < NUM_CRASH_STRINGS; ++i) - if (crashtracer_strings[i]) Out << crashtracer_strings[i] << '\n'; - } - __crashreporter_info__ = agg_crashtracer_strings[slot] = AggStr.c_str(); - return slot; -} - -static void ResetCrashTracerInfo(unsigned slot) { - unsigned max_slot = 0; - unsigned max_value = 0; - - crashtracer_strings[slot] = agg_crashtracer_strings[slot] = 0; - - for (unsigned i = 0 ; i < NUM_CRASH_STRINGS; ++i) - if (agg_crashtracer_strings[i] && - crashtracer_counter_id[i] > max_value) { - max_slot = i; - max_value = crashtracer_counter_id[i]; - } - - __crashreporter_info__ = agg_crashtracer_strings[max_slot]; -} - -namespace { -class ArgsCrashTracerInfo { - llvm::SmallString<1024> CrashString; - llvm::SmallString<1024> AggregateString; - unsigned crashtracerSlot; -public: - ArgsCrashTracerInfo(llvm::SmallVectorImpl &Args) - : crashtracerSlot(0) - { - { - llvm::raw_svector_ostream Out(CrashString); - Out << "ClangCIndex [" << getClangFullVersion() << "]" - << "[createTranslationUnitFromSourceFile]: clang"; - for (llvm::SmallVectorImpl::iterator I=Args.begin(), - E=Args.end(); I!=E; ++I) - Out << ' ' << *I; - } - crashtracerSlot = SetCrashTracerInfo(CrashString.c_str(), - AggregateString); - } - - ~ArgsCrashTracerInfo() { - ResetCrashTracerInfo(crashtracerSlot); - } -}; -} -#endif - -/// \brief The result of comparing two source ranges. -enum RangeComparisonResult { - /// \brief Either the ranges overlap or one of the ranges is invalid. - RangeOverlap, - - /// \brief The first range ends before the second range starts. - RangeBefore, - - /// \brief The first range starts after the second range ends. - RangeAfter -}; - -/// \brief Compare two source ranges to determine their relative position in -/// the translation unit. -static RangeComparisonResult RangeCompare(SourceManager &SM, - SourceRange R1, - SourceRange R2) { - assert(R1.isValid() && "First range is invalid?"); - assert(R2.isValid() && "Second range is invalid?"); - if (R1.getEnd() == R2.getBegin() || - SM.isBeforeInTranslationUnit(R1.getEnd(), R2.getBegin())) - return RangeBefore; - if (R2.getEnd() == R1.getBegin() || - SM.isBeforeInTranslationUnit(R2.getEnd(), R1.getBegin())) - return RangeAfter; - return RangeOverlap; -} - -/// \brief Translate a Clang source range into a CIndex source range. -/// -/// Clang internally represents ranges where the end location points to the -/// start of the token at the end. However, for external clients it is more -/// useful to have a CXSourceRange be a proper half-open interval. This routine -/// does the appropriate translation. -CXSourceRange cxloc::translateSourceRange(const SourceManager &SM, - const LangOptions &LangOpts, - SourceRange R) { - // We want the last character in this location, so we will adjust the - // location accordingly. - // FIXME: How do do this with a macro instantiation location? - SourceLocation EndLoc = R.getEnd(); - if (!EndLoc.isInvalid() && EndLoc.isFileID()) { - unsigned Length = Lexer::MeasureTokenLength(EndLoc, SM, LangOpts); - EndLoc = EndLoc.getFileLocWithOffset(Length); - } - - CXSourceRange Result = { { (void *)&SM, (void *)&LangOpts }, - R.getBegin().getRawEncoding(), - EndLoc.getRawEncoding() }; - return Result; -} - -//===----------------------------------------------------------------------===// -// Cursor visitor. -//===----------------------------------------------------------------------===// - -namespace { - -// Cursor visitor. -class CursorVisitor : public DeclVisitor, - public TypeLocVisitor, - public StmtVisitor -{ - /// \brief The translation unit we are traversing. - ASTUnit *TU; - - /// \brief The parent cursor whose children we are traversing. - CXCursor Parent; - - /// \brief The declaration that serves at the parent of any statement or - /// expression nodes. - Decl *StmtParent; - - /// \brief The visitor function. - CXCursorVisitor Visitor; - - /// \brief The opaque client data, to be passed along to the visitor. - CXClientData ClientData; - - // MaxPCHLevel - the maximum PCH level of declarations that we will pass on - // to the visitor. Declarations with a PCH level greater than this value will - // be suppressed. - unsigned MaxPCHLevel; - - /// \brief When valid, a source range to which the cursor should restrict - /// its search. - SourceRange RegionOfInterest; - - using DeclVisitor::Visit; - using TypeLocVisitor::Visit; - using StmtVisitor::Visit; - - /// \brief Determine whether this particular source range comes before, comes - /// after, or overlaps the region of interest. - /// - /// \param R a half-open source range retrieved from the abstract syntax tree. - RangeComparisonResult CompareRegionOfInterest(SourceRange R); - -public: - CursorVisitor(ASTUnit *TU, CXCursorVisitor Visitor, CXClientData ClientData, - unsigned MaxPCHLevel, - SourceRange RegionOfInterest = SourceRange()) - : TU(TU), Visitor(Visitor), ClientData(ClientData), - MaxPCHLevel(MaxPCHLevel), RegionOfInterest(RegionOfInterest) - { - Parent.kind = CXCursor_NoDeclFound; - Parent.data[0] = 0; - Parent.data[1] = 0; - Parent.data[2] = 0; - StmtParent = 0; - } - - bool Visit(CXCursor Cursor, bool CheckedRegionOfInterest = false); - - std::pair - getPreprocessedEntities(); - - bool VisitChildren(CXCursor Parent); - - // Declaration visitors - bool VisitAttributes(Decl *D); - bool VisitBlockDecl(BlockDecl *B); - bool VisitDeclContext(DeclContext *DC); - bool VisitTranslationUnitDecl(TranslationUnitDecl *D); - bool VisitTypedefDecl(TypedefDecl *D); - bool VisitTagDecl(TagDecl *D); - bool VisitEnumConstantDecl(EnumConstantDecl *D); - bool VisitDeclaratorDecl(DeclaratorDecl *DD); - bool VisitFunctionDecl(FunctionDecl *ND); - bool VisitFieldDecl(FieldDecl *D); - bool VisitVarDecl(VarDecl *); - bool VisitObjCMethodDecl(ObjCMethodDecl *ND); - bool VisitObjCContainerDecl(ObjCContainerDecl *D); - bool VisitObjCCategoryDecl(ObjCCategoryDecl *ND); - bool VisitObjCProtocolDecl(ObjCProtocolDecl *PID); - bool VisitObjCInterfaceDecl(ObjCInterfaceDecl *D); - bool VisitObjCImplDecl(ObjCImplDecl *D); - bool VisitObjCCategoryImplDecl(ObjCCategoryImplDecl *D); - bool VisitObjCImplementationDecl(ObjCImplementationDecl *D); - // FIXME: ObjCPropertyDecl requires TypeSourceInfo, getter/setter locations, - // etc. - // FIXME: ObjCCompatibleAliasDecl requires aliased-class locations. - bool VisitObjCForwardProtocolDecl(ObjCForwardProtocolDecl *D); - bool VisitObjCClassDecl(ObjCClassDecl *D); - - // Type visitors - // FIXME: QualifiedTypeLoc doesn't provide any location information - bool VisitBuiltinTypeLoc(BuiltinTypeLoc TL); - bool VisitTypedefTypeLoc(TypedefTypeLoc TL); - bool VisitUnresolvedUsingTypeLoc(UnresolvedUsingTypeLoc TL); - bool VisitTagTypeLoc(TagTypeLoc TL); - // FIXME: TemplateTypeParmTypeLoc doesn't provide any location information - bool VisitObjCInterfaceTypeLoc(ObjCInterfaceTypeLoc TL); - bool VisitObjCObjectPointerTypeLoc(ObjCObjectPointerTypeLoc TL); - bool VisitPointerTypeLoc(PointerTypeLoc TL); - bool VisitBlockPointerTypeLoc(BlockPointerTypeLoc TL); - bool VisitMemberPointerTypeLoc(MemberPointerTypeLoc TL); - bool VisitLValueReferenceTypeLoc(LValueReferenceTypeLoc TL); - bool VisitRValueReferenceTypeLoc(RValueReferenceTypeLoc TL); - bool VisitFunctionTypeLoc(FunctionTypeLoc TL); - bool VisitArrayTypeLoc(ArrayTypeLoc TL); - // FIXME: Implement for TemplateSpecializationTypeLoc - // FIXME: Implement visitors here when the unimplemented TypeLocs get - // implemented - bool VisitTypeOfExprTypeLoc(TypeOfExprTypeLoc TL); - bool VisitTypeOfTypeLoc(TypeOfTypeLoc TL); - - // Statement visitors - bool VisitStmt(Stmt *S); - bool VisitDeclStmt(DeclStmt *S); - // FIXME: LabelStmt label? - bool VisitIfStmt(IfStmt *S); - bool VisitSwitchStmt(SwitchStmt *S); - bool VisitWhileStmt(WhileStmt *S); - bool VisitForStmt(ForStmt *S); - - // Expression visitors - bool VisitBlockExpr(BlockExpr *B); - bool VisitCompoundLiteralExpr(CompoundLiteralExpr *E); - bool VisitExplicitCastExpr(ExplicitCastExpr *E); - bool VisitObjCMessageExpr(ObjCMessageExpr *E); - bool VisitObjCEncodeExpr(ObjCEncodeExpr *E); - bool VisitSizeOfAlignOfExpr(SizeOfAlignOfExpr *E); -}; - -} // end anonymous namespace - -RangeComparisonResult CursorVisitor::CompareRegionOfInterest(SourceRange R) { - return RangeCompare(TU->getSourceManager(), R, RegionOfInterest); -} - -/// \brief Visit the given cursor and, if requested by the visitor, -/// its children. -/// -/// \param Cursor the cursor to visit. -/// -/// \param CheckRegionOfInterest if true, then the caller already checked that -/// this cursor is within the region of interest. -/// -/// \returns true if the visitation should be aborted, false if it -/// should continue. -bool CursorVisitor::Visit(CXCursor Cursor, bool CheckedRegionOfInterest) { - if (clang_isInvalid(Cursor.kind)) - return false; - - if (clang_isDeclaration(Cursor.kind)) { - Decl *D = getCursorDecl(Cursor); - assert(D && "Invalid declaration cursor"); - if (D->getPCHLevel() > MaxPCHLevel) - return false; - - if (D->isImplicit()) - return false; - } - - // If we have a range of interest, and this cursor doesn't intersect with it, - // we're done. - if (RegionOfInterest.isValid() && !CheckedRegionOfInterest) { - SourceRange Range = - cxloc::translateCXSourceRange(clang_getCursorExtent(Cursor)); - if (Range.isInvalid() || CompareRegionOfInterest(Range)) - return false; - } - - switch (Visitor(Cursor, Parent, ClientData)) { - case CXChildVisit_Break: - return true; - - case CXChildVisit_Continue: - return false; - - case CXChildVisit_Recurse: - return VisitChildren(Cursor); - } - - return false; -} - -std::pair -CursorVisitor::getPreprocessedEntities() { - PreprocessingRecord &PPRec - = *TU->getPreprocessor().getPreprocessingRecord(); - - bool OnlyLocalDecls - = !TU->isMainFileAST() && TU->getOnlyLocalDecls(); - - // There is no region of interest; we have to walk everything. - if (RegionOfInterest.isInvalid()) - return std::make_pair(PPRec.begin(OnlyLocalDecls), - PPRec.end(OnlyLocalDecls)); - - // Find the file in which the region of interest lands. - SourceManager &SM = TU->getSourceManager(); - std::pair Begin - = SM.getDecomposedInstantiationLoc(RegionOfInterest.getBegin()); - std::pair End - = SM.getDecomposedInstantiationLoc(RegionOfInterest.getEnd()); - - // The region of interest spans files; we have to walk everything. - if (Begin.first != End.first) - return std::make_pair(PPRec.begin(OnlyLocalDecls), - PPRec.end(OnlyLocalDecls)); - - ASTUnit::PreprocessedEntitiesByFileMap &ByFileMap - = TU->getPreprocessedEntitiesByFile(); - if (ByFileMap.empty()) { - // Build the mapping from files to sets of preprocessed entities. - for (PreprocessingRecord::iterator E = PPRec.begin(OnlyLocalDecls), - EEnd = PPRec.end(OnlyLocalDecls); - E != EEnd; ++E) { - std::pair P - = SM.getDecomposedInstantiationLoc((*E)->getSourceRange().getBegin()); - ByFileMap[P.first].push_back(*E); - } - } - - return std::make_pair(ByFileMap[Begin.first].begin(), - ByFileMap[Begin.first].end()); -} - -/// \brief Visit the children of the given cursor. -/// -/// \returns true if the visitation should be aborted, false if it -/// should continue. -bool CursorVisitor::VisitChildren(CXCursor Cursor) { - if (clang_isReference(Cursor.kind)) { - // By definition, references have no children. - return false; - } - - // Set the Parent field to Cursor, then back to its old value once we're - // done. - class SetParentRAII { - CXCursor &Parent; - Decl *&StmtParent; - CXCursor OldParent; - - public: - SetParentRAII(CXCursor &Parent, Decl *&StmtParent, CXCursor NewParent) - : Parent(Parent), StmtParent(StmtParent), OldParent(Parent) - { - Parent = NewParent; - if (clang_isDeclaration(Parent.kind)) - StmtParent = getCursorDecl(Parent); - } - - ~SetParentRAII() { - Parent = OldParent; - if (clang_isDeclaration(Parent.kind)) - StmtParent = getCursorDecl(Parent); - } - } SetParent(Parent, StmtParent, Cursor); - - if (clang_isDeclaration(Cursor.kind)) { - Decl *D = getCursorDecl(Cursor); - assert(D && "Invalid declaration cursor"); - return VisitAttributes(D) || Visit(D); - } - - if (clang_isStatement(Cursor.kind)) - return Visit(getCursorStmt(Cursor)); - if (clang_isExpression(Cursor.kind)) - return Visit(getCursorExpr(Cursor)); - - if (clang_isTranslationUnit(Cursor.kind)) { - ASTUnit *CXXUnit = getCursorASTUnit(Cursor); - if (!CXXUnit->isMainFileAST() && CXXUnit->getOnlyLocalDecls() && - RegionOfInterest.isInvalid()) { - const std::vector &TLDs = CXXUnit->getTopLevelDecls(); - for (std::vector::const_iterator it = TLDs.begin(), - ie = TLDs.end(); it != ie; ++it) { - if (Visit(MakeCXCursor(*it, CXXUnit), true)) - return true; - } - } else if (VisitDeclContext( - CXXUnit->getASTContext().getTranslationUnitDecl())) - return true; - - // Walk the preprocessing record. - if (CXXUnit->getPreprocessor().getPreprocessingRecord()) { - // FIXME: Once we have the ability to deserialize a preprocessing record, - // do so. - PreprocessingRecord::iterator E, EEnd; - for (llvm::tie(E, EEnd) = getPreprocessedEntities(); E != EEnd; ++E) { - if (MacroInstantiation *MI = dyn_cast(*E)) { - if (Visit(MakeMacroInstantiationCursor(MI, CXXUnit))) - return true; - - continue; - } - - if (MacroDefinition *MD = dyn_cast(*E)) { - if (Visit(MakeMacroDefinitionCursor(MD, CXXUnit))) - return true; - - continue; - } - } - } - return false; - } - - // Nothing to visit at the moment. - return false; -} - -bool CursorVisitor::VisitBlockDecl(BlockDecl *B) { - for (BlockDecl::param_iterator I=B->param_begin(), E=B->param_end(); I!=E;++I) - if (Decl *D = *I) - if (Visit(D)) - return true; - - return Visit(MakeCXCursor(B->getBody(), StmtParent, TU)); -} - -bool CursorVisitor::VisitDeclContext(DeclContext *DC) { - for (DeclContext::decl_iterator - I = DC->decls_begin(), E = DC->decls_end(); I != E; ++I) { - - CXCursor Cursor = MakeCXCursor(*I, TU); - - if (RegionOfInterest.isValid()) { - SourceRange Range = - cxloc::translateCXSourceRange(clang_getCursorExtent(Cursor)); - if (Range.isInvalid()) - continue; - - switch (CompareRegionOfInterest(Range)) { - case RangeBefore: - // This declaration comes before the region of interest; skip it. - continue; - - case RangeAfter: - // This declaration comes after the region of interest; we're done. - return false; - - case RangeOverlap: - // This declaration overlaps the region of interest; visit it. - break; - } - } - - if (Visit(Cursor, true)) - return true; - } - - return false; -} - -bool CursorVisitor::VisitTranslationUnitDecl(TranslationUnitDecl *D) { - llvm_unreachable("Translation units are visited directly by Visit()"); - return false; -} - -bool CursorVisitor::VisitTypedefDecl(TypedefDecl *D) { - if (TypeSourceInfo *TSInfo = D->getTypeSourceInfo()) - return Visit(TSInfo->getTypeLoc()); - - return false; -} - -bool CursorVisitor::VisitTagDecl(TagDecl *D) { - return VisitDeclContext(D); -} - -bool CursorVisitor::VisitEnumConstantDecl(EnumConstantDecl *D) { - if (Expr *Init = D->getInitExpr()) - return Visit(MakeCXCursor(Init, StmtParent, TU)); - return false; -} - -bool CursorVisitor::VisitDeclaratorDecl(DeclaratorDecl *DD) { - if (TypeSourceInfo *TSInfo = DD->getTypeSourceInfo()) - if (Visit(TSInfo->getTypeLoc())) - return true; - - return false; -} - -bool CursorVisitor::VisitFunctionDecl(FunctionDecl *ND) { - if (VisitDeclaratorDecl(ND)) - return true; - - if (ND->isThisDeclarationADefinition() && - Visit(MakeCXCursor(ND->getBody(), StmtParent, TU))) - return true; - - return false; -} - -bool CursorVisitor::VisitFieldDecl(FieldDecl *D) { - if (VisitDeclaratorDecl(D)) - return true; - - if (Expr *BitWidth = D->getBitWidth()) - return Visit(MakeCXCursor(BitWidth, StmtParent, TU)); - - return false; -} - -bool CursorVisitor::VisitVarDecl(VarDecl *D) { - if (VisitDeclaratorDecl(D)) - return true; - - if (Expr *Init = D->getInit()) - return Visit(MakeCXCursor(Init, StmtParent, TU)); - - return false; -} - -bool CursorVisitor::VisitObjCMethodDecl(ObjCMethodDecl *ND) { - if (TypeSourceInfo *TSInfo = ND->getResultTypeSourceInfo()) - if (Visit(TSInfo->getTypeLoc())) - return true; - - for (ObjCMethodDecl::param_iterator P = ND->param_begin(), - PEnd = ND->param_end(); - P != PEnd; ++P) { - if (Visit(MakeCXCursor(*P, TU))) - return true; - } - - if (ND->isThisDeclarationADefinition() && - Visit(MakeCXCursor(ND->getBody(), StmtParent, TU))) - return true; - - return false; -} - -bool CursorVisitor::VisitObjCContainerDecl(ObjCContainerDecl *D) { - return VisitDeclContext(D); -} - -bool CursorVisitor::VisitObjCCategoryDecl(ObjCCategoryDecl *ND) { - if (Visit(MakeCursorObjCClassRef(ND->getClassInterface(), ND->getLocation(), - TU))) - return true; - - ObjCCategoryDecl::protocol_loc_iterator PL = ND->protocol_loc_begin(); - for (ObjCCategoryDecl::protocol_iterator I = ND->protocol_begin(), - E = ND->protocol_end(); I != E; ++I, ++PL) - if (Visit(MakeCursorObjCProtocolRef(*I, *PL, TU))) - return true; - - return VisitObjCContainerDecl(ND); -} - -bool CursorVisitor::VisitObjCProtocolDecl(ObjCProtocolDecl *PID) { - ObjCProtocolDecl::protocol_loc_iterator PL = PID->protocol_loc_begin(); - for (ObjCProtocolDecl::protocol_iterator I = PID->protocol_begin(), - E = PID->protocol_end(); I != E; ++I, ++PL) - if (Visit(MakeCursorObjCProtocolRef(*I, *PL, TU))) - return true; - - return VisitObjCContainerDecl(PID); -} - -bool CursorVisitor::VisitObjCInterfaceDecl(ObjCInterfaceDecl *D) { - // Issue callbacks for super class. - if (D->getSuperClass() && - Visit(MakeCursorObjCSuperClassRef(D->getSuperClass(), - D->getSuperClassLoc(), - TU))) - return true; - - ObjCInterfaceDecl::protocol_loc_iterator PL = D->protocol_loc_begin(); - for (ObjCInterfaceDecl::protocol_iterator I = D->protocol_begin(), - E = D->protocol_end(); I != E; ++I, ++PL) - if (Visit(MakeCursorObjCProtocolRef(*I, *PL, TU))) - return true; - - return VisitObjCContainerDecl(D); -} - -bool CursorVisitor::VisitObjCImplDecl(ObjCImplDecl *D) { - return VisitObjCContainerDecl(D); -} - -bool CursorVisitor::VisitObjCCategoryImplDecl(ObjCCategoryImplDecl *D) { - // 'ID' could be null when dealing with invalid code. - if (ObjCInterfaceDecl *ID = D->getClassInterface()) - if (Visit(MakeCursorObjCClassRef(ID, D->getLocation(), TU))) - return true; - - return VisitObjCImplDecl(D); -} - -bool CursorVisitor::VisitObjCImplementationDecl(ObjCImplementationDecl *D) { -#if 0 - // Issue callbacks for super class. - // FIXME: No source location information! - if (D->getSuperClass() && - Visit(MakeCursorObjCSuperClassRef(D->getSuperClass(), - D->getSuperClassLoc(), - TU))) - return true; -#endif - - return VisitObjCImplDecl(D); -} - -bool CursorVisitor::VisitObjCForwardProtocolDecl(ObjCForwardProtocolDecl *D) { - ObjCForwardProtocolDecl::protocol_loc_iterator PL = D->protocol_loc_begin(); - for (ObjCForwardProtocolDecl::protocol_iterator I = D->protocol_begin(), - E = D->protocol_end(); - I != E; ++I, ++PL) - if (Visit(MakeCursorObjCProtocolRef(*I, *PL, TU))) - return true; - - return false; -} - -bool CursorVisitor::VisitObjCClassDecl(ObjCClassDecl *D) { - for (ObjCClassDecl::iterator C = D->begin(), CEnd = D->end(); C != CEnd; ++C) - if (Visit(MakeCursorObjCClassRef(C->getInterface(), C->getLocation(), TU))) - return true; - - return false; -} - -bool CursorVisitor::VisitBuiltinTypeLoc(BuiltinTypeLoc TL) { - ASTContext &Context = TU->getASTContext(); - - // Some builtin types (such as Objective-C's "id", "sel", and - // "Class") have associated declarations. Create cursors for those. - QualType VisitType; - switch (TL.getType()->getAs()->getKind()) { - case BuiltinType::Void: - case BuiltinType::Bool: - case BuiltinType::Char_U: - case BuiltinType::UChar: - case BuiltinType::Char16: - case BuiltinType::Char32: - case BuiltinType::UShort: - case BuiltinType::UInt: - case BuiltinType::ULong: - case BuiltinType::ULongLong: - case BuiltinType::UInt128: - case BuiltinType::Char_S: - case BuiltinType::SChar: - case BuiltinType::WChar: - case BuiltinType::Short: - case BuiltinType::Int: - case BuiltinType::Long: - case BuiltinType::LongLong: - case BuiltinType::Int128: - case BuiltinType::Float: - case BuiltinType::Double: - case BuiltinType::LongDouble: - case BuiltinType::NullPtr: - case BuiltinType::Overload: - case BuiltinType::Dependent: - break; - - case BuiltinType::UndeducedAuto: // FIXME: Deserves a cursor? - break; - - case BuiltinType::ObjCId: - VisitType = Context.getObjCIdType(); - break; - - case BuiltinType::ObjCClass: - VisitType = Context.getObjCClassType(); - break; - - case BuiltinType::ObjCSel: - VisitType = Context.getObjCSelType(); - break; - } - - if (!VisitType.isNull()) { - if (const TypedefType *Typedef = VisitType->getAs()) - return Visit(MakeCursorTypeRef(Typedef->getDecl(), TL.getBuiltinLoc(), - TU)); - } - - return false; -} - -bool CursorVisitor::VisitTypedefTypeLoc(TypedefTypeLoc TL) { - return Visit(MakeCursorTypeRef(TL.getTypedefDecl(), TL.getNameLoc(), TU)); -} - -bool CursorVisitor::VisitUnresolvedUsingTypeLoc(UnresolvedUsingTypeLoc TL) { - return Visit(MakeCursorTypeRef(TL.getDecl(), TL.getNameLoc(), TU)); -} - -bool CursorVisitor::VisitTagTypeLoc(TagTypeLoc TL) { - return Visit(MakeCursorTypeRef(TL.getDecl(), TL.getNameLoc(), TU)); -} - -bool CursorVisitor::VisitObjCInterfaceTypeLoc(ObjCInterfaceTypeLoc TL) { - if (Visit(MakeCursorObjCClassRef(TL.getIFaceDecl(), TL.getNameLoc(), TU))) - return true; - - for (unsigned I = 0, N = TL.getNumProtocols(); I != N; ++I) { - if (Visit(MakeCursorObjCProtocolRef(TL.getProtocol(I), TL.getProtocolLoc(I), - TU))) - return true; - } - - return false; -} - -bool CursorVisitor::VisitObjCObjectPointerTypeLoc(ObjCObjectPointerTypeLoc TL) { - if (TL.hasBaseTypeAsWritten() && Visit(TL.getBaseTypeLoc())) - return true; - - if (TL.hasProtocolsAsWritten()) { - for (unsigned I = 0, N = TL.getNumProtocols(); I != N; ++I) { - if (Visit(MakeCursorObjCProtocolRef(TL.getProtocol(I), - TL.getProtocolLoc(I), - TU))) - return true; - } - } - - return false; -} - -bool CursorVisitor::VisitPointerTypeLoc(PointerTypeLoc TL) { - return Visit(TL.getPointeeLoc()); -} - -bool CursorVisitor::VisitBlockPointerTypeLoc(BlockPointerTypeLoc TL) { - return Visit(TL.getPointeeLoc()); -} - -bool CursorVisitor::VisitMemberPointerTypeLoc(MemberPointerTypeLoc TL) { - return Visit(TL.getPointeeLoc()); -} - -bool CursorVisitor::VisitLValueReferenceTypeLoc(LValueReferenceTypeLoc TL) { - return Visit(TL.getPointeeLoc()); -} - -bool CursorVisitor::VisitRValueReferenceTypeLoc(RValueReferenceTypeLoc TL) { - return Visit(TL.getPointeeLoc()); -} - -bool CursorVisitor::VisitFunctionTypeLoc(FunctionTypeLoc TL) { - if (Visit(TL.getResultLoc())) - return true; - - for (unsigned I = 0, N = TL.getNumArgs(); I != N; ++I) - if (Decl *D = TL.getArg(I)) - if (Visit(MakeCXCursor(D, TU))) - return true; - - return false; -} - -bool CursorVisitor::VisitArrayTypeLoc(ArrayTypeLoc TL) { - if (Visit(TL.getElementLoc())) - return true; - - if (Expr *Size = TL.getSizeExpr()) - return Visit(MakeCXCursor(Size, StmtParent, TU)); - - return false; -} - -bool CursorVisitor::VisitTypeOfExprTypeLoc(TypeOfExprTypeLoc TL) { - return Visit(MakeCXCursor(TL.getUnderlyingExpr(), StmtParent, TU)); -} - -bool CursorVisitor::VisitTypeOfTypeLoc(TypeOfTypeLoc TL) { - if (TypeSourceInfo *TSInfo = TL.getUnderlyingTInfo()) - return Visit(TSInfo->getTypeLoc()); - - return false; -} - -bool CursorVisitor::VisitStmt(Stmt *S) { - for (Stmt::child_iterator Child = S->child_begin(), ChildEnd = S->child_end(); - Child != ChildEnd; ++Child) { - if (*Child && Visit(MakeCXCursor(*Child, StmtParent, TU))) - return true; - } - - return false; -} - -bool CursorVisitor::VisitDeclStmt(DeclStmt *S) { - for (DeclStmt::decl_iterator D = S->decl_begin(), DEnd = S->decl_end(); - D != DEnd; ++D) { - if (*D && Visit(MakeCXCursor(*D, TU))) - return true; - } - - return false; -} - -bool CursorVisitor::VisitIfStmt(IfStmt *S) { - if (VarDecl *Var = S->getConditionVariable()) { - if (Visit(MakeCXCursor(Var, TU))) - return true; - } - - if (S->getCond() && Visit(MakeCXCursor(S->getCond(), StmtParent, TU))) - return true; - if (S->getThen() && Visit(MakeCXCursor(S->getThen(), StmtParent, TU))) - return true; - if (S->getElse() && Visit(MakeCXCursor(S->getElse(), StmtParent, TU))) - return true; - - return false; -} - -bool CursorVisitor::VisitSwitchStmt(SwitchStmt *S) { - if (VarDecl *Var = S->getConditionVariable()) { - if (Visit(MakeCXCursor(Var, TU))) - return true; - } - - if (S->getCond() && Visit(MakeCXCursor(S->getCond(), StmtParent, TU))) - return true; - if (S->getBody() && Visit(MakeCXCursor(S->getBody(), StmtParent, TU))) - return true; - - return false; -} - -bool CursorVisitor::VisitWhileStmt(WhileStmt *S) { - if (VarDecl *Var = S->getConditionVariable()) { - if (Visit(MakeCXCursor(Var, TU))) - return true; - } - - if (S->getCond() && Visit(MakeCXCursor(S->getCond(), StmtParent, TU))) - return true; - if (S->getBody() && Visit(MakeCXCursor(S->getBody(), StmtParent, TU))) - return true; - - return false; -} - -bool CursorVisitor::VisitForStmt(ForStmt *S) { - if (S->getInit() && Visit(MakeCXCursor(S->getInit(), StmtParent, TU))) - return true; - if (VarDecl *Var = S->getConditionVariable()) { - if (Visit(MakeCXCursor(Var, TU))) - return true; - } - - if (S->getCond() && Visit(MakeCXCursor(S->getCond(), StmtParent, TU))) - return true; - if (S->getInc() && Visit(MakeCXCursor(S->getInc(), StmtParent, TU))) - return true; - if (S->getBody() && Visit(MakeCXCursor(S->getBody(), StmtParent, TU))) - return true; - - return false; -} - -bool CursorVisitor::VisitBlockExpr(BlockExpr *B) { - return Visit(B->getBlockDecl()); -} - -bool CursorVisitor::VisitSizeOfAlignOfExpr(SizeOfAlignOfExpr *E) { - if (E->isArgumentType()) { - if (TypeSourceInfo *TSInfo = E->getArgumentTypeInfo()) - return Visit(TSInfo->getTypeLoc()); - - return false; - } - - return VisitExpr(E); -} - -bool CursorVisitor::VisitExplicitCastExpr(ExplicitCastExpr *E) { - if (TypeSourceInfo *TSInfo = E->getTypeInfoAsWritten()) - if (Visit(TSInfo->getTypeLoc())) - return true; - - return VisitCastExpr(E); -} - -bool CursorVisitor::VisitCompoundLiteralExpr(CompoundLiteralExpr *E) { - if (TypeSourceInfo *TSInfo = E->getTypeSourceInfo()) - if (Visit(TSInfo->getTypeLoc())) - return true; - - return VisitExpr(E); -} - -bool CursorVisitor::VisitObjCMessageExpr(ObjCMessageExpr *E) { - if (TypeSourceInfo *TSInfo = E->getClassReceiverTypeInfo()) - if (Visit(TSInfo->getTypeLoc())) - return true; - - return VisitExpr(E); -} - -bool CursorVisitor::VisitObjCEncodeExpr(ObjCEncodeExpr *E) { - return Visit(E->getEncodedTypeSourceInfo()->getTypeLoc()); -} - - -bool CursorVisitor::VisitAttributes(Decl *D) { - for (const Attr *A = D->getAttrs(); A; A = A->getNext()) - if (Visit(MakeCXCursor(A, D, TU))) - return true; - - return false; -} - -extern "C" { -CXIndex clang_createIndex(int excludeDeclarationsFromPCH, - int displayDiagnostics) { - CIndexer *CIdxr = new CIndexer(); - if (excludeDeclarationsFromPCH) - CIdxr->setOnlyLocalDecls(); - if (displayDiagnostics) - CIdxr->setDisplayDiagnostics(); - return CIdxr; -} - -void clang_disposeIndex(CXIndex CIdx) { - if (CIdx) - delete static_cast(CIdx); -} - -void clang_setUseExternalASTGeneration(CXIndex CIdx, int value) { - if (CIdx) { - CIndexer *CXXIdx = static_cast(CIdx); - CXXIdx->setUseExternalASTGeneration(value); - } -} - -CXTranslationUnit clang_createTranslationUnit(CXIndex CIdx, - const char *ast_filename) { - if (!CIdx) - return 0; - - CIndexer *CXXIdx = static_cast(CIdx); - - llvm::IntrusiveRefCntPtr Diags; - return ASTUnit::LoadFromPCHFile(ast_filename, Diags, - CXXIdx->getOnlyLocalDecls(), - 0, 0, true); -} - -CXTranslationUnit -clang_createTranslationUnitFromSourceFile(CXIndex CIdx, - const char *source_filename, - int num_command_line_args, - const char **command_line_args, - unsigned num_unsaved_files, - struct CXUnsavedFile *unsaved_files) { - if (!CIdx) - return 0; - - CIndexer *CXXIdx = static_cast(CIdx); - - // Configure the diagnostics. - DiagnosticOptions DiagOpts; - llvm::IntrusiveRefCntPtr Diags; - Diags = CompilerInstance::createDiagnostics(DiagOpts, 0, 0); - - llvm::SmallVector RemappedFiles; - for (unsigned I = 0; I != num_unsaved_files; ++I) { - llvm::StringRef Data(unsaved_files[I].Contents, unsaved_files[I].Length); - const llvm::MemoryBuffer *Buffer - = llvm::MemoryBuffer::getMemBufferCopy(Data, unsaved_files[I].Filename); - RemappedFiles.push_back(std::make_pair(unsaved_files[I].Filename, - Buffer)); - } - - if (!CXXIdx->getUseExternalASTGeneration()) { - llvm::SmallVector Args; - - // The 'source_filename' argument is optional. If the caller does not - // specify it then it is assumed that the source file is specified - // in the actual argument list. - if (source_filename) - Args.push_back(source_filename); - Args.insert(Args.end(), command_line_args, - command_line_args + num_command_line_args); - Args.push_back("-Xclang"); - Args.push_back("-detailed-preprocessing-record"); - unsigned NumErrors = Diags->getNumErrors(); - -#ifdef USE_CRASHTRACER - ArgsCrashTracerInfo ACTI(Args); -#endif - - llvm::OwningPtr Unit( - ASTUnit::LoadFromCommandLine(Args.data(), Args.data() + Args.size(), - Diags, - CXXIdx->getClangResourcesPath(), - CXXIdx->getOnlyLocalDecls(), - RemappedFiles.data(), - RemappedFiles.size(), - /*CaptureDiagnostics=*/true)); - - // FIXME: Until we have broader testing, just drop the entire AST if we - // encountered an error. - if (NumErrors != Diags->getNumErrors()) { - // Make sure to check that 'Unit' is non-NULL. - if (CXXIdx->getDisplayDiagnostics() && Unit.get()) { - for (ASTUnit::stored_diag_iterator D = Unit->stored_diag_begin(), - DEnd = Unit->stored_diag_end(); - D != DEnd; ++D) { - CXStoredDiagnostic Diag(*D, Unit->getASTContext().getLangOptions()); - CXString Msg = clang_formatDiagnostic(&Diag, - clang_defaultDiagnosticDisplayOptions()); - fprintf(stderr, "%s\n", clang_getCString(Msg)); - clang_disposeString(Msg); - } -#ifdef LLVM_ON_WIN32 - // On Windows, force a flush, since there may be multiple copies of - // stderr and stdout in the file system, all with different buffers - // but writing to the same device. - fflush(stderr); -#endif - } - } - - return Unit.take(); - } - - // Build up the arguments for invoking 'clang'. - std::vector argv; - - // First add the complete path to the 'clang' executable. - llvm::sys::Path ClangPath = static_cast(CIdx)->getClangPath(); - argv.push_back(ClangPath.c_str()); - - // Add the '-emit-ast' option as our execution mode for 'clang'. - argv.push_back("-emit-ast"); - - // The 'source_filename' argument is optional. If the caller does not - // specify it then it is assumed that the source file is specified - // in the actual argument list. - if (source_filename) - argv.push_back(source_filename); - - // Generate a temporary name for the AST file. - argv.push_back("-o"); - char astTmpFile[L_tmpnam]; - argv.push_back(tmpnam(astTmpFile)); - - // Remap any unsaved files to temporary files. - std::vector TemporaryFiles; - std::vector RemapArgs; - if (RemapFiles(num_unsaved_files, unsaved_files, RemapArgs, TemporaryFiles)) - return 0; - - // The pointers into the elements of RemapArgs are stable because we - // won't be adding anything to RemapArgs after this point. - for (unsigned i = 0, e = RemapArgs.size(); i != e; ++i) - argv.push_back(RemapArgs[i].c_str()); - - // Process the compiler options, stripping off '-o', '-c', '-fsyntax-only'. - for (int i = 0; i < num_command_line_args; ++i) - if (const char *arg = command_line_args[i]) { - if (strcmp(arg, "-o") == 0) { - ++i; // Also skip the matching argument. - continue; - } - if (strcmp(arg, "-emit-ast") == 0 || - strcmp(arg, "-c") == 0 || - strcmp(arg, "-fsyntax-only") == 0) { - continue; - } - - // Keep the argument. - argv.push_back(arg); - } - - // Generate a temporary name for the diagnostics file. - char tmpFileResults[L_tmpnam]; - char *tmpResultsFileName = tmpnam(tmpFileResults); - llvm::sys::Path DiagnosticsFile(tmpResultsFileName); - TemporaryFiles.push_back(DiagnosticsFile); - argv.push_back("-fdiagnostics-binary"); - - argv.push_back("-Xclang"); - argv.push_back("-detailed-preprocessing-record"); - - // Add the null terminator. - argv.push_back(NULL); - - // Invoke 'clang'. - llvm::sys::Path DevNull; // leave empty, causes redirection to /dev/null - // on Unix or NUL (Windows). - std::string ErrMsg; - const llvm::sys::Path *Redirects[] = { &DevNull, &DevNull, &DiagnosticsFile, - NULL }; - llvm::sys::Program::ExecuteAndWait(ClangPath, &argv[0], /* env */ NULL, - /* redirects */ &Redirects[0], - /* secondsToWait */ 0, /* memoryLimits */ 0, &ErrMsg); - - if (!ErrMsg.empty()) { - std::string AllArgs; - for (std::vector::iterator I = argv.begin(), E = argv.end(); - I != E; ++I) { - AllArgs += ' '; - if (*I) - AllArgs += *I; - } - - Diags->Report(diag::err_fe_invoking) << AllArgs << ErrMsg; - } - - ASTUnit *ATU = ASTUnit::LoadFromPCHFile(astTmpFile, Diags, - CXXIdx->getOnlyLocalDecls(), - RemappedFiles.data(), - RemappedFiles.size(), - /*CaptureDiagnostics=*/true); - if (ATU) { - LoadSerializedDiagnostics(DiagnosticsFile, - num_unsaved_files, unsaved_files, - ATU->getFileManager(), - ATU->getSourceManager(), - ATU->getStoredDiagnostics()); - } else if (CXXIdx->getDisplayDiagnostics()) { - // We failed to load the ASTUnit, but we can still deserialize the - // diagnostics and emit them. - FileManager FileMgr; - Diagnostic Diag; - SourceManager SourceMgr(Diag); - // FIXME: Faked LangOpts! - LangOptions LangOpts; - llvm::SmallVector Diags; - LoadSerializedDiagnostics(DiagnosticsFile, - num_unsaved_files, unsaved_files, - FileMgr, SourceMgr, Diags); - for (llvm::SmallVector::iterator D = Diags.begin(), - DEnd = Diags.end(); - D != DEnd; ++D) { - CXStoredDiagnostic Diag(*D, LangOpts); - CXString Msg = clang_formatDiagnostic(&Diag, - clang_defaultDiagnosticDisplayOptions()); - fprintf(stderr, "%s\n", clang_getCString(Msg)); - clang_disposeString(Msg); - } - -#ifdef LLVM_ON_WIN32 - // On Windows, force a flush, since there may be multiple copies of - // stderr and stdout in the file system, all with different buffers - // but writing to the same device. - fflush(stderr); -#endif - } - - if (ATU) { - // Make the translation unit responsible for destroying all temporary files. - for (unsigned i = 0, e = TemporaryFiles.size(); i != e; ++i) - ATU->addTemporaryFile(TemporaryFiles[i]); - ATU->addTemporaryFile(llvm::sys::Path(ATU->getPCHFileName())); - } else { - // Destroy all of the temporary files now; they can't be referenced any - // longer. - llvm::sys::Path(astTmpFile).eraseFromDisk(); - for (unsigned i = 0, e = TemporaryFiles.size(); i != e; ++i) - TemporaryFiles[i].eraseFromDisk(); - } - - return ATU; -} - -void clang_disposeTranslationUnit(CXTranslationUnit CTUnit) { - if (CTUnit) - delete static_cast(CTUnit); -} - -CXString clang_getTranslationUnitSpelling(CXTranslationUnit CTUnit) { - if (!CTUnit) - return createCXString(""); - - ASTUnit *CXXUnit = static_cast(CTUnit); - return createCXString(CXXUnit->getOriginalSourceFileName(), true); -} - -CXCursor clang_getTranslationUnitCursor(CXTranslationUnit TU) { - CXCursor Result = { CXCursor_TranslationUnit, { 0, 0, TU } }; - return Result; -} - -} // end: extern "C" - -//===----------------------------------------------------------------------===// -// CXSourceLocation and CXSourceRange Operations. -//===----------------------------------------------------------------------===// - -extern "C" { -CXSourceLocation clang_getNullLocation() { - CXSourceLocation Result = { { 0, 0 }, 0 }; - return Result; -} - -unsigned clang_equalLocations(CXSourceLocation loc1, CXSourceLocation loc2) { - return (loc1.ptr_data[0] == loc2.ptr_data[0] && - loc1.ptr_data[1] == loc2.ptr_data[1] && - loc1.int_data == loc2.int_data); -} - -CXSourceLocation clang_getLocation(CXTranslationUnit tu, - CXFile file, - unsigned line, - unsigned column) { - if (!tu) - return clang_getNullLocation(); - - ASTUnit *CXXUnit = static_cast(tu); - SourceLocation SLoc - = CXXUnit->getSourceManager().getLocation( - static_cast(file), - line, column); - - return cxloc::translateSourceLocation(CXXUnit->getASTContext(), SLoc); -} - -CXSourceRange clang_getNullRange() { - CXSourceRange Result = { { 0, 0 }, 0, 0 }; - return Result; -} - -CXSourceRange clang_getRange(CXSourceLocation begin, CXSourceLocation end) { - if (begin.ptr_data[0] != end.ptr_data[0] || - begin.ptr_data[1] != end.ptr_data[1]) - return clang_getNullRange(); - - CXSourceRange Result = { { begin.ptr_data[0], begin.ptr_data[1] }, - begin.int_data, end.int_data }; - return Result; -} - -void clang_getInstantiationLocation(CXSourceLocation location, - CXFile *file, - unsigned *line, - unsigned *column, - unsigned *offset) { - SourceLocation Loc = SourceLocation::getFromRawEncoding(location.int_data); - - if (!location.ptr_data[0] || Loc.isInvalid()) { - if (file) - *file = 0; - if (line) - *line = 0; - if (column) - *column = 0; - if (offset) - *offset = 0; - return; - } - - const SourceManager &SM = - *static_cast(location.ptr_data[0]); - SourceLocation InstLoc = SM.getInstantiationLoc(Loc); - - if (file) - *file = (void *)SM.getFileEntryForID(SM.getFileID(InstLoc)); - if (line) - *line = SM.getInstantiationLineNumber(InstLoc); - if (column) - *column = SM.getInstantiationColumnNumber(InstLoc); - if (offset) - *offset = SM.getDecomposedLoc(InstLoc).second; -} - -CXSourceLocation clang_getRangeStart(CXSourceRange range) { - CXSourceLocation Result = { { range.ptr_data[0], range.ptr_data[1] }, - range.begin_int_data }; - return Result; -} - -CXSourceLocation clang_getRangeEnd(CXSourceRange range) { - CXSourceLocation Result = { { range.ptr_data[0], range.ptr_data[1] }, - range.end_int_data }; - return Result; -} - -} // end: extern "C" - -//===----------------------------------------------------------------------===// -// CXFile Operations. -//===----------------------------------------------------------------------===// - -extern "C" { -CXString clang_getFileName(CXFile SFile) { - if (!SFile) - return createCXString(NULL); - - FileEntry *FEnt = static_cast(SFile); - return createCXString(FEnt->getName()); -} - -time_t clang_getFileTime(CXFile SFile) { - if (!SFile) - return 0; - - FileEntry *FEnt = static_cast(SFile); - return FEnt->getModificationTime(); -} - -CXFile clang_getFile(CXTranslationUnit tu, const char *file_name) { - if (!tu) - return 0; - - ASTUnit *CXXUnit = static_cast(tu); - - FileManager &FMgr = CXXUnit->getFileManager(); - const FileEntry *File = FMgr.getFile(file_name, file_name+strlen(file_name)); - return const_cast(File); -} - -} // end: extern "C" - -//===----------------------------------------------------------------------===// -// CXCursor Operations. -//===----------------------------------------------------------------------===// - -static Decl *getDeclFromExpr(Stmt *E) { - if (DeclRefExpr *RefExpr = dyn_cast(E)) - return RefExpr->getDecl(); - if (MemberExpr *ME = dyn_cast(E)) - return ME->getMemberDecl(); - if (ObjCIvarRefExpr *RE = dyn_cast(E)) - return RE->getDecl(); - - if (CallExpr *CE = dyn_cast(E)) - return getDeclFromExpr(CE->getCallee()); - if (CastExpr *CE = dyn_cast(E)) - return getDeclFromExpr(CE->getSubExpr()); - if (ObjCMessageExpr *OME = dyn_cast(E)) - return OME->getMethodDecl(); - - return 0; -} - -static SourceLocation getLocationFromExpr(Expr *E) { - if (ObjCMessageExpr *Msg = dyn_cast(E)) - return /*FIXME:*/Msg->getLeftLoc(); - if (DeclRefExpr *DRE = dyn_cast(E)) - return DRE->getLocation(); - if (MemberExpr *Member = dyn_cast(E)) - return Member->getMemberLoc(); - if (ObjCIvarRefExpr *Ivar = dyn_cast(E)) - return Ivar->getLocation(); - return E->getLocStart(); -} - -extern "C" { - -unsigned clang_visitChildren(CXCursor parent, - CXCursorVisitor visitor, - CXClientData client_data) { - ASTUnit *CXXUnit = getCursorASTUnit(parent); - - unsigned PCHLevel = Decl::MaxPCHLevel; - - // Set the PCHLevel to filter out unwanted decls if requested. - if (CXXUnit->getOnlyLocalDecls()) { - PCHLevel = 0; - - // If the main input was an AST, bump the level. - if (CXXUnit->isMainFileAST()) - ++PCHLevel; - } - - CursorVisitor CursorVis(CXXUnit, visitor, client_data, PCHLevel); - return CursorVis.VisitChildren(parent); -} - -static CXString getDeclSpelling(Decl *D) { - NamedDecl *ND = dyn_cast_or_null(D); - if (!ND) - return createCXString(""); - - if (ObjCMethodDecl *OMD = dyn_cast(ND)) - return createCXString(OMD->getSelector().getAsString()); - - if (ObjCCategoryImplDecl *CIMP = dyn_cast(ND)) - // No, this isn't the same as the code below. getIdentifier() is non-virtual - // and returns different names. NamedDecl returns the class name and - // ObjCCategoryImplDecl returns the category name. - return createCXString(CIMP->getIdentifier()->getNameStart()); - - if (ND->getIdentifier()) - return createCXString(ND->getIdentifier()->getNameStart()); - - return createCXString(""); -} - -CXString clang_getCursorSpelling(CXCursor C) { - if (clang_isTranslationUnit(C.kind)) - return clang_getTranslationUnitSpelling(C.data[2]); - - if (clang_isReference(C.kind)) { - switch (C.kind) { - case CXCursor_ObjCSuperClassRef: { - ObjCInterfaceDecl *Super = getCursorObjCSuperClassRef(C).first; - return createCXString(Super->getIdentifier()->getNameStart()); - } - case CXCursor_ObjCClassRef: { - ObjCInterfaceDecl *Class = getCursorObjCClassRef(C).first; - return createCXString(Class->getIdentifier()->getNameStart()); - } - case CXCursor_ObjCProtocolRef: { - ObjCProtocolDecl *OID = getCursorObjCProtocolRef(C).first; - assert(OID && "getCursorSpelling(): Missing protocol decl"); - return createCXString(OID->getIdentifier()->getNameStart()); - } - case CXCursor_TypeRef: { - TypeDecl *Type = getCursorTypeRef(C).first; - assert(Type && "Missing type decl"); - - return createCXString(getCursorContext(C).getTypeDeclType(Type). - getAsString()); - } - - default: - return createCXString(""); - } - } - - if (clang_isExpression(C.kind)) { - Decl *D = getDeclFromExpr(getCursorExpr(C)); - if (D) - return getDeclSpelling(D); - return createCXString(""); - } - - if (C.kind == CXCursor_MacroInstantiation) - return createCXString(getCursorMacroInstantiation(C)->getName() - ->getNameStart()); - - if (C.kind == CXCursor_MacroDefinition) - return createCXString(getCursorMacroDefinition(C)->getName() - ->getNameStart()); - - if (clang_isDeclaration(C.kind)) - return getDeclSpelling(getCursorDecl(C)); - - return createCXString(""); -} - -CXString clang_getCursorKindSpelling(enum CXCursorKind Kind) { - switch (Kind) { - case CXCursor_FunctionDecl: - return createCXString("FunctionDecl"); - case CXCursor_TypedefDecl: - return createCXString("TypedefDecl"); - case CXCursor_EnumDecl: - return createCXString("EnumDecl"); - case CXCursor_EnumConstantDecl: - return createCXString("EnumConstantDecl"); - case CXCursor_StructDecl: - return createCXString("StructDecl"); - case CXCursor_UnionDecl: - return createCXString("UnionDecl"); - case CXCursor_ClassDecl: - return createCXString("ClassDecl"); - case CXCursor_FieldDecl: - return createCXString("FieldDecl"); - case CXCursor_VarDecl: - return createCXString("VarDecl"); - case CXCursor_ParmDecl: - return createCXString("ParmDecl"); - case CXCursor_ObjCInterfaceDecl: - return createCXString("ObjCInterfaceDecl"); - case CXCursor_ObjCCategoryDecl: - return createCXString("ObjCCategoryDecl"); - case CXCursor_ObjCProtocolDecl: - return createCXString("ObjCProtocolDecl"); - case CXCursor_ObjCPropertyDecl: - return createCXString("ObjCPropertyDecl"); - case CXCursor_ObjCIvarDecl: - return createCXString("ObjCIvarDecl"); - case CXCursor_ObjCInstanceMethodDecl: - return createCXString("ObjCInstanceMethodDecl"); - case CXCursor_ObjCClassMethodDecl: - return createCXString("ObjCClassMethodDecl"); - case CXCursor_ObjCImplementationDecl: - return createCXString("ObjCImplementationDecl"); - case CXCursor_ObjCCategoryImplDecl: - return createCXString("ObjCCategoryImplDecl"); - case CXCursor_CXXMethod: - return createCXString("CXXMethod"); - case CXCursor_UnexposedDecl: - return createCXString("UnexposedDecl"); - case CXCursor_ObjCSuperClassRef: - return createCXString("ObjCSuperClassRef"); - case CXCursor_ObjCProtocolRef: - return createCXString("ObjCProtocolRef"); - case CXCursor_ObjCClassRef: - return createCXString("ObjCClassRef"); - case CXCursor_TypeRef: - return createCXString("TypeRef"); - case CXCursor_UnexposedExpr: - return createCXString("UnexposedExpr"); - case CXCursor_BlockExpr: - return createCXString("BlockExpr"); - case CXCursor_DeclRefExpr: - return createCXString("DeclRefExpr"); - case CXCursor_MemberRefExpr: - return createCXString("MemberRefExpr"); - case CXCursor_CallExpr: - return createCXString("CallExpr"); - case CXCursor_ObjCMessageExpr: - return createCXString("ObjCMessageExpr"); - case CXCursor_UnexposedStmt: - return createCXString("UnexposedStmt"); - case CXCursor_InvalidFile: - return createCXString("InvalidFile"); - case CXCursor_InvalidCode: - return createCXString("InvalidCode"); - case CXCursor_NoDeclFound: - return createCXString("NoDeclFound"); - case CXCursor_NotImplemented: - return createCXString("NotImplemented"); - case CXCursor_TranslationUnit: - return createCXString("TranslationUnit"); - case CXCursor_UnexposedAttr: - return createCXString("UnexposedAttr"); - case CXCursor_IBActionAttr: - return createCXString("attribute(ibaction)"); - case CXCursor_IBOutletAttr: - return createCXString("attribute(iboutlet)"); - case CXCursor_PreprocessingDirective: - return createCXString("preprocessing directive"); - case CXCursor_MacroDefinition: - return createCXString("macro definition"); - case CXCursor_MacroInstantiation: - return createCXString("macro instantiation"); - } - - llvm_unreachable("Unhandled CXCursorKind"); - return createCXString(NULL); -} - -enum CXChildVisitResult GetCursorVisitor(CXCursor cursor, - CXCursor parent, - CXClientData client_data) { - CXCursor *BestCursor = static_cast(client_data); - *BestCursor = cursor; - return CXChildVisit_Recurse; -} - -CXCursor clang_getCursor(CXTranslationUnit TU, CXSourceLocation Loc) { - if (!TU) - return clang_getNullCursor(); - - ASTUnit *CXXUnit = static_cast(TU); - - ASTUnit::ConcurrencyCheck Check(*CXXUnit); - - SourceLocation SLoc = cxloc::translateSourceLocation(Loc); - CXCursor Result = MakeCXCursorInvalid(CXCursor_NoDeclFound); - if (SLoc.isValid()) { - SourceRange RegionOfInterest(SLoc, SLoc.getFileLocWithOffset(1)); - - // FIXME: Would be great to have a "hint" cursor, then walk from that - // hint cursor upward until we find a cursor whose source range encloses - // the region of interest, rather than starting from the translation unit. - CXCursor Parent = clang_getTranslationUnitCursor(CXXUnit); - CursorVisitor CursorVis(CXXUnit, GetCursorVisitor, &Result, - Decl::MaxPCHLevel, RegionOfInterest); - CursorVis.VisitChildren(Parent); - } - return Result; -} - -CXCursor clang_getNullCursor(void) { - return MakeCXCursorInvalid(CXCursor_InvalidFile); -} - -unsigned clang_equalCursors(CXCursor X, CXCursor Y) { - return X == Y; -} - -unsigned clang_isInvalid(enum CXCursorKind K) { - return K >= CXCursor_FirstInvalid && K <= CXCursor_LastInvalid; -} - -unsigned clang_isDeclaration(enum CXCursorKind K) { - return K >= CXCursor_FirstDecl && K <= CXCursor_LastDecl; -} - -unsigned clang_isReference(enum CXCursorKind K) { - return K >= CXCursor_FirstRef && K <= CXCursor_LastRef; -} - -unsigned clang_isExpression(enum CXCursorKind K) { - return K >= CXCursor_FirstExpr && K <= CXCursor_LastExpr; -} - -unsigned clang_isStatement(enum CXCursorKind K) { - return K >= CXCursor_FirstStmt && K <= CXCursor_LastStmt; -} - -unsigned clang_isTranslationUnit(enum CXCursorKind K) { - return K == CXCursor_TranslationUnit; -} - -unsigned clang_isPreprocessing(enum CXCursorKind K) { - return K >= CXCursor_FirstPreprocessing && K <= CXCursor_LastPreprocessing; -} - -unsigned clang_isUnexposed(enum CXCursorKind K) { - switch (K) { - case CXCursor_UnexposedDecl: - case CXCursor_UnexposedExpr: - case CXCursor_UnexposedStmt: - case CXCursor_UnexposedAttr: - return true; - default: - return false; - } -} - -CXCursorKind clang_getCursorKind(CXCursor C) { - return C.kind; -} - -CXSourceLocation clang_getCursorLocation(CXCursor C) { - if (clang_isReference(C.kind)) { - switch (C.kind) { - case CXCursor_ObjCSuperClassRef: { - std::pair P - = getCursorObjCSuperClassRef(C); - return cxloc::translateSourceLocation(P.first->getASTContext(), P.second); - } - - case CXCursor_ObjCProtocolRef: { - std::pair P - = getCursorObjCProtocolRef(C); - return cxloc::translateSourceLocation(P.first->getASTContext(), P.second); - } - - case CXCursor_ObjCClassRef: { - std::pair P - = getCursorObjCClassRef(C); - return cxloc::translateSourceLocation(P.first->getASTContext(), P.second); - } - - case CXCursor_TypeRef: { - std::pair P = getCursorTypeRef(C); - return cxloc::translateSourceLocation(P.first->getASTContext(), P.second); - } - - default: - // FIXME: Need a way to enumerate all non-reference cases. - llvm_unreachable("Missed a reference kind"); - } - } - - if (clang_isExpression(C.kind)) - return cxloc::translateSourceLocation(getCursorContext(C), - getLocationFromExpr(getCursorExpr(C))); - - if (C.kind == CXCursor_PreprocessingDirective) { - SourceLocation L = cxcursor::getCursorPreprocessingDirective(C).getBegin(); - return cxloc::translateSourceLocation(getCursorContext(C), L); - } - - if (C.kind == CXCursor_MacroInstantiation) { - SourceLocation L - = cxcursor::getCursorMacroInstantiation(C)->getSourceRange().getBegin(); - return cxloc::translateSourceLocation(getCursorContext(C), L); - } - - if (C.kind == CXCursor_MacroDefinition) { - SourceLocation L = cxcursor::getCursorMacroDefinition(C)->getLocation(); - return cxloc::translateSourceLocation(getCursorContext(C), L); - } - - if (!getCursorDecl(C)) - return clang_getNullLocation(); - - Decl *D = getCursorDecl(C); - SourceLocation Loc = D->getLocation(); - if (ObjCInterfaceDecl *Class = dyn_cast(D)) - Loc = Class->getClassLoc(); - return cxloc::translateSourceLocation(getCursorContext(C), Loc); -} - -CXSourceRange clang_getCursorExtent(CXCursor C) { - if (clang_isReference(C.kind)) { - switch (C.kind) { - case CXCursor_ObjCSuperClassRef: { - std::pair P - = getCursorObjCSuperClassRef(C); - return cxloc::translateSourceRange(P.first->getASTContext(), P.second); - } - - case CXCursor_ObjCProtocolRef: { - std::pair P - = getCursorObjCProtocolRef(C); - return cxloc::translateSourceRange(P.first->getASTContext(), P.second); - } - - case CXCursor_ObjCClassRef: { - std::pair P - = getCursorObjCClassRef(C); - - return cxloc::translateSourceRange(P.first->getASTContext(), P.second); - } - - case CXCursor_TypeRef: { - std::pair P = getCursorTypeRef(C); - return cxloc::translateSourceRange(P.first->getASTContext(), P.second); - } - - default: - // FIXME: Need a way to enumerate all non-reference cases. - llvm_unreachable("Missed a reference kind"); - } - } - - if (clang_isExpression(C.kind)) - return cxloc::translateSourceRange(getCursorContext(C), - getCursorExpr(C)->getSourceRange()); - - if (clang_isStatement(C.kind)) - return cxloc::translateSourceRange(getCursorContext(C), - getCursorStmt(C)->getSourceRange()); - - if (C.kind == CXCursor_PreprocessingDirective) { - SourceRange R = cxcursor::getCursorPreprocessingDirective(C); - return cxloc::translateSourceRange(getCursorContext(C), R); - } - - if (C.kind == CXCursor_MacroInstantiation) { - SourceRange R = cxcursor::getCursorMacroInstantiation(C)->getSourceRange(); - return cxloc::translateSourceRange(getCursorContext(C), R); - } - - if (C.kind == CXCursor_MacroDefinition) { - SourceRange R = cxcursor::getCursorMacroDefinition(C)->getSourceRange(); - return cxloc::translateSourceRange(getCursorContext(C), R); - } - - if (!getCursorDecl(C)) - return clang_getNullRange(); - - Decl *D = getCursorDecl(C); - return cxloc::translateSourceRange(getCursorContext(C), D->getSourceRange()); -} - -CXCursor clang_getCursorReferenced(CXCursor C) { - if (clang_isInvalid(C.kind)) - return clang_getNullCursor(); - - ASTUnit *CXXUnit = getCursorASTUnit(C); - if (clang_isDeclaration(C.kind)) - return C; - - if (clang_isExpression(C.kind)) { - Decl *D = getDeclFromExpr(getCursorExpr(C)); - if (D) - return MakeCXCursor(D, CXXUnit); - return clang_getNullCursor(); - } - - if (C.kind == CXCursor_MacroInstantiation) { - if (MacroDefinition *Def = getCursorMacroInstantiation(C)->getDefinition()) - return MakeMacroDefinitionCursor(Def, CXXUnit); - } - - if (!clang_isReference(C.kind)) - return clang_getNullCursor(); - - switch (C.kind) { - case CXCursor_ObjCSuperClassRef: - return MakeCXCursor(getCursorObjCSuperClassRef(C).first, CXXUnit); - - case CXCursor_ObjCProtocolRef: { - return MakeCXCursor(getCursorObjCProtocolRef(C).first, CXXUnit); - - case CXCursor_ObjCClassRef: - return MakeCXCursor(getCursorObjCClassRef(C).first, CXXUnit); - - case CXCursor_TypeRef: - return MakeCXCursor(getCursorTypeRef(C).first, CXXUnit); - - default: - // We would prefer to enumerate all non-reference cursor kinds here. - llvm_unreachable("Unhandled reference cursor kind"); - break; - } - } - - return clang_getNullCursor(); -} - -CXCursor clang_getCursorDefinition(CXCursor C) { - if (clang_isInvalid(C.kind)) - return clang_getNullCursor(); - - ASTUnit *CXXUnit = getCursorASTUnit(C); - - bool WasReference = false; - if (clang_isReference(C.kind) || clang_isExpression(C.kind)) { - C = clang_getCursorReferenced(C); - WasReference = true; - } - - if (C.kind == CXCursor_MacroInstantiation) - return clang_getCursorReferenced(C); - - if (!clang_isDeclaration(C.kind)) - return clang_getNullCursor(); - - Decl *D = getCursorDecl(C); - if (!D) - return clang_getNullCursor(); - - switch (D->getKind()) { - // Declaration kinds that don't really separate the notions of - // declaration and definition. - case Decl::Namespace: - case Decl::Typedef: - case Decl::TemplateTypeParm: - case Decl::EnumConstant: - case Decl::Field: - case Decl::ObjCIvar: - case Decl::ObjCAtDefsField: - case Decl::ImplicitParam: - case Decl::ParmVar: - case Decl::NonTypeTemplateParm: - case Decl::TemplateTemplateParm: - case Decl::ObjCCategoryImpl: - case Decl::ObjCImplementation: - case Decl::LinkageSpec: - case Decl::ObjCPropertyImpl: - case Decl::FileScopeAsm: - case Decl::StaticAssert: - case Decl::Block: - return C; - - // Declaration kinds that don't make any sense here, but are - // nonetheless harmless. - case Decl::TranslationUnit: - break; - - // Declaration kinds for which the definition is not resolvable. - case Decl::UnresolvedUsingTypename: - case Decl::UnresolvedUsingValue: - break; - - case Decl::UsingDirective: - return MakeCXCursor(cast(D)->getNominatedNamespace(), - CXXUnit); - - case Decl::NamespaceAlias: - return MakeCXCursor(cast(D)->getNamespace(), CXXUnit); - - case Decl::Enum: - case Decl::Record: - case Decl::CXXRecord: - case Decl::ClassTemplateSpecialization: - case Decl::ClassTemplatePartialSpecialization: - if (TagDecl *Def = cast(D)->getDefinition()) - return MakeCXCursor(Def, CXXUnit); - return clang_getNullCursor(); - - case Decl::Function: - case Decl::CXXMethod: - case Decl::CXXConstructor: - case Decl::CXXDestructor: - case Decl::CXXConversion: { - const FunctionDecl *Def = 0; - if (cast(D)->getBody(Def)) - return MakeCXCursor(const_cast(Def), CXXUnit); - return clang_getNullCursor(); - } - - case Decl::Var: { - // Ask the variable if it has a definition. - if (VarDecl *Def = cast(D)->getDefinition()) - return MakeCXCursor(Def, CXXUnit); - return clang_getNullCursor(); - } - - case Decl::FunctionTemplate: { - const FunctionDecl *Def = 0; - if (cast(D)->getTemplatedDecl()->getBody(Def)) - return MakeCXCursor(Def->getDescribedFunctionTemplate(), CXXUnit); - return clang_getNullCursor(); - } - - case Decl::ClassTemplate: { - if (RecordDecl *Def = cast(D)->getTemplatedDecl() - ->getDefinition()) - return MakeCXCursor( - cast(Def)->getDescribedClassTemplate(), - CXXUnit); - return clang_getNullCursor(); - } - - case Decl::Using: { - UsingDecl *Using = cast(D); - CXCursor Def = clang_getNullCursor(); - for (UsingDecl::shadow_iterator S = Using->shadow_begin(), - SEnd = Using->shadow_end(); - S != SEnd; ++S) { - if (Def != clang_getNullCursor()) { - // FIXME: We have no way to return multiple results. - return clang_getNullCursor(); - } - - Def = clang_getCursorDefinition(MakeCXCursor((*S)->getTargetDecl(), - CXXUnit)); - } - - return Def; - } - - case Decl::UsingShadow: - return clang_getCursorDefinition( - MakeCXCursor(cast(D)->getTargetDecl(), - CXXUnit)); - - case Decl::ObjCMethod: { - ObjCMethodDecl *Method = cast(D); - if (Method->isThisDeclarationADefinition()) - return C; - - // Dig out the method definition in the associated - // @implementation, if we have it. - // FIXME: The ASTs should make finding the definition easier. - if (ObjCInterfaceDecl *Class - = dyn_cast(Method->getDeclContext())) - if (ObjCImplementationDecl *ClassImpl = Class->getImplementation()) - if (ObjCMethodDecl *Def = ClassImpl->getMethod(Method->getSelector(), - Method->isInstanceMethod())) - if (Def->isThisDeclarationADefinition()) - return MakeCXCursor(Def, CXXUnit); - - return clang_getNullCursor(); - } - - case Decl::ObjCCategory: - if (ObjCCategoryImplDecl *Impl - = cast(D)->getImplementation()) - return MakeCXCursor(Impl, CXXUnit); - return clang_getNullCursor(); - - case Decl::ObjCProtocol: - if (!cast(D)->isForwardDecl()) - return C; - return clang_getNullCursor(); - - case Decl::ObjCInterface: - // There are two notions of a "definition" for an Objective-C - // class: the interface and its implementation. When we resolved a - // reference to an Objective-C class, produce the @interface as - // the definition; when we were provided with the interface, - // produce the @implementation as the definition. - if (WasReference) { - if (!cast(D)->isForwardDecl()) - return C; - } else if (ObjCImplementationDecl *Impl - = cast(D)->getImplementation()) - return MakeCXCursor(Impl, CXXUnit); - return clang_getNullCursor(); - - case Decl::ObjCProperty: - // FIXME: We don't really know where to find the - // ObjCPropertyImplDecls that implement this property. - return clang_getNullCursor(); - - case Decl::ObjCCompatibleAlias: - if (ObjCInterfaceDecl *Class - = cast(D)->getClassInterface()) - if (!Class->isForwardDecl()) - return MakeCXCursor(Class, CXXUnit); - - return clang_getNullCursor(); - - case Decl::ObjCForwardProtocol: { - ObjCForwardProtocolDecl *Forward = cast(D); - if (Forward->protocol_size() == 1) - return clang_getCursorDefinition( - MakeCXCursor(*Forward->protocol_begin(), - CXXUnit)); - - // FIXME: Cannot return multiple definitions. - return clang_getNullCursor(); - } - - case Decl::ObjCClass: { - ObjCClassDecl *Class = cast(D); - if (Class->size() == 1) { - ObjCInterfaceDecl *IFace = Class->begin()->getInterface(); - if (!IFace->isForwardDecl()) - return MakeCXCursor(IFace, CXXUnit); - return clang_getNullCursor(); - } - - // FIXME: Cannot return multiple definitions. - return clang_getNullCursor(); - } - - case Decl::Friend: - if (NamedDecl *Friend = cast(D)->getFriendDecl()) - return clang_getCursorDefinition(MakeCXCursor(Friend, CXXUnit)); - return clang_getNullCursor(); - - case Decl::FriendTemplate: - if (NamedDecl *Friend = cast(D)->getFriendDecl()) - return clang_getCursorDefinition(MakeCXCursor(Friend, CXXUnit)); - return clang_getNullCursor(); - } - - return clang_getNullCursor(); -} - -unsigned clang_isCursorDefinition(CXCursor C) { - if (!clang_isDeclaration(C.kind)) - return 0; - - return clang_getCursorDefinition(C) == C; -} - -void clang_getDefinitionSpellingAndExtent(CXCursor C, - const char **startBuf, - const char **endBuf, - unsigned *startLine, - unsigned *startColumn, - unsigned *endLine, - unsigned *endColumn) { - assert(getCursorDecl(C) && "CXCursor has null decl"); - NamedDecl *ND = static_cast(getCursorDecl(C)); - FunctionDecl *FD = dyn_cast(ND); - CompoundStmt *Body = dyn_cast(FD->getBody()); - - SourceManager &SM = FD->getASTContext().getSourceManager(); - *startBuf = SM.getCharacterData(Body->getLBracLoc()); - *endBuf = SM.getCharacterData(Body->getRBracLoc()); - *startLine = SM.getSpellingLineNumber(Body->getLBracLoc()); - *startColumn = SM.getSpellingColumnNumber(Body->getLBracLoc()); - *endLine = SM.getSpellingLineNumber(Body->getRBracLoc()); - *endColumn = SM.getSpellingColumnNumber(Body->getRBracLoc()); -} - -void clang_enableStackTraces(void) { - llvm::sys::PrintStackTraceOnErrorSignal(); -} - -} // end: extern "C" - -//===----------------------------------------------------------------------===// -// Token-based Operations. -//===----------------------------------------------------------------------===// - -/* CXToken layout: - * int_data[0]: a CXTokenKind - * int_data[1]: starting token location - * int_data[2]: token length - * int_data[3]: reserved - * ptr_data: for identifiers and keywords, an IdentifierInfo*. - * otherwise unused. - */ -extern "C" { - -CXTokenKind clang_getTokenKind(CXToken CXTok) { - return static_cast(CXTok.int_data[0]); -} - -CXString clang_getTokenSpelling(CXTranslationUnit TU, CXToken CXTok) { - switch (clang_getTokenKind(CXTok)) { - case CXToken_Identifier: - case CXToken_Keyword: - // We know we have an IdentifierInfo*, so use that. - return createCXString(static_cast(CXTok.ptr_data) - ->getNameStart()); - - case CXToken_Literal: { - // We have stashed the starting pointer in the ptr_data field. Use it. - const char *Text = static_cast(CXTok.ptr_data); - return createCXString(llvm::StringRef(Text, CXTok.int_data[2])); - } - - case CXToken_Punctuation: - case CXToken_Comment: - break; - } - - // We have to find the starting buffer pointer the hard way, by - // deconstructing the source location. - ASTUnit *CXXUnit = static_cast(TU); - if (!CXXUnit) - return createCXString(""); - - SourceLocation Loc = SourceLocation::getFromRawEncoding(CXTok.int_data[1]); - std::pair LocInfo - = CXXUnit->getSourceManager().getDecomposedLoc(Loc); - bool Invalid = false; - llvm::StringRef Buffer - = CXXUnit->getSourceManager().getBufferData(LocInfo.first, &Invalid); - if (Invalid) - return createCXString(""); - - return createCXString(Buffer.substr(LocInfo.second, CXTok.int_data[2])); -} - -CXSourceLocation clang_getTokenLocation(CXTranslationUnit TU, CXToken CXTok) { - ASTUnit *CXXUnit = static_cast(TU); - if (!CXXUnit) - return clang_getNullLocation(); - - return cxloc::translateSourceLocation(CXXUnit->getASTContext(), - SourceLocation::getFromRawEncoding(CXTok.int_data[1])); -} - -CXSourceRange clang_getTokenExtent(CXTranslationUnit TU, CXToken CXTok) { - ASTUnit *CXXUnit = static_cast(TU); - if (!CXXUnit) - return clang_getNullRange(); - - return cxloc::translateSourceRange(CXXUnit->getASTContext(), - SourceLocation::getFromRawEncoding(CXTok.int_data[1])); -} - -void clang_tokenize(CXTranslationUnit TU, CXSourceRange Range, - CXToken **Tokens, unsigned *NumTokens) { - if (Tokens) - *Tokens = 0; - if (NumTokens) - *NumTokens = 0; - - ASTUnit *CXXUnit = static_cast(TU); - if (!CXXUnit || !Tokens || !NumTokens) - return; - - ASTUnit::ConcurrencyCheck Check(*CXXUnit); - - SourceRange R = cxloc::translateCXSourceRange(Range); - if (R.isInvalid()) - return; - - SourceManager &SourceMgr = CXXUnit->getSourceManager(); - std::pair BeginLocInfo - = SourceMgr.getDecomposedLoc(R.getBegin()); - std::pair EndLocInfo - = SourceMgr.getDecomposedLoc(R.getEnd()); - - // Cannot tokenize across files. - if (BeginLocInfo.first != EndLocInfo.first) - return; - - // Create a lexer - bool Invalid = false; - llvm::StringRef Buffer - = SourceMgr.getBufferData(BeginLocInfo.first, &Invalid); - if (Invalid) - return; - - Lexer Lex(SourceMgr.getLocForStartOfFile(BeginLocInfo.first), - CXXUnit->getASTContext().getLangOptions(), - Buffer.begin(), Buffer.data() + BeginLocInfo.second, Buffer.end()); - Lex.SetCommentRetentionState(true); - - // Lex tokens until we hit the end of the range. - const char *EffectiveBufferEnd = Buffer.data() + EndLocInfo.second; - llvm::SmallVector CXTokens; - Token Tok; - do { - // Lex the next token - Lex.LexFromRawLexer(Tok); - if (Tok.is(tok::eof)) - break; - - // Initialize the CXToken. - CXToken CXTok; - - // - Common fields - CXTok.int_data[1] = Tok.getLocation().getRawEncoding(); - CXTok.int_data[2] = Tok.getLength(); - CXTok.int_data[3] = 0; - - // - Kind-specific fields - if (Tok.isLiteral()) { - CXTok.int_data[0] = CXToken_Literal; - CXTok.ptr_data = (void *)Tok.getLiteralData(); - } else if (Tok.is(tok::identifier)) { - // Lookup the identifier to determine whether we have a keyword. - std::pair LocInfo - = SourceMgr.getDecomposedLoc(Tok.getLocation()); - bool Invalid = false; - llvm::StringRef Buf - = CXXUnit->getSourceManager().getBufferData(LocInfo.first, &Invalid); - if (Invalid) - return; - - const char *StartPos = Buf.data() + LocInfo.second; - IdentifierInfo *II - = CXXUnit->getPreprocessor().LookUpIdentifierInfo(Tok, StartPos); - CXTok.int_data[0] = II->getTokenID() == tok::identifier? - CXToken_Identifier - : CXToken_Keyword; - CXTok.ptr_data = II; - } else if (Tok.is(tok::comment)) { - CXTok.int_data[0] = CXToken_Comment; - CXTok.ptr_data = 0; - } else { - CXTok.int_data[0] = CXToken_Punctuation; - CXTok.ptr_data = 0; - } - CXTokens.push_back(CXTok); - } while (Lex.getBufferLocation() <= EffectiveBufferEnd); - - if (CXTokens.empty()) - return; - - *Tokens = (CXToken *)malloc(sizeof(CXToken) * CXTokens.size()); - memmove(*Tokens, CXTokens.data(), sizeof(CXToken) * CXTokens.size()); - *NumTokens = CXTokens.size(); -} - -typedef llvm::DenseMap AnnotateTokensData; - -enum CXChildVisitResult AnnotateTokensVisitor(CXCursor cursor, - CXCursor parent, - CXClientData client_data) { - AnnotateTokensData *Data = static_cast(client_data); - - // We only annotate the locations of declarations, simple - // references, and expressions which directly reference something. - CXCursorKind Kind = clang_getCursorKind(cursor); - if (clang_isDeclaration(Kind) || clang_isReference(Kind)) { - // Okay: We can annotate the location of this declaration with the - // declaration or reference - } else if (clang_isExpression(cursor.kind)) { - if (Kind != CXCursor_DeclRefExpr && - Kind != CXCursor_MemberRefExpr && - Kind != CXCursor_ObjCMessageExpr) - return CXChildVisit_Recurse; - - CXCursor Referenced = clang_getCursorReferenced(cursor); - if (Referenced == cursor || Referenced == clang_getNullCursor()) - return CXChildVisit_Recurse; - - // Okay: we can annotate the location of this expression - } else if (clang_isPreprocessing(cursor.kind)) { - // We can always annotate a preprocessing directive/macro instantiation. - } else { - // Nothing to annotate - return CXChildVisit_Recurse; - } - - CXSourceLocation Loc = clang_getCursorLocation(cursor); - (*Data)[Loc.int_data] = cursor; - return CXChildVisit_Recurse; -} - -void clang_annotateTokens(CXTranslationUnit TU, - CXToken *Tokens, unsigned NumTokens, - CXCursor *Cursors) { - if (NumTokens == 0) - return; - - // Any token we don't specifically annotate will have a NULL cursor. - for (unsigned I = 0; I != NumTokens; ++I) - Cursors[I] = clang_getNullCursor(); - - ASTUnit *CXXUnit = static_cast(TU); - if (!CXXUnit || !Tokens) - return; - - ASTUnit::ConcurrencyCheck Check(*CXXUnit); - - // Determine the region of interest, which contains all of the tokens. - SourceRange RegionOfInterest; - RegionOfInterest.setBegin( - cxloc::translateSourceLocation(clang_getTokenLocation(TU, Tokens[0]))); - SourceLocation End - = cxloc::translateSourceLocation(clang_getTokenLocation(TU, - Tokens[NumTokens - 1])); - RegionOfInterest.setEnd(CXXUnit->getPreprocessor().getLocForEndOfToken(End)); - - // A mapping from the source locations found when re-lexing or traversing the - // region of interest to the corresponding cursors. - AnnotateTokensData Annotated; - - // Relex the tokens within the source range to look for preprocessing - // directives. - SourceManager &SourceMgr = CXXUnit->getSourceManager(); - std::pair BeginLocInfo - = SourceMgr.getDecomposedLoc(RegionOfInterest.getBegin()); - std::pair EndLocInfo - = SourceMgr.getDecomposedLoc(RegionOfInterest.getEnd()); - - llvm::StringRef Buffer; - bool Invalid = false; - if (BeginLocInfo.first == EndLocInfo.first && - ((Buffer = SourceMgr.getBufferData(BeginLocInfo.first, &Invalid)),true) && - !Invalid) { - Lexer Lex(SourceMgr.getLocForStartOfFile(BeginLocInfo.first), - CXXUnit->getASTContext().getLangOptions(), - Buffer.begin(), Buffer.data() + BeginLocInfo.second, - Buffer.end()); - Lex.SetCommentRetentionState(true); - - // Lex tokens in raw mode until we hit the end of the range, to avoid - // entering #includes or expanding macros. - while (true) { - Token Tok; - Lex.LexFromRawLexer(Tok); - - reprocess: - if (Tok.is(tok::hash) && Tok.isAtStartOfLine()) { - // We have found a preprocessing directive. Gobble it up so that we - // don't see it while preprocessing these tokens later, but keep track of - // all of the token locations inside this preprocessing directive so that - // we can annotate them appropriately. - // - // FIXME: Some simple tests here could identify macro definitions and - // #undefs, to provide specific cursor kinds for those. - std::vector Locations; - do { - Locations.push_back(Tok.getLocation()); - Lex.LexFromRawLexer(Tok); - } while (!Tok.isAtStartOfLine() && !Tok.is(tok::eof)); - - using namespace cxcursor; - CXCursor Cursor - = MakePreprocessingDirectiveCursor(SourceRange(Locations.front(), - Locations.back()), - CXXUnit); - for (unsigned I = 0, N = Locations.size(); I != N; ++I) { - Annotated[Locations[I].getRawEncoding()] = Cursor; - } - - if (Tok.isAtStartOfLine()) - goto reprocess; - - continue; - } - - if (Tok.is(tok::eof)) - break; - } - } - - // Annotate all of the source locations in the region of interest that map to - // a specific cursor. - CXCursor Parent = clang_getTranslationUnitCursor(CXXUnit); - CursorVisitor AnnotateVis(CXXUnit, AnnotateTokensVisitor, &Annotated, - Decl::MaxPCHLevel, RegionOfInterest); - AnnotateVis.VisitChildren(Parent); - - for (unsigned I = 0; I != NumTokens; ++I) { - // Determine whether we saw a cursor at this token's location. - AnnotateTokensData::iterator Pos = Annotated.find(Tokens[I].int_data[1]); - if (Pos == Annotated.end()) - continue; - - Cursors[I] = Pos->second; - } -} - -void clang_disposeTokens(CXTranslationUnit TU, - CXToken *Tokens, unsigned NumTokens) { - free(Tokens); -} - -} // end: extern "C" - -//===----------------------------------------------------------------------===// -// Operations for querying linkage of a cursor. -//===----------------------------------------------------------------------===// - -extern "C" { -CXLinkageKind clang_getCursorLinkage(CXCursor cursor) { - if (!clang_isDeclaration(cursor.kind)) - return CXLinkage_Invalid; - - Decl *D = cxcursor::getCursorDecl(cursor); - if (NamedDecl *ND = dyn_cast_or_null(D)) - switch (ND->getLinkage()) { - case NoLinkage: return CXLinkage_NoLinkage; - case InternalLinkage: return CXLinkage_Internal; - case UniqueExternalLinkage: return CXLinkage_UniqueExternal; - case ExternalLinkage: return CXLinkage_External; - }; - - return CXLinkage_Invalid; -} -} // end: extern "C" - -//===----------------------------------------------------------------------===// -// Operations for querying language of a cursor. -//===----------------------------------------------------------------------===// - -static CXLanguageKind getDeclLanguage(const Decl *D) { - switch (D->getKind()) { - default: - break; - case Decl::ImplicitParam: - case Decl::ObjCAtDefsField: - case Decl::ObjCCategory: - case Decl::ObjCCategoryImpl: - case Decl::ObjCClass: - case Decl::ObjCCompatibleAlias: - case Decl::ObjCForwardProtocol: - case Decl::ObjCImplementation: - case Decl::ObjCInterface: - case Decl::ObjCIvar: - case Decl::ObjCMethod: - case Decl::ObjCProperty: - case Decl::ObjCPropertyImpl: - case Decl::ObjCProtocol: - return CXLanguage_ObjC; - case Decl::CXXConstructor: - case Decl::CXXConversion: - case Decl::CXXDestructor: - case Decl::CXXMethod: - case Decl::CXXRecord: - case Decl::ClassTemplate: - case Decl::ClassTemplatePartialSpecialization: - case Decl::ClassTemplateSpecialization: - case Decl::Friend: - case Decl::FriendTemplate: - case Decl::FunctionTemplate: - case Decl::LinkageSpec: - case Decl::Namespace: - case Decl::NamespaceAlias: - case Decl::NonTypeTemplateParm: - case Decl::StaticAssert: - case Decl::TemplateTemplateParm: - case Decl::TemplateTypeParm: - case Decl::UnresolvedUsingTypename: - case Decl::UnresolvedUsingValue: - case Decl::Using: - case Decl::UsingDirective: - case Decl::UsingShadow: - return CXLanguage_CPlusPlus; - } - - return CXLanguage_C; -} - -extern "C" { -CXLanguageKind clang_getCursorLanguage(CXCursor cursor) { - if (clang_isDeclaration(cursor.kind)) - return getDeclLanguage(cxcursor::getCursorDecl(cursor)); - - return CXLanguage_Invalid; -} -} // end: extern "C" - -//===----------------------------------------------------------------------===// -// CXString Operations. -//===----------------------------------------------------------------------===// - -extern "C" { -const char *clang_getCString(CXString string) { - return string.Spelling; -} - -void clang_disposeString(CXString string) { - if (string.MustFreeString && string.Spelling) - free((void*)string.Spelling); -} - -} // end: extern "C" - -namespace clang { namespace cxstring { -CXString createCXString(const char *String, bool DupString){ - CXString Str; - if (DupString) { - Str.Spelling = strdup(String); - Str.MustFreeString = 1; - } else { - Str.Spelling = String; - Str.MustFreeString = 0; - } - return Str; -} - -CXString createCXString(llvm::StringRef String, bool DupString) { - CXString Result; - if (DupString || (!String.empty() && String.data()[String.size()] != 0)) { - char *Spelling = (char *)malloc(String.size() + 1); - memmove(Spelling, String.data(), String.size()); - Spelling[String.size()] = 0; - Result.Spelling = Spelling; - Result.MustFreeString = 1; - } else { - Result.Spelling = String.data(); - Result.MustFreeString = 0; - } - return Result; -} -}} - -//===----------------------------------------------------------------------===// -// Misc. utility functions. -//===----------------------------------------------------------------------===// - -extern "C" { - -CXString clang_getClangVersion() { - return createCXString(getClangFullVersion()); -} - -} // end: extern "C" diff --git a/tools/CIndex/CIndex.darwin.exports b/tools/CIndex/CIndex.darwin.exports deleted file mode 100644 index b3611680531..00000000000 --- a/tools/CIndex/CIndex.darwin.exports +++ /dev/null @@ -1,81 +0,0 @@ -_clang_annotateTokens -_clang_codeComplete -_clang_codeCompleteGetDiagnostic -_clang_codeCompleteGetNumDiagnostics -_clang_constructUSR_ObjCCategory -_clang_constructUSR_ObjCClass -_clang_constructUSR_ObjCIvar -_clang_constructUSR_ObjCMethod -_clang_constructUSR_ObjCProperty -_clang_constructUSR_ObjCProtocol -_clang_createIndex -_clang_createTranslationUnit -_clang_createTranslationUnitFromSourceFile -_clang_defaultDiagnosticDisplayOptions -_clang_disposeCodeCompleteResults -_clang_disposeDiagnostic -_clang_disposeIndex -_clang_disposeString -_clang_disposeTokens -_clang_disposeTranslationUnit -_clang_enableStackTraces -_clang_equalCursors -_clang_equalLocations -_clang_formatDiagnostic -_clang_getCString -_clang_getClangVersion -_clang_getCompletionChunkCompletionString -_clang_getCompletionChunkKind -_clang_getCompletionChunkText -_clang_getCursor -_clang_getCursorDefinition -_clang_getCursorExtent -_clang_getCursorKind -_clang_getCursorKindSpelling -_clang_getCursorLanguage -_clang_getCursorLinkage -_clang_getCursorLocation -_clang_getCursorReferenced -_clang_getCursorSpelling -_clang_getCursorUSR -_clang_getDefinitionSpellingAndExtent -_clang_getDiagnostic -_clang_getDiagnosticFixIt -_clang_getDiagnosticLocation -_clang_getDiagnosticNumFixIts -_clang_getDiagnosticNumRanges -_clang_getDiagnosticRange -_clang_getDiagnosticSeverity -_clang_getDiagnosticSpelling -_clang_getFile -_clang_getFileName -_clang_getFileTime -_clang_getInclusions -_clang_getInstantiationLocation -_clang_getLocation -_clang_getNullCursor -_clang_getNullLocation -_clang_getNullRange -_clang_getNumCompletionChunks -_clang_getNumDiagnostics -_clang_getRange -_clang_getRangeEnd -_clang_getRangeStart -_clang_getTokenExtent -_clang_getTokenKind -_clang_getTokenLocation -_clang_getTokenSpelling -_clang_getTranslationUnitCursor -_clang_getTranslationUnitSpelling -_clang_isCursorDefinition -_clang_isDeclaration -_clang_isExpression -_clang_isInvalid -_clang_isPreprocessing -_clang_isReference -_clang_isStatement -_clang_isTranslationUnit -_clang_isUnexposed -_clang_setUseExternalASTGeneration -_clang_tokenize -_clang_visitChildren diff --git a/tools/CIndex/CIndex.exports b/tools/CIndex/CIndex.exports deleted file mode 100644 index 991bb067f7d..00000000000 --- a/tools/CIndex/CIndex.exports +++ /dev/null @@ -1,81 +0,0 @@ -clang_annotateTokens -clang_codeComplete -clang_codeCompleteGetDiagnostic -clang_codeCompleteGetNumDiagnostics -clang_constructUSR_ObjCCategory -clang_constructUSR_ObjCClass -clang_constructUSR_ObjCIvar -clang_constructUSR_ObjCMethod -clang_constructUSR_ObjCProperty -clang_constructUSR_ObjCProtocol -clang_createIndex -clang_createTranslationUnit -clang_createTranslationUnitFromSourceFile -clang_defaultDiagnosticDisplayOptions -clang_disposeCodeCompleteResults -clang_disposeDiagnostic -clang_disposeIndex -clang_disposeString -clang_disposeTokens -clang_disposeTranslationUnit -clang_enableStackTraces -clang_equalCursors -clang_equalLocations -clang_formatDiagnostic -clang_getCString -clang_getClangVersion -clang_getCompletionChunkCompletionString -clang_getCompletionChunkKind -clang_getCompletionChunkText -clang_getCursor -clang_getCursorDefinition -clang_getCursorExtent -clang_getCursorKind -clang_getCursorKindSpelling -clang_getCursorLanguage -clang_getCursorLinkage -clang_getCursorLocation -clang_getCursorReferenced -clang_getCursorSpelling -clang_getCursorUSR -clang_getDefinitionSpellingAndExtent -clang_getDiagnostic -clang_getDiagnosticFixIt -clang_getDiagnosticLocation -clang_getDiagnosticNumFixIts -clang_getDiagnosticNumRanges -clang_getDiagnosticRange -clang_getDiagnosticSeverity -clang_getDiagnosticSpelling -clang_getFile -clang_getFileName -clang_getFileTime -clang_getInclusions -clang_getInstantiationLocation -clang_getLocation -clang_getNullCursor -clang_getNullLocation -clang_getNullRange -clang_getNumCompletionChunks -clang_getNumDiagnostics -clang_getRange -clang_getRangeEnd -clang_getRangeStart -clang_getTokenExtent -clang_getTokenKind -clang_getTokenLocation -clang_getTokenSpelling -clang_getTranslationUnitCursor -clang_getTranslationUnitSpelling -clang_isCursorDefinition -clang_isDeclaration -clang_isExpression -clang_isInvalid -clang_isPreprocessing -clang_isReference -clang_isStatement -clang_isTranslationUnit -clang_isUnexposed -clang_setUseExternalASTGeneration -clang_tokenize -clang_visitChildren diff --git a/tools/CIndex/CIndexCodeCompletion.cpp b/tools/CIndex/CIndexCodeCompletion.cpp deleted file mode 100644 index a21614c7473..00000000000 --- a/tools/CIndex/CIndexCodeCompletion.cpp +++ /dev/null @@ -1,512 +0,0 @@ -//===- CIndexCodeCompletion.cpp - Code Completion API hooks ---------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file implements the Clang-C Source Indexing library hooks for -// code completion. -// -//===----------------------------------------------------------------------===// - -#include "CIndexer.h" -#include "CIndexDiagnostic.h" -#include "clang/Basic/SourceManager.h" -#include "clang/Basic/FileManager.h" -#include "clang/Frontend/CompilerInstance.h" -#include "clang/Frontend/FrontendDiagnostic.h" -#include "clang/Sema/CodeCompleteConsumer.h" -#include "llvm/ADT/StringExtras.h" -#include "llvm/Support/MemoryBuffer.h" -#include "llvm/System/Program.h" - -#ifdef UDP_CODE_COMPLETION_LOGGER -#include "clang/Basic/Version.h" -#include "llvm/ADT/SmallString.h" -#include "llvm/Support/Timer.h" -#include "llvm/Support/raw_ostream.h" -#include -#include -#include -#include -#endif - -using namespace clang; -using namespace clang::cxstring; - -extern "C" { - -enum CXCompletionChunkKind -clang_getCompletionChunkKind(CXCompletionString completion_string, - unsigned chunk_number) { - CodeCompletionString *CCStr = (CodeCompletionString *)completion_string; - if (!CCStr || chunk_number >= CCStr->size()) - return CXCompletionChunk_Text; - - switch ((*CCStr)[chunk_number].Kind) { - case CodeCompletionString::CK_TypedText: - return CXCompletionChunk_TypedText; - case CodeCompletionString::CK_Text: - return CXCompletionChunk_Text; - case CodeCompletionString::CK_Optional: - return CXCompletionChunk_Optional; - case CodeCompletionString::CK_Placeholder: - return CXCompletionChunk_Placeholder; - case CodeCompletionString::CK_Informative: - return CXCompletionChunk_Informative; - case CodeCompletionString::CK_ResultType: - return CXCompletionChunk_ResultType; - case CodeCompletionString::CK_CurrentParameter: - return CXCompletionChunk_CurrentParameter; - case CodeCompletionString::CK_LeftParen: - return CXCompletionChunk_LeftParen; - case CodeCompletionString::CK_RightParen: - return CXCompletionChunk_RightParen; - case CodeCompletionString::CK_LeftBracket: - return CXCompletionChunk_LeftBracket; - case CodeCompletionString::CK_RightBracket: - return CXCompletionChunk_RightBracket; - case CodeCompletionString::CK_LeftBrace: - return CXCompletionChunk_LeftBrace; - case CodeCompletionString::CK_RightBrace: - return CXCompletionChunk_RightBrace; - case CodeCompletionString::CK_LeftAngle: - return CXCompletionChunk_LeftAngle; - case CodeCompletionString::CK_RightAngle: - return CXCompletionChunk_RightAngle; - case CodeCompletionString::CK_Comma: - return CXCompletionChunk_Comma; - case CodeCompletionString::CK_Colon: - return CXCompletionChunk_Colon; - case CodeCompletionString::CK_SemiColon: - return CXCompletionChunk_SemiColon; - case CodeCompletionString::CK_Equal: - return CXCompletionChunk_Equal; - case CodeCompletionString::CK_HorizontalSpace: - return CXCompletionChunk_HorizontalSpace; - case CodeCompletionString::CK_VerticalSpace: - return CXCompletionChunk_VerticalSpace; - } - - // Should be unreachable, but let's be careful. - return CXCompletionChunk_Text; -} - -CXString clang_getCompletionChunkText(CXCompletionString completion_string, - unsigned chunk_number) { - CodeCompletionString *CCStr = (CodeCompletionString *)completion_string; - if (!CCStr || chunk_number >= CCStr->size()) - return createCXString(0); - - switch ((*CCStr)[chunk_number].Kind) { - case CodeCompletionString::CK_TypedText: - case CodeCompletionString::CK_Text: - case CodeCompletionString::CK_Placeholder: - case CodeCompletionString::CK_CurrentParameter: - case CodeCompletionString::CK_Informative: - case CodeCompletionString::CK_LeftParen: - case CodeCompletionString::CK_RightParen: - case CodeCompletionString::CK_LeftBracket: - case CodeCompletionString::CK_RightBracket: - case CodeCompletionString::CK_LeftBrace: - case CodeCompletionString::CK_RightBrace: - case CodeCompletionString::CK_LeftAngle: - case CodeCompletionString::CK_RightAngle: - case CodeCompletionString::CK_Comma: - case CodeCompletionString::CK_ResultType: - case CodeCompletionString::CK_Colon: - case CodeCompletionString::CK_SemiColon: - case CodeCompletionString::CK_Equal: - case CodeCompletionString::CK_HorizontalSpace: - case CodeCompletionString::CK_VerticalSpace: - return createCXString((*CCStr)[chunk_number].Text, false); - - case CodeCompletionString::CK_Optional: - // Note: treated as an empty text block. - return createCXString(""); - } - - // Should be unreachable, but let's be careful. - return createCXString(0); -} - - -CXCompletionString -clang_getCompletionChunkCompletionString(CXCompletionString completion_string, - unsigned chunk_number) { - CodeCompletionString *CCStr = (CodeCompletionString *)completion_string; - if (!CCStr || chunk_number >= CCStr->size()) - return 0; - - switch ((*CCStr)[chunk_number].Kind) { - case CodeCompletionString::CK_TypedText: - case CodeCompletionString::CK_Text: - case CodeCompletionString::CK_Placeholder: - case CodeCompletionString::CK_CurrentParameter: - case CodeCompletionString::CK_Informative: - case CodeCompletionString::CK_LeftParen: - case CodeCompletionString::CK_RightParen: - case CodeCompletionString::CK_LeftBracket: - case CodeCompletionString::CK_RightBracket: - case CodeCompletionString::CK_LeftBrace: - case CodeCompletionString::CK_RightBrace: - case CodeCompletionString::CK_LeftAngle: - case CodeCompletionString::CK_RightAngle: - case CodeCompletionString::CK_Comma: - case CodeCompletionString::CK_ResultType: - case CodeCompletionString::CK_Colon: - case CodeCompletionString::CK_SemiColon: - case CodeCompletionString::CK_Equal: - case CodeCompletionString::CK_HorizontalSpace: - case CodeCompletionString::CK_VerticalSpace: - return 0; - - case CodeCompletionString::CK_Optional: - // Note: treated as an empty text block. - return (*CCStr)[chunk_number].Optional; - } - - // Should be unreachable, but let's be careful. - return 0; -} - -unsigned clang_getNumCompletionChunks(CXCompletionString completion_string) { - CodeCompletionString *CCStr = (CodeCompletionString *)completion_string; - return CCStr? CCStr->size() : 0; -} - -static bool ReadUnsigned(const char *&Memory, const char *MemoryEnd, - unsigned &Value) { - if (Memory + sizeof(unsigned) > MemoryEnd) - return true; - - memmove(&Value, Memory, sizeof(unsigned)); - Memory += sizeof(unsigned); - return false; -} - -/// \brief The CXCodeCompleteResults structure we allocate internally; -/// the client only sees the initial CXCodeCompleteResults structure. -struct AllocatedCXCodeCompleteResults : public CXCodeCompleteResults { - AllocatedCXCodeCompleteResults(); - ~AllocatedCXCodeCompleteResults(); - - /// \brief The memory buffer from which we parsed the results. We - /// retain this buffer because the completion strings point into it. - llvm::MemoryBuffer *Buffer; - - /// \brief Diagnostics produced while performing code completion. - llvm::SmallVector Diagnostics; - - /// \brief Diag object - Diagnostic Diag; - - /// \brief Language options used to adjust source locations. - LangOptions LangOpts; - - /// \brief Source manager, used for diagnostics. - SourceManager SourceMgr; - - /// \brief File manager, used for diagnostics. - FileManager FileMgr; - - /// \brief Temporary files that should be removed once we have finished - /// with the code-completion results. - std::vector TemporaryFiles; -}; - -AllocatedCXCodeCompleteResults::AllocatedCXCodeCompleteResults() - : CXCodeCompleteResults(), Buffer(0), SourceMgr(Diag) { } - -AllocatedCXCodeCompleteResults::~AllocatedCXCodeCompleteResults() { - for (unsigned I = 0, N = NumResults; I != N; ++I) - delete (CodeCompletionString *)Results[I].CompletionString; - delete [] Results; - delete Buffer; - - for (unsigned I = 0, N = TemporaryFiles.size(); I != N; ++I) - TemporaryFiles[I].eraseFromDisk(); -} - -CXCodeCompleteResults *clang_codeComplete(CXIndex CIdx, - const char *source_filename, - int num_command_line_args, - const char **command_line_args, - unsigned num_unsaved_files, - struct CXUnsavedFile *unsaved_files, - const char *complete_filename, - unsigned complete_line, - unsigned complete_column) { -#ifdef UDP_CODE_COMPLETION_LOGGER -#ifdef UDP_CODE_COMPLETION_LOGGER_PORT - const llvm::TimeRecord &StartTime = llvm::TimeRecord::getCurrentTime(); -#endif -#endif - - // The indexer, which is mainly used to determine where diagnostics go. - CIndexer *CXXIdx = static_cast(CIdx); - - // Configure the diagnostics. - DiagnosticOptions DiagOpts; - llvm::IntrusiveRefCntPtr Diags; - Diags = CompilerInstance::createDiagnostics(DiagOpts, 0, 0); - - // The set of temporary files that we've built. - std::vector TemporaryFiles; - - // Build up the arguments for invoking 'clang'. - std::vector argv; - - // First add the complete path to the 'clang' executable. - llvm::sys::Path ClangPath = CXXIdx->getClangPath(); - argv.push_back(ClangPath.c_str()); - - // Add the '-fsyntax-only' argument so that we only perform a basic - // syntax check of the code. - argv.push_back("-fsyntax-only"); - - // Add the appropriate '-code-completion-at=file:line:column' argument - // to perform code completion, with an "-Xclang" preceding it. - std::string code_complete_at; - code_complete_at += complete_filename; - code_complete_at += ":"; - code_complete_at += llvm::utostr(complete_line); - code_complete_at += ":"; - code_complete_at += llvm::utostr(complete_column); - argv.push_back("-Xclang"); - argv.push_back("-code-completion-at"); - argv.push_back("-Xclang"); - argv.push_back(code_complete_at.c_str()); - argv.push_back("-Xclang"); - argv.push_back("-no-code-completion-debug-printer"); - argv.push_back("-Xclang"); - argv.push_back("-code-completion-macros"); - argv.push_back("-fdiagnostics-binary"); - - // Remap any unsaved files to temporary files. - std::vector RemapArgs; - if (RemapFiles(num_unsaved_files, unsaved_files, RemapArgs, TemporaryFiles)) - return 0; - - // The pointers into the elements of RemapArgs are stable because we - // won't be adding anything to RemapArgs after this point. - for (unsigned i = 0, e = RemapArgs.size(); i != e; ++i) - argv.push_back(RemapArgs[i].c_str()); - - // Add the source file name (FIXME: later, we'll want to build temporary - // file from the buffer, or just feed the source text via standard input). - if (source_filename) - argv.push_back(source_filename); - - // Process the compiler options, stripping off '-o', '-c', '-fsyntax-only'. - for (int i = 0; i < num_command_line_args; ++i) - if (const char *arg = command_line_args[i]) { - if (strcmp(arg, "-o") == 0) { - ++i; // Also skip the matching argument. - continue; - } - if (strcmp(arg, "-emit-ast") == 0 || - strcmp(arg, "-c") == 0 || - strcmp(arg, "-fsyntax-only") == 0) { - continue; - } - - // Keep the argument. - argv.push_back(arg); - } - - // Add the null terminator. - argv.push_back(NULL); - - // Generate a temporary name for the code-completion results file. - char tmpFile[L_tmpnam]; - char *tmpFileName = tmpnam(tmpFile); - llvm::sys::Path ResultsFile(tmpFileName); - TemporaryFiles.push_back(ResultsFile); - - // Generate a temporary name for the diagnostics file. - char tmpFileResults[L_tmpnam]; - char *tmpResultsFileName = tmpnam(tmpFileResults); - llvm::sys::Path DiagnosticsFile(tmpResultsFileName); - TemporaryFiles.push_back(DiagnosticsFile); - - // Invoke 'clang'. - llvm::sys::Path DevNull; // leave empty, causes redirection to /dev/null - // on Unix or NUL (Windows). - std::string ErrMsg; - const llvm::sys::Path *Redirects[] = { &DevNull, &ResultsFile, - &DiagnosticsFile, 0 }; - llvm::sys::Program::ExecuteAndWait(ClangPath, &argv[0], /* env */ NULL, - /* redirects */ &Redirects[0], - /* secondsToWait */ 0, - /* memoryLimits */ 0, &ErrMsg); - - if (!ErrMsg.empty()) { - std::string AllArgs; - for (std::vector::iterator I = argv.begin(), E = argv.end(); - I != E; ++I) { - AllArgs += ' '; - if (*I) - AllArgs += *I; - } - - Diags->Report(diag::err_fe_invoking) << AllArgs << ErrMsg; - } - - // Parse the resulting source file to find code-completion results. - using llvm::MemoryBuffer; - using llvm::StringRef; - AllocatedCXCodeCompleteResults *Results = new AllocatedCXCodeCompleteResults; - Results->Results = 0; - Results->NumResults = 0; - Results->Buffer = 0; - // FIXME: Set Results->LangOpts! - if (MemoryBuffer *F = MemoryBuffer::getFile(ResultsFile.c_str())) { - llvm::SmallVector CompletionResults; - StringRef Buffer = F->getBuffer(); - for (const char *Str = Buffer.data(), *StrEnd = Str + Buffer.size(); - Str < StrEnd;) { - unsigned KindValue; - if (ReadUnsigned(Str, StrEnd, KindValue)) - break; - - CodeCompletionString *CCStr - = CodeCompletionString::Deserialize(Str, StrEnd); - if (!CCStr) - continue; - - if (!CCStr->empty()) { - // Vend the code-completion result to the caller. - CXCompletionResult Result; - Result.CursorKind = (CXCursorKind)KindValue; - Result.CompletionString = CCStr; - CompletionResults.push_back(Result); - } - }; - - // Allocate the results. - Results->Results = new CXCompletionResult [CompletionResults.size()]; - Results->NumResults = CompletionResults.size(); - memcpy(Results->Results, CompletionResults.data(), - CompletionResults.size() * sizeof(CXCompletionResult)); - Results->Buffer = F; - } - - LoadSerializedDiagnostics(DiagnosticsFile, num_unsaved_files, unsaved_files, - Results->FileMgr, Results->SourceMgr, - Results->Diagnostics); - - // Make sure we delete temporary files when the code-completion results are - // destroyed. - Results->TemporaryFiles.swap(TemporaryFiles); - -#ifdef UDP_CODE_COMPLETION_LOGGER -#ifdef UDP_CODE_COMPLETION_LOGGER_PORT - const llvm::TimeRecord &EndTime = llvm::TimeRecord::getCurrentTime(); - llvm::SmallString<256> LogResult; - llvm::raw_svector_ostream os(LogResult); - - // Figure out the language and whether or not it uses PCH. - const char *lang = 0; - bool usesPCH = false; - - for (std::vector::iterator I = argv.begin(), E = argv.end(); - I != E; ++I) { - if (*I == 0) - continue; - if (strcmp(*I, "-x") == 0) { - if (I + 1 != E) { - lang = *(++I); - continue; - } - } - else if (strcmp(*I, "-include") == 0) { - if (I+1 != E) { - const char *arg = *(++I); - llvm::SmallString<512> pchName; - { - llvm::raw_svector_ostream os(pchName); - os << arg << ".pth"; - } - pchName.push_back('\0'); - struct stat stat_results; - if (stat(pchName.data(), &stat_results) == 0) - usesPCH = true; - continue; - } - } - } - - os << "{ "; - os << "\"wall\": " << (EndTime.getWallTime() - StartTime.getWallTime()); - os << ", \"numRes\": " << Results->NumResults; - os << ", \"diags\": " << Results->Diagnostics.size(); - os << ", \"pch\": " << (usesPCH ? "true" : "false"); - os << ", \"lang\": \"" << (lang ? lang : "") << '"'; - const char *name = getlogin(); - os << ", \"user\": \"" << (name ? name : "unknown") << '"'; - os << ", \"clangVer\": \"" << getClangFullVersion() << '"'; - os << " }"; - - llvm::StringRef res = os.str(); - if (res.size() > 0) { - do { - // Setup the UDP socket. - struct sockaddr_in servaddr; - bzero(&servaddr, sizeof(servaddr)); - servaddr.sin_family = AF_INET; - servaddr.sin_port = htons(UDP_CODE_COMPLETION_LOGGER_PORT); - if (inet_pton(AF_INET, UDP_CODE_COMPLETION_LOGGER, - &servaddr.sin_addr) <= 0) - break; - - int sockfd = socket(AF_INET, SOCK_DGRAM, 0); - if (sockfd < 0) - break; - - sendto(sockfd, res.data(), res.size(), 0, - (struct sockaddr *)&servaddr, sizeof(servaddr)); - close(sockfd); - } - while (false); - } -#endif -#endif - return Results; -} - -void clang_disposeCodeCompleteResults(CXCodeCompleteResults *ResultsIn) { - if (!ResultsIn) - return; - - AllocatedCXCodeCompleteResults *Results - = static_cast(ResultsIn); - delete Results; -} - -unsigned -clang_codeCompleteGetNumDiagnostics(CXCodeCompleteResults *ResultsIn) { - AllocatedCXCodeCompleteResults *Results - = static_cast(ResultsIn); - if (!Results) - return 0; - - return Results->Diagnostics.size(); -} - -CXDiagnostic -clang_codeCompleteGetDiagnostic(CXCodeCompleteResults *ResultsIn, - unsigned Index) { - AllocatedCXCodeCompleteResults *Results - = static_cast(ResultsIn); - if (!Results || Index >= Results->Diagnostics.size()) - return 0; - - return new CXStoredDiagnostic(Results->Diagnostics[Index], Results->LangOpts); -} - - -} // end extern "C" diff --git a/tools/CIndex/CIndexDiagnostic.cpp b/tools/CIndex/CIndexDiagnostic.cpp deleted file mode 100644 index 3db37b97da1..00000000000 --- a/tools/CIndex/CIndexDiagnostic.cpp +++ /dev/null @@ -1,285 +0,0 @@ -/*===-- CIndexDiagnostics.cpp - Diagnostics C Interface ---------*- C++ -*-===*\ -|* *| -|* The LLVM Compiler Infrastructure *| -|* *| -|* This file is distributed under the University of Illinois Open Source *| -|* License. See LICENSE.TXT for details. *| -|* *| -|*===----------------------------------------------------------------------===*| -|* *| -|* Implements the diagnostic functions of the Clang C interface. *| -|* *| -\*===----------------------------------------------------------------------===*/ -#include "CIndexDiagnostic.h" -#include "CIndexer.h" -#include "CXSourceLocation.h" - -#include "clang/Frontend/ASTUnit.h" -#include "clang/Frontend/FrontendDiagnostic.h" -#include "llvm/ADT/SmallString.h" -#include "llvm/ADT/Twine.h" -#include "llvm/Support/MemoryBuffer.h" -#include "llvm/Support/raw_ostream.h" - -using namespace clang; -using namespace clang::cxloc; -using namespace clang::cxstring; -using namespace llvm; - -//----------------------------------------------------------------------------- -// C Interface Routines -//----------------------------------------------------------------------------- -extern "C" { - -unsigned clang_getNumDiagnostics(CXTranslationUnit Unit) { - ASTUnit *CXXUnit = static_cast(Unit); - return CXXUnit? CXXUnit->stored_diag_size() : 0; -} - -CXDiagnostic clang_getDiagnostic(CXTranslationUnit Unit, unsigned Index) { - ASTUnit *CXXUnit = static_cast(Unit); - if (!CXXUnit || Index >= CXXUnit->stored_diag_size()) - return 0; - - return new CXStoredDiagnostic(CXXUnit->stored_diag_begin()[Index], - CXXUnit->getASTContext().getLangOptions()); -} - -void clang_disposeDiagnostic(CXDiagnostic Diagnostic) { - CXStoredDiagnostic *Stored = static_cast(Diagnostic); - delete Stored; -} - -CXString clang_formatDiagnostic(CXDiagnostic Diagnostic, unsigned Options) { - if (!Diagnostic) - return createCXString(""); - - CXDiagnosticSeverity Severity = clang_getDiagnosticSeverity(Diagnostic); - - // Ignore diagnostics that should be ignored. - if (Severity == CXDiagnostic_Ignored) - return createCXString(""); - - llvm::SmallString<256> Str; - llvm::raw_svector_ostream Out(Str); - - if (Options & CXDiagnostic_DisplaySourceLocation) { - // Print source location (file:line), along with optional column - // and source ranges. - CXFile File; - unsigned Line, Column; - clang_getInstantiationLocation(clang_getDiagnosticLocation(Diagnostic), - &File, &Line, &Column, 0); - if (File) { - CXString FName = clang_getFileName(File); - Out << clang_getCString(FName) << ":" << Line << ":"; - clang_disposeString(FName); - if (Options & CXDiagnostic_DisplayColumn) - Out << Column << ":"; - - if (Options & CXDiagnostic_DisplaySourceRanges) { - unsigned N = clang_getDiagnosticNumRanges(Diagnostic); - bool PrintedRange = false; - for (unsigned I = 0; I != N; ++I) { - CXFile StartFile, EndFile; - CXSourceRange Range = clang_getDiagnosticRange(Diagnostic, I); - - unsigned StartLine, StartColumn, EndLine, EndColumn; - clang_getInstantiationLocation(clang_getRangeStart(Range), - &StartFile, &StartLine, &StartColumn, - 0); - clang_getInstantiationLocation(clang_getRangeEnd(Range), - &EndFile, &EndLine, &EndColumn, 0); - - if (StartFile != EndFile || StartFile != File) - continue; - - Out << "{" << StartLine << ":" << StartColumn << "-" - << EndLine << ":" << EndColumn << "}"; - PrintedRange = true; - } - if (PrintedRange) - Out << ":"; - } - } - - Out << " "; - } - - /* Print warning/error/etc. */ - switch (Severity) { - case CXDiagnostic_Ignored: assert(0 && "impossible"); break; - case CXDiagnostic_Note: Out << "note: "; break; - case CXDiagnostic_Warning: Out << "warning: "; break; - case CXDiagnostic_Error: Out << "error: "; break; - case CXDiagnostic_Fatal: Out << "fatal error: "; break; - } - - CXString Text = clang_getDiagnosticSpelling(Diagnostic); - if (clang_getCString(Text)) - Out << clang_getCString(Text); - else - Out << ""; - clang_disposeString(Text); - return createCXString(Out.str(), true); -} - -unsigned clang_defaultDiagnosticDisplayOptions() { - return CXDiagnostic_DisplaySourceLocation | CXDiagnostic_DisplayColumn; -} - -enum CXDiagnosticSeverity clang_getDiagnosticSeverity(CXDiagnostic Diag) { - CXStoredDiagnostic *StoredDiag = static_cast(Diag); - if (!StoredDiag) - return CXDiagnostic_Ignored; - - switch (StoredDiag->Diag.getLevel()) { - case Diagnostic::Ignored: return CXDiagnostic_Ignored; - case Diagnostic::Note: return CXDiagnostic_Note; - case Diagnostic::Warning: return CXDiagnostic_Warning; - case Diagnostic::Error: return CXDiagnostic_Error; - case Diagnostic::Fatal: return CXDiagnostic_Fatal; - } - - llvm_unreachable("Invalid diagnostic level"); - return CXDiagnostic_Ignored; -} - -CXSourceLocation clang_getDiagnosticLocation(CXDiagnostic Diag) { - CXStoredDiagnostic *StoredDiag = static_cast(Diag); - if (!StoredDiag || StoredDiag->Diag.getLocation().isInvalid()) - return clang_getNullLocation(); - - return translateSourceLocation(StoredDiag->Diag.getLocation().getManager(), - StoredDiag->LangOpts, - StoredDiag->Diag.getLocation()); -} - -CXString clang_getDiagnosticSpelling(CXDiagnostic Diag) { - CXStoredDiagnostic *StoredDiag = static_cast(Diag); - if (!StoredDiag) - return createCXString(""); - - return createCXString(StoredDiag->Diag.getMessage(), false); -} - -unsigned clang_getDiagnosticNumRanges(CXDiagnostic Diag) { - CXStoredDiagnostic *StoredDiag = static_cast(Diag); - if (!StoredDiag || StoredDiag->Diag.getLocation().isInvalid()) - return 0; - - return StoredDiag->Diag.range_size(); -} - -CXSourceRange clang_getDiagnosticRange(CXDiagnostic Diag, unsigned Range) { - CXStoredDiagnostic *StoredDiag = static_cast(Diag); - if (!StoredDiag || Range >= StoredDiag->Diag.range_size() || - StoredDiag->Diag.getLocation().isInvalid()) - return clang_getNullRange(); - - return translateSourceRange(StoredDiag->Diag.getLocation().getManager(), - StoredDiag->LangOpts, - StoredDiag->Diag.range_begin()[Range]); -} - -unsigned clang_getDiagnosticNumFixIts(CXDiagnostic Diag) { - CXStoredDiagnostic *StoredDiag = static_cast(Diag); - if (!StoredDiag) - return 0; - - return StoredDiag->Diag.fixit_size(); -} - -CXString clang_getDiagnosticFixIt(CXDiagnostic Diagnostic, unsigned FixIt, - CXSourceRange *ReplacementRange) { - CXStoredDiagnostic *StoredDiag - = static_cast(Diagnostic); - if (!StoredDiag || FixIt >= StoredDiag->Diag.fixit_size() || - StoredDiag->Diag.getLocation().isInvalid()) { - if (ReplacementRange) - *ReplacementRange = clang_getNullRange(); - - return createCXString(""); - } - - const FixItHint &Hint = StoredDiag->Diag.fixit_begin()[FixIt]; - if (ReplacementRange) { - if (Hint.RemoveRange.isInvalid()) { - // Create an empty range that refers to a single source - // location (which is the insertion point). - CXSourceRange Range = { - { (void *)&StoredDiag->Diag.getLocation().getManager(), - (void *)&StoredDiag->LangOpts }, - Hint.InsertionLoc.getRawEncoding(), - Hint.InsertionLoc.getRawEncoding() - }; - - *ReplacementRange = Range; - } else { - // Create a range that covers the entire replacement (or - // removal) range, adjusting the end of the range to point to - // the end of the token. - *ReplacementRange - = translateSourceRange(StoredDiag->Diag.getLocation().getManager(), - StoredDiag->LangOpts, - Hint.RemoveRange); - } - } - - return createCXString(Hint.CodeToInsert); -} - -} // end extern "C" - -void clang::LoadSerializedDiagnostics(const llvm::sys::Path &DiagnosticsPath, - unsigned num_unsaved_files, - struct CXUnsavedFile *unsaved_files, - FileManager &FileMgr, - SourceManager &SourceMgr, - SmallVectorImpl &Diags) { - using llvm::MemoryBuffer; - using llvm::StringRef; - MemoryBuffer *F = MemoryBuffer::getFile(DiagnosticsPath.c_str()); - if (!F) - return; - - // Enter the unsaved files into the file manager. - for (unsigned I = 0; I != num_unsaved_files; ++I) { - const FileEntry *File = FileMgr.getVirtualFile(unsaved_files[I].Filename, - unsaved_files[I].Length, - 0); - if (!File) { - // FIXME: Hard to localize when we have no diagnostics engine! - Diags.push_back(StoredDiagnostic(Diagnostic::Fatal, - (Twine("could not remap from missing file ") + - unsaved_files[I].Filename).str())); - delete F; - return; - } - - MemoryBuffer *Buffer - = MemoryBuffer::getMemBuffer(unsaved_files[I].Contents, - unsaved_files[I].Contents + unsaved_files[I].Length); - if (!Buffer) { - delete F; - return; - } - - SourceMgr.overrideFileContents(File, Buffer); - SourceMgr.createFileID(File, SourceLocation(), SrcMgr::C_User); - } - - // Parse the diagnostics, emitting them one by one until we've - // exhausted the data. - StringRef Buffer = F->getBuffer(); - const char *Memory = Buffer.data(), *MemoryEnd = Memory + Buffer.size(); - while (Memory != MemoryEnd) { - StoredDiagnostic Stored = StoredDiagnostic::Deserialize(FileMgr, SourceMgr, - Memory, MemoryEnd); - if (!Stored) - break; - - Diags.push_back(Stored); - } - delete F; -} diff --git a/tools/CIndex/CIndexDiagnostic.h b/tools/CIndex/CIndexDiagnostic.h deleted file mode 100644 index 919c21cfdbe..00000000000 --- a/tools/CIndex/CIndexDiagnostic.h +++ /dev/null @@ -1,53 +0,0 @@ -/*===-- CIndexDiagnostic.h - Diagnostics C Interface ------------*- C++ -*-===*\ -|* *| -|* The LLVM Compiler Infrastructure *| -|* *| -|* This file is distributed under the University of Illinois Open Source *| -|* License. See LICENSE.TXT for details. *| -|* *| -|*===----------------------------------------------------------------------===*| -|* *| -|* Implements the diagnostic functions of the Clang C interface. *| -|* *| -\*===----------------------------------------------------------------------===*/ -#ifndef LLVM_CLANG_CINDEX_DIAGNOSTIC_H -#define LLVM_CLANG_CINDEX_DIAGNOSTIC_H - -struct CXUnsavedFile; - -namespace llvm { -template class SmallVectorImpl; -namespace sys { class Path; } -} - -namespace clang { - -class Diagnostic; -class FileManager; -class LangOptions; -class Preprocessor; -class StoredDiagnostic; -class SourceManager; - -/// \brief The storage behind a CXDiagnostic -struct CXStoredDiagnostic { - const StoredDiagnostic &Diag; - const LangOptions &LangOpts; - - CXStoredDiagnostic(const StoredDiagnostic &Diag, - const LangOptions &LangOpts) - : Diag(Diag), LangOpts(LangOpts) { } -}; - -/// \brief Given the path to a file that contains binary, serialized -/// diagnostics produced by Clang, load those diagnostics. -void LoadSerializedDiagnostics(const llvm::sys::Path &DiagnosticsPath, - unsigned num_unsaved_files, - struct CXUnsavedFile *unsaved_files, - FileManager &FileMgr, - SourceManager &SourceMgr, - llvm::SmallVectorImpl &Diags); - -} // end namespace clang - -#endif // LLVM_CLANG_CINDEX_DIAGNOSTIC_H diff --git a/tools/CIndex/CIndexInclusionStack.cpp b/tools/CIndex/CIndexInclusionStack.cpp deleted file mode 100644 index e86323956f9..00000000000 --- a/tools/CIndex/CIndexInclusionStack.cpp +++ /dev/null @@ -1,67 +0,0 @@ -//===- CIndexInclusionStack.cpp - Clang-C Source Indexing Library ---------===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file defines a callback mechanism for clients to get the inclusion -// stack from a translation unit. -// -//===----------------------------------------------------------------------===// - -#include "CIndexer.h" -#include "CXSourceLocation.h" -#include "clang/AST/DeclVisitor.h" -#include "clang/Frontend/ASTUnit.h" -#include "llvm/ADT/SmallString.h" -#include "llvm/Support/raw_ostream.h" -using namespace clang; - -extern "C" { -void clang_getInclusions(CXTranslationUnit TU, CXInclusionVisitor CB, - CXClientData clientData) { - - ASTUnit *CXXUnit = static_cast(TU); - SourceManager &SM = CXXUnit->getSourceManager(); - ASTContext &Ctx = CXXUnit->getASTContext(); - - llvm::SmallVector InclusionStack; - unsigned i = SM.sloc_loaded_entry_size(); - unsigned n = SM.sloc_entry_size(); - - // In the case where all the SLocEntries are in an external source, traverse - // those SLocEntries as well. This is the case where we are looking - // at the inclusion stack of an AST/PCH file. - if (i >= n) - i = 0; - - for ( ; i < n ; ++i) { - - const SrcMgr::SLocEntry &SL = SM.getSLocEntry(i); - - if (!SL.isFile()) - continue; - - const SrcMgr::FileInfo &FI = SL.getFile(); - if (!FI.getContentCache()->Entry) - continue; - - // Build the inclusion stack. - SourceLocation L = FI.getIncludeLoc(); - InclusionStack.clear(); - while (L.isValid()) { - PresumedLoc PLoc = SM.getPresumedLoc(L); - InclusionStack.push_back(cxloc::translateSourceLocation(Ctx, L)); - L = PLoc.getIncludeLoc(); - } - - // Callback to the client. - // FIXME: We should have a function to construct CXFiles. - CB((CXFile) FI.getContentCache()->Entry, - InclusionStack.data(), InclusionStack.size(), clientData); - } -} -} // end extern C diff --git a/tools/CIndex/CIndexUSRs.cpp b/tools/CIndex/CIndexUSRs.cpp deleted file mode 100644 index 58870b930b1..00000000000 --- a/tools/CIndex/CIndexUSRs.cpp +++ /dev/null @@ -1,469 +0,0 @@ -//===- CIndexUSR.cpp - Clang-C Source Indexing Library --------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file implements the generation and use of USRs from CXEntities. -// -//===----------------------------------------------------------------------===// - -#include "CIndexer.h" -#include "CXCursor.h" -#include "clang/AST/DeclVisitor.h" -#include "clang/Frontend/ASTUnit.h" -#include "clang/Lex/PreprocessingRecord.h" -#include "llvm/ADT/SmallString.h" -#include "llvm/Support/raw_ostream.h" - -using namespace clang; -using namespace clang::cxstring; - -//===----------------------------------------------------------------------===// -// USR generation. -//===----------------------------------------------------------------------===// - -namespace { -class USRGenerator : public DeclVisitor { - llvm::raw_ostream &Out; - bool IgnoreResults; - ASTUnit *AU; -public: - USRGenerator(ASTUnit *au, llvm::raw_ostream &out) - : Out(out), IgnoreResults(false), AU(au) {} - - bool ignoreResults() const { return IgnoreResults; } - - // Visitation methods from generating USRs from AST elements. - void VisitBlockDecl(BlockDecl *D); - void VisitDeclContext(DeclContext *D); - void VisitFieldDecl(FieldDecl *D); - void VisitFunctionDecl(FunctionDecl *D); - void VisitNamedDecl(NamedDecl *D); - void VisitNamespaceDecl(NamespaceDecl *D); - void VisitObjCClassDecl(ObjCClassDecl *CD); - void VisitObjCContainerDecl(ObjCContainerDecl *CD); - void VisitObjCForwardProtocolDecl(ObjCForwardProtocolDecl *P); - void VisitObjCMethodDecl(ObjCMethodDecl *MD); - void VisitObjCPropertyDecl(ObjCPropertyDecl *D); - void VisitObjCPropertyImplDecl(ObjCPropertyImplDecl *D); - void VisitTagDecl(TagDecl *D); - void VisitTypedefDecl(TypedefDecl *D); - void VisitVarDecl(VarDecl *D); - - /// Generate the string component containing the location of the - /// declaration. - void GenLoc(const Decl *D); - - /// String generation methods used both by the visitation methods - /// and from other clients that want to directly generate USRs. These - /// methods do not construct complete USRs (which incorporate the parents - /// of an AST element), but only the fragments concerning the AST element - /// itself. - - /// Generate a USR fragment for a named declaration. This does - /// not include the USR component for the parent. - void GenNamedDecl(llvm::StringRef name); - - /// Generate a USR for an Objective-C class. - void GenObjCClass(llvm::StringRef cls); - /// Generate a USR for an Objective-C class category. - void GenObjCCategory(llvm::StringRef cls, llvm::StringRef cat); - /// Generate a USR fragment for an Objective-C instance variable. The - /// complete USR can be created by concatenating the USR for the - /// encompassing class with this USR fragment. - void GenObjCIvar(llvm::StringRef ivar); - /// Generate a USR fragment for an Objective-C method. - void GenObjCMethod(llvm::StringRef sel, bool isInstanceMethod); - /// Generate a USR fragment for an Objective-C property. - void GenObjCProperty(llvm::StringRef prop); - /// Generate a USR for an Objective-C protocol. - void GenObjCProtocol(llvm::StringRef prot); -}; - -class StringUSRGenerator { -private: - llvm::SmallString<1024> StrBuf; - llvm::raw_svector_ostream Out; - USRGenerator UG; -public: - StringUSRGenerator(const CXCursor *C = 0) - : Out(StrBuf), UG(C ? cxcursor::getCursorASTUnit(*C) : 0, Out) { - // Add the USR space prefix. - Out << "c:"; - } - - llvm::StringRef str() { - return Out.str(); - } - - USRGenerator* operator->() { return &UG; } - - template - llvm::raw_svector_ostream &operator<<(const T &x) { - Out << x; - return Out; - } -}; - -} // end anonymous namespace - -//===----------------------------------------------------------------------===// -// Generating USRs from ASTS. -//===----------------------------------------------------------------------===// - -void USRGenerator::VisitBlockDecl(BlockDecl *D) { - VisitDeclContext(D->getDeclContext()); - // FIXME: Better support for anonymous blocks. - Out << "@B@anon"; -} - -void USRGenerator::VisitDeclContext(DeclContext *DC) { - if (NamedDecl *D = dyn_cast(DC)) - Visit(D); -} - -void USRGenerator::VisitFieldDecl(FieldDecl *D) { - const std::string &s = D->getNameAsString(); - if (s.empty()) { - // Bit fields can be anonymous. - IgnoreResults = true; - return; - } - VisitDeclContext(D->getDeclContext()); - Out << (isa(D) ? "@" : "@FI@") << s; -} - -void USRGenerator::VisitFunctionDecl(FunctionDecl *D) { - VisitDeclContext(D->getDeclContext()); - Out << "@F@" << D; -} - -void USRGenerator::VisitNamedDecl(NamedDecl *D) { - VisitDeclContext(D->getDeclContext()); - const std::string &s = D->getNameAsString(); - // The string can be empty if the declaration has no name; e.g., it is - // the ParmDecl with no name for declaration of a function pointer type, e.g.: - // void (*f)(void *); - // In this case, don't generate a USR. - if (s.empty()) - IgnoreResults = true; - else - GenNamedDecl(s); -} - -void USRGenerator::VisitVarDecl(VarDecl *D) { - // VarDecls can be declared 'extern' within a function or method body, - // but their enclosing DeclContext is the function, not the TU. We need - // to check the storage class to correctly generate the USR. - if (!D->hasExternalStorage()) - VisitDeclContext(D->getDeclContext()); - - const std::string &s = D->getNameAsString(); - // The string can be empty if the declaration has no name; e.g., it is - // the ParmDecl with no name for declaration of a function pointer type, e.g.: - // void (*f)(void *); - // In this case, don't generate a USR. - if (s.empty()) - IgnoreResults = true; - else - GenNamedDecl(s); -} - -void USRGenerator::VisitNamespaceDecl(NamespaceDecl *D) { - VisitDeclContext(D->getDeclContext()); - Out << "@N@" << D; -} - -void USRGenerator::VisitObjCMethodDecl(ObjCMethodDecl *D) { - Visit(cast(D->getDeclContext())); - GenObjCMethod(DeclarationName(D->getSelector()).getAsString(), - D->isInstanceMethod()); -} - -void USRGenerator::VisitObjCClassDecl(ObjCClassDecl *D) { - // FIXME: @class declarations can refer to multiple classes. We need - // to be able to traverse these. - IgnoreResults = true; -} - -void USRGenerator::VisitObjCForwardProtocolDecl(ObjCForwardProtocolDecl *D) { - // FIXME: @protocol declarations can refer to multiple protocols. We need - // to be able to traverse these. - IgnoreResults = true; -} - -void USRGenerator::VisitObjCContainerDecl(ObjCContainerDecl *D) { - switch (D->getKind()) { - default: - assert(false && "Invalid ObjC container."); - case Decl::ObjCInterface: - case Decl::ObjCImplementation: - GenObjCClass(D->getName()); - break; - case Decl::ObjCCategory: { - ObjCCategoryDecl *CD = cast(D); - ObjCInterfaceDecl *ID = CD->getClassInterface(); - if (!ID) { - // Handle invalid code where the @interface might not - // have been specified. - // FIXME: We should be able to generate this USR even if the - // @interface isn't available. - IgnoreResults = true; - return; - } - GenObjCCategory(ID->getName(), CD->getName()); - break; - } - case Decl::ObjCCategoryImpl: { - ObjCCategoryImplDecl *CD = cast(D); - ObjCInterfaceDecl *ID = CD->getClassInterface(); - if (!ID) { - // Handle invalid code where the @interface might not - // have been specified. - // FIXME: We should be able to generate this USR even if the - // @interface isn't available. - IgnoreResults = true; - return; - } - GenObjCCategory(ID->getName(), CD->getName()); - break; - } - case Decl::ObjCProtocol: - GenObjCProtocol(cast(D)->getName()); - break; - } -} - -void USRGenerator::VisitObjCPropertyDecl(ObjCPropertyDecl *D) { - Visit(cast(D->getDeclContext())); - GenObjCProperty(D->getName()); -} - -void USRGenerator::VisitObjCPropertyImplDecl(ObjCPropertyImplDecl *D) { - if (ObjCPropertyDecl *PD = D->getPropertyDecl()) { - VisitObjCPropertyDecl(PD); - return; - } - - IgnoreResults = true; -} - -void USRGenerator::VisitTagDecl(TagDecl *D) { - D = D->getCanonicalDecl(); - VisitDeclContext(D->getDeclContext()); - switch (D->getTagKind()) { - case TagDecl::TK_struct: Out << "@S"; break; - case TagDecl::TK_class: Out << "@C"; break; - case TagDecl::TK_union: Out << "@U"; break; - case TagDecl::TK_enum: Out << "@E"; break; - } - - const std::string &s = D->getNameAsString(); - const TypedefDecl *TD = 0; - if (s.empty()) { - TD = D->getTypedefForAnonDecl(); - Out << (TD ? 'A' : 'a'); - } - - // Add the location of the tag decl to handle resolution across - // translation units. - if (D->getLinkage() == NoLinkage) { - Out << '@'; - GenLoc(D); - if (IgnoreResults) - return; - } - - if (s.empty()) { - if (TD) - Out << '@' << TD; - } - else - Out << '@' << s; -} - -void USRGenerator::VisitTypedefDecl(TypedefDecl *D) { - DeclContext *DC = D->getDeclContext(); - if (NamedDecl *DCN = dyn_cast(DC)) - Visit(DCN); - Out << "@T@"; - if (D->getLinkage() == NoLinkage) { - GenLoc(D); - if (IgnoreResults) - return; - Out << '@'; - } - Out << D->getName(); -} - -void USRGenerator::GenLoc(const Decl *D) { - const SourceManager &SM = AU->getSourceManager(); - SourceLocation L = D->getLocStart(); - if (L.isInvalid()) { - IgnoreResults = true; - return; - } - L = SM.getInstantiationLoc(L); - const std::pair &Decomposed = SM.getDecomposedLoc(L); - const FileEntry *FE = SM.getFileEntryForID(Decomposed.first); - if (FE) { - llvm::sys::Path P(FE->getName()); - Out << P.getLast(); - } - else { - // This case really isn't interesting. - IgnoreResults = true; - return; - } - Out << '@' - << SM.getLineNumber(Decomposed.first, Decomposed.second) << ':' - << SM.getColumnNumber(Decomposed.first, Decomposed.second); -} - -//===----------------------------------------------------------------------===// -// General purpose USR generation methods. -//===----------------------------------------------------------------------===// - -void USRGenerator::GenNamedDecl(llvm::StringRef name) { - Out << "@" << name; -} - -void USRGenerator::GenObjCClass(llvm::StringRef cls) { - Out << "objc(cs)" << cls; -} - -void USRGenerator::GenObjCCategory(llvm::StringRef cls, llvm::StringRef cat) { - Out << "objc(cy)" << cls << '@' << cat; -} - -void USRGenerator::GenObjCIvar(llvm::StringRef ivar) { - GenNamedDecl(ivar); -} - -void USRGenerator::GenObjCMethod(llvm::StringRef meth, bool isInstanceMethod) { - Out << (isInstanceMethod ? "(im)" : "(cm)") << meth; -} - -void USRGenerator::GenObjCProperty(llvm::StringRef prop) { - Out << "(py)" << prop; -} - -void USRGenerator::GenObjCProtocol(llvm::StringRef prot) { - Out << "objc(pl)" << prot; -} - -//===----------------------------------------------------------------------===// -// API hooks. -//===----------------------------------------------------------------------===// - -static inline llvm::StringRef extractUSRSuffix(llvm::StringRef s) { - return s.startswith("c:") ? s.substr(2) : ""; -} - -static CXString getDeclCursorUSR(const CXCursor &C) { - Decl *D = cxcursor::getCursorDecl(C); - - // Don't generate USRs for things with invalid locations. - if (!D || D->getLocStart().isInvalid()) - return createCXString(""); - - // Check if the cursor has 'NoLinkage'. - if (const NamedDecl *ND = dyn_cast(D)) - switch (ND->getLinkage()) { - case ExternalLinkage: - // Generate USRs for all entities with external linkage. - break; - case NoLinkage: - // We allow enums, typedefs, and structs that have no linkage to - // have USRs that are anchored to the file they were defined in - // (e.g., the header). This is a little gross, but in principal - // enums/anonymous structs/etc. defined in a common header file - // are referred to across multiple translation units. - if (isa(ND) || isa(ND) || - isa(ND) || isa(ND)) - break; - // Fall-through. - case InternalLinkage: - case UniqueExternalLinkage: - return createCXString(""); - } - - StringUSRGenerator SUG(&C); - SUG->Visit(D); - - if (SUG->ignoreResults()) - return createCXString(""); - - // For development testing. - // assert(SUG.str().size() > 2); - - // Return a copy of the string that must be disposed by the caller. - return createCXString(SUG.str(), true); -} - -extern "C" { - -CXString clang_getCursorUSR(CXCursor C) { - const CXCursorKind &K = clang_getCursorKind(C); - - if (clang_isDeclaration(K)) - return getDeclCursorUSR(C); - - if (K == CXCursor_MacroDefinition) { - StringUSRGenerator SUG(&C); - SUG << "macro@" - << cxcursor::getCursorMacroDefinition(C)->getName()->getNameStart(); - return createCXString(SUG.str(), true); - } - - return createCXString(""); -} - -CXString clang_constructUSR_ObjCIvar(const char *name, CXString classUSR) { - StringUSRGenerator SUG; - SUG << extractUSRSuffix(clang_getCString(classUSR)); - SUG->GenObjCIvar(name); - return createCXString(SUG.str(), true); -} - -CXString clang_constructUSR_ObjCMethod(const char *name, - unsigned isInstanceMethod, - CXString classUSR) { - StringUSRGenerator SUG; - SUG << extractUSRSuffix(clang_getCString(classUSR)); - SUG->GenObjCMethod(name, isInstanceMethod); - return createCXString(SUG.str(), true); -} - -CXString clang_constructUSR_ObjCClass(const char *name) { - StringUSRGenerator SUG; - SUG->GenObjCClass(name); - return createCXString(SUG.str(), true); -} - -CXString clang_constructUSR_ObjCProtocol(const char *name) { - StringUSRGenerator SUG; - SUG->GenObjCProtocol(name); - return createCXString(SUG.str(), true); -} - -CXString clang_constructUSR_ObjCCategory(const char *class_name, - const char *category_name) { - StringUSRGenerator SUG; - SUG->GenObjCCategory(class_name, category_name); - return createCXString(SUG.str(), true); -} - -CXString clang_constructUSR_ObjCProperty(const char *property, - CXString classUSR) { - StringUSRGenerator SUG; - SUG << extractUSRSuffix(clang_getCString(classUSR)); - SUG->GenObjCProperty(property); - return createCXString(SUG.str(), true); -} - -} // end extern "C" diff --git a/tools/CIndex/CIndexer.cpp b/tools/CIndex/CIndexer.cpp deleted file mode 100644 index d5131ff6d86..00000000000 --- a/tools/CIndex/CIndexer.cpp +++ /dev/null @@ -1,154 +0,0 @@ -//===- CIndex.cpp - Clang-C Source Indexing Library -----------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file implements the Clang-C Source Indexing library. -// -//===----------------------------------------------------------------------===// - -#include "CIndexer.h" - -#include "clang/AST/Decl.h" -#include "clang/AST/DeclVisitor.h" -#include "clang/AST/StmtVisitor.h" -#include "clang/Basic/FileManager.h" -#include "clang/Basic/SourceManager.h" -#include "clang/Basic/Version.h" -#include "clang/Sema/CodeCompleteConsumer.h" -#include "llvm/ADT/StringExtras.h" -#include "llvm/Config/config.h" -#include "llvm/Support/Compiler.h" -#include "llvm/Support/MemoryBuffer.h" -#include "llvm/Support/raw_ostream.h" -#include "llvm/System/Program.h" - -#include -#include -#include - -#ifdef LLVM_ON_WIN32 -#include -#else -#include -#endif - -using namespace clang; - -const llvm::sys::Path& CIndexer::getClangPath() { - // Did we already compute the path? - if (!ClangPath.empty()) - return ClangPath; - - // Find the location where this library lives (libCIndex.dylib). -#ifdef LLVM_ON_WIN32 - MEMORY_BASIC_INFORMATION mbi; - char path[MAX_PATH]; - VirtualQuery((void *)(uintptr_t)clang_createTranslationUnit, &mbi, - sizeof(mbi)); - GetModuleFileNameA((HINSTANCE)mbi.AllocationBase, path, MAX_PATH); - - llvm::sys::Path CIndexPath(path); - - CIndexPath.eraseComponent(); - CIndexPath.appendComponent("clang"); - CIndexPath.appendSuffix("exe"); - CIndexPath.makeAbsolute(); -#else - // This silly cast below avoids a C++ warning. - Dl_info info; - if (dladdr((void *)(uintptr_t)clang_createTranslationUnit, &info) == 0) - assert(0 && "Call to dladdr() failed"); - - llvm::sys::Path CIndexPath(info.dli_fname); - - // We now have the CIndex directory, locate clang relative to it. - CIndexPath.eraseComponent(); - CIndexPath.appendComponent(".."); - CIndexPath.appendComponent("bin"); - CIndexPath.appendComponent("clang"); -#endif - - // Cache our result. - ClangPath = CIndexPath; - return ClangPath; -} - -std::string CIndexer::getClangResourcesPath() { - llvm::sys::Path P = getClangPath(); - - if (!P.empty()) { - P.eraseComponent(); // Remove /clang from foo/bin/clang - P.eraseComponent(); // Remove /bin from foo/bin - - // Get foo/lib/clang//include - P.appendComponent("lib"); - P.appendComponent("clang"); - P.appendComponent(CLANG_VERSION_STRING); - } - - return P.str(); -} - -static llvm::sys::Path GetTemporaryPath() { - // FIXME: This is lame; sys::Path should provide this function (in particular, - // it should know how to find the temporary files dir). - std::string Error; - const char *TmpDir = ::getenv("TMPDIR"); - if (!TmpDir) - TmpDir = ::getenv("TEMP"); - if (!TmpDir) - TmpDir = ::getenv("TMP"); - if (!TmpDir) - TmpDir = "/tmp"; - llvm::sys::Path P(TmpDir); - P.appendComponent("remap"); - if (P.makeUnique(false, &Error)) - return llvm::sys::Path(""); - - // FIXME: Grumble, makeUnique sometimes leaves the file around!? PR3837. - P.eraseFromDisk(false, 0); - - return P; -} - -bool clang::RemapFiles(unsigned num_unsaved_files, - struct CXUnsavedFile *unsaved_files, - std::vector &RemapArgs, - std::vector &TemporaryFiles) { - for (unsigned i = 0; i != num_unsaved_files; ++i) { - // Write the contents of this unsaved file into the temporary file. - llvm::sys::Path SavedFile(GetTemporaryPath()); - if (SavedFile.empty()) - return true; - - std::string ErrorInfo; - llvm::raw_fd_ostream OS(SavedFile.c_str(), ErrorInfo); - if (!ErrorInfo.empty()) - return true; - - OS.write(unsaved_files[i].Contents, unsaved_files[i].Length); - OS.close(); - if (OS.has_error()) { - SavedFile.eraseFromDisk(); - return true; - } - - // Remap the file. - std::string RemapArg = unsaved_files[i].Filename; - RemapArg += ';'; - RemapArg += SavedFile.str(); - RemapArgs.push_back("-Xclang"); - RemapArgs.push_back("-remap-file"); - RemapArgs.push_back("-Xclang"); - RemapArgs.push_back(RemapArg); - TemporaryFiles.push_back(SavedFile); - } - - return false; -} - diff --git a/tools/CIndex/CIndexer.h b/tools/CIndex/CIndexer.h deleted file mode 100644 index 31bf779ea4a..00000000000 --- a/tools/CIndex/CIndexer.h +++ /dev/null @@ -1,78 +0,0 @@ -//===- CIndexer.h - Clang-C Source Indexing Library -----------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file defines CIndexer, a subclass of Indexer that provides extra -// functionality needed by the CIndex library. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_CLANG_CINDEXER_H -#define LLVM_CLANG_CINDEXER_H - -#include "clang-c/Index.h" -#include "llvm/ADT/StringRef.h" -#include "llvm/System/Path.h" -#include - -namespace clang { -namespace cxstring { - CXString createCXString(const char *String, bool DupString = false); - CXString createCXString(llvm::StringRef String, bool DupString = true); -} -} - -class CIndexer { - bool UseExternalASTGeneration; - bool OnlyLocalDecls; - bool DisplayDiagnostics; - - llvm::sys::Path ClangPath; - -public: - CIndexer() - : UseExternalASTGeneration(false), OnlyLocalDecls(false), - DisplayDiagnostics(false) { } - - /// \brief Whether we only want to see "local" declarations (that did not - /// come from a previous precompiled header). If false, we want to see all - /// declarations. - bool getOnlyLocalDecls() const { return OnlyLocalDecls; } - void setOnlyLocalDecls(bool Local = true) { OnlyLocalDecls = Local; } - - bool getDisplayDiagnostics() const { return DisplayDiagnostics; } - void setDisplayDiagnostics(bool Display = true) { - DisplayDiagnostics = Display; - } - - bool getUseExternalASTGeneration() const { return UseExternalASTGeneration; } - void setUseExternalASTGeneration(bool Value) { - UseExternalASTGeneration = Value; - } - - /// \brief Get the path of the clang binary. - const llvm::sys::Path& getClangPath(); - - /// \brief Get the path of the clang resource files. - std::string getClangResourcesPath(); -}; - -namespace clang { - /** - * \brief Given a set of "unsaved" files, create temporary files and - * construct the clang -cc1 argument list needed to perform the remapping. - * - * \returns true if an error occurred. - */ - bool RemapFiles(unsigned num_unsaved_files, - struct CXUnsavedFile *unsaved_files, - std::vector &RemapArgs, - std::vector &TemporaryFiles); -} - -#endif diff --git a/tools/CIndex/CMakeLists.txt b/tools/CIndex/CMakeLists.txt deleted file mode 100644 index 609719e627f..00000000000 --- a/tools/CIndex/CMakeLists.txt +++ /dev/null @@ -1,56 +0,0 @@ -set(SHARED_LIBRARY TRUE) - -set(LLVM_NO_RTTI 1) - -set(LLVM_USED_LIBS - clangFrontend - clangDriver - clangSema - clangAnalysis - clangAST - clangParse - clangLex - clangBasic) - -set( LLVM_LINK_COMPONENTS - bitreader - mc - core - ) - -add_clang_library(CIndex - CIndex.cpp - CIndexCodeCompletion.cpp - CIndexDiagnostic.cpp - CIndexInclusionStack.cpp - CIndexUSRs.cpp - CIndexer.cpp - CXCursor.cpp - ../../include/clang-c/Index.h -) - -if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") - # FIXME: Deal with LLVM_SUBMIT_VERSION? - - # FIXME: This uses a special darwin-specific exports file in order to - # get underscore-prefixed names. It would be better to have build rules - # which know how to produce a darwin-suitable exports file from the - # regular exports file. - set_target_properties(CIndex - PROPERTIES - LINK_FLAGS "-avoid-version -Wl,-exported_symbols_list -Wl,${CMAKE_CURRENT_SOURCE_DIR}/CIndex.darwin.exports -Wl,-dead_strip -Wl,-seg1addr -Wl,0xE0000000" - INSTALL_NAME_DIR "@executable_path/../lib" - ) -endif() - -if(MSVC) - # windows.h doesn't compile with /Za - get_target_property(NON_ANSI_COMPILE_FLAGS CIndex COMPILE_FLAGS) - string(REPLACE /Za "" NON_ANSI_COMPILE_FLAGS ${NON_ANSI_COMPILE_FLAGS}) - set_target_properties(CIndex PROPERTIES COMPILE_FLAGS ${NON_ANSI_COMPILE_FLAGS}) -endif(MSVC) - -set_target_properties(CIndex - PROPERTIES - LINKER_LANGUAGE CXX - DEFINE_SYMBOL _CINDEX_LIB_) diff --git a/tools/CIndex/CXCursor.cpp b/tools/CIndex/CXCursor.cpp deleted file mode 100644 index 3bc5d01fbad..00000000000 --- a/tools/CIndex/CXCursor.cpp +++ /dev/null @@ -1,369 +0,0 @@ -//===- CXCursor.cpp - Routines for manipulating CXCursors -----------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file defines routines for manipulating CXCursors. It should be the -// only file that has internal knowledge of the encoding of the data in -// CXCursor. -// -//===----------------------------------------------------------------------===// - -#include "CXCursor.h" -#include "clang/Frontend/ASTUnit.h" -#include "clang/AST/Decl.h" -#include "clang/AST/DeclObjC.h" -#include "clang/AST/Expr.h" -#include "llvm/Support/ErrorHandling.h" - -using namespace clang; - -CXCursor cxcursor::MakeCXCursorInvalid(CXCursorKind K) { - assert(K >= CXCursor_FirstInvalid && K <= CXCursor_LastInvalid); - CXCursor C = { K, { 0, 0, 0 } }; - return C; -} - -static CXCursorKind GetCursorKind(Decl *D) { - assert(D && "Invalid arguments!"); - switch (D->getKind()) { - case Decl::Enum: return CXCursor_EnumDecl; - case Decl::EnumConstant: return CXCursor_EnumConstantDecl; - case Decl::Field: return CXCursor_FieldDecl; - case Decl::Function: - return CXCursor_FunctionDecl; - case Decl::ObjCCategory: return CXCursor_ObjCCategoryDecl; - case Decl::ObjCCategoryImpl: return CXCursor_ObjCCategoryImplDecl; - case Decl::ObjCClass: - // FIXME - return CXCursor_UnexposedDecl; - case Decl::ObjCForwardProtocol: - // FIXME - return CXCursor_UnexposedDecl; - case Decl::ObjCImplementation: return CXCursor_ObjCImplementationDecl; - case Decl::ObjCInterface: return CXCursor_ObjCInterfaceDecl; - case Decl::ObjCIvar: return CXCursor_ObjCIvarDecl; - case Decl::ObjCMethod: - return cast(D)->isInstanceMethod() - ? CXCursor_ObjCInstanceMethodDecl : CXCursor_ObjCClassMethodDecl; - case Decl::CXXMethod: return CXCursor_CXXMethod; - case Decl::ObjCProperty: return CXCursor_ObjCPropertyDecl; - case Decl::ObjCProtocol: return CXCursor_ObjCProtocolDecl; - case Decl::ParmVar: return CXCursor_ParmDecl; - case Decl::Typedef: return CXCursor_TypedefDecl; - case Decl::Var: return CXCursor_VarDecl; - default: - if (TagDecl *TD = dyn_cast(D)) { - switch (TD->getTagKind()) { - case TagDecl::TK_struct: return CXCursor_StructDecl; - case TagDecl::TK_class: return CXCursor_ClassDecl; - case TagDecl::TK_union: return CXCursor_UnionDecl; - case TagDecl::TK_enum: return CXCursor_EnumDecl; - } - } - - return CXCursor_UnexposedDecl; - } - - llvm_unreachable("Invalid Decl"); - return CXCursor_NotImplemented; -} - -static CXCursorKind GetCursorKind(const Attr *A) { - assert(A && "Invalid arguments!"); - switch (A->getKind()) { - default: break; - case Attr::IBActionKind: return CXCursor_IBActionAttr; - case Attr::IBOutletKind: return CXCursor_IBOutletAttr; - } - - return CXCursor_UnexposedAttr; -} - -CXCursor cxcursor::MakeCXCursor(const Attr *A, Decl *Parent, ASTUnit *TU) { - assert(A && Parent && TU && "Invalid arguments!"); - CXCursor C = { GetCursorKind(A), { Parent, (void*)A, TU } }; - return C; -} - -CXCursor cxcursor::MakeCXCursor(Decl *D, ASTUnit *TU) { - assert(D && TU && "Invalid arguments!"); - CXCursor C = { GetCursorKind(D), { D, 0, TU } }; - return C; -} - -CXCursor cxcursor::MakeCXCursor(Stmt *S, Decl *Parent, ASTUnit *TU) { - assert(S && TU && "Invalid arguments!"); - CXCursorKind K = CXCursor_NotImplemented; - - switch (S->getStmtClass()) { - case Stmt::NoStmtClass: - break; - - case Stmt::NullStmtClass: - case Stmt::CompoundStmtClass: - case Stmt::CaseStmtClass: - case Stmt::DefaultStmtClass: - case Stmt::LabelStmtClass: - case Stmt::IfStmtClass: - case Stmt::SwitchStmtClass: - case Stmt::WhileStmtClass: - case Stmt::DoStmtClass: - case Stmt::ForStmtClass: - case Stmt::GotoStmtClass: - case Stmt::IndirectGotoStmtClass: - case Stmt::ContinueStmtClass: - case Stmt::BreakStmtClass: - case Stmt::ReturnStmtClass: - case Stmt::DeclStmtClass: - case Stmt::SwitchCaseClass: - case Stmt::AsmStmtClass: - case Stmt::ObjCAtTryStmtClass: - case Stmt::ObjCAtCatchStmtClass: - case Stmt::ObjCAtFinallyStmtClass: - case Stmt::ObjCAtThrowStmtClass: - case Stmt::ObjCAtSynchronizedStmtClass: - case Stmt::ObjCForCollectionStmtClass: - case Stmt::CXXCatchStmtClass: - case Stmt::CXXTryStmtClass: - K = CXCursor_UnexposedStmt; - break; - - case Stmt::PredefinedExprClass: - case Stmt::IntegerLiteralClass: - case Stmt::FloatingLiteralClass: - case Stmt::ImaginaryLiteralClass: - case Stmt::StringLiteralClass: - case Stmt::CharacterLiteralClass: - case Stmt::ParenExprClass: - case Stmt::UnaryOperatorClass: - case Stmt::SizeOfAlignOfExprClass: - case Stmt::ArraySubscriptExprClass: - case Stmt::BinaryOperatorClass: - case Stmt::CompoundAssignOperatorClass: - case Stmt::ConditionalOperatorClass: - case Stmt::ImplicitCastExprClass: - case Stmt::CStyleCastExprClass: - case Stmt::CompoundLiteralExprClass: - case Stmt::ExtVectorElementExprClass: - case Stmt::InitListExprClass: - case Stmt::DesignatedInitExprClass: - case Stmt::ImplicitValueInitExprClass: - case Stmt::ParenListExprClass: - case Stmt::VAArgExprClass: - case Stmt::AddrLabelExprClass: - case Stmt::StmtExprClass: - case Stmt::TypesCompatibleExprClass: - case Stmt::ChooseExprClass: - case Stmt::GNUNullExprClass: - case Stmt::CXXStaticCastExprClass: - case Stmt::CXXDynamicCastExprClass: - case Stmt::CXXReinterpretCastExprClass: - case Stmt::CXXConstCastExprClass: - case Stmt::CXXFunctionalCastExprClass: - case Stmt::CXXTypeidExprClass: - case Stmt::CXXBoolLiteralExprClass: - case Stmt::CXXNullPtrLiteralExprClass: - case Stmt::CXXThisExprClass: - case Stmt::CXXThrowExprClass: - case Stmt::CXXDefaultArgExprClass: - case Stmt::CXXZeroInitValueExprClass: - case Stmt::CXXNewExprClass: - case Stmt::CXXDeleteExprClass: - case Stmt::CXXPseudoDestructorExprClass: - case Stmt::UnresolvedLookupExprClass: - case Stmt::UnaryTypeTraitExprClass: - case Stmt::DependentScopeDeclRefExprClass: - case Stmt::CXXBindTemporaryExprClass: - case Stmt::CXXBindReferenceExprClass: - case Stmt::CXXExprWithTemporariesClass: - case Stmt::CXXUnresolvedConstructExprClass: - case Stmt::CXXDependentScopeMemberExprClass: - case Stmt::UnresolvedMemberExprClass: - case Stmt::ObjCStringLiteralClass: - case Stmt::ObjCEncodeExprClass: - case Stmt::ObjCSelectorExprClass: - case Stmt::ObjCProtocolExprClass: - case Stmt::ObjCImplicitSetterGetterRefExprClass: - case Stmt::ObjCSuperExprClass: - case Stmt::ObjCIsaExprClass: - case Stmt::ShuffleVectorExprClass: - case Stmt::BlockExprClass: - K = CXCursor_UnexposedExpr; - break; - case Stmt::DeclRefExprClass: - case Stmt::BlockDeclRefExprClass: - // FIXME: UnresolvedLookupExpr? - // FIXME: DependentScopeDeclRefExpr? - K = CXCursor_DeclRefExpr; - break; - - case Stmt::MemberExprClass: - case Stmt::ObjCIvarRefExprClass: - case Stmt::ObjCPropertyRefExprClass: - // FIXME: UnresolvedMemberExpr? - // FIXME: CXXDependentScopeMemberExpr? - K = CXCursor_MemberRefExpr; - break; - - case Stmt::CallExprClass: - case Stmt::CXXOperatorCallExprClass: - case Stmt::CXXMemberCallExprClass: - case Stmt::CXXConstructExprClass: - case Stmt::CXXTemporaryObjectExprClass: - // FIXME: CXXUnresolvedConstructExpr - // FIXME: ObjCImplicitSetterGetterRefExpr? - K = CXCursor_CallExpr; - break; - - case Stmt::ObjCMessageExprClass: - K = CXCursor_ObjCMessageExpr; - break; - } - - CXCursor C = { K, { Parent, S, TU } }; - return C; -} - -CXCursor cxcursor::MakeCursorObjCSuperClassRef(ObjCInterfaceDecl *Super, - SourceLocation Loc, - ASTUnit *TU) { - assert(Super && TU && "Invalid arguments!"); - void *RawLoc = reinterpret_cast(Loc.getRawEncoding()); - CXCursor C = { CXCursor_ObjCSuperClassRef, { Super, RawLoc, TU } }; - return C; -} - -std::pair -cxcursor::getCursorObjCSuperClassRef(CXCursor C) { - assert(C.kind == CXCursor_ObjCSuperClassRef); - return std::make_pair(static_cast(C.data[0]), - SourceLocation::getFromRawEncoding( - reinterpret_cast(C.data[1]))); -} - -CXCursor cxcursor::MakeCursorObjCProtocolRef(ObjCProtocolDecl *Super, - SourceLocation Loc, - ASTUnit *TU) { - assert(Super && TU && "Invalid arguments!"); - void *RawLoc = reinterpret_cast(Loc.getRawEncoding()); - CXCursor C = { CXCursor_ObjCProtocolRef, { Super, RawLoc, TU } }; - return C; -} - -std::pair -cxcursor::getCursorObjCProtocolRef(CXCursor C) { - assert(C.kind == CXCursor_ObjCProtocolRef); - return std::make_pair(static_cast(C.data[0]), - SourceLocation::getFromRawEncoding( - reinterpret_cast(C.data[1]))); -} - -CXCursor cxcursor::MakeCursorObjCClassRef(ObjCInterfaceDecl *Class, - SourceLocation Loc, - ASTUnit *TU) { - // 'Class' can be null for invalid code. - if (!Class) - return MakeCXCursorInvalid(CXCursor_InvalidCode); - assert(TU && "Invalid arguments!"); - void *RawLoc = reinterpret_cast(Loc.getRawEncoding()); - CXCursor C = { CXCursor_ObjCClassRef, { Class, RawLoc, TU } }; - return C; -} - -std::pair -cxcursor::getCursorObjCClassRef(CXCursor C) { - assert(C.kind == CXCursor_ObjCClassRef); - return std::make_pair(static_cast(C.data[0]), - SourceLocation::getFromRawEncoding( - reinterpret_cast(C.data[1]))); -} - -CXCursor cxcursor::MakeCursorTypeRef(TypeDecl *Type, SourceLocation Loc, - ASTUnit *TU) { - assert(Type && TU && "Invalid arguments!"); - void *RawLoc = reinterpret_cast(Loc.getRawEncoding()); - CXCursor C = { CXCursor_TypeRef, { Type, RawLoc, TU } }; - return C; -} - -std::pair -cxcursor::getCursorTypeRef(CXCursor C) { - assert(C.kind == CXCursor_TypeRef); - return std::make_pair(static_cast(C.data[0]), - SourceLocation::getFromRawEncoding( - reinterpret_cast(C.data[1]))); -} - -CXCursor cxcursor::MakePreprocessingDirectiveCursor(SourceRange Range, - ASTUnit *TU) { - CXCursor C = { CXCursor_PreprocessingDirective, - { reinterpret_cast(Range.getBegin().getRawEncoding()), - reinterpret_cast(Range.getEnd().getRawEncoding()), - TU } - }; - return C; -} - -SourceRange cxcursor::getCursorPreprocessingDirective(CXCursor C) { - assert(C.kind == CXCursor_PreprocessingDirective); - return SourceRange(SourceLocation::getFromRawEncoding( - reinterpret_cast (C.data[0])), - SourceLocation::getFromRawEncoding( - reinterpret_cast (C.data[1]))); -} - -CXCursor cxcursor::MakeMacroDefinitionCursor(MacroDefinition *MI, ASTUnit *TU) { - CXCursor C = { CXCursor_MacroDefinition, { MI, 0, TU } }; - return C; -} - -MacroDefinition *cxcursor::getCursorMacroDefinition(CXCursor C) { - assert(C.kind == CXCursor_MacroDefinition); - return static_cast(C.data[0]); -} - -CXCursor cxcursor::MakeMacroInstantiationCursor(MacroInstantiation *MI, - ASTUnit *TU) { - CXCursor C = { CXCursor_MacroInstantiation, { MI, 0, TU } }; - return C; -} - -MacroInstantiation *cxcursor::getCursorMacroInstantiation(CXCursor C) { - assert(C.kind == CXCursor_MacroInstantiation); - return static_cast(C.data[0]); -} - -Decl *cxcursor::getCursorDecl(CXCursor Cursor) { - return (Decl *)Cursor.data[0]; -} - -Expr *cxcursor::getCursorExpr(CXCursor Cursor) { - return dyn_cast_or_null(getCursorStmt(Cursor)); -} - -Stmt *cxcursor::getCursorStmt(CXCursor Cursor) { - if (Cursor.kind == CXCursor_ObjCSuperClassRef || - Cursor.kind == CXCursor_ObjCProtocolRef || - Cursor.kind == CXCursor_ObjCClassRef) - return 0; - - return (Stmt *)Cursor.data[1]; -} - -ASTContext &cxcursor::getCursorContext(CXCursor Cursor) { - return getCursorASTUnit(Cursor)->getASTContext(); -} - -ASTUnit *cxcursor::getCursorASTUnit(CXCursor Cursor) { - return static_cast(Cursor.data[2]); -} - -bool cxcursor::operator==(CXCursor X, CXCursor Y) { - return X.kind == Y.kind && X.data[0] == Y.data[0] && X.data[1] == Y.data[1] && - X.data[2] == Y.data[2]; -} diff --git a/tools/CIndex/CXCursor.h b/tools/CIndex/CXCursor.h deleted file mode 100644 index 1664f5a9ced..00000000000 --- a/tools/CIndex/CXCursor.h +++ /dev/null @@ -1,112 +0,0 @@ -//===- CXCursor.h - Routines for manipulating CXCursors -------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file defines routines for manipulating CXCursors. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_CLANG_CXCURSOR_H -#define LLVM_CLANG_CXCURSOR_H - -#include "clang-c/Index.h" -#include "clang/Basic/SourceLocation.h" -#include - -namespace clang { - -class ASTContext; -class ASTUnit; -class Attr; -class Decl; -class Expr; -class MacroDefinition; -class MacroInstantiation; -class NamedDecl; -class ObjCInterfaceDecl; -class ObjCProtocolDecl; -class Stmt; -class TypeDecl; - -namespace cxcursor { - -CXCursor MakeCXCursor(const clang::Attr *A, clang::Decl *Parent, ASTUnit *TU); -CXCursor MakeCXCursor(clang::Decl *D, ASTUnit *TU); -CXCursor MakeCXCursor(clang::Stmt *S, clang::Decl *Parent, ASTUnit *TU); -CXCursor MakeCXCursorInvalid(CXCursorKind K); - -/// \brief Create an Objective-C superclass reference at the given location. -CXCursor MakeCursorObjCSuperClassRef(ObjCInterfaceDecl *Super, - SourceLocation Loc, - ASTUnit *TU); - -/// \brief Unpack an ObjCSuperClassRef cursor into the interface it references -/// and optionally the location where the reference occurred. -std::pair - getCursorObjCSuperClassRef(CXCursor C); - -/// \brief Create an Objective-C protocol reference at the given location. -CXCursor MakeCursorObjCProtocolRef(ObjCProtocolDecl *Proto, SourceLocation Loc, - ASTUnit *TU); - -/// \brief Unpack an ObjCProtocolRef cursor into the protocol it references -/// and optionally the location where the reference occurred. -std::pair - getCursorObjCProtocolRef(CXCursor C); - -/// \brief Create an Objective-C class reference at the given location. -CXCursor MakeCursorObjCClassRef(ObjCInterfaceDecl *Class, SourceLocation Loc, - ASTUnit *TU); - -/// \brief Unpack an ObjCClassRef cursor into the class it references -/// and optionally the location where the reference occurred. -std::pair - getCursorObjCClassRef(CXCursor C); - -/// \brief Create a type reference at the given location. -CXCursor MakeCursorTypeRef(TypeDecl *Type, SourceLocation Loc, ASTUnit *TU); - -/// \brief Unpack a TypeRef cursor into the class it references -/// and optionally the location where the reference occurred. -std::pair getCursorTypeRef(CXCursor C); - -/// \brief Create a preprocessing directive cursor. -CXCursor MakePreprocessingDirectiveCursor(SourceRange Range, ASTUnit *TU); - -/// \brief Unpack a given preprocessing directive to retrieve its source range. -SourceRange getCursorPreprocessingDirective(CXCursor C); - -/// \brief Create a macro definition cursor. -CXCursor MakeMacroDefinitionCursor(MacroDefinition *, ASTUnit *TU); - -/// \brief Unpack a given macro definition cursor to retrieve its -/// source range. -MacroDefinition *getCursorMacroDefinition(CXCursor C); - -/// \brief Create a macro instantiation cursor. -CXCursor MakeMacroInstantiationCursor(MacroInstantiation *, ASTUnit *TU); - -/// \brief Unpack a given macro instantiation cursor to retrieve its -/// source range. -MacroInstantiation *getCursorMacroInstantiation(CXCursor C); - -Decl *getCursorDecl(CXCursor Cursor); -Expr *getCursorExpr(CXCursor Cursor); -Stmt *getCursorStmt(CXCursor Cursor); -ASTContext &getCursorContext(CXCursor Cursor); -ASTUnit *getCursorASTUnit(CXCursor Cursor); - -bool operator==(CXCursor X, CXCursor Y); - -inline bool operator!=(CXCursor X, CXCursor Y) { - return !(X == Y); -} - -}} // end namespace: clang::cxcursor - -#endif diff --git a/tools/CIndex/CXSourceLocation.h b/tools/CIndex/CXSourceLocation.h deleted file mode 100644 index 66566c12689..00000000000 --- a/tools/CIndex/CXSourceLocation.h +++ /dev/null @@ -1,75 +0,0 @@ -//===- CXSourceLocation.h - CXSourceLocations Utilities ---------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file defines routines for manipulating CXSourceLocations. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_CLANG_CXSOURCELOCATION_H -#define LLVM_CLANG_CXSOURCELOCATION_H - -#include "clang-c/Index.h" -#include "clang/Basic/SourceLocation.h" -#include "clang/Basic/LangOptions.h" -#include "clang/AST/ASTContext.h" - -namespace clang { - -class SourceManager; - -namespace cxloc { - -/// \brief Translate a Clang source location into a CIndex source location. -static inline CXSourceLocation -translateSourceLocation(const SourceManager &SM, const LangOptions &LangOpts, - SourceLocation Loc) { - CXSourceLocation Result = { { (void*) &SM, (void*) &LangOpts, }, - Loc.getRawEncoding() }; - return Result; -} - -/// \brief Translate a Clang source location into a CIndex source location. -static inline CXSourceLocation translateSourceLocation(ASTContext &Context, - SourceLocation Loc) { - return translateSourceLocation(Context.getSourceManager(), - Context.getLangOptions(), - Loc); -} - -/// \brief Translate a Clang source range into a CIndex source range. -/// -/// Clang internally represents ranges where the end location points to the -/// start of the token at the end. However, for external clients it is more -/// useful to have a CXSourceRange be a proper half-open interval. This routine -/// does the appropriate translation. -CXSourceRange translateSourceRange(const SourceManager &SM, - const LangOptions &LangOpts, - SourceRange R); - -/// \brief Translate a Clang source range into a CIndex source range. -static inline CXSourceRange translateSourceRange(ASTContext &Context, - SourceRange R) { - return translateSourceRange(Context.getSourceManager(), - Context.getLangOptions(), - R); -} - -static inline SourceLocation translateSourceLocation(CXSourceLocation L) { - return SourceLocation::getFromRawEncoding(L.int_data); -} - -static inline SourceRange translateCXSourceRange(CXSourceRange R) { - return SourceRange(SourceLocation::getFromRawEncoding(R.begin_int_data), - SourceLocation::getFromRawEncoding(R.end_int_data)); -} - - -}} // end namespace: clang::cxloc - -#endif diff --git a/tools/CIndex/Makefile b/tools/CIndex/Makefile deleted file mode 100644 index 391746d4d4f..00000000000 --- a/tools/CIndex/Makefile +++ /dev/null @@ -1,55 +0,0 @@ -##===- tools/CIndex/Makefile -------------------------------*- Makefile -*-===## -# -# The LLVM Compiler Infrastructure -# -# This file is distributed under the University of Illinois Open Source -# License. See LICENSE.TXT for details. -# -##===----------------------------------------------------------------------===## - -LEVEL = ../../../.. -LIBRARYNAME = CIndex - -EXPORTED_SYMBOL_FILE = $(PROJ_SRC_DIR)/CIndex.exports - -CPP.Flags += -I$(PROJ_SRC_DIR)/../../include -I$(PROJ_OBJ_DIR)/../../include - -# Include this here so we can get the configuration of the targets -# that have been configured for construction. We have to do this -# early so we can set up LINK_COMPONENTS before including Makefile.rules -include $(LEVEL)/Makefile.config - -LINK_LIBS_IN_SHARED = 1 -SHARED_LIBRARY = 1 - -LINK_COMPONENTS := bitreader mc core -USEDLIBS = clangFrontend.a clangDriver.a clangSema.a \ - clangAnalysis.a clangAST.a clangParse.a clangLex.a clangBasic.a - -include $(LEVEL)/Makefile.common - -##===----------------------------------------------------------------------===## -# FIXME: This is copied from the 'lto' makefile. Should we share this? -##===----------------------------------------------------------------------===## - -ifeq ($(HOST_OS),Darwin) - # set dylib internal version number to llvmCore submission number - ifdef LLVM_SUBMIT_VERSION - LLVMLibsOptions := $(LLVMLibsOptions) -Wl,-current_version \ - -Wl,$(LLVM_SUBMIT_VERSION).$(LLVM_SUBMIT_SUBVERSION) \ - -Wl,-compatibility_version -Wl,1 - endif - # extra options to override libtool defaults - LLVMLibsOptions := $(LLVMLibsOptions) \ - -avoid-version \ - -Wl,-dead_strip \ - -Wl,-seg1addr -Wl,0xE0000000 - - # Mac OS X 10.4 and earlier tools do not allow a second -install_name on command line - DARWIN_VERS := $(shell echo $(TARGET_TRIPLE) | sed 's/.*darwin\([0-9]*\).*/\1/') - ifneq ($(DARWIN_VERS),8) - LLVMLibsOptions := $(LLVMLibsOptions) \ - -no-undefined -Wl,-install_name \ - -Wl,"@executable_path/../lib/lib$(LIBRARYNAME)$(SHLIBEXT)" - endif -endif diff --git a/tools/index-test/CMakeLists.txt b/tools/index-test/CMakeLists.txt deleted file mode 100644 index 9472e580fbc..00000000000 --- a/tools/index-test/CMakeLists.txt +++ /dev/null @@ -1,23 +0,0 @@ -set(LLVM_NO_RTTI 1) - -set( LLVM_USED_LIBS - clangIndex - clangFrontend - clangDriver - clangSema - clangAnalysis - clangAST - clangParse - clangLex - clangBasic - ) - -set( LLVM_LINK_COMPONENTS - bitreader - mc - core - ) - -add_clang_executable(index-test - index-test.cpp - ) diff --git a/tools/index-test/Makefile b/tools/index-test/Makefile deleted file mode 100644 index 4ee98fc7cc9..00000000000 --- a/tools/index-test/Makefile +++ /dev/null @@ -1,25 +0,0 @@ -##===- tools/index-test/Makefile ---------------------------*- Makefile -*-===## -# -# The LLVM Compiler Infrastructure -# -# This file is distributed under the University of Illinois Open Source -# License. See LICENSE.TXT for details. -# -##===----------------------------------------------------------------------===## -LEVEL = ../../../.. - -TOOLNAME = index-test -CPPFLAGS += -I$(PROJ_SRC_DIR)/../../include -I$(PROJ_OBJ_DIR)/../../include -CXXFLAGS = -fno-rtti -NO_INSTALL = 1 - -# No plugins, optimize startup time. -TOOL_NO_EXPORTS = 1 - -include $(LEVEL)/Makefile.config - -LINK_COMPONENTS := bitreader mc core -USEDLIBS = clangIndex.a clangFrontend.a clangDriver.a clangSema.a \ - clangAnalysis.a clangAST.a clangParse.a clangLex.a clangBasic.a - -include $(LLVM_SRC_ROOT)/Makefile.rules diff --git a/tools/index-test/index-test.cpp b/tools/index-test/index-test.cpp deleted file mode 100644 index ff9fd543115..00000000000 --- a/tools/index-test/index-test.cpp +++ /dev/null @@ -1,334 +0,0 @@ -//===--- index-test.cpp - Indexing test bed -------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This utility may be invoked in the following manner: -// index-test --help - Output help info. -// index-test [options] - Read from stdin. -// index-test [options] file - Read from "file". -// index-test [options] file1 file2 - Read these files. -// -// Files must be AST files. -// -//===----------------------------------------------------------------------===// -// -// -point-at [file:line:column] -// Point at a declaration/statement/expression. If no other operation is -// specified, prints some info about it. -// -// -print-refs -// Print ASTLocations that reference the -point-at node -// -// -print-defs -// Print ASTLocations that define the -point-at node -// -// -print-decls -// Print ASTLocations that declare the -point-at node -// -//===----------------------------------------------------------------------===// - -#include "clang/Index/Program.h" -#include "clang/Index/Indexer.h" -#include "clang/Index/Entity.h" -#include "clang/Index/TranslationUnit.h" -#include "clang/Index/ASTLocation.h" -#include "clang/Index/DeclReferenceMap.h" -#include "clang/Index/SelectorMap.h" -#include "clang/Index/Handlers.h" -#include "clang/Index/Analyzer.h" -#include "clang/Index/Utils.h" -#include "clang/Frontend/ASTUnit.h" -#include "clang/Frontend/CompilerInstance.h" -#include "clang/Frontend/CompilerInvocation.h" -#include "clang/Frontend/DiagnosticOptions.h" -#include "clang/Frontend/TextDiagnosticPrinter.h" -#include "clang/Frontend/CommandLineSourceLoc.h" -#include "clang/AST/DeclObjC.h" -#include "clang/AST/ExprObjC.h" -#include "clang/Basic/FileManager.h" -#include "clang/Basic/SourceManager.h" -#include "llvm/Support/CommandLine.h" -#include "llvm/Support/ManagedStatic.h" -#include "llvm/Support/PrettyStackTrace.h" -#include "llvm/Support/raw_ostream.h" -#include "llvm/System/Signals.h" -using namespace clang; -using namespace idx; - -class TUnit : public TranslationUnit { -public: - TUnit(ASTUnit *ast, const std::string &filename) - : AST(ast), Filename(filename), - DeclRefMap(ast->getASTContext()), - SelMap(ast->getASTContext()) { } - - virtual ASTContext &getASTContext() { return AST->getASTContext(); } - virtual DeclReferenceMap &getDeclReferenceMap() { return DeclRefMap; } - virtual SelectorMap &getSelectorMap() { return SelMap; } - - llvm::OwningPtr AST; - std::string Filename; - DeclReferenceMap DeclRefMap; - SelectorMap SelMap; -}; - -static llvm::cl::list -PointAtLocation("point-at", llvm::cl::Optional, - llvm::cl::value_desc("source-location"), - llvm::cl::desc("Point at the given source location of the first AST file")); - -enum ProgActions { - PrintPoint, // Just print the point-at node - PrintRefs, // Print references of the point-at node - PrintDefs, // Print definitions of the point-at node - PrintDecls // Print declarations of the point-at node -}; - -static llvm::cl::opt -ProgAction( - llvm::cl::desc("Choose action to perform on the pointed-at AST node:"), - llvm::cl::ZeroOrMore, - llvm::cl::init(PrintPoint), - llvm::cl::values( - clEnumValN(PrintRefs, "print-refs", - "Print references"), - clEnumValN(PrintDefs, "print-defs", - "Print definitions"), - clEnumValN(PrintDecls, "print-decls", - "Print declarations"), - clEnumValEnd)); - -static llvm::cl::opt -DisableFree("disable-free", - llvm::cl::desc("Disable freeing of memory on exit"), - llvm::cl::init(false)); - -static bool HadErrors = false; - -static void ProcessObjCMessage(ObjCMessageExpr *Msg, Indexer &Idxer) { - llvm::raw_ostream &OS = llvm::outs(); - typedef Storing ResultsTy; - ResultsTy Results; - - Analyzer Analyz(Idxer.getProgram(), Idxer); - - switch (ProgAction) { - default: assert(0); - case PrintRefs: - llvm::errs() << "Error: Cannot -print-refs on a ObjC message expression\n"; - HadErrors = true; - return; - - case PrintDecls: { - Analyz.FindObjCMethods(Msg, Results); - for (ResultsTy::iterator - I = Results.begin(), E = Results.end(); I != E; ++I) - I->print(OS); - break; - } - - case PrintDefs: { - Analyz.FindObjCMethods(Msg, Results); - for (ResultsTy::iterator - I = Results.begin(), E = Results.end(); I != E; ++I) { - const ObjCMethodDecl *D = cast(I->AsDecl()); - if (D->isThisDeclarationADefinition()) - I->print(OS); - } - break; - } - - } -} - -static void ProcessASTLocation(ASTLocation ASTLoc, Indexer &Idxer) { - assert(ASTLoc.isValid()); - - if (ObjCMessageExpr *Msg = - dyn_cast_or_null(ASTLoc.dyn_AsStmt())) - return ProcessObjCMessage(Msg, Idxer); - - Decl *D = ASTLoc.getReferencedDecl(); - if (D == 0) { - llvm::errs() << "Error: Couldn't get referenced Decl for the ASTLocation\n"; - HadErrors = true; - return; - } - - llvm::raw_ostream &OS = llvm::outs(); - typedef Storing ResultsTy; - ResultsTy Results; - - Analyzer Analyz(Idxer.getProgram(), Idxer); - - switch (ProgAction) { - default: assert(0); - case PrintRefs: { - Analyz.FindReferences(D, Results); - for (ResultsTy::iterator - I = Results.begin(), E = Results.end(); I != E; ++I) - I->print(OS); - break; - } - - case PrintDecls: { - Analyz.FindDeclarations(D, Results); - for (ResultsTy::iterator - I = Results.begin(), E = Results.end(); I != E; ++I) - I->print(OS); - break; - } - - case PrintDefs: { - Analyz.FindDeclarations(D, Results); - for (ResultsTy::iterator - I = Results.begin(), E = Results.end(); I != E; ++I) { - const Decl *D = I->AsDecl(); - bool isDef = false; - if (const FunctionDecl *FD = dyn_cast(D)) - isDef = FD->isThisDeclarationADefinition(); - else if (const VarDecl *VD = dyn_cast(D)) - isDef = VD->getInit() != 0; - else if (const ObjCMethodDecl *MD = dyn_cast(D)) - isDef = MD->isThisDeclarationADefinition(); - - if (isDef) - I->print(OS); - } - break; - } - - } -} - -static llvm::cl::opt -ASTFromSource("ast-from-source", - llvm::cl::desc("Treat the inputs as source files to parse")); - -static llvm::cl::list -CompilerArgs("arg", llvm::cl::desc("Extra arguments to use during parsing")); - -static llvm::cl::list -InputFilenames(llvm::cl::Positional, llvm::cl::desc("")); - -ASTUnit *CreateFromSource(const std::string &Filename, Diagnostic &Diags, - const char *Argv0) { - llvm::SmallVector Args; - Args.push_back(Filename.c_str()); - for (unsigned i = 0, e = CompilerArgs.size(); i != e; ++i) - Args.push_back(CompilerArgs[i].c_str()); - - void *MainAddr = (void*) (intptr_t) CreateFromSource; - std::string ResourceDir = - CompilerInvocation::GetResourcesPath(Argv0, MainAddr); - return ASTUnit::LoadFromCommandLine(Args.data(), Args.data() + Args.size(), - Diags, ResourceDir); -} - -int main(int argc, char **argv) { - llvm::sys::PrintStackTraceOnErrorSignal(); - llvm::PrettyStackTraceProgram X(argc, argv); - llvm::cl::ParseCommandLineOptions(argc, argv, - "LLVM 'Clang' Indexing Test Bed: http://clang.llvm.org\n"); - - Program Prog; - Indexer Idxer(Prog); - llvm::SmallVector TUnits; - - DiagnosticOptions DiagOpts; - llvm::OwningPtr Diags( - CompilerInstance::createDiagnostics(DiagOpts, argc, argv)); - - // If no input was specified, read from stdin. - if (InputFilenames.empty()) - InputFilenames.push_back("-"); - - for (unsigned i = 0, e = InputFilenames.size(); i != e; ++i) { - const std::string &InFile = InputFilenames[i]; - llvm::OwningPtr AST; - if (ASTFromSource) - AST.reset(CreateFromSource(InFile, *Diags, argv[0])); - else - AST.reset(ASTUnit::LoadFromPCHFile(InFile, *Diags)); - if (!AST) - return 1; - - TUnit *TU = new TUnit(AST.take(), InFile); - TUnits.push_back(TU); - - Idxer.IndexAST(TU); - } - - ASTLocation ASTLoc; - const std::string &FirstFile = TUnits[0]->Filename; - ASTUnit *FirstAST = TUnits[0]->AST.get(); - - if (!PointAtLocation.empty()) { - const std::string &Filename = PointAtLocation[0].FileName; - const FileEntry *File = FirstAST->getFileManager().getFile(Filename); - if (File == 0) { - llvm::errs() << "File '" << Filename << "' does not exist\n"; - return 1; - } - - // Safety check. Using an out-of-date AST file will only lead to crashes - // or incorrect results. - // FIXME: Check all the source files that make up the AST file. - const FileEntry *ASTFile = FirstAST->getFileManager().getFile(FirstFile); - if (File->getModificationTime() > ASTFile->getModificationTime()) { - llvm::errs() << "[" << FirstFile << "] Error: " << - "Pointing at a source file which was modified after creating " - "the AST file\n"; - return 1; - } - - unsigned Line = PointAtLocation[0].Line; - unsigned Col = PointAtLocation[0].Column; - - SourceLocation Loc = - FirstAST->getSourceManager().getLocation(File, Line, Col); - if (Loc.isInvalid()) { - llvm::errs() << "[" << FirstFile << "] Error: " << - "Couldn't resolve source location (invalid location)\n"; - return 1; - } - - ASTLoc = ResolveLocationInAST(FirstAST->getASTContext(), Loc); - if (ASTLoc.isInvalid()) { - llvm::errs() << "[" << FirstFile << "] Error: " << - "Couldn't resolve source location (no declaration found)\n"; - return 1; - } - } - - if (ASTLoc.isValid()) { - if (ProgAction == PrintPoint) { - llvm::raw_ostream &OS = llvm::outs(); - ASTLoc.print(OS); - if (const char *Comment = - FirstAST->getASTContext().getCommentForDecl(ASTLoc.dyn_AsDecl())) - OS << "Comment associated with this declaration:\n" << Comment << "\n"; - } else { - ProcessASTLocation(ASTLoc, Idxer); - } - } - - if (HadErrors) - return 1; - - if (!DisableFree) { - for (int i=0, e=TUnits.size(); i != e; ++i) - delete TUnits[i]; - } - - // Managed static deconstruction. Useful for making things like - // -time-passes usable. - llvm::llvm_shutdown(); - - return 0; -} diff --git a/utils/pch-test.pl b/utils/pch-test.pl deleted file mode 100755 index 2e17117a2a2..00000000000 --- a/utils/pch-test.pl +++ /dev/null @@ -1,61 +0,0 @@ -#!/usr/bin/perl -w - -# This tiny little script, which should be run from the clang -# directory (with clang-cc in your patch), tries to take each -# compilable Clang test and build a PCH file from that test, then read -# and dump the contents of the PCH file just created. -use POSIX; - -$exitcode = 0; -sub testfiles($$) { - my $suffix = shift; - my $language = shift; - my $passed = 0; - my $failed = 0; - my $skipped = 0; - - @files = `ls test/*/*.$suffix`; - foreach $file (@files) { - chomp($file); - my $code = system("clang-cc -fsyntax-only -x $language $file > /dev/null 2>&1"); - if ($code == 0) { - print("."); - $code = system("clang-cc -emit-pch -x $language -o $file.pch $file > /dev/null 2>&1"); - if ($code == 0) { - $code = system("clang-cc -include-pch $file.pch -x $language -ast-dump /dev/null > /dev/null 2>&1"); - if ($code == 0) { - $passed++; - } elsif (($code & 0xFF) == SIGINT) { - exit($exitcode); - } else { - print("\n---Failed to dump AST file for \"$file\"---\n"); - $exitcode = 1; - $failed++; - } - unlink "$file.pch"; - } elsif (($code & 0xFF) == SIGINT) { - exit($exitcode); - } else { - print("\n---Failed to build PCH file for \"$file\"---\n"); - $exitcode = 1; - $failed++; - } - } elsif (($code & 0xFF) == SIGINT) { - exit($exitcode); - } else { - print("x"); - $skipped++; - } - } - - print("\n\n$passed tests passed\n"); - print("$failed tests failed\n"); - print("$skipped tests skipped ('x')\n") -} - -printf("-----Testing precompiled headers for C-----\n"); -testfiles("c", "c"); -printf("\n-----Testing precompiled headers for Objective-C-----\n"); -testfiles("m", "objective-c"); -print("\n"); -exit($exitcode); diff --git a/win32/clangAST/clangAST.vcproj b/win32/clangAST/clangAST.vcproj deleted file mode 100644 index 8795412ba8c..00000000000 --- a/win32/clangAST/clangAST.vcproj +++ /dev/null @@ -1,347 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/win32/clangAnalysis/clangAnalysis.vcproj b/win32/clangAnalysis/clangAnalysis.vcproj deleted file mode 100644 index c9850e059cf..00000000000 --- a/win32/clangAnalysis/clangAnalysis.vcproj +++ /dev/null @@ -1,351 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/win32/clangBasic/clangBasic.vcproj b/win32/clangBasic/clangBasic.vcproj deleted file mode 100644 index d836a6604c7..00000000000 --- a/win32/clangBasic/clangBasic.vcproj +++ /dev/null @@ -1,236 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/win32/clangCodeGen/clangCodeGen.vcproj b/win32/clangCodeGen/clangCodeGen.vcproj deleted file mode 100644 index a819fd94d86..00000000000 --- a/win32/clangCodeGen/clangCodeGen.vcproj +++ /dev/null @@ -1,271 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/win32/clangDriver/clangDriver.vcproj b/win32/clangDriver/clangDriver.vcproj deleted file mode 100644 index 0a744bbe4e9..00000000000 --- a/win32/clangDriver/clangDriver.vcproj +++ /dev/null @@ -1,270 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/win32/clangLex/clangLex.vcproj b/win32/clangLex/clangLex.vcproj deleted file mode 100644 index 5bec4b8b8e7..00000000000 --- a/win32/clangLex/clangLex.vcproj +++ /dev/null @@ -1,283 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/win32/clangLibDriver/clangLibDriver.vcproj b/win32/clangLibDriver/clangLibDriver.vcproj deleted file mode 100644 index de42ef72a78..00000000000 --- a/win32/clangLibDriver/clangLibDriver.vcproj +++ /dev/null @@ -1,205 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/win32/clangParse/clangParse.vcproj b/win32/clangParse/clangParse.vcproj deleted file mode 100644 index 4cf55253054..00000000000 --- a/win32/clangParse/clangParse.vcproj +++ /dev/null @@ -1,248 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/win32/clangRewrite/clangRewrite.vcproj b/win32/clangRewrite/clangRewrite.vcproj deleted file mode 100644 index 7b1f898f9d6..00000000000 --- a/win32/clangRewrite/clangRewrite.vcproj +++ /dev/null @@ -1,191 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/win32/clangSema/clangSema.vcproj b/win32/clangSema/clangSema.vcproj deleted file mode 100644 index 572c3effcaf..00000000000 --- a/win32/clangSema/clangSema.vcproj +++ /dev/null @@ -1,263 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/www/analyzer/menu.js b/www/analyzer/menu.js deleted file mode 100644 index 6b393c081c8..00000000000 --- a/www/analyzer/menu.js +++ /dev/null @@ -1,17 +0,0 @@ -startList = function() { - if (document.all&&document.getElementById) { - navRoot = document.getElementById("nav"); - for (i=0; i Date: Fri, 17 Sep 2010 15:48:55 +0000 Subject: [PATCH 3/4] Vendor import of llvm r114020 (from the release_28 branch): http://llvm.org/svn/llvm-project/llvm/branches/release_28@114020 Approved by: rpaulo (mentor) --- CMakeLists.txt | 42 +- CREDITS.TXT | 32 +- Makefile | 14 +- Makefile.config.in | 18 +- Makefile.rules | 264 +- README.txt | 3 +- autoconf/configure.ac | 86 +- autoconf/m4/link_options.m4 | 21 + bindings/ada/llvm/llvm.ads | 36 +- bindings/ocaml/llvm/llvm.ml | 12 +- bindings/ocaml/llvm/llvm.mli | 28 +- bindings/ocaml/llvm/llvm_ocaml.c | 30 +- cmake/config-ix.cmake | 10 + cmake/modules/CMakeLists.txt | 12 + cmake/modules/ChooseMSVCCRT.cmake | 106 + cmake/modules/LLVM.cmake | 29 + cmake/modules/LLVMConfig.cmake | 48 +- cmake/modules/LLVMLibDeps.cmake | 33 +- cmake/modules/VersionFromVCS.cmake | 33 + configure | 155 +- docs/AliasAnalysis.html | 10 +- docs/BitCodeFormat.html | 17 +- docs/CMake.html | 45 +- docs/CodeGenerator.html | 6 +- docs/CommandGuide/bugpoint.pod | 4 + docs/CommandGuide/index.html | 5 +- docs/CommandGuide/llvm-diff.pod | 53 + docs/DeveloperPolicy.html | 54 +- docs/GCCFEBuildInstrs.html | 16 +- docs/GetElementPtr.html | 13 +- docs/GoldPlugin.html | 8 +- docs/LangRef.html | 129 +- docs/MakefileGuide.html | 5 +- docs/Passes.html | 49 +- docs/ProgrammersManual.html | 6 +- docs/ReleaseNotes.html | 598 +-- docs/TestingGuide.html | 229 +- docs/WritingAnLLVMBackend.html | 5 +- docs/WritingAnLLVMPass.html | 59 +- docs/tutorial/LangImpl3.html | 10 +- docs/tutorial/LangImpl5.html | 6 +- docs/tutorial/LangImpl6.html | 4 +- docs/tutorial/LangImpl7.html | 6 +- examples/BrainF/BrainF.cpp | 11 +- examples/Fibonacci/fibonacci.cpp | 14 +- examples/Makefile | 9 +- include/llvm-c/Core.h | 20 +- include/llvm-c/EnhancedDisassembly.h | 17 +- include/llvm-c/ExecutionEngine.h | 2 + include/llvm-c/Target.h | 47 +- include/llvm-c/lto.h | 24 +- include/llvm/ADT/APInt.h | 4 +- include/llvm/ADT/DenseMap.h | 3 +- include/llvm/ADT/DenseSet.h | 6 + include/llvm/ADT/DepthFirstIterator.h | 10 + include/llvm/ADT/FoldingSet.h | 177 +- include/llvm/ADT/ImmutableIntervalMap.h | 10 +- include/llvm/ADT/NullablePtr.h | 52 + include/llvm/ADT/STLExtras.h | 4 +- include/llvm/ADT/ScopedHashTable.h | 7 +- include/llvm/ADT/SmallVector.h | 32 +- include/llvm/ADT/StringMap.h | 4 + include/llvm/ADT/StringRef.h | 13 +- include/llvm/ADT/StringSet.h | 7 +- include/llvm/ADT/StringSwitch.h | 20 + include/llvm/ADT/Triple.h | 32 +- include/llvm/ADT/ValueMap.h | 18 +- include/llvm/ADT/ilist.h | 1 - include/llvm/Analysis/AliasAnalysis.h | 109 +- include/llvm/Analysis/AliasSetTracker.h | 10 +- include/llvm/Analysis/DOTGraphTraitsPass.h | 4 +- include/llvm/Analysis/DebugInfo.h | 61 +- include/llvm/Analysis/Dominators.h | 9 +- include/llvm/Analysis/FindUsedTypes.h | 2 +- include/llvm/Analysis/IntervalPartition.h | 2 +- include/llvm/Analysis/LazyValueInfo.h | 12 +- include/llvm/Analysis/LibCallAliasAnalysis.h | 25 +- include/llvm/Analysis/LibCallSemantics.h | 5 +- .../llvm/Analysis/LoopDependenceAnalysis.h | 2 +- include/llvm/Analysis/LoopInfo.h | 26 +- include/llvm/Analysis/LoopPass.h | 12 +- include/llvm/Analysis/Passes.h | 18 +- include/llvm/Analysis/PointerTracking.h | 1 + include/llvm/Analysis/PostDominators.h | 4 +- include/llvm/Analysis/RegionInfo.h | 630 ++++ include/llvm/Analysis/RegionIterator.h | 342 ++ include/llvm/Analysis/RegionPrinter.h | 26 + include/llvm/Analysis/ScalarEvolution.h | 47 +- .../llvm/Analysis/ScalarEvolutionExpander.h | 14 +- .../Analysis/ScalarEvolutionExpressions.h | 48 +- include/llvm/Analysis/ValueTracking.h | 19 - ...ionWriter.h => AssemblyAnnotationWriter.h} | 17 +- include/llvm/AutoUpgrade.h | 5 + include/llvm/Bitcode/Archive.h | 6 +- include/llvm/Bitcode/BitstreamWriter.h | 8 +- include/llvm/Bitcode/LLVMBitCodes.h | 31 +- include/llvm/CallGraphSCCPass.h | 5 +- include/llvm/CodeGen/AsmPrinter.h | 13 +- include/llvm/CodeGen/CalcSpillWeights.h | 29 +- include/llvm/CodeGen/CallingConvLower.h | 6 + include/llvm/CodeGen/FunctionLoweringInfo.h | 10 + include/llvm/CodeGen/ISDOpcodes.h | 9 +- include/llvm/CodeGen/LiveInterval.h | 37 +- include/llvm/CodeGen/LiveIntervalAnalysis.h | 48 +- include/llvm/CodeGen/LiveStackAnalysis.h | 2 +- include/llvm/CodeGen/LiveVariables.h | 2 +- include/llvm/CodeGen/MachineFrameInfo.h | 167 +- include/llvm/CodeGen/MachineFunction.h | 2 +- include/llvm/CodeGen/MachineFunctionPass.h | 3 +- include/llvm/CodeGen/MachineInstr.h | 6 +- include/llvm/CodeGen/MachineLoopInfo.h | 2 +- include/llvm/CodeGen/MachineModuleInfo.h | 2 +- include/llvm/CodeGen/Passes.h | 62 +- include/llvm/CodeGen/ProcessImplicitDefs.h | 2 +- include/llvm/CodeGen/SchedulerRegistry.h | 13 +- include/llvm/CodeGen/SelectionDAG.h | 4 - include/llvm/CodeGen/SlotIndexes.h | 45 +- .../CodeGen/TargetLoweringObjectFileImpl.h | 1 - include/llvm/CodeGen/ValueTypes.h | 112 +- include/llvm/CompilerDriver/Action.h | 14 +- include/llvm/CompilerDriver/AutoGenerated.h | 40 + include/llvm/CompilerDriver/BuiltinOptions.h | 4 + include/llvm/CompilerDriver/Common.td | 43 +- .../llvm/CompilerDriver/CompilationGraph.h | 95 +- include/llvm/CompilerDriver/Error.h | 20 +- include/llvm/CompilerDriver/ForceLinkage.h | 122 - .../llvm/CompilerDriver/ForceLinkageMacros.h | 29 - include/llvm/CompilerDriver/Main.h | 21 + include/llvm/CompilerDriver/Main.inc | 14 +- include/llvm/CompilerDriver/Plugin.h | 81 - include/llvm/CompilerDriver/Tool.h | 38 +- include/llvm/Config/config.h.cmake | 20 +- include/llvm/Config/config.h.in | 17 + include/llvm/Config/llvm-config.h.cmake | 97 + include/llvm/Config/llvm-config.h.in | 97 + include/llvm/Constants.h | 44 - include/llvm/DerivedTypes.h | 66 +- .../llvm/ExecutionEngine/JITMemoryManager.h | 9 +- include/llvm/GlobalValue.h | 46 +- include/llvm/Instruction.h | 12 +- include/llvm/Instructions.h | 96 +- include/llvm/IntrinsicInst.h | 16 +- include/llvm/Intrinsics.td | 69 +- include/llvm/IntrinsicsARM.td | 119 +- include/llvm/IntrinsicsPowerPC.td | 47 +- include/llvm/IntrinsicsX86.td | 482 ++- include/llvm/LLVMContext.h | 5 +- include/llvm/LinkAllPasses.h | 12 +- include/llvm/LinkAllVMCore.h | 1 - include/llvm/Linker.h | 1 - include/llvm/MC/ELFObjectWriter.h | 46 + include/llvm/MC/MCAsmInfo.h | 14 + include/llvm/MC/MCAssembler.h | 23 +- include/llvm/MC/MCContext.h | 60 +- include/llvm/MC/MCDwarf.h | 156 + include/llvm/MC/MCELFSymbolFlags.h | 54 + include/llvm/MC/MCObjectStreamer.h | 11 + include/llvm/MC/MCObjectWriter.h | 2 +- include/llvm/MC/MCParser/AsmParser.h | 152 - include/llvm/MC/MCParser/MCAsmParser.h | 30 +- .../llvm/MC/MCParser/MCAsmParserExtension.h | 18 +- include/llvm/MC/MCParser/MCParsedAsmOperand.h | 8 +- include/llvm/MC/MCSectionELF.h | 10 +- include/llvm/MC/MCStreamer.h | 30 +- include/llvm/Metadata.h | 56 +- include/llvm/Module.h | 29 +- include/llvm/Pass.h | 71 +- include/llvm/PassAnalysisSupport.h | 50 +- include/llvm/PassManager.h | 1 - include/llvm/PassManagers.h | 58 +- include/llvm/PassRegistry.h | 71 + include/llvm/PassSupport.h | 41 +- include/llvm/Support/COFF.h | 87 +- include/llvm/Support/CallSite.h | 63 +- include/llvm/Support/Casting.h | 67 - include/llvm/Support/CommandLine.h | 27 +- include/llvm/Support/Compiler.h | 5 +- include/llvm/Support/ConstantRange.h | 38 +- include/llvm/Support/CrashRecoveryContext.h | 84 + include/llvm/Support/DataFlow.h | 2 +- include/llvm/Support/ELF.h | 83 +- include/llvm/Support/ErrorHandling.h | 12 + include/llvm/Support/GraphWriter.h | 12 +- include/llvm/Support/IRBuilder.h | 20 - include/llvm/Support/IRReader.h | 10 +- include/llvm/Support/MachO.h | 638 ++++ include/llvm/Support/MathExtras.h | 6 +- include/llvm/Support/PassNameParser.h | 24 +- include/llvm/Support/PatternMatch.h | 7 + include/llvm/Support/PrettyStackTrace.h | 14 +- include/llvm/Support/Regex.h | 15 +- include/llvm/Support/Registry.h | 2 + include/llvm/Support/SlowOperationInformer.h | 65 - include/llvm/Support/SourceMgr.h | 4 +- include/llvm/Support/StandardPasses.h | 3 +- include/llvm/Support/SystemUtils.h | 7 +- include/llvm/Support/TypeBuilder.h | 2 +- include/llvm/Support/raw_ostream.h | 125 +- include/llvm/System/Memory.h | 1 - include/llvm/System/Path.h | 5 +- include/llvm/System/Process.h | 2 - include/llvm/System/Program.h | 3 - include/llvm/System/Signals.h | 4 + include/llvm/System/ThreadLocal.h | 13 + include/llvm/Target/Target.td | 7 +- include/llvm/Target/TargetAsmParser.h | 14 +- include/llvm/Target/TargetCallingConv.td | 9 +- include/llvm/Target/TargetData.h | 42 +- include/llvm/Target/TargetInstrDesc.h | 14 +- include/llvm/Target/TargetInstrInfo.h | 53 +- include/llvm/Target/TargetLowering.h | 140 +- include/llvm/Target/TargetMachine.h | 38 +- include/llvm/Target/TargetOpcodes.h | 2 +- include/llvm/Target/TargetOptions.h | 23 +- include/llvm/Target/TargetRegisterInfo.h | 67 +- include/llvm/Target/TargetRegistry.h | 17 +- include/llvm/Target/TargetSelect.h | 25 +- include/llvm/Transforms/IPO.h | 5 +- include/llvm/Transforms/IPO/InlinerPass.h | 4 +- include/llvm/Transforms/Scalar.h | 47 +- include/llvm/Transforms/Utils/Cloning.h | 15 +- include/llvm/Transforms/Utils/Local.h | 2 - include/llvm/Transforms/Utils/SSAUpdater.h | 18 +- include/llvm/Transforms/Utils/SSI.h | 93 - .../Transforms/Utils/UnifyFunctionExitNodes.h | 2 +- .../llvm}/Transforms/Utils/ValueMapper.h | 12 +- include/llvm/Type.h | 18 +- include/llvm/Use.h | 24 - include/llvm/Value.h | 6 +- include/llvm/ValueSymbolTable.h | 88 - lib/Analysis/AliasAnalysis.cpp | 241 +- lib/Analysis/AliasAnalysisCounter.cpp | 20 +- lib/Analysis/AliasAnalysisEvaluator.cpp | 50 +- lib/Analysis/AliasDebugger.cpp | 17 +- lib/Analysis/AliasSetTracker.cpp | 153 +- lib/Analysis/BasicAliasAnalysis.cpp | 586 ++- lib/Analysis/CFGPrinter.cpp | 30 +- lib/Analysis/CMakeLists.txt | 3 + lib/Analysis/CaptureTracking.cpp | 2 +- lib/Analysis/ConstantFolding.cpp | 4 +- lib/Analysis/DbgInfoPrinter.cpp | 6 +- lib/Analysis/DebugInfo.cpp | 192 +- lib/Analysis/DomPrinter.cpp | 65 +- lib/Analysis/IPA/CallGraph.cpp | 15 +- lib/Analysis/IPA/CallGraphSCCPass.cpp | 12 +- lib/Analysis/IPA/FindUsedTypes.cpp | 4 +- lib/Analysis/IPA/GlobalsModRef.cpp | 81 +- lib/Analysis/IVUsers.cpp | 39 +- lib/Analysis/InlineCost.cpp | 8 +- lib/Analysis/InstCount.cpp | 6 +- lib/Analysis/IntervalPartition.cpp | 6 +- lib/Analysis/LazyValueInfo.cpp | 587 ++- lib/Analysis/LibCallAliasAnalysis.cpp | 14 +- lib/Analysis/LibCallSemantics.cpp | 3 +- lib/Analysis/Lint.cpp | 11 +- lib/Analysis/LiveValues.cpp | 6 +- lib/Analysis/LoopDependenceAnalysis.cpp | 4 +- lib/Analysis/LoopInfo.cpp | 45 +- lib/Analysis/LoopPass.cpp | 16 +- lib/Analysis/MemoryDependenceAnalysis.cpp | 44 +- lib/Analysis/ModuleDebugInfoPrinter.cpp | 7 +- lib/Analysis/PointerTracking.cpp | 55 +- lib/Analysis/PostDominators.cpp | 8 +- lib/Analysis/ProfileEstimatorPass.cpp | 14 +- lib/Analysis/ProfileInfo.cpp | 13 +- lib/Analysis/ProfileInfoLoaderPass.cpp | 14 +- lib/Analysis/ProfileVerifierPass.cpp | 8 +- lib/Analysis/RegionInfo.cpp | 749 ++++ lib/Analysis/RegionPrinter.cpp | 186 + lib/Analysis/ScalarEvolution.cpp | 747 ++-- lib/Analysis/ScalarEvolutionAliasAnalysis.cpp | 17 +- lib/Analysis/ScalarEvolutionExpander.cpp | 74 +- lib/Analysis/ScalarEvolutionNormalization.cpp | 114 +- lib/Analysis/TypeBasedAliasAnalysis.cpp | 191 + lib/Analysis/ValueTracking.cpp | 238 +- lib/AsmParser/LLLexer.cpp | 2 +- lib/AsmParser/LLParser.cpp | 161 +- lib/AsmParser/LLParser.h | 14 +- lib/AsmParser/LLToken.h | 4 +- lib/AsmParser/Parser.cpp | 3 +- lib/Bitcode/Reader/BitcodeReader.cpp | 119 +- lib/Bitcode/Reader/BitcodeReader.h | 12 +- lib/Bitcode/Writer/BitcodeWriter.cpp | 138 +- lib/Bitcode/Writer/BitcodeWriterPass.cpp | 2 +- lib/Bitcode/Writer/ValueEnumerator.cpp | 149 +- lib/Bitcode/Writer/ValueEnumerator.h | 9 +- lib/CodeGen/AggressiveAntiDepBreaker.cpp | 32 +- lib/CodeGen/AggressiveAntiDepBreaker.h | 10 +- lib/CodeGen/Analysis.cpp | 4 +- lib/CodeGen/AsmPrinter/AsmPrinter.cpp | 88 +- lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp | 4 +- .../AsmPrinter/AsmPrinterInlineAsm.cpp | 13 +- lib/CodeGen/AsmPrinter/DwarfDebug.cpp | 862 +++-- lib/CodeGen/AsmPrinter/DwarfDebug.h | 28 +- lib/CodeGen/AsmPrinter/DwarfException.cpp | 2 +- lib/CodeGen/BranchFolding.cpp | 2 +- lib/CodeGen/CMakeLists.txt | 6 +- lib/CodeGen/CalcSpillWeights.cpp | 278 +- lib/CodeGen/CodePlacementOpt.cpp | 2 +- lib/CodeGen/CriticalAntiDepBreaker.cpp | 27 +- lib/CodeGen/CriticalAntiDepBreaker.h | 7 +- lib/CodeGen/DeadMachineInstructionElim.cpp | 21 +- lib/CodeGen/DwarfEHPrepare.cpp | 290 +- lib/CodeGen/ELF.h | 120 +- lib/CodeGen/ELFCodeEmitter.cpp | 2 +- lib/CodeGen/ELFWriter.cpp | 30 +- lib/CodeGen/ELFWriter.h | 13 +- lib/CodeGen/GCMetadata.cpp | 12 +- lib/CodeGen/GCStrategy.cpp | 9 +- lib/CodeGen/IfConversion.cpp | 5 +- lib/CodeGen/InlineSpiller.cpp | 118 +- lib/CodeGen/IntrinsicLowering.cpp | 3 +- lib/CodeGen/LLVMTargetMachine.cpp | 81 +- lib/CodeGen/LiveInterval.cpp | 164 +- lib/CodeGen/LiveIntervalAnalysis.cpp | 79 +- lib/CodeGen/LiveStackAnalysis.cpp | 3 +- lib/CodeGen/LiveVariables.cpp | 18 +- lib/CodeGen/LocalStackSlotAllocation.cpp | 354 ++ lib/CodeGen/LowerSubregs.cpp | 22 +- lib/CodeGen/MachineBasicBlock.cpp | 32 +- lib/CodeGen/MachineCSE.cpp | 41 +- lib/CodeGen/MachineDominators.cpp | 8 +- lib/CodeGen/MachineFunction.cpp | 3 +- lib/CodeGen/MachineFunctionAnalysis.cpp | 4 +- lib/CodeGen/MachineFunctionPrinterPass.cpp | 2 +- lib/CodeGen/MachineInstr.cpp | 33 +- lib/CodeGen/MachineLICM.cpp | 21 +- lib/CodeGen/MachineLoopInfo.cpp | 6 +- lib/CodeGen/MachineModuleInfo.cpp | 15 +- lib/CodeGen/MachineSink.cpp | 138 +- lib/CodeGen/MachineVerifier.cpp | 230 +- lib/CodeGen/OptimizeExts.cpp | 220 -- lib/CodeGen/OptimizePHIs.cpp | 20 +- lib/CodeGen/PBQP/HeuristicBase.h | 8 +- lib/CodeGen/PBQP/HeuristicSolver.h | 9 + lib/CodeGen/PBQP/Heuristics/Briggs.h | 8 +- lib/CodeGen/PBQP/Solution.h | 31 + lib/CodeGen/PHIElimination.cpp | 36 +- lib/CodeGen/PHIElimination.h | 10 +- lib/CodeGen/PeepholeOptimizer.cpp | 287 ++ lib/CodeGen/PostRASchedulerList.cpp | 7 +- lib/CodeGen/PreAllocSplitting.cpp | 15 +- lib/CodeGen/ProcessImplicitDefs.cpp | 18 +- lib/CodeGen/PrologEpilogInserter.cpp | 243 +- lib/CodeGen/PrologEpilogInserter.h | 9 +- lib/CodeGen/RegAllocFast.cpp | 136 +- lib/CodeGen/RegAllocLinearScan.cpp | 154 +- lib/CodeGen/RegAllocPBQP.cpp | 47 +- lib/CodeGen/RegisterCoalescer.cpp | 3 +- lib/CodeGen/RegisterScavenging.cpp | 34 +- lib/CodeGen/RenderMachineFunction.cpp | 1014 +++++ lib/CodeGen/RenderMachineFunction.h | 336 ++ lib/CodeGen/ScheduleDAGInstrs.cpp | 9 +- lib/CodeGen/ScheduleDAGInstrs.h | 4 +- lib/CodeGen/SelectionDAG/DAGCombiner.cpp | 15 +- lib/CodeGen/SelectionDAG/FastISel.cpp | 17 +- .../SelectionDAG/FunctionLoweringInfo.cpp | 67 +- lib/CodeGen/SelectionDAG/LegalizeDAG.cpp | 26 +- .../SelectionDAG/LegalizeIntegerTypes.cpp | 20 +- lib/CodeGen/SelectionDAG/LegalizeTypes.h | 24 +- .../SelectionDAG/LegalizeVectorTypes.cpp | 406 +- lib/CodeGen/SelectionDAG/ScheduleDAGFast.cpp | 74 +- .../SelectionDAG/ScheduleDAGRRList.cpp | 423 ++- .../SelectionDAG/ScheduleDAGSDNodes.cpp | 5 +- lib/CodeGen/SelectionDAG/SelectionDAG.cpp | 40 +- .../SelectionDAG/SelectionDAGBuilder.cpp | 660 ++-- .../SelectionDAG/SelectionDAGBuilder.h | 37 +- lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp | 44 +- .../SelectionDAG/SelectionDAGPrinter.cpp | 2 +- lib/CodeGen/SelectionDAG/TargetLowering.cpp | 182 +- lib/CodeGen/SimpleRegisterCoalescing.cpp | 161 +- lib/CodeGen/SimpleRegisterCoalescing.h | 3 +- lib/CodeGen/SjLjEHPrepare.cpp | 2 +- lib/CodeGen/SlotIndexes.cpp | 3 +- lib/CodeGen/Spiller.cpp | 98 +- lib/CodeGen/Spiller.h | 19 +- lib/CodeGen/SplitKit.cpp | 1097 ++++++ lib/CodeGen/SplitKit.h | 321 ++ lib/CodeGen/Splitter.cpp | 817 ++++ lib/CodeGen/Splitter.h | 99 + lib/CodeGen/StackProtector.cpp | 8 +- lib/CodeGen/StackSlotColoring.cpp | 9 +- lib/CodeGen/StrongPHIElimination.cpp | 9 +- lib/CodeGen/TailDuplication.cpp | 19 +- lib/CodeGen/TargetInstrInfoImpl.cpp | 13 - lib/CodeGen/TargetLoweringObjectFileImpl.cpp | 6 +- lib/CodeGen/TwoAddressInstructionPass.cpp | 50 +- lib/CodeGen/UnreachableBlockElim.cpp | 15 +- lib/CodeGen/VirtRegMap.cpp | 3 +- lib/CodeGen/VirtRegMap.h | 7 +- lib/CodeGen/VirtRegRewriter.cpp | 101 +- lib/CompilerDriver/Action.cpp | 13 +- lib/CompilerDriver/BuiltinOptions.cpp | 4 +- lib/CompilerDriver/CompilationGraph.cpp | 289 +- lib/CompilerDriver/Main.cpp | 127 +- lib/CompilerDriver/Makefile | 36 +- lib/CompilerDriver/Plugin.cpp | 78 - .../ExecutionEngineBindings.cpp | 4 + lib/ExecutionEngine/JIT/Intercept.cpp | 12 + lib/ExecutionEngine/JIT/JIT.cpp | 10 +- .../JIT/JITDebugRegisterer.cpp | 10 +- lib/ExecutionEngine/JIT/JITDwarfEmitter.cpp | 440 --- lib/ExecutionEngine/JIT/JITDwarfEmitter.h | 16 - lib/ExecutionEngine/JIT/JITEmitter.cpp | 307 +- lib/Linker/LinkModules.cpp | 180 +- lib/MC/CMakeLists.txt | 3 + lib/MC/ELFObjectWriter.cpp | 973 +++++ lib/MC/MCAsmInfo.cpp | 2 + lib/MC/MCAsmInfoDarwin.cpp | 3 + lib/MC/MCAsmStreamer.cpp | 3 +- lib/MC/MCAssembler.cpp | 74 +- lib/MC/MCContext.cpp | 88 +- lib/MC/MCDisassembler/CMakeLists.txt | 7 + .../MC/MCDisassembler}/EDDisassembler.cpp | 41 +- .../MC/MCDisassembler}/EDDisassembler.h | 37 +- lib/MC/MCDisassembler/EDInfo.h | 73 + .../edis => lib/MC/MCDisassembler}/EDInst.cpp | 2 +- .../edis => lib/MC/MCDisassembler}/EDInst.h | 21 +- .../MC/MCDisassembler}/EDOperand.cpp | 8 +- .../MC/MCDisassembler}/EDOperand.h | 19 +- .../MC/MCDisassembler}/EDToken.cpp | 8 +- .../edis => lib/MC/MCDisassembler}/EDToken.h | 12 +- lib/MC/MCDisassembler/Makefile | 14 + lib/MC/MCDwarf.cpp | 21 + lib/MC/MCELFStreamer.cpp | 408 ++ lib/MC/MCMachOStreamer.cpp | 277 +- lib/MC/MCNullStreamer.cpp | 1 + lib/MC/MCObjectStreamer.cpp | 48 + lib/MC/MCParser/AsmLexer.cpp | 28 +- lib/MC/MCParser/AsmParser.cpp | 702 +++- lib/MC/MCParser/DarwinAsmParser.cpp | 237 +- lib/MC/MCParser/ELFAsmParser.cpp | 235 +- lib/MC/MCParser/MCAsmParser.cpp | 15 +- lib/MC/MCParser/TargetAsmParser.cpp | 2 +- lib/MC/MCStreamer.cpp | 3 +- lib/MC/MachObjectWriter.cpp | 2 +- lib/MC/Makefile | 2 +- lib/MC/WinCOFFObjectWriter.cpp | 737 +++- lib/MC/WinCOFFStreamer.cpp | 229 +- lib/Support/APFloat.cpp | 1 + lib/Support/APInt.cpp | 17 +- lib/Support/CMakeLists.txt | 2 +- lib/Support/ConstantRange.cpp | 128 +- lib/Support/CrashRecoveryContext.cpp | 204 + lib/Support/ErrorHandling.cpp | 34 +- lib/Support/FoldingSet.cpp | 89 +- lib/Support/PrettyStackTrace.cpp | 5 +- lib/Support/SlowOperationInformer.cpp | 67 - lib/Support/SmallVector.cpp | 2 +- lib/Support/Statistic.cpp | 14 +- lib/Support/StringRef.cpp | 27 +- lib/Support/SystemUtils.cpp | 10 + lib/Support/Triple.cpp | 243 +- lib/Support/raw_ostream.cpp | 97 +- lib/System/DynamicLibrary.cpp | 6 + lib/System/Path.cpp | 40 +- lib/System/RWMutex.cpp | 18 +- lib/System/ThreadLocal.cpp | 5 + lib/System/Unix/Path.inc | 12 +- lib/System/Unix/Signals.inc | 44 + lib/System/Unix/ThreadLocal.inc | 1 + lib/System/Win32/Path.inc | 16 +- lib/System/Win32/Signals.inc | 14 + lib/System/Win32/ThreadLocal.inc | 4 + lib/Target/ARM/ARM.h | 60 +- lib/Target/ARM/ARM.td | 76 +- lib/Target/ARM/ARMAddressingModes.h | 20 +- .../ARM/{AsmPrinter => }/ARMAsmPrinter.cpp | 171 +- lib/Target/ARM/ARMBaseInstrInfo.cpp | 134 +- lib/Target/ARM/ARMBaseInstrInfo.h | 81 +- lib/Target/ARM/ARMBaseRegisterInfo.cpp | 563 ++- lib/Target/ARM/ARMBaseRegisterInfo.h | 29 +- lib/Target/ARM/ARMCallingConv.td | 4 +- lib/Target/ARM/ARMCodeEmitter.cpp | 72 +- lib/Target/ARM/ARMConstantIslandPass.cpp | 96 +- lib/Target/ARM/ARMExpandPseudoInsts.cpp | 361 +- lib/Target/ARM/ARMFastISel.cpp | 665 ++++ lib/Target/ARM/ARMGlobalMerge.cpp | 212 ++ lib/Target/ARM/ARMISelDAGToDAG.cpp | 369 +- lib/Target/ARM/ARMISelLowering.cpp | 635 +++- lib/Target/ARM/ARMISelLowering.h | 42 +- lib/Target/ARM/ARMInstrFormats.td | 290 +- lib/Target/ARM/ARMInstrInfo.td | 406 +- lib/Target/ARM/ARMInstrNEON.td | 627 +++- lib/Target/ARM/ARMInstrThumb.td | 19 +- lib/Target/ARM/ARMInstrThumb2.td | 732 ++-- lib/Target/ARM/ARMInstrVFP.td | 76 +- lib/Target/ARM/ARMLoadStoreOptimizer.cpp | 139 +- .../ARM/{AsmPrinter => }/ARMMCInstLower.cpp | 0 .../ARM/{AsmPrinter => }/ARMMCInstLower.h | 0 lib/Target/ARM/ARMMachineFunctionInfo.h | 11 +- lib/Target/ARM/ARMRegisterInfo.td | 176 +- lib/Target/ARM/ARMSubtarget.cpp | 5 + lib/Target/ARM/ARMSubtarget.h | 22 +- lib/Target/ARM/ARMTargetMachine.cpp | 16 +- lib/Target/ARM/ARMTargetMachine.h | 1 + lib/Target/ARM/AsmParser/ARMAsmParser.cpp | 245 +- lib/Target/ARM/AsmPrinter/ARMInstPrinter.cpp | 66 +- lib/Target/ARM/AsmPrinter/ARMInstPrinter.h | 2 + lib/Target/ARM/AsmPrinter/CMakeLists.txt | 2 - lib/Target/ARM/CMakeLists.txt | 10 +- .../ARM/Disassembler/ARMDisassembler.cpp | 13 +- .../ARM/Disassembler/ARMDisassemblerCore.cpp | 183 +- .../ARM/Disassembler/ARMDisassemblerCore.h | 66 +- .../ARM/Disassembler/ThumbDisassemblerCore.h | 227 +- lib/Target/ARM/Makefile | 5 +- lib/Target/ARM/NEONMoveFix.cpp | 2 +- lib/Target/ARM/NEONPreAllocPass.cpp | 147 +- lib/Target/ARM/README.txt | 42 +- lib/Target/ARM/Thumb1RegisterInfo.cpp | 369 +- lib/Target/ARM/Thumb1RegisterInfo.h | 22 +- lib/Target/ARM/Thumb2ITBlockPass.cpp | 64 +- lib/Target/ARM/Thumb2InstrInfo.cpp | 8 +- lib/Target/ARM/Thumb2SizeReduction.cpp | 14 +- lib/Target/Alpha/AlphaBranchSelector.cpp | 2 +- lib/Target/Alpha/AlphaCodeEmitter.cpp | 2 +- lib/Target/Alpha/AlphaISelDAGToDAG.cpp | 4 +- lib/Target/Alpha/AlphaInstrInfo.cpp | 26 - lib/Target/Alpha/AlphaInstrInfo.h | 6 - lib/Target/Alpha/AlphaLLRP.cpp | 2 +- lib/Target/Alpha/AlphaRegisterInfo.cpp | 6 +- lib/Target/Alpha/AlphaRegisterInfo.h | 5 +- .../Alpha/AsmPrinter/AlphaAsmPrinter.cpp | 2 - lib/Target/Blackfin/BlackfinInstrInfo.cpp | 28 - lib/Target/Blackfin/BlackfinInstrInfo.h | 4 - lib/Target/Blackfin/BlackfinRegisterInfo.cpp | 16 +- lib/Target/Blackfin/BlackfinRegisterInfo.h | 7 +- lib/Target/CBackend/CBackend.cpp | 12 +- lib/Target/CellSPU/SPUCallingConv.td | 24 +- lib/Target/CellSPU/SPUISelDAGToDAG.cpp | 44 +- lib/Target/CellSPU/SPUISelLowering.cpp | 105 +- lib/Target/CellSPU/SPUInstrInfo.cpp | 142 - lib/Target/CellSPU/SPUInstrInfo.h | 6 - lib/Target/CellSPU/SPUInstrInfo.td | 156 +- lib/Target/CellSPU/SPUOperands.td | 6 - lib/Target/CellSPU/SPURegisterInfo.cpp | 11 +- lib/Target/CellSPU/SPURegisterInfo.h | 5 +- lib/Target/CellSPU/SPURegisterInfo.td | 2 +- lib/Target/CppBackend/CPPBackend.cpp | 17 +- .../MBlaze/AsmPrinter/MBlazeAsmPrinter.cpp | 10 - lib/Target/MBlaze/MBlaze.td | 2 +- lib/Target/MBlaze/MBlazeCallingConv.td | 2 +- lib/Target/MBlaze/MBlazeDelaySlotFiller.cpp | 2 +- lib/Target/MBlaze/MBlazeISelDAGToDAG.cpp | 2 +- lib/Target/MBlaze/MBlazeInstrFPU.td | 2 +- lib/Target/MBlaze/MBlazeInstrFSL.td | 2 +- lib/Target/MBlaze/MBlazeInstrFormats.td | 2 +- lib/Target/MBlaze/MBlazeInstrInfo.cpp | 35 - lib/Target/MBlaze/MBlazeInstrInfo.h | 6 - lib/Target/MBlaze/MBlazeInstrInfo.td | 2 +- lib/Target/MBlaze/MBlazeIntrinsics.td | 12 +- lib/Target/MBlaze/MBlazeRegisterInfo.cpp | 5 +- lib/Target/MBlaze/MBlazeRegisterInfo.h | 5 +- lib/Target/MBlaze/MBlazeRegisterInfo.td | 2 +- lib/Target/MBlaze/MBlazeSchedule.td | 2 +- lib/Target/MSIL/CMakeLists.txt | 3 - lib/Target/MSIL/MSILWriter.cpp | 1706 --------- lib/Target/MSIL/MSILWriter.h | 258 -- lib/Target/MSIL/Makefile | 16 - lib/Target/MSIL/README.TXT | 26 - lib/Target/MSIL/TargetInfo/CMakeLists.txt | 6 - lib/Target/MSIL/TargetInfo/MSILTargetInfo.cpp | 26 - lib/Target/MSIL/TargetInfo/Makefile | 15 - lib/Target/MSP430/MSP430BranchSelector.cpp | 7 +- lib/Target/MSP430/MSP430InstrInfo.cpp | 23 +- lib/Target/MSP430/MSP430InstrInfo.h | 4 - lib/Target/MSP430/MSP430RegisterInfo.cpp | 12 +- lib/Target/MSP430/MSP430RegisterInfo.h | 7 +- lib/Target/Mangler.cpp | 3 +- lib/Target/Mips/AsmPrinter/MipsAsmPrinter.cpp | 20 + lib/Target/Mips/Mips.td | 2 +- lib/Target/Mips/MipsCallingConv.td | 2 +- lib/Target/Mips/MipsDelaySlotFiller.cpp | 2 +- lib/Target/Mips/MipsISelDAGToDAG.cpp | 11 +- lib/Target/Mips/MipsISelLowering.cpp | 8 +- lib/Target/Mips/MipsInstrFPU.td | 2 +- lib/Target/Mips/MipsInstrFormats.td | 2 +- lib/Target/Mips/MipsInstrInfo.cpp | 47 - lib/Target/Mips/MipsInstrInfo.h | 6 - lib/Target/Mips/MipsInstrInfo.td | 9 +- lib/Target/Mips/MipsRegisterInfo.cpp | 6 +- lib/Target/Mips/MipsRegisterInfo.h | 5 +- lib/Target/Mips/MipsRegisterInfo.td | 2 +- lib/Target/Mips/MipsSchedule.td | 2 +- lib/Target/PIC16/CMakeLists.txt | 2 +- lib/Target/PIC16/PIC16.h | 7 +- lib/Target/PIC16/PIC16ISelLowering.cpp | 10 + lib/Target/PIC16/PIC16ISelLowering.h | 5 +- lib/Target/PIC16/PIC16InstrInfo.cpp | 15 - lib/Target/PIC16/PIC16InstrInfo.h | 4 - lib/Target/PIC16/PIC16MemSelOpt.cpp | 2 +- lib/Target/PIC16/PIC16Passes/PIC16Cloner.cpp | 2 +- lib/Target/PIC16/PIC16Passes/PIC16Cloner.h | 2 +- lib/Target/PIC16/PIC16Passes/PIC16Overlay.cpp | 5 +- lib/Target/PIC16/PIC16Passes/PIC16Overlay.h | 2 +- lib/Target/PIC16/PIC16RegisterInfo.cpp | 9 +- lib/Target/PIC16/PIC16RegisterInfo.h | 5 +- .../PowerPC/AsmPrinter/PPCAsmPrinter.cpp | 14 + lib/Target/PowerPC/PPCBranchSelector.cpp | 7 +- lib/Target/PowerPC/PPCCallingConv.td | 2 +- lib/Target/PowerPC/PPCCodeEmitter.cpp | 4 +- lib/Target/PowerPC/PPCISelLowering.cpp | 39 +- lib/Target/PowerPC/PPCInstrInfo.cpp | 82 +- lib/Target/PowerPC/PPCInstrInfo.h | 6 - lib/Target/PowerPC/PPCInstrInfo.td | 19 +- lib/Target/PowerPC/PPCRegisterInfo.cpp | 22 +- lib/Target/PowerPC/PPCRegisterInfo.h | 5 +- lib/Target/PowerPC/PPCSubtarget.cpp | 4 + lib/Target/PowerPC/PPCSubtarget.h | 4 + lib/Target/README.txt | 18 +- lib/Target/Sparc/DelaySlotFiller.cpp | 2 +- lib/Target/Sparc/FPMover.cpp | 2 +- lib/Target/Sparc/Sparc.td | 2 +- lib/Target/Sparc/SparcISelDAGToDAG.cpp | 8 +- lib/Target/Sparc/SparcInstrInfo.cpp | 40 - lib/Target/Sparc/SparcInstrInfo.h | 6 - lib/Target/Sparc/SparcInstrInfo.td | 12 +- lib/Target/Sparc/SparcRegisterInfo.cpp | 6 +- lib/Target/Sparc/SparcRegisterInfo.h | 5 +- lib/Target/SystemZ/SystemZInstrInfo.cpp | 25 - lib/Target/SystemZ/SystemZInstrInfo.h | 3 - lib/Target/SystemZ/SystemZRegisterInfo.cpp | 9 +- lib/Target/SystemZ/SystemZRegisterInfo.h | 7 +- lib/Target/TargetData.cpp | 62 +- lib/Target/TargetMachine.cpp | 20 +- lib/Target/TargetRegisterInfo.cpp | 14 +- lib/Target/X86/AsmParser/X86AsmParser.cpp | 274 +- lib/Target/X86/AsmPrinter/CMakeLists.txt | 3 +- .../X86/AsmPrinter/X86ATTInstPrinter.cpp | 5 + lib/Target/X86/AsmPrinter/X86ATTInstPrinter.h | 3 + lib/Target/X86/AsmPrinter/X86InstComments.cpp | 232 ++ lib/Target/X86/AsmPrinter/X86InstComments.h | 25 + .../X86/AsmPrinter/X86IntelInstPrinter.cpp | 5 + .../X86/AsmPrinter/X86IntelInstPrinter.h | 4 + lib/Target/X86/CMakeLists.txt | 10 +- lib/Target/X86/README-FPStack.txt | 4 +- lib/Target/X86/README-SSE.txt | 42 +- lib/Target/X86/README.txt | 104 +- lib/Target/X86/SSEDomainFix.cpp | 2 +- lib/Target/X86/X86.h | 5 - lib/Target/X86/X86.td | 4 +- lib/Target/X86/X86AsmBackend.cpp | 45 +- .../X86/{AsmPrinter => }/X86AsmPrinter.cpp | 51 +- .../X86/{AsmPrinter => }/X86AsmPrinter.h | 6 +- lib/Target/X86/X86CallingConv.td | 32 +- lib/Target/X86/X86CodeEmitter.cpp | 119 +- lib/Target/X86/X86FastISel.cpp | 29 +- lib/Target/X86/X86FloatingPoint.cpp | 473 ++- lib/Target/X86/X86FloatingPointRegKill.cpp | 153 - lib/Target/X86/X86ISelDAGToDAG.cpp | 37 +- lib/Target/X86/X86ISelLowering.cpp | 1227 +++++- lib/Target/X86/X86ISelLowering.h | 58 +- lib/Target/X86/X86Instr64bit.td | 156 +- lib/Target/X86/X86InstrFMA.td | 60 + lib/Target/X86/X86InstrFPStack.td | 6 +- lib/Target/X86/X86InstrFormats.td | 33 +- lib/Target/X86/X86InstrFragmentsSIMD.td | 80 +- lib/Target/X86/X86InstrInfo.cpp | 692 +--- lib/Target/X86/X86InstrInfo.h | 30 +- lib/Target/X86/X86InstrInfo.td | 145 +- lib/Target/X86/X86InstrMMX.td | 2 +- lib/Target/X86/X86InstrSSE.td | 1935 +++++++--- lib/Target/X86/X86MCAsmInfo.cpp | 3 + lib/Target/X86/X86MCCodeEmitter.cpp | 57 +- .../X86/{AsmPrinter => }/X86MCInstLower.cpp | 119 +- .../X86/{AsmPrinter => }/X86MCInstLower.h | 13 +- lib/Target/X86/X86RegisterInfo.cpp | 103 +- lib/Target/X86/X86RegisterInfo.h | 9 +- lib/Target/X86/X86RegisterInfo.td | 17 +- lib/Target/X86/X86ShuffleDecode.h | 155 + lib/Target/X86/X86Subtarget.cpp | 10 +- lib/Target/X86/X86Subtarget.h | 8 + lib/Target/X86/X86TargetMachine.cpp | 44 +- .../XCore/AsmPrinter/XCoreAsmPrinter.cpp | 12 +- lib/Target/XCore/CMakeLists.txt | 2 +- lib/Target/XCore/XCoreISelDAGToDAG.cpp | 21 +- lib/Target/XCore/XCoreInstrInfo.cpp | 29 +- lib/Target/XCore/XCoreInstrInfo.h | 6 - lib/Target/XCore/XCoreInstrInfo.td | 12 +- lib/Target/XCore/XCoreRegisterInfo.cpp | 14 +- lib/Target/XCore/XCoreRegisterInfo.h | 5 +- lib/Transforms/Hello/Hello.cpp | 11 +- lib/Transforms/IPO/ArgumentPromotion.cpp | 13 +- lib/Transforms/IPO/ConstantMerge.cpp | 34 +- .../IPO/DeadArgumentElimination.cpp | 26 +- lib/Transforms/IPO/DeadTypeElimination.cpp | 4 +- lib/Transforms/IPO/ExtractGV.cpp | 153 +- lib/Transforms/IPO/FunctionAttrs.cpp | 12 +- lib/Transforms/IPO/GlobalDCE.cpp | 5 +- lib/Transforms/IPO/GlobalOpt.cpp | 12 +- lib/Transforms/IPO/IPConstantPropagation.cpp | 10 +- lib/Transforms/IPO/InlineAlways.cpp | 6 +- lib/Transforms/IPO/InlineSimple.cpp | 8 +- lib/Transforms/IPO/Inliner.cpp | 12 +- lib/Transforms/IPO/Internalize.cpp | 8 +- lib/Transforms/IPO/LoopExtractor.cpp | 23 +- lib/Transforms/IPO/LowerSetJmp.cpp | 4 +- lib/Transforms/IPO/MergeFunctions.cpp | 658 ++-- lib/Transforms/IPO/PartialInlining.cpp | 10 +- lib/Transforms/IPO/PartialSpecialization.cpp | 46 +- lib/Transforms/IPO/PruneEH.cpp | 6 +- lib/Transforms/IPO/StripDeadPrototypes.cpp | 6 +- lib/Transforms/IPO/StripSymbols.cpp | 36 +- lib/Transforms/IPO/StructRetPromotion.cpp | 26 +- lib/Transforms/InstCombine/InstCombine.h | 2 +- .../InstCombine/InstCombineAndOrXor.cpp | 46 +- .../InstCombine/InstCombineCalls.cpp | 35 +- .../InstCombine/InstCombineCasts.cpp | 287 +- .../InstCombine/InstCombineCompares.cpp | 2 +- .../InstCombineLoadStoreAlloca.cpp | 22 +- .../InstCombine/InstCombineSelect.cpp | 28 - .../InstCombine/InstCombineShifts.cpp | 307 +- .../InstCombine/InstructionCombining.cpp | 4 +- .../Instrumentation/EdgeProfiling.cpp | 6 +- .../Instrumentation/OptimalEdgeProfiling.cpp | 8 +- lib/Transforms/Scalar/ABCD.cpp | 1112 ------ lib/Transforms/Scalar/ADCE.cpp | 4 +- lib/Transforms/Scalar/BasicBlockPlacement.cpp | 6 +- lib/Transforms/Scalar/CMakeLists.txt | 3 +- lib/Transforms/Scalar/CodeGenPrepare.cpp | 36 +- lib/Transforms/Scalar/ConstantProp.cpp | 6 +- .../Scalar/CorrelatedValuePropagation.cpp | 200 + lib/Transforms/Scalar/DCE.cpp | 10 +- .../Scalar/DeadStoreElimination.cpp | 7 +- lib/Transforms/Scalar/GEPSplitter.cpp | 6 +- lib/Transforms/Scalar/GVN.cpp | 15 +- lib/Transforms/Scalar/IndVarSimplify.cpp | 18 +- lib/Transforms/Scalar/JumpThreading.cpp | 217 +- lib/Transforms/Scalar/LICM.cpp | 738 ++-- lib/Transforms/Scalar/LoopDeletion.cpp | 7 +- lib/Transforms/Scalar/LoopIndexSplit.cpp | 12 +- lib/Transforms/Scalar/LoopRotation.cpp | 34 +- lib/Transforms/Scalar/LoopStrengthReduce.cpp | 182 +- lib/Transforms/Scalar/LoopUnrollPass.cpp | 23 +- lib/Transforms/Scalar/LoopUnswitch.cpp | 30 +- lib/Transforms/Scalar/LowerAtomic.cpp | 161 + lib/Transforms/Scalar/MemCpyOptimizer.cpp | 21 +- lib/Transforms/Scalar/Reassociate.cpp | 5 +- lib/Transforms/Scalar/Reg2Mem.cpp | 8 +- lib/Transforms/Scalar/SCCP.cpp | 41 +- .../Scalar/ScalarReplAggregates.cpp | 49 +- lib/Transforms/Scalar/SimplifyCFGPass.cpp | 10 +- .../Scalar/SimplifyHalfPowrLibCalls.cpp | 6 +- lib/Transforms/Scalar/SimplifyLibCalls.cpp | 27 +- lib/Transforms/Scalar/Sink.cpp | 5 +- lib/Transforms/Scalar/TailDuplication.cpp | 4 +- .../Scalar/TailRecursionElimination.cpp | 64 +- lib/Transforms/Utils/BasicBlockUtils.cpp | 25 +- lib/Transforms/Utils/BasicInliner.cpp | 4 +- lib/Transforms/Utils/BreakCriticalEdges.cpp | 10 +- lib/Transforms/Utils/BuildLibCalls.cpp | 21 +- lib/Transforms/Utils/CMakeLists.txt | 1 - lib/Transforms/Utils/CloneFunction.cpp | 86 +- lib/Transforms/Utils/CloneModule.cpp | 30 +- lib/Transforms/Utils/InlineFunction.cpp | 11 +- lib/Transforms/Utils/InstructionNamer.cpp | 8 +- lib/Transforms/Utils/LCSSA.cpp | 27 +- lib/Transforms/Utils/Local.cpp | 3 + lib/Transforms/Utils/LoopSimplify.cpp | 42 +- lib/Transforms/Utils/LoopUnroll.cpp | 6 + lib/Transforms/Utils/LowerInvoke.cpp | 11 +- lib/Transforms/Utils/LowerSwitch.cpp | 16 +- lib/Transforms/Utils/Mem2Reg.cpp | 7 +- .../Utils/PromoteMemoryToRegister.cpp | 17 +- lib/Transforms/Utils/SSAUpdater.cpp | 40 +- lib/Transforms/Utils/SSI.cpp | 432 --- lib/Transforms/Utils/SimplifyCFG.cpp | 56 +- .../Utils/UnifyFunctionExitNodes.cpp | 6 +- lib/Transforms/Utils/ValueMapper.cpp | 84 +- lib/VMCore/AsmWriter.cpp | 167 +- lib/VMCore/AutoUpgrade.cpp | 217 +- lib/VMCore/CMakeLists.txt | 1 + lib/VMCore/ConstantFold.cpp | 40 - lib/VMCore/Constants.cpp | 121 +- lib/VMCore/ConstantsContext.h | 16 +- lib/VMCore/Core.cpp | 92 +- lib/VMCore/Dominators.cpp | 145 +- lib/VMCore/Globals.cpp | 9 +- lib/VMCore/InlineAsm.cpp | 2 +- lib/VMCore/Instruction.cpp | 4 +- lib/VMCore/Instructions.cpp | 49 +- lib/VMCore/LLVMContext.cpp | 13 +- lib/VMCore/LLVMContextImpl.cpp | 3 - lib/VMCore/LLVMContextImpl.h | 5 - lib/VMCore/Metadata.cpp | 170 +- lib/VMCore/Module.cpp | 23 +- lib/VMCore/Pass.cpp | 293 +- lib/VMCore/PassManager.cpp | 330 +- lib/VMCore/PassRegistry.cpp | 159 + lib/VMCore/PrintModulePass.cpp | 18 +- lib/VMCore/Type.cpp | 257 +- lib/VMCore/TypesContext.h | 78 +- lib/VMCore/Use.cpp | 19 +- lib/VMCore/Value.cpp | 35 +- lib/VMCore/ValueSymbolTable.cpp | 2 - lib/VMCore/Verifier.cpp | 125 +- runtime/libprofile/Makefile | 8 +- ...xported_symbols.lst => libprofile.exports} | 0 .../BasicAA/args-rets-allocas-loads.ll | 220 +- test/Analysis/BasicAA/constant-over-index.ll | 5 +- test/Analysis/BasicAA/featuretest.ll | 50 +- test/Analysis/BasicAA/gep-alias.ll | 12 +- test/Analysis/BasicAA/getmodrefinfo-cs-cs.ll | 26 + test/Analysis/BasicAA/modref.ll | 11 + .../RegionInfo/20100809_bb_not_in_domtree.ll | 20 + test/Analysis/RegionInfo/block_sort.ll | 42 + test/Analysis/RegionInfo/cond_loop.ll | 33 + .../RegionInfo/condition_complicated.ll | 60 + .../RegionInfo/condition_complicated_2.ll | 44 + .../RegionInfo/condition_forward_edge.ll | 26 + .../RegionInfo/condition_same_exit.ll | 31 + test/Analysis/RegionInfo/condition_simple.ll | 28 + .../ABCD => Analysis/RegionInfo}/dg.exp | 0 test/Analysis/RegionInfo/exit_in_condition.ll | 38 + test/Analysis/RegionInfo/infinite_loop.ll | 20 + test/Analysis/RegionInfo/infinite_loop_2.ll | 36 + test/Analysis/RegionInfo/infinite_loop_3.ll | 52 + test/Analysis/RegionInfo/infinite_loop_4.ll | 48 + .../RegionInfo/loop_with_condition.ll | 46 + test/Analysis/RegionInfo/loops_1.ll | 40 + test/Analysis/RegionInfo/loops_2.ll | 49 + test/Analysis/RegionInfo/mix_1.ll | 69 + .../RegionInfo/multiple_exiting_edge.ll | 38 + test/Analysis/RegionInfo/nested_loops.ll | 33 + test/Analysis/RegionInfo/next.ll | 49 + test/Analysis/RegionInfo/paper.ll | 55 + .../RegionInfo/two_loops_same_header.ll | 46 + test/Analysis/ScalarEvolution/avoid-smax-1.ll | 2 +- .../ScalarEvolution/max-trip-count.ll | 42 +- test/Archive/README.txt | 2 +- test/Assembler/2010-01-06-UnionType.ll | 3 - test/Assembler/align-inst-alloca.ll | 6 + test/Assembler/align-inst-load.ll | 6 + test/Assembler/align-inst-store.ll | 6 + test/Assembler/align-inst.ll | 10 + test/Assembler/comment.ll | 20 + test/Assembler/getelementptr.ll | 4 +- test/Bindings/Ocaml/analysis.ml | 2 +- test/Bindings/Ocaml/bitreader.ml | 2 +- test/Bindings/Ocaml/bitwriter.ml | 2 +- test/Bindings/Ocaml/executionengine.ml | 2 +- test/Bindings/Ocaml/scalar_opts.ml | 6 +- test/Bindings/Ocaml/target.ml | 7 +- test/Bindings/Ocaml/vmcore.ml | 42 +- test/Bitcode/AutoUpgradeGlobals.ll | 3 + test/Bitcode/AutoUpgradeGlobals.ll.bc | Bin 0 -> 312 bytes test/Bitcode/neon-intrinsics.ll | 213 ++ test/Bitcode/neon-intrinsics.ll.bc | Bin 0 -> 5764 bytes test/BugPoint/crash-narrowfunctiontest.ll | 4 +- test/BugPoint/metadata.ll | 35 + test/BugPoint/remove_arguments_test.ll | 4 +- test/CMakeLists.txt | 17 + test/CodeGen/ARM/2007-01-19-InfiniteLoop.ll | 6 +- .../ARM/2007-03-26-RegScavengerAssert.ll | 2 +- .../2007-05-31-RegScavengerInfiniteLoop.ll | 2 +- test/CodeGen/ARM/2009-12-02-vtrn-undef.ll | 14 + test/CodeGen/ARM/2010-05-20-NEONSpillCrash.ll | 22 +- test/CodeGen/ARM/2010-05-21-BuildVector.ll | 4 +- .../CodeGen/ARM/2010-06-11-vmovdrr-bitcast.ll | 4 +- test/CodeGen/ARM/2010-06-21-nondarwin-tc.ll | 1 + .../ARM/2010-06-29-PartialRedefFastAlloc.ll | 4 +- test/CodeGen/ARM/2010-07-26-GlobalMerge.ll | 95 + test/CodeGen/ARM/2010-08-04-EHCrash.ll | 65 + test/CodeGen/ARM/arguments.ll | 42 +- test/CodeGen/ARM/bfi.ll | 40 + test/CodeGen/ARM/call-tc.ll | 1 + test/CodeGen/ARM/code-placement.ll | 29 + test/CodeGen/ARM/div.ll | 10 - test/CodeGen/ARM/fast-isel.ll | 39 + test/CodeGen/ARM/fnmuls.ll | 12 +- test/CodeGen/ARM/fpcmp-opt.ll | 2 +- test/CodeGen/ARM/fpowi.ll | 2 +- test/CodeGen/ARM/long_shift.ll | 6 +- test/CodeGen/ARM/lsr-on-unrolled-loops.ll | 19 +- test/CodeGen/ARM/pack.ll | 32 +- test/CodeGen/ARM/reg_sequence.ll | 73 +- test/CodeGen/ARM/remat.ll | 2 +- test/CodeGen/ARM/select.ll | 25 + test/CodeGen/ARM/spill-q.ll | 8 +- test/CodeGen/ARM/t2-imm.ll | 6 +- test/CodeGen/ARM/vaba.ll | 128 +- test/CodeGen/ARM/vabd.ll | 38 +- test/CodeGen/ARM/vadd.ll | 82 +- test/CodeGen/ARM/vext.ll | 20 + test/CodeGen/ARM/vld1.ll | 53 +- test/CodeGen/ARM/vld2.ll | 36 +- test/CodeGen/ARM/vld3.ll | 36 +- test/CodeGen/ARM/vld4.ll | 36 +- test/CodeGen/ARM/vldlane.ll | 84 +- test/CodeGen/ARM/vmla.ll | 78 +- test/CodeGen/ARM/vmls.ll | 78 +- test/CodeGen/ARM/vmov.ll | 30 +- test/CodeGen/ARM/vmul.ll | 68 +- test/CodeGen/ARM/vrev.ll | 18 + test/CodeGen/ARM/vst1.ll | 40 +- test/CodeGen/ARM/vst2.ll | 36 +- test/CodeGen/ARM/vst3.ll | 38 +- test/CodeGen/ARM/vst4.ll | 36 +- test/CodeGen/ARM/vstlane.ll | 84 +- test/CodeGen/ARM/vsub.ll | 82 +- test/CodeGen/ARM/vtrn.ll | 27 + test/CodeGen/ARM/vuzp.ll | 27 + test/CodeGen/ARM/vzip.ll | 27 + test/CodeGen/Alpha/2010-08-01-mulreduce64.ll | 11 + test/CodeGen/CellSPU/arg_ret.ll | 33 + test/CodeGen/CellSPU/bigstack.ll | 6 +- test/CodeGen/CellSPU/call.ll | 26 +- test/CodeGen/CellSPU/call_indirect.ll | 2 +- test/CodeGen/CellSPU/shuffles.ll | 23 + test/CodeGen/CellSPU/v2f32.ll | 75 + test/CodeGen/CellSPU/v2i32.ll | 64 + .../Generic/2010-07-27-DAGCombineCrash.ll | 6 + test/CodeGen/Mips/2008-06-05-Carry.ll | 2 +- test/CodeGen/Mips/2008-07-03-SRet.ll | 2 +- test/CodeGen/Mips/2008-07-05-ByVal.ll | 2 +- test/CodeGen/Mips/2008-07-06-fadd64.ll | 2 +- test/CodeGen/Mips/2008-07-07-FPExtend.ll | 2 +- test/CodeGen/Mips/2008-07-07-Float2Int.ll | 2 +- .../Mips/2008-07-07-IntDoubleConvertions.ll | 2 +- .../Mips/2008-07-15-InternalConstant.ll | 2 +- test/CodeGen/Mips/2008-07-15-SmallSection.ll | 2 +- test/CodeGen/Mips/2008-07-16-SignExtInReg.ll | 2 +- test/CodeGen/Mips/2008-07-22-Cstpool.ll | 2 +- test/CodeGen/Mips/2008-07-23-fpcmp.ll | 2 +- test/CodeGen/Mips/2008-07-29-icmp.ll | 2 +- test/CodeGen/Mips/2008-07-31-fcopysign.ll | 2 +- test/CodeGen/Mips/2008-08-01-AsmInline.ll | 2 +- test/CodeGen/Mips/2008-08-03-fabs64.ll | 2 +- test/CodeGen/Mips/2008-08-04-Bitconvert.ll | 2 +- test/CodeGen/Mips/2008-08-06-Alloca.ll | 2 +- test/CodeGen/Mips/2008-08-07-CC.ll | 2 +- test/CodeGen/Mips/2008-08-07-FPRound.ll | 2 +- test/CodeGen/Mips/2008-08-08-ctlz.ll | 2 +- test/CodeGen/Mips/2010-07-20-Select.ll | 21 + test/CodeGen/Mips/2010-07-20-Switch.ll | 33 + .../PowerPC/2008-01-25-EmptyFunction.ll | 8 - test/CodeGen/PowerPC/empty-functions.ll | 12 + test/CodeGen/PowerPC/vec_constants.ll | 18 +- test/CodeGen/SystemZ/05-MemLoadsStores.ll | 2 +- test/CodeGen/SystemZ/05-MemLoadsStores16.ll | 2 +- test/CodeGen/SystemZ/07-BrUnCond.ll | 2 +- test/CodeGen/SystemZ/09-DynamicAlloca.ll | 2 +- test/CodeGen/SystemZ/09-Globals.ll | 2 +- test/CodeGen/SystemZ/10-FuncsPic.ll | 2 +- test/CodeGen/SystemZ/10-GlobalsPic.ll | 2 +- test/CodeGen/SystemZ/11-BSwap.ll | 2 +- test/CodeGen/SystemZ/2009-06-02-Rotate.ll | 2 +- test/CodeGen/SystemZ/2009-07-04-Shl32.ll | 2 +- test/CodeGen/SystemZ/2009-07-05-Shifts.ll | 2 +- .../2009-07-10-BadIncomingArgOffset.ll | 2 +- .../SystemZ/2009-07-11-FloatBitConvert.ll | 2 +- .../SystemZ/2009-07-11-InvalidRIISel.ll | 2 +- .../Thumb/2007-05-05-InvalidPushPop.ll | 2 +- .../CodeGen/Thumb/2010-07-15-debugOrdering.ll | 147 + test/CodeGen/Thumb/barrier.ll | 24 + test/CodeGen/Thumb/dyn-stackalloc.ll | 2 +- test/CodeGen/Thumb/large-stack.ll | 29 +- test/CodeGen/Thumb/vargs.ll | 2 +- .../Thumb2/2009-10-15-ITBlockBranch.ll | 4 +- test/CodeGen/Thumb2/2010-04-15-DynAllocBug.ll | 13 +- .../Thumb2/2010-08-10-VarSizedAllocaBug.ll | 53 + test/CodeGen/Thumb2/bfi.ll | 40 + test/CodeGen/Thumb2/cortex-fp.ll | 24 + test/CodeGen/Thumb2/crash.ll | 6 +- test/CodeGen/Thumb2/div.ll | 2 +- test/CodeGen/Thumb2/ldr-str-imm12.ll | 8 +- test/CodeGen/Thumb2/lsr-deficiency.ll | 4 +- test/CodeGen/Thumb2/machine-licm-vdup.ll | 38 + test/CodeGen/Thumb2/machine-licm.ll | 8 +- test/CodeGen/Thumb2/thumb2-and2.ll | 2 +- test/CodeGen/Thumb2/thumb2-badreg-operands.ll | 15 + test/CodeGen/Thumb2/thumb2-barrier.ll | 17 + test/CodeGen/Thumb2/thumb2-call-tc.ll | 1 + test/CodeGen/Thumb2/thumb2-cmp.ll | 14 + test/CodeGen/Thumb2/thumb2-ifcvt1-tc.ll | 1 + test/CodeGen/Thumb2/thumb2-pack.ll | 32 +- test/CodeGen/Thumb2/thumb2-spill-q.ll | 8 +- test/CodeGen/Thumb2/thumb2-uxtb.ll | 2 +- test/CodeGen/X86/2006-05-22-FPSetEQ.ll | 2 +- test/CodeGen/X86/2007-06-14-branchfold.ll | 133 - test/CodeGen/X86/2008-01-25-EmptyFunction.ll | 8 - .../X86}/2008-08-06-CmpStride.ll | 0 .../X86}/2009-02-09-ivs-different-sizes.ll | 0 test/CodeGen/X86/2009-02-26-MachineLICMBug.ll | 2 +- test/CodeGen/X86/2009-03-13-PHIElimBug.ll | 2 +- test/CodeGen/X86/2009-03-16-PHIElimInLPad.ll | 2 +- test/CodeGen/X86/2009-03-23-MultiUseSched.ll | 2 +- .../X86}/2010-01-18-DbgValue.ll | 5 +- .../X86}/2010-02-01-DbgValueCrash.ll | 1 - .../X86}/2010-05-25-DotDebugLoc.ll | 2 +- .../X86}/2010-05-28-Crash.ll | 0 .../X86}/2010-06-01-DeadArg-DbgInfo.ll | 0 test/CodeGen/X86/2010-07-11-FPStackLoneUse.ll | 28 + test/CodeGen/X86/2010-07-15-Crash.ll | 12 + test/CodeGen/X86/2010-07-29-SetccSimplify.ll | 14 + .../X86/2010-08-04-MaskedSignedCompare.ll | 36 + test/CodeGen/X86/2010-08-04-MingWCrash.ll | 39 + test/CodeGen/X86/2010-08-10-DbgConstant.ll | 25 + .../2010-09-01-RemoveCopyByCommutingDef.ll | 28 + test/CodeGen/X86/GC/dg.exp | 4 +- test/CodeGen/X86/MachineSink-PHIUse.ll | 39 + test/CodeGen/X86/avx-128.ll | 12 + test/CodeGen/X86/avx-256.ll | 15 + test/CodeGen/X86/avx-intrinsics-x86.ll | 2587 +++++++++++++ test/CodeGen/X86/avx-intrinsics-x86_64.ll | 50 + test/CodeGen/X86/barrier-sse.ll | 21 + test/CodeGen/X86/barrier.ll | 7 + test/CodeGen/X86/call-imm.ll | 2 +- .../change-compare-stride-trickiness-0.ll | 0 .../change-compare-stride-trickiness-1.ll | 0 .../change-compare-stride-trickiness-2.ll | 0 test/CodeGen/X86/constant-pool-remat-0.ll | 4 +- test/CodeGen/X86/critical-edge-split.ll | 2 +- test/CodeGen/X86/dllexport.ll | 2 +- test/CodeGen/X86/dyn-stackalloc.ll | 6 +- test/CodeGen/X86/empty-functions.ll | 15 + test/CodeGen/X86/fabs.ll | 2 +- test/CodeGen/X86/fast-isel-atomic.ll | 17 + test/CodeGen/X86/fast-isel-cmp-branch.ll | 29 + test/CodeGen/X86/fast-isel-gep.ll | 4 +- test/CodeGen/X86/fast-isel-shift-imm.ll | 2 +- test/CodeGen/X86/force-align-stack.ll | 21 + .../X86}/insert-positions.ll | 0 test/CodeGen/X86/int-intrinsic.ll | 20 + test/CodeGen/X86/licm-nested.ll | 2 +- test/CodeGen/X86/lock-inst-encoding.ll | 22 + test/CodeGen/X86/loop-strength-reduce4.ll | 4 +- test/CodeGen/X86/lsr-interesting-step.ll | 51 + test/CodeGen/X86/lsr-normalization.ll | 99 + test/CodeGen/X86/lsr-reuse.ll | 4 +- test/CodeGen/X86/lsr-static-addr.ll | 31 + test/CodeGen/X86/lsr-wrap.ll | 2 +- test/CodeGen/X86/narrow_op-2.ll | 25 - test/CodeGen/X86/phi-immediate-factoring.ll | 2 +- test/CodeGen/X86/pr7882.ll | 17 + test/CodeGen/X86/shl-anyext.ll | 40 + test/CodeGen/X86/sibcall.ll | 2 + test/CodeGen/X86/sse-minmax.ll | 4 +- test/CodeGen/X86/sse1.ll | 45 + test/CodeGen/X86/sse2.ll | 168 +- test/CodeGen/X86/sse41.ll | 25 + test/CodeGen/X86/stack-color-with-reg.ll | 361 -- test/CodeGen/X86/stdcall.ll | 2 +- test/CodeGen/X86/store-narrow.ll | 31 +- test/CodeGen/X86/tailcall-fastisel.ll | 14 +- test/CodeGen/X86/twoaddr-coalesce.ll | 2 +- test/CodeGen/X86/v2f32.ll | 57 +- test/CodeGen/X86/vec_cast.ll | 21 +- test/CodeGen/X86/vec_insert-6.ll | 2 +- test/CodeGen/X86/vec_insert-9.ll | 2 +- test/CodeGen/X86/vec_shift4.ll | 25 + test/CodeGen/X86/vec_shuffle-10.ll | 25 - test/CodeGen/X86/vec_shuffle-19.ll | 2 +- test/CodeGen/X86/vec_shuffle-20.ll | 2 +- test/CodeGen/X86/vec_shuffle-24.ll | 3 +- test/CodeGen/X86/vec_shuffle-3.ll | 20 - test/CodeGen/X86/vec_shuffle-37.ll | 14 + test/CodeGen/X86/vec_shuffle-4.ll | 12 - test/CodeGen/X86/vec_shuffle-5.ll | 13 - test/CodeGen/X86/vec_shuffle-6.ll | 42 - test/CodeGen/X86/vec_shuffle-7.ll | 11 - test/CodeGen/X86/vec_shuffle-8.ll | 10 - test/CodeGen/X86/vec_shuffle-9.ll | 21 - test/CodeGen/X86/widen_shuffle-1.ll | 8 +- test/CodeGen/X86/win_chkstk.ll | 45 + test/CodeGen/X86/zero-remat.ll | 2 +- test/DebugInfo/2010-07-19-Crash.ll | 24 + test/DebugInfo/2010-08-04-StackVariable.ll | 124 + test/DebugInfo/printdbginfo2.ll | 2 +- test/Feature/NamedMDNode.ll | 2 +- test/Feature/linker_private_linkages.ll | 1 + test/Feature/metadata.ll | 6 +- test/Feature/unions.ll | 14 - test/FrontendC++/2009-07-15-LineNumbers.cpp | 2 +- test/FrontendC++/2010-07-19-nowarn.cpp | 21 + test/FrontendC++/2010-07-23-DeclLoc.cpp | 86 + test/FrontendC++/2010-08-31-ByValArg.cpp | 53 + .../2008-03-24-BitField-And-Alloca.c | 2 +- test/FrontendC/2010-05-18-asmsched.c | 4 +- .../2010-07-14-overconservative-align.c | 4 +- test/FrontendC/2010-07-14-ref-off-end.c | 4 +- test/FrontendC/2010-07-27-MinNoFoldConst.c | 18 + test/FrontendC/2010-08-12-asm-aggr-arg.c | 16 + test/FrontendC/asm-reg-var-local.c | 32 + test/FrontendC/cstring-align.c | 14 +- test/FrontendC/misaligned-param.c | 15 + test/FrontendC/vla-1.c | 5 +- test/FrontendC/vla-2.c | 10 + .../2010-08-02-NonPODObjectValue.mm | 27 + test/FrontendObjC++/2010-08-04-Template.mm | 10 + test/FrontendObjC++/2010-08-06-X.Y-syntax.mm | 16 + test/FrontendObjC/2009-08-17-DebugInfo.m | 2 +- test/Integer/a15.ll | 27 - test/Integer/a15.ll.out | 21 - test/Integer/a17.ll | 25 - test/Integer/a17.ll.out | 20 - test/Integer/a31.ll | 25 - test/Integer/a31.ll.out | 20 - test/Integer/a33.ll | 26 - test/Integer/a33.ll.out | 20 - test/Integer/a63.ll | 25 - test/Integer/a63.ll.out | 20 - test/Integer/a7.ll | 31 - test/Integer/a7.ll.out | 25 - test/Integer/a9.ll | 25 - test/Integer/a9.ll.out | 19 - test/LLVMC/Alias.td | 24 + test/LLVMC/AppendCmdHook.td | 4 +- test/LLVMC/EmptyCompilationGraph.td | 2 +- test/LLVMC/EnvParentheses.td | 4 +- test/LLVMC/ExternOptions.td | 26 - test/LLVMC/ForwardAs.td | 6 +- test/LLVMC/ForwardTransformedValue.td | 12 +- test/LLVMC/ForwardValue.td | 12 +- test/LLVMC/HookWithArguments.td | 4 +- test/LLVMC/HookWithInFile.td | 4 +- test/LLVMC/Init.td | 4 +- test/LLVMC/LanguageMap.td | 29 + test/LLVMC/MultiValuedOption.td | 6 +- test/LLVMC/MultipleCompilationGraphs.td | 2 +- test/LLVMC/MultiplePluginPriorities.td | 17 - test/LLVMC/NoActions.td | 4 +- test/LLVMC/NoCompilationGraph.td | 2 +- test/LLVMC/OneOrMore.td | 4 +- test/LLVMC/OptionPreprocessor.td | 4 +- test/LLVMC/OutputSuffixHook.td | 8 +- test/LLVMC/TestWarnings.td | 2 +- test/Linker/metadata-a.ll | 15 + test/Linker/metadata-b.ll | 9 + test/MC/AsmParser/ARM/arm_instructions.s | 8 + test/MC/AsmParser/ELF/dg.exp | 6 + test/MC/AsmParser/ELF/directive_previous.s | 13 + test/MC/AsmParser/ELF/directive_section.s | 23 + .../AsmParser/X86/x86_32-avx-clmul-encoding.s | 42 + test/MC/AsmParser/X86/x86_32-avx-encoding.s | 3241 ++++++++++++++++ test/MC/AsmParser/X86/x86_32-encoding.s | 2889 +------------- test/MC/AsmParser/X86/x86_32-fma3-encoding.s | 674 ++++ test/MC/AsmParser/X86/x86_32-new-encoder.s | 8 + .../AsmParser/X86/x86_64-avx-clmul-encoding.s | 42 + test/MC/AsmParser/X86/x86_64-avx-encoding.s | 3318 +++++++++++++++++ test/MC/AsmParser/X86/x86_64-encoding.s | 2892 +------------- test/MC/AsmParser/X86/x86_64-fma3-encoding.s | 674 ++++ test/MC/AsmParser/X86/x86_64-new-encoder.s | 13 +- .../MC/AsmParser/X86/x86_instruction_errors.s | 5 + test/MC/AsmParser/X86/x86_instructions.s | 26 +- test/MC/AsmParser/X86/x86_operands.s | 2 - test/MC/AsmParser/dg.exp | 5 +- test/MC/AsmParser/directive_abort.s | 6 +- test/MC/AsmParser/directive_elf_size.s | 8 + test/MC/AsmParser/directive_values.s | 17 + test/MC/AsmParser/dollars-in-identifiers.s | 7 + .../MC/AsmParser/macro-def-in-instantiation.s | 13 + test/MC/AsmParser/macros-parsing.s | 23 + test/MC/AsmParser/macros.s | 39 + test/MC/COFF/basic-coff.ll | 136 + test/MC/COFF/dg.exp | 5 + test/MC/COFF/switch-relocations.ll | 34 + test/MC/COFF/symbol-fragment-offset.ll | 182 + test/MC/Disassembler/arm-tests.txt | 34 + test/MC/Disassembler/neon-tests.txt | 3 + test/MC/Disassembler/thumb-tests.txt | 12 + test/MC/ELF/bss.ll | 8 + test/MC/ELF/dg.exp | 5 + test/Makefile | 39 +- test/Other/close-stderr.ll | 9 + test/Other/constant-fold-gep.ll | 42 - test/Other/inline-asm-newline-terminator.ll | 1 - test/Other/lint.ll | 4 +- test/Scripts/coff-dump.py | 566 +++ test/Scripts/coff-dump.py.bat | 4 + test/TableGen/FieldAccess.td | 14 + test/TableGen/ListManip.td | 10 + test/TestRunner.sh | 37 +- test/Transforms/ABCD/basic.ll | 27 - test/Transforms/ConstProp/constant-expr.ll | 4 +- test/Transforms/ConstantMerge/dont-merge.ll | 14 + .../2010-09-02-Trunc.ll | 25 + .../CorrelatedValuePropagation/basic.ll | 83 + .../CorrelatedValuePropagation/dg.exp | 3 + .../GVN/2009-07-13-MemDepSortFail.ll | 2 +- .../GlobalOpt/2008-07-17-addrspace.ll | 2 +- test/Transforms/GlobalOpt/crash.ll | 15 + .../IPConstantProp/2009-09-24-byval-ptr.ll | 4 +- .../2003-12-10-IndVarDeadCode.ll | 25 - .../IndVarSimplify/2009-05-24-useafterfree.ll | 2 +- test/Transforms/IndVarSimplify/crash.ll | 36 + .../IndVarSimplify/loop_evaluate10.ll | 2 +- test/Transforms/IndVarSimplify/uglygep.ll | 40 + test/Transforms/InstCombine/align-addr.ll | 33 +- test/Transforms/InstCombine/align-inc.ll | 12 - test/Transforms/InstCombine/bit-checks.ll | 11 + .../InstCombine/bitcast-scalar-to-vector.ll | 14 - test/Transforms/InstCombine/bitcast.ll | 105 + test/Transforms/InstCombine/intrinsics.ll | 34 +- test/Transforms/InstCombine/phi.ll | 21 + test/Transforms/InstCombine/shift-simplify.ll | 42 - .../InstCombine/shift-trunc-shift.ll | 10 - test/Transforms/InstCombine/shift.ll | 102 +- test/Transforms/InstCombine/sqrt.ll | 32 + test/Transforms/InstCombine/trunc-mask-ext.ll | 38 - test/Transforms/InstCombine/trunc.ll | 99 + .../InstCombine/urem-simplify-bug.ll | 2 +- .../JumpThreading/2010-08-26-and.ll | 162 + test/Transforms/JumpThreading/basic.ll | 68 +- test/Transforms/JumpThreading/crash.ll | 50 + test/Transforms/JumpThreading/lvi-load.ll | 49 + .../LCSSA/2006-06-03-IncorrectIDFPhis.ll | 4 +- test/Transforms/LICM/crash.ll | 61 + test/Transforms/LICM/hoisting.ll | 16 + test/Transforms/LICM/scalar_promote.ll | 59 +- test/Transforms/LICM/sinking.ll | 14 + test/Transforms/LoopRotate/phi-duplicate.ll | 22 +- .../2010-07-15-IncorrectDomFrontierUpdate.ll | 20 + .../LoopSimplify/indirectbr-backedge.ll | 35 + test/Transforms/LoopSimplify/preserve-scev.ll | 50 + test/Transforms/LoopStrengthReduce/pr3571.ll | 2 +- test/Transforms/LoopStrengthReduce/uglygep.ll | 1 - test/Transforms/LoopUnswitch/infinite-loop.ll | 53 + test/Transforms/LowerAtomic/atomic-load.ll | 40 + test/Transforms/LowerAtomic/atomic-swap.ll | 26 + test/Transforms/LowerAtomic/barrier.ll | 10 + test/Transforms/{SSI => LowerAtomic}/dg.exp | 0 .../MergeFunc/vectors-and-arrays.ll | 18 + .../PartialSpecialize/two-specializations.ll | 22 +- test/Transforms/SCCP/ipsccp-addr-taken.ll | 28 + test/Transforms/SSI/2009-07-09-Invoke.ll | 71 - .../SSI/2009-08-15-UnreachableBB.ll | 19 - test/Transforms/SSI/2009-08-17-CritEdge.ll | 15 - .../SSI/2009-08-19-UnreachableBB2.ll | 22 - test/Transforms/SSI/ssiphi.ll | 22 - test/Transforms/ScalarRepl/vector_promote.ll | 43 +- .../2008-04-27-MultipleReturnCrash.ll | 2 +- test/Transforms/SimplifyCFG/basictest.ll | 1 - test/Transforms/SimplifyCFG/indirectbr.ll | 64 + .../StripSymbols/2010-08-25-crash.ll | 19 + .../TailCallElim/accum_recursion.ll | 65 +- .../accum_recursion_constant_arg.ll | 20 - test/Transforms/TailCallElim/switch.ll | 34 - .../TailDup/2008-06-11-AvoidDupLoopHeader.ll | 2 +- test/Verifier/2010-08-07-PointerIntrinsic.ll | 21 + test/lit.cfg | 21 +- tools/CMakeLists.txt | 2 + tools/Makefile | 20 +- tools/bugpoint-passes/CMakeLists.txt | 3 + tools/bugpoint-passes/Makefile | 23 + .../TestPasses.cpp | 16 +- tools/bugpoint-passes/bugpoint.exports | 0 tools/bugpoint/BugDriver.cpp | 29 +- tools/bugpoint/BugDriver.h | 67 +- tools/bugpoint/CMakeLists.txt | 1 - tools/bugpoint/CrashDebugger.cpp | 73 +- tools/bugpoint/ExecutionDriver.cpp | 24 +- tools/bugpoint/ExtractFunction.cpp | 91 +- tools/bugpoint/FindBugs.cpp | 8 +- tools/bugpoint/Miscompilation.cpp | 157 +- tools/bugpoint/OptimizerDriver.cpp | 113 +- tools/bugpoint/ToolRunner.cpp | 12 +- tools/bugpoint/bugpoint.cpp | 26 +- tools/edis/CMakeLists.txt | 14 +- tools/edis/EDInfo.td | 1 - tools/edis/EDMain.cpp | 160 +- tools/edis/Makefile | 30 +- tools/gold/README.txt | 4 +- tools/gold/gold-plugin.cpp | 40 +- tools/llc/llc.cpp | 151 +- tools/lli/lli.cpp | 3 +- tools/llvm-as/llvm-as.cpp | 18 +- tools/llvm-bcanalyzer/llvm-bcanalyzer.cpp | 17 +- tools/llvm-config/CMakeLists.txt | 2 +- tools/llvm-diff/CMakeLists.txt | 6 + tools/llvm-diff/DifferenceEngine.cpp | 676 ++++ tools/llvm-diff/DifferenceEngine.h | 179 + .../plugins/Plugin => llvm-diff}/Makefile | 16 +- tools/llvm-diff/llvm-diff.cpp | 331 ++ tools/llvm-dis/llvm-dis.cpp | 47 +- tools/llvm-extract/llvm-extract.cpp | 38 +- tools/llvm-ld/llvm-ld.cpp | 38 +- tools/llvm-link/llvm-link.cpp | 19 +- tools/llvm-mc/CMakeLists.txt | 3 +- tools/llvm-mc/Disassembler.cpp | 182 +- tools/llvm-mc/Disassembler.h | 7 +- tools/llvm-mc/Makefile | 4 +- tools/llvm-mc/llvm-mc.cpp | 177 +- tools/llvm-nm/llvm-nm.cpp | 15 +- tools/llvm-prof/llvm-prof.cpp | 15 +- tools/llvm-shlib/Makefile | 53 +- tools/llvmc/CMakeLists.txt | 2 +- tools/llvmc/Makefile | 8 +- tools/llvmc/doc/LLVMC-Reference.rst | 9 +- tools/llvmc/example/Hello/Hello.cpp | 33 - tools/llvmc/example/Simple/PluginMain.cpp | 1 - tools/llvmc/example/Skeleton/Makefile | 24 - tools/llvmc/example/Skeleton/driver/Makefile | 13 - tools/llvmc/example/Skeleton/plugins/Makefile | 18 - .../Skeleton/plugins/Plugin/PluginMain.cpp | 1 - tools/llvmc/example/mcc16/Makefile | 18 - tools/llvmc/example/mcc16/driver/Makefile | 13 - tools/llvmc/example/mcc16/plugins/Makefile | 18 - tools/llvmc/examples/Hello/Hello.cpp | 29 + .../{example => examples}/Hello/Makefile | 4 +- .../{example/Simple => examples}/Makefile | 7 +- .../Clang => examples/Simple}/Makefile | 6 +- tools/llvmc/examples/Simple/Simple.cpp | 2 + .../{example => examples}/Simple/Simple.td | 24 +- .../Skeleton/AutoGenerated.td} | 4 +- tools/llvmc/examples/Skeleton/Hooks.cpp | 12 + .../{driver => examples/Skeleton}/Main.cpp | 3 +- tools/llvmc/examples/Skeleton/Makefile | 20 + .../{example => examples}/Skeleton/README | 2 +- .../mcc16/Hooks.cpp} | 35 +- .../mcc16/driver => examples/mcc16}/Main.cpp | 17 +- .../{plugins/Base => examples/mcc16}/Makefile | 6 +- .../PIC16Base.td => examples/mcc16/PIC16.td} | 50 +- .../llvmc/{example => examples}/mcc16/README | 2 +- tools/llvmc/plugins/Base/PluginMain.cpp | 1 - tools/llvmc/plugins/Clang/PluginMain.cpp | 1 - tools/llvmc/plugins/Makefile | 18 - tools/llvmc/src/AutoGenerated.td | 17 + tools/llvmc/{plugins/Base => src}/Base.td.in | 109 +- tools/llvmc/{plugins/Clang => src}/Clang.td | 68 +- tools/llvmc/{plugins/Base => src}/Hooks.cpp | 0 .../{example/Skeleton/driver => src}/Main.cpp | 4 +- tools/llvmc/{driver => src}/Makefile | 5 +- tools/lto/LTOCodeGenerator.cpp | 50 +- tools/lto/LTOCodeGenerator.h | 6 +- tools/lto/LTOModule.cpp | 869 +++-- tools/lto/LTOModule.h | 1 + tools/lto/Makefile | 13 +- tools/lto/lto.cpp | 28 +- tools/lto/lto.exports | 3 + tools/opt/AnalysisWrappers.cpp | 22 +- tools/opt/GraphPrinters.cpp | 38 +- tools/opt/PrintSCC.cpp | 40 +- tools/opt/opt.cpp | 137 +- unittests/ADT/SmallVectorTest.cpp | 4 +- unittests/ADT/StringRefTest.cpp | 9 + unittests/ADT/TripleTest.cpp | 117 +- .../PIC16Base => unittests/Analysis}/Makefile | 14 +- unittests/Analysis/ScalarEvolutionTest.cpp | 82 + unittests/ExecutionEngine/JIT/JITTest.cpp | 27 - unittests/Makefile | 2 +- unittests/Makefile.unittest | 4 +- unittests/Support/Casting.cpp | 154 + unittests/Support/ConstantRangeTest.cpp | 69 +- unittests/Support/ValueHandleTest.cpp | 1 - unittests/VMCore/DerivedTypesTest.cpp | 57 +- unittests/VMCore/InstructionsTest.cpp | 4 +- unittests/VMCore/MetadataTest.cpp | 7 +- unittests/VMCore/PassManagerTest.cpp | 12 +- utils/FileCheck/FileCheck.cpp | 160 +- utils/FileUpdate/FileUpdate.cpp | 24 +- utils/Makefile | 7 +- utils/RegressionFinder.pl | 186 - utils/TableGen/ARMDecoderEmitter.cpp | 61 +- utils/TableGen/AsmMatcherEmitter.cpp | 164 +- utils/TableGen/AsmWriterEmitter.cpp | 2 +- utils/TableGen/CallingConvEmitter.cpp | 2 + utils/TableGen/ClangAttrEmitter.cpp | 582 ++- utils/TableGen/ClangAttrEmitter.h | 39 + utils/TableGen/CodeGenDAGPatterns.cpp | 4 +- utils/TableGen/CodeGenInstruction.cpp | 1 + utils/TableGen/CodeGenInstruction.h | 1 + utils/TableGen/CodeGenIntrinsics.h | 2 +- utils/TableGen/CodeGenRegisters.h | 32 + utils/TableGen/CodeGenTarget.cpp | 10 +- utils/TableGen/DAGISelEmitter.cpp | 48 - utils/TableGen/DAGISelEmitter.h | 2 - utils/TableGen/DAGISelMatcherEmitter.cpp | 2 +- utils/TableGen/DAGISelMatcherGen.cpp | 7 +- utils/TableGen/EDEmitter.cpp | 59 +- utils/TableGen/EDEmitter.h | 3 - utils/TableGen/FastISelEmitter.cpp | 24 +- utils/TableGen/InstrInfoEmitter.cpp | 1 + utils/TableGen/IntrinsicEmitter.cpp | 4 +- utils/TableGen/LLVMCConfigurationEmitter.cpp | 656 ++-- utils/TableGen/NeonEmitter.cpp | 11 +- utils/TableGen/Record.cpp | 28 +- utils/TableGen/Record.h | 12 +- utils/TableGen/RegisterInfoEmitter.cpp | 30 +- utils/TableGen/TableGen.cpp | 98 +- utils/buildit/GNUmakefile | 16 +- utils/buildit/build_llvm | 33 +- utils/lit/lit/ExampleTests/lit.cfg | 3 + .../lit/ExampleTests/required-and-missing.c | 4 + .../lit/ExampleTests/required-and-present.c | 2 + utils/lit/lit/TestFormats.py | 7 + utils/lit/lit/TestRunner.py | 86 +- utils/lit/lit/TestingConfig.py | 9 +- utils/lit/lit/lit.py | 5 +- utils/llvm-lit/Makefile | 21 + utils/llvm-lit/llvm-lit.in | 21 + utils/llvm.grm | 4 + utils/llvmdo | 4 - utils/mkpatch | 37 - utils/userloc.pl | 216 -- utils/valgrind/i386-pc-linux-gnu.supp | 34 + utils/valgrind/x86_64-pc-linux-gnu.supp | 43 +- utils/vim/llvm.vim | 10 +- utils/vim/vimrc | 129 +- 1399 files changed, 60896 insertions(+), 33583 deletions(-) create mode 100644 cmake/modules/CMakeLists.txt create mode 100644 cmake/modules/ChooseMSVCCRT.cmake create mode 100644 cmake/modules/LLVM.cmake create mode 100644 cmake/modules/VersionFromVCS.cmake create mode 100644 docs/CommandGuide/llvm-diff.pod create mode 100644 include/llvm/ADT/NullablePtr.h create mode 100644 include/llvm/Analysis/RegionInfo.h create mode 100644 include/llvm/Analysis/RegionIterator.h create mode 100644 include/llvm/Analysis/RegionPrinter.h rename include/llvm/Assembly/{AsmAnnotationWriter.h => AssemblyAnnotationWriter.h} (73%) create mode 100644 include/llvm/CompilerDriver/AutoGenerated.h delete mode 100644 include/llvm/CompilerDriver/ForceLinkage.h delete mode 100644 include/llvm/CompilerDriver/ForceLinkageMacros.h create mode 100644 include/llvm/CompilerDriver/Main.h delete mode 100644 include/llvm/CompilerDriver/Plugin.h create mode 100644 include/llvm/Config/llvm-config.h.cmake create mode 100644 include/llvm/Config/llvm-config.h.in create mode 100644 include/llvm/MC/ELFObjectWriter.h create mode 100644 include/llvm/MC/MCDwarf.h create mode 100644 include/llvm/MC/MCELFSymbolFlags.h delete mode 100644 include/llvm/MC/MCParser/AsmParser.h create mode 100644 include/llvm/PassRegistry.h create mode 100644 include/llvm/Support/CrashRecoveryContext.h delete mode 100644 include/llvm/Support/SlowOperationInformer.h delete mode 100644 include/llvm/Transforms/Utils/SSI.h rename {lib => include/llvm}/Transforms/Utils/ValueMapper.h (65%) create mode 100644 lib/Analysis/RegionInfo.cpp create mode 100644 lib/Analysis/RegionPrinter.cpp create mode 100644 lib/Analysis/TypeBasedAliasAnalysis.cpp create mode 100644 lib/CodeGen/LocalStackSlotAllocation.cpp delete mode 100644 lib/CodeGen/OptimizeExts.cpp create mode 100644 lib/CodeGen/PeepholeOptimizer.cpp create mode 100644 lib/CodeGen/RenderMachineFunction.cpp create mode 100644 lib/CodeGen/RenderMachineFunction.h create mode 100644 lib/CodeGen/SplitKit.cpp create mode 100644 lib/CodeGen/SplitKit.h create mode 100644 lib/CodeGen/Splitter.cpp create mode 100644 lib/CodeGen/Splitter.h delete mode 100644 lib/CompilerDriver/Plugin.cpp create mode 100644 lib/MC/ELFObjectWriter.cpp create mode 100644 lib/MC/MCDisassembler/CMakeLists.txt rename {tools/edis => lib/MC/MCDisassembler}/EDDisassembler.cpp (89%) rename {tools/edis => lib/MC/MCDisassembler}/EDDisassembler.h (91%) create mode 100644 lib/MC/MCDisassembler/EDInfo.h rename {tools/edis => lib/MC/MCDisassembler}/EDInst.cpp (100%) rename {tools/edis => lib/MC/MCDisassembler}/EDInst.h (95%) rename {tools/edis => lib/MC/MCDisassembler}/EDOperand.cpp (98%) rename {tools/edis => lib/MC/MCDisassembler}/EDOperand.h (88%) rename {tools/edis => lib/MC/MCDisassembler}/EDToken.cpp (98%) rename {tools/edis => lib/MC/MCDisassembler}/EDToken.h (97%) create mode 100644 lib/MC/MCDisassembler/Makefile create mode 100644 lib/MC/MCDwarf.cpp create mode 100644 lib/MC/MCELFStreamer.cpp create mode 100644 lib/Support/CrashRecoveryContext.cpp delete mode 100644 lib/Support/SlowOperationInformer.cpp rename lib/Target/ARM/{AsmPrinter => }/ARMAsmPrinter.cpp (94%) create mode 100644 lib/Target/ARM/ARMFastISel.cpp create mode 100644 lib/Target/ARM/ARMGlobalMerge.cpp rename lib/Target/ARM/{AsmPrinter => }/ARMMCInstLower.cpp (100%) rename lib/Target/ARM/{AsmPrinter => }/ARMMCInstLower.h (100%) delete mode 100644 lib/Target/MSIL/CMakeLists.txt delete mode 100644 lib/Target/MSIL/MSILWriter.cpp delete mode 100644 lib/Target/MSIL/MSILWriter.h delete mode 100644 lib/Target/MSIL/Makefile delete mode 100644 lib/Target/MSIL/README.TXT delete mode 100644 lib/Target/MSIL/TargetInfo/CMakeLists.txt delete mode 100644 lib/Target/MSIL/TargetInfo/MSILTargetInfo.cpp delete mode 100644 lib/Target/MSIL/TargetInfo/Makefile create mode 100644 lib/Target/X86/AsmPrinter/X86InstComments.cpp create mode 100644 lib/Target/X86/AsmPrinter/X86InstComments.h rename lib/Target/X86/{AsmPrinter => }/X86AsmPrinter.cpp (93%) rename lib/Target/X86/{AsmPrinter => }/X86AsmPrinter.h (96%) delete mode 100644 lib/Target/X86/X86FloatingPointRegKill.cpp create mode 100644 lib/Target/X86/X86InstrFMA.td rename lib/Target/X86/{AsmPrinter => }/X86MCInstLower.cpp (86%) rename lib/Target/X86/{AsmPrinter => }/X86MCInstLower.h (82%) create mode 100644 lib/Target/X86/X86ShuffleDecode.h delete mode 100644 lib/Transforms/Scalar/ABCD.cpp create mode 100644 lib/Transforms/Scalar/CorrelatedValuePropagation.cpp create mode 100644 lib/Transforms/Scalar/LowerAtomic.cpp delete mode 100644 lib/Transforms/Utils/SSI.cpp create mode 100644 lib/VMCore/PassRegistry.cpp rename runtime/libprofile/{exported_symbols.lst => libprofile.exports} (100%) create mode 100644 test/Analysis/BasicAA/getmodrefinfo-cs-cs.ll create mode 100644 test/Analysis/RegionInfo/20100809_bb_not_in_domtree.ll create mode 100644 test/Analysis/RegionInfo/block_sort.ll create mode 100644 test/Analysis/RegionInfo/cond_loop.ll create mode 100644 test/Analysis/RegionInfo/condition_complicated.ll create mode 100644 test/Analysis/RegionInfo/condition_complicated_2.ll create mode 100644 test/Analysis/RegionInfo/condition_forward_edge.ll create mode 100644 test/Analysis/RegionInfo/condition_same_exit.ll create mode 100644 test/Analysis/RegionInfo/condition_simple.ll rename test/{Transforms/ABCD => Analysis/RegionInfo}/dg.exp (100%) create mode 100644 test/Analysis/RegionInfo/exit_in_condition.ll create mode 100644 test/Analysis/RegionInfo/infinite_loop.ll create mode 100644 test/Analysis/RegionInfo/infinite_loop_2.ll create mode 100644 test/Analysis/RegionInfo/infinite_loop_3.ll create mode 100644 test/Analysis/RegionInfo/infinite_loop_4.ll create mode 100644 test/Analysis/RegionInfo/loop_with_condition.ll create mode 100644 test/Analysis/RegionInfo/loops_1.ll create mode 100644 test/Analysis/RegionInfo/loops_2.ll create mode 100644 test/Analysis/RegionInfo/mix_1.ll create mode 100644 test/Analysis/RegionInfo/multiple_exiting_edge.ll create mode 100644 test/Analysis/RegionInfo/nested_loops.ll create mode 100644 test/Analysis/RegionInfo/next.ll create mode 100644 test/Analysis/RegionInfo/paper.ll create mode 100644 test/Analysis/RegionInfo/two_loops_same_header.ll delete mode 100644 test/Assembler/2010-01-06-UnionType.ll create mode 100644 test/Assembler/align-inst-alloca.ll create mode 100644 test/Assembler/align-inst-load.ll create mode 100644 test/Assembler/align-inst-store.ll create mode 100644 test/Assembler/align-inst.ll create mode 100644 test/Assembler/comment.ll create mode 100644 test/Bitcode/AutoUpgradeGlobals.ll create mode 100644 test/Bitcode/AutoUpgradeGlobals.ll.bc create mode 100644 test/Bitcode/neon-intrinsics.ll create mode 100644 test/Bitcode/neon-intrinsics.ll.bc create mode 100644 test/BugPoint/metadata.ll create mode 100644 test/CodeGen/ARM/2010-07-26-GlobalMerge.ll create mode 100644 test/CodeGen/ARM/2010-08-04-EHCrash.ll create mode 100644 test/CodeGen/ARM/bfi.ll create mode 100644 test/CodeGen/ARM/code-placement.ll create mode 100644 test/CodeGen/ARM/fast-isel.ll create mode 100644 test/CodeGen/Alpha/2010-08-01-mulreduce64.ll create mode 100644 test/CodeGen/CellSPU/arg_ret.ll create mode 100644 test/CodeGen/CellSPU/v2f32.ll create mode 100644 test/CodeGen/CellSPU/v2i32.ll create mode 100644 test/CodeGen/Generic/2010-07-27-DAGCombineCrash.ll create mode 100644 test/CodeGen/Mips/2010-07-20-Select.ll create mode 100644 test/CodeGen/Mips/2010-07-20-Switch.ll delete mode 100644 test/CodeGen/PowerPC/2008-01-25-EmptyFunction.ll create mode 100644 test/CodeGen/PowerPC/empty-functions.ll create mode 100644 test/CodeGen/Thumb/2010-07-15-debugOrdering.ll create mode 100644 test/CodeGen/Thumb/barrier.ll create mode 100644 test/CodeGen/Thumb2/2010-08-10-VarSizedAllocaBug.ll create mode 100644 test/CodeGen/Thumb2/bfi.ll create mode 100644 test/CodeGen/Thumb2/cortex-fp.ll create mode 100644 test/CodeGen/Thumb2/machine-licm-vdup.ll create mode 100644 test/CodeGen/Thumb2/thumb2-badreg-operands.ll create mode 100644 test/CodeGen/Thumb2/thumb2-barrier.ll delete mode 100644 test/CodeGen/X86/2007-06-14-branchfold.ll delete mode 100644 test/CodeGen/X86/2008-01-25-EmptyFunction.ll rename test/{Transforms/LoopStrengthReduce => CodeGen/X86}/2008-08-06-CmpStride.ll (100%) rename test/{Transforms/LoopStrengthReduce => CodeGen/X86}/2009-02-09-ivs-different-sizes.ll (100%) rename test/{DebugInfo => CodeGen/X86}/2010-01-18-DbgValue.ll (93%) rename test/{DebugInfo => CodeGen/X86}/2010-02-01-DbgValueCrash.ll (98%) rename test/{DebugInfo => CodeGen/X86}/2010-05-25-DotDebugLoc.ll (99%) rename test/{DebugInfo => CodeGen/X86}/2010-05-28-Crash.ll (100%) rename test/{DebugInfo => CodeGen/X86}/2010-06-01-DeadArg-DbgInfo.ll (100%) create mode 100644 test/CodeGen/X86/2010-07-11-FPStackLoneUse.ll create mode 100644 test/CodeGen/X86/2010-07-15-Crash.ll create mode 100644 test/CodeGen/X86/2010-07-29-SetccSimplify.ll create mode 100644 test/CodeGen/X86/2010-08-04-MaskedSignedCompare.ll create mode 100644 test/CodeGen/X86/2010-08-04-MingWCrash.ll create mode 100644 test/CodeGen/X86/2010-08-10-DbgConstant.ll create mode 100644 test/CodeGen/X86/2010-09-01-RemoveCopyByCommutingDef.ll create mode 100644 test/CodeGen/X86/MachineSink-PHIUse.ll create mode 100644 test/CodeGen/X86/avx-128.ll create mode 100644 test/CodeGen/X86/avx-256.ll create mode 100644 test/CodeGen/X86/avx-intrinsics-x86.ll create mode 100644 test/CodeGen/X86/avx-intrinsics-x86_64.ll create mode 100644 test/CodeGen/X86/barrier-sse.ll create mode 100644 test/CodeGen/X86/barrier.ll rename test/{Transforms/LoopStrengthReduce => CodeGen/X86}/change-compare-stride-trickiness-0.ll (100%) rename test/{Transforms/LoopStrengthReduce => CodeGen/X86}/change-compare-stride-trickiness-1.ll (100%) rename test/{Transforms/LoopStrengthReduce => CodeGen/X86}/change-compare-stride-trickiness-2.ll (100%) create mode 100644 test/CodeGen/X86/empty-functions.ll create mode 100644 test/CodeGen/X86/fast-isel-atomic.ll create mode 100644 test/CodeGen/X86/fast-isel-cmp-branch.ll create mode 100644 test/CodeGen/X86/force-align-stack.ll rename test/{Transforms/LoopStrengthReduce => CodeGen/X86}/insert-positions.ll (100%) create mode 100644 test/CodeGen/X86/int-intrinsic.ll create mode 100644 test/CodeGen/X86/lock-inst-encoding.ll create mode 100644 test/CodeGen/X86/lsr-interesting-step.ll create mode 100644 test/CodeGen/X86/lsr-normalization.ll create mode 100644 test/CodeGen/X86/lsr-static-addr.ll delete mode 100644 test/CodeGen/X86/narrow_op-2.ll create mode 100644 test/CodeGen/X86/pr7882.ll create mode 100644 test/CodeGen/X86/shl-anyext.ll create mode 100644 test/CodeGen/X86/sse1.ll delete mode 100644 test/CodeGen/X86/stack-color-with-reg.ll create mode 100644 test/CodeGen/X86/vec_shift4.ll delete mode 100644 test/CodeGen/X86/vec_shuffle-10.ll delete mode 100644 test/CodeGen/X86/vec_shuffle-3.ll create mode 100644 test/CodeGen/X86/vec_shuffle-37.ll delete mode 100644 test/CodeGen/X86/vec_shuffle-4.ll delete mode 100644 test/CodeGen/X86/vec_shuffle-5.ll delete mode 100644 test/CodeGen/X86/vec_shuffle-6.ll delete mode 100644 test/CodeGen/X86/vec_shuffle-7.ll delete mode 100644 test/CodeGen/X86/vec_shuffle-8.ll delete mode 100644 test/CodeGen/X86/vec_shuffle-9.ll create mode 100644 test/CodeGen/X86/win_chkstk.ll create mode 100644 test/DebugInfo/2010-07-19-Crash.ll create mode 100644 test/DebugInfo/2010-08-04-StackVariable.ll delete mode 100644 test/Feature/unions.ll create mode 100644 test/FrontendC++/2010-07-19-nowarn.cpp create mode 100644 test/FrontendC++/2010-07-23-DeclLoc.cpp create mode 100644 test/FrontendC++/2010-08-31-ByValArg.cpp create mode 100644 test/FrontendC/2010-07-27-MinNoFoldConst.c create mode 100644 test/FrontendC/2010-08-12-asm-aggr-arg.c create mode 100644 test/FrontendC/asm-reg-var-local.c create mode 100644 test/FrontendC/misaligned-param.c create mode 100644 test/FrontendC/vla-2.c create mode 100644 test/FrontendObjC++/2010-08-02-NonPODObjectValue.mm create mode 100644 test/FrontendObjC++/2010-08-04-Template.mm create mode 100644 test/FrontendObjC++/2010-08-06-X.Y-syntax.mm delete mode 100644 test/Integer/a15.ll delete mode 100644 test/Integer/a15.ll.out delete mode 100644 test/Integer/a17.ll delete mode 100644 test/Integer/a17.ll.out delete mode 100644 test/Integer/a31.ll delete mode 100644 test/Integer/a31.ll.out delete mode 100644 test/Integer/a33.ll delete mode 100644 test/Integer/a33.ll.out delete mode 100644 test/Integer/a63.ll delete mode 100644 test/Integer/a63.ll.out delete mode 100644 test/Integer/a7.ll delete mode 100644 test/Integer/a7.ll.out delete mode 100644 test/Integer/a9.ll delete mode 100644 test/Integer/a9.ll.out create mode 100644 test/LLVMC/Alias.td delete mode 100644 test/LLVMC/ExternOptions.td create mode 100644 test/LLVMC/LanguageMap.td delete mode 100644 test/LLVMC/MultiplePluginPriorities.td create mode 100644 test/Linker/metadata-a.ll create mode 100644 test/Linker/metadata-b.ll create mode 100644 test/MC/AsmParser/ARM/arm_instructions.s create mode 100644 test/MC/AsmParser/ELF/dg.exp create mode 100644 test/MC/AsmParser/ELF/directive_previous.s create mode 100644 test/MC/AsmParser/ELF/directive_section.s create mode 100644 test/MC/AsmParser/X86/x86_32-avx-clmul-encoding.s create mode 100644 test/MC/AsmParser/X86/x86_32-avx-encoding.s create mode 100644 test/MC/AsmParser/X86/x86_32-fma3-encoding.s create mode 100644 test/MC/AsmParser/X86/x86_64-avx-clmul-encoding.s create mode 100644 test/MC/AsmParser/X86/x86_64-avx-encoding.s create mode 100644 test/MC/AsmParser/X86/x86_64-fma3-encoding.s create mode 100644 test/MC/AsmParser/X86/x86_instruction_errors.s create mode 100644 test/MC/AsmParser/directive_elf_size.s create mode 100644 test/MC/AsmParser/dollars-in-identifiers.s create mode 100644 test/MC/AsmParser/macro-def-in-instantiation.s create mode 100644 test/MC/AsmParser/macros-parsing.s create mode 100644 test/MC/AsmParser/macros.s create mode 100644 test/MC/COFF/basic-coff.ll create mode 100644 test/MC/COFF/dg.exp create mode 100644 test/MC/COFF/switch-relocations.ll create mode 100644 test/MC/COFF/symbol-fragment-offset.ll create mode 100644 test/MC/ELF/bss.ll create mode 100644 test/MC/ELF/dg.exp create mode 100644 test/Other/close-stderr.ll create mode 100755 test/Scripts/coff-dump.py create mode 100644 test/Scripts/coff-dump.py.bat create mode 100644 test/TableGen/FieldAccess.td create mode 100644 test/TableGen/ListManip.td delete mode 100644 test/Transforms/ABCD/basic.ll create mode 100644 test/Transforms/CorrelatedValuePropagation/2010-09-02-Trunc.ll create mode 100644 test/Transforms/CorrelatedValuePropagation/basic.ll create mode 100644 test/Transforms/CorrelatedValuePropagation/dg.exp delete mode 100644 test/Transforms/IndVarSimplify/2003-12-10-IndVarDeadCode.ll create mode 100644 test/Transforms/IndVarSimplify/uglygep.ll delete mode 100644 test/Transforms/InstCombine/align-inc.ll delete mode 100644 test/Transforms/InstCombine/bitcast-scalar-to-vector.ll create mode 100644 test/Transforms/InstCombine/bitcast.ll delete mode 100644 test/Transforms/InstCombine/shift-simplify.ll delete mode 100644 test/Transforms/InstCombine/shift-trunc-shift.ll create mode 100644 test/Transforms/InstCombine/sqrt.ll delete mode 100644 test/Transforms/InstCombine/trunc-mask-ext.ll create mode 100644 test/Transforms/InstCombine/trunc.ll create mode 100644 test/Transforms/JumpThreading/2010-08-26-and.ll create mode 100644 test/Transforms/JumpThreading/lvi-load.ll create mode 100644 test/Transforms/LICM/crash.ll create mode 100644 test/Transforms/LoopSimplify/2010-07-15-IncorrectDomFrontierUpdate.ll create mode 100644 test/Transforms/LoopSimplify/indirectbr-backedge.ll create mode 100644 test/Transforms/LoopSimplify/preserve-scev.ll create mode 100644 test/Transforms/LoopUnswitch/infinite-loop.ll create mode 100644 test/Transforms/LowerAtomic/atomic-load.ll create mode 100644 test/Transforms/LowerAtomic/atomic-swap.ll create mode 100644 test/Transforms/LowerAtomic/barrier.ll rename test/Transforms/{SSI => LowerAtomic}/dg.exp (100%) create mode 100644 test/Transforms/MergeFunc/vectors-and-arrays.ll create mode 100644 test/Transforms/SCCP/ipsccp-addr-taken.ll delete mode 100644 test/Transforms/SSI/2009-07-09-Invoke.ll delete mode 100644 test/Transforms/SSI/2009-08-15-UnreachableBB.ll delete mode 100644 test/Transforms/SSI/2009-08-17-CritEdge.ll delete mode 100644 test/Transforms/SSI/2009-08-19-UnreachableBB2.ll delete mode 100644 test/Transforms/SSI/ssiphi.ll create mode 100644 test/Transforms/SimplifyCFG/indirectbr.ll create mode 100644 test/Transforms/StripSymbols/2010-08-25-crash.ll delete mode 100644 test/Transforms/TailCallElim/accum_recursion_constant_arg.ll delete mode 100644 test/Transforms/TailCallElim/switch.ll create mode 100644 test/Verifier/2010-08-07-PointerIntrinsic.ll create mode 100644 tools/bugpoint-passes/CMakeLists.txt create mode 100644 tools/bugpoint-passes/Makefile rename tools/{bugpoint => bugpoint-passes}/TestPasses.cpp (91%) create mode 100644 tools/bugpoint-passes/bugpoint.exports delete mode 100644 tools/edis/EDInfo.td create mode 100644 tools/llvm-diff/CMakeLists.txt create mode 100644 tools/llvm-diff/DifferenceEngine.cpp create mode 100644 tools/llvm-diff/DifferenceEngine.h rename tools/{llvmc/example/Skeleton/plugins/Plugin => llvm-diff}/Makefile (58%) create mode 100644 tools/llvm-diff/llvm-diff.cpp delete mode 100644 tools/llvmc/example/Hello/Hello.cpp delete mode 100644 tools/llvmc/example/Simple/PluginMain.cpp delete mode 100644 tools/llvmc/example/Skeleton/Makefile delete mode 100644 tools/llvmc/example/Skeleton/driver/Makefile delete mode 100644 tools/llvmc/example/Skeleton/plugins/Makefile delete mode 100644 tools/llvmc/example/Skeleton/plugins/Plugin/PluginMain.cpp delete mode 100644 tools/llvmc/example/mcc16/Makefile delete mode 100644 tools/llvmc/example/mcc16/driver/Makefile delete mode 100644 tools/llvmc/example/mcc16/plugins/Makefile create mode 100644 tools/llvmc/examples/Hello/Hello.cpp rename tools/llvmc/{example => examples}/Hello/Makefile (78%) rename tools/llvmc/{example/Simple => examples}/Makefile (68%) rename tools/llvmc/{plugins/Clang => examples/Simple}/Makefile (73%) create mode 100644 tools/llvmc/examples/Simple/Simple.cpp rename tools/llvmc/{example => examples}/Simple/Simple.td (53%) rename tools/llvmc/{example/Skeleton/plugins/Plugin/Plugin.td => examples/Skeleton/AutoGenerated.td} (52%) create mode 100644 tools/llvmc/examples/Skeleton/Hooks.cpp rename tools/llvmc/{driver => examples/Skeleton}/Main.cpp (83%) create mode 100644 tools/llvmc/examples/Skeleton/Makefile rename tools/llvmc/{example => examples}/Skeleton/README (80%) rename tools/llvmc/{example/mcc16/plugins/PIC16Base/PluginMain.cpp => examples/mcc16/Hooks.cpp} (79%) rename tools/llvmc/{example/mcc16/driver => examples/mcc16}/Main.cpp (90%) rename tools/llvmc/{plugins/Base => examples/mcc16}/Makefile (73%) rename tools/llvmc/{example/mcc16/plugins/PIC16Base/PIC16Base.td => examples/mcc16/PIC16.td} (87%) rename tools/llvmc/{example => examples}/mcc16/README (96%) delete mode 100644 tools/llvmc/plugins/Base/PluginMain.cpp delete mode 100644 tools/llvmc/plugins/Clang/PluginMain.cpp delete mode 100644 tools/llvmc/plugins/Makefile create mode 100644 tools/llvmc/src/AutoGenerated.td rename tools/llvmc/{plugins/Base => src}/Base.td.in (84%) rename tools/llvmc/{plugins/Clang => src}/Clang.td (55%) rename tools/llvmc/{plugins/Base => src}/Hooks.cpp (100%) rename tools/llvmc/{example/Skeleton/driver => src}/Main.cpp (83%) rename tools/llvmc/{driver => src}/Makefile (72%) rename {tools/llvmc/example/mcc16/plugins/PIC16Base => unittests/Analysis}/Makefile (53%) create mode 100644 unittests/Analysis/ScalarEvolutionTest.cpp create mode 100644 unittests/Support/Casting.cpp delete mode 100755 utils/RegressionFinder.pl create mode 100644 utils/lit/lit/ExampleTests/required-and-missing.c create mode 100644 utils/lit/lit/ExampleTests/required-and-present.c create mode 100644 utils/llvm-lit/Makefile create mode 100644 utils/llvm-lit/llvm-lit.in delete mode 100755 utils/mkpatch delete mode 100755 utils/userloc.pl diff --git a/CMakeLists.txt b/CMakeLists.txt index d4f2221c9fd..a6099d17c56 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,10 +1,20 @@ # See docs/CMake.html for instructions about how to build LLVM with CMake. project(LLVM) -cmake_minimum_required(VERSION 2.6.1) +cmake_minimum_required(VERSION 2.8) + +# Add path for custom modules +set(CMAKE_MODULE_PATH + ${CMAKE_MODULE_PATH} + "${CMAKE_CURRENT_SOURCE_DIR}/cmake" + "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules" + ) + +set(PACKAGE_VERSION "2.8") +include(VersionFromVCS) +add_version_info_from_vcs(PACKAGE_VERSION) set(PACKAGE_NAME llvm) -set(PACKAGE_VERSION 2.8svn) set(PACKAGE_STRING "${PACKAGE_NAME} ${PACKAGE_VERSION}") set(PACKAGE_BUGREPORT "llvmbugs@cs.uiuc.edu") @@ -53,7 +63,6 @@ set(LLVM_ALL_TARGETS CppBackend Mips MBlaze - MSIL MSP430 PIC16 PowerPC @@ -124,13 +133,6 @@ configure_file( set(llvm_builded_incs_dir ${LLVM_BINARY_DIR}/include/llvm) -# Add path for custom modules -set(CMAKE_MODULE_PATH - ${CMAKE_MODULE_PATH} - "${LLVM_MAIN_SRC_DIR}/cmake" - "${LLVM_MAIN_SRC_DIR}/cmake/modules" - ) - include(AddLLVMDefinitions) if(WIN32) @@ -214,14 +216,8 @@ if( CMAKE_SIZEOF_VOID_P EQUAL 8 AND NOT WIN32 ) endif( CMAKE_SIZEOF_VOID_P EQUAL 8 AND NOT WIN32 ) if( MSVC ) - # List of valid CRTs for MSVC - set(MSVC_CRT - MD - MDd - MT - MTd) + include(ChooseMSVCCRT) - set(LLVM_USE_CRT "" CACHE STRING "Specify VC++ CRT to use for debug/release configurations.") add_llvm_definitions( -D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS ) add_llvm_definitions( -D_SCL_SECURE_NO_WARNINGS -DCRT_NONSTDC_NO_WARNINGS ) add_llvm_definitions( -D_SCL_SECURE_NO_DEPRECATE ) @@ -231,15 +227,6 @@ if( MSVC ) # Suppress 'new behavior: elements of array 'array' will be default initialized' add_llvm_definitions( -wd4351 ) - if (NOT ${LLVM_USE_CRT} STREQUAL "") - list(FIND MSVC_CRT ${LLVM_USE_CRT} idx) - if (idx LESS 0) - message(FATAL_ERROR "Invalid value for LLVM_USE_CRT: ${LLVM_USE_CRT}. Valid options are one of: ${MSVC_CRT}") - endif (idx LESS 0) - add_llvm_definitions("/${LLVM_USE_CRT}") - message(STATUS "Using VC++ CRT: ${LLVM_USE_CRT}") - endif (NOT ${LLVM_USE_CRT} STREQUAL "") - # Enable warnings if (LLVM_ENABLE_WARNINGS) add_llvm_definitions( /W4 /Wall ) @@ -308,6 +295,7 @@ add_subdirectory(lib/Analysis) add_subdirectory(lib/Analysis/IPA) add_subdirectory(lib/MC) add_subdirectory(lib/MC/MCParser) +add_subdirectory(lib/MC/MCDisassembler) add_subdirectory(test) add_subdirectory(utils/FileCheck) @@ -372,6 +360,8 @@ add_subdirectory(tools) option(LLVM_BUILD_EXAMPLES "Build LLVM example programs." OFF) add_subdirectory(examples) +add_subdirectory(cmake/modules) + install(DIRECTORY include/ DESTINATION include FILES_MATCHING diff --git a/CREDITS.TXT b/CREDITS.TXT index e58b85fdbd9..aeecfe2e21e 100644 --- a/CREDITS.TXT +++ b/CREDITS.TXT @@ -134,6 +134,11 @@ N: Gabor Greif E: ggreif@gmail.com D: Improvements for space efficiency +N: James Grosbach +E: grosbach@apple.com +D: SjLj exception handling support +D: General fixes and improvements for the ARM back-end + N: Lang Hames E: lhames@gmail.com D: PBQP-based register allocator @@ -247,6 +252,12 @@ N: Scott Michel E: scottm@aero.org D: Added STI Cell SPU backend. +N: Takumi Nakamura +E: geek4civic@gmail.com +E: chapuni@hf.rim.or.jp +D: Cygwin and MinGW support. +S: Yokohama, Japan + N: Edward O'Callaghan E: eocallaghan@auroraux.org W: http://www.auroraux.org @@ -277,6 +288,11 @@ N: Sandeep Patel E: deeppatel1987@gmail.com D: ARM calling conventions rewrite, hard float support +N: Wesley Peck +E: peckw@wesleypeck.com +W: http://wesleypeck.com/ +D: MicroBlaze backend + N: Vladimir Prus W: http://vladimir_prus.blogspot.com E: ghost@cs.msu.su @@ -288,7 +304,10 @@ D: MSIL backend N: Duncan Sands E: baldrick@free.fr -D: Ada front-end, exception handling improvements +D: Ada support in llvm-gcc +D: Dragonegg plugin +D: Exception handling improvements +D: Type legalizer rewrite N: Ruchira Sasanka E: sasanka@uiuc.edu @@ -306,6 +325,10 @@ N: Anand Shukla E: ashukla@cs.uiuc.edu D: The `paths' pass +N: Michael J. Spencer +E: bigcheesegs@gmail.com +D: Shepherding Windows COFF support into MC. + N: Reid Spencer E: rspencer@reidspencer.com W: http://reidspencer.com/ @@ -329,14 +352,9 @@ E: xerxes@zafena.se D: Cmake dependency chain and various bug fixes N: Bill Wendling -E: isanbard@gmail.com +E: wendling@apple.com D: Bunches of stuff N: Bob Wilson E: bob.wilson@acm.org D: Advanced SIMD (NEON) support in the ARM backend - -N: Wesley Peck -E: peckw@wesleypeck.com -W: http://wesleypeck.com/ -D: MicroBlaze backend diff --git a/Makefile b/Makefile index d42f887b6b1..ae650b7f2d9 100644 --- a/Makefile +++ b/Makefile @@ -64,7 +64,8 @@ endif ifeq ($(MAKECMDGOALS),install-clang) DIRS := tools/clang/tools/driver tools/clang/lib/Headers \ - tools/clang/runtime tools/clang/docs + tools/clang/runtime tools/clang/docs \ + tools/lto OPTIONAL_DIRS := NO_INSTALL = 1 endif @@ -78,7 +79,8 @@ ifeq ($(MAKECMDGOALS),install-clang-c) endif ifeq ($(MAKECMDGOALS),clang-only) - DIRS := $(filter-out tools runtime docs unittests, $(DIRS)) tools/clang + DIRS := $(filter-out tools runtime docs unittests, $(DIRS)) \ + tools/clang tools/lto OPTIONAL_DIRS := endif @@ -110,7 +112,8 @@ cross-compile-build-tools: --host=$(BUILD_TRIPLE) --target=$(BUILD_TRIPLE); \ cd .. ; \ fi; \ - ($(MAKE) -C BuildTools \ + (unset SDKROOT; \ + $(MAKE) -C BuildTools \ BUILD_DIRS_ONLY=1 \ UNIVERSAL= \ ENABLE_OPTIMIZED=$(ENABLE_OPTIMIZED) \ @@ -167,7 +170,7 @@ FilesToConfig := \ include/llvm/Config/AsmParsers.def \ include/llvm/Config/Disassemblers.def \ include/llvm/System/DataTypes.h \ - tools/llvmc/plugins/Base/Base.td + tools/llvmc/src/Base.td FilesToConfigPATH := $(addprefix $(LLVM_OBJ_ROOT)/,$(FilesToConfig)) all-local:: $(FilesToConfigPATH) @@ -192,9 +195,6 @@ endif check-llvm2cpp: $(Verb)$(MAKE) check TESTSUITE=Feature RUNLLVM2CPP=1 -check-one: - $(Verb)$(MAKE) -C test check-one TESTONE=$(TESTONE) - srpm: $(LLVM_OBJ_ROOT)/llvm.spec rpmbuild -bs $(LLVM_OBJ_ROOT)/llvm.spec diff --git a/Makefile.config.in b/Makefile.config.in index 1d54b317c3e..5ebd80384fb 100644 --- a/Makefile.config.in +++ b/Makefile.config.in @@ -39,14 +39,18 @@ ifndef PROJECT_NAME PROJECT_NAME := $(LLVMPackageName) endif -PROJ_OBJ_DIR := $(shell $(PWD)) -PROJ_OBJ_ROOT := $(shell cd $(PROJ_OBJ_DIR)/$(LEVEL); $(PWD)) +# The macro below is expanded when 'realpath' is not built-in. +# Built-in 'realpath' is available on GNU Make 3.81. +realpath = $(shell cd $(1); $(PWD)) + +PROJ_OBJ_DIR := $(call realpath, .) +PROJ_OBJ_ROOT := $(call realpath, $(PROJ_OBJ_DIR)/$(LEVEL)) ifeq ($(PROJECT_NAME),llvm) -LLVM_SRC_ROOT := $(shell cd @abs_top_srcdir@; $(PWD)) -LLVM_OBJ_ROOT := $(shell cd @abs_top_builddir@; $(PWD)) -PROJ_SRC_ROOT := $(shell cd $(LLVM_SRC_ROOT); $(PWD)) -PROJ_SRC_DIR := $(shell cd $(LLVM_SRC_ROOT)/$(patsubst $(PROJ_OBJ_ROOT)%,%,$(PROJ_OBJ_DIR)); $(PWD)) +LLVM_SRC_ROOT := $(call realpath, @abs_top_srcdir@) +LLVM_OBJ_ROOT := $(call realpath, @abs_top_builddir@) +PROJ_SRC_ROOT := $(LLVM_SRC_ROOT) +PROJ_SRC_DIR := $(call realpath, $(LLVM_SRC_ROOT)/$(patsubst $(PROJ_OBJ_ROOT)%,%,$(PROJ_OBJ_DIR))) prefix := @prefix@ PROJ_prefix := $(prefix) PROJ_VERSION := $(LLVMVersion) @@ -66,7 +70,7 @@ endif ifndef LLVM_OBJ_ROOT $(error Projects must define LLVM_OBJ_ROOT) endif -PROJ_SRC_DIR := $(shell cd $(PROJ_SRC_ROOT)/$(patsubst $(PROJ_OBJ_ROOT)%,%,$(PROJ_OBJ_DIR)); $(PWD)) +PROJ_SRC_DIR := $(call realpath, $(PROJ_SRC_ROOT)/$(patsubst $(PROJ_OBJ_ROOT)%,%,$(PROJ_OBJ_DIR))) prefix := $(PROJ_INSTALL_ROOT) PROJ_prefix := $(prefix) ifndef PROJ_VERSION diff --git a/Makefile.rules b/Makefile.rules index 12582f6f91d..2e18c66e2b7 100644 --- a/Makefile.rules +++ b/Makefile.rules @@ -196,105 +196,15 @@ install-local:: all-local install-bytecode:: install-bytecode-local ############################################################################### -# LLVMC: Provide rules for compiling llvmc plugins +# LLVMC: Provide rules for compiling llvmc-based driver ############################################################################### -ifdef LLVMC_PLUGIN - -LIBRARYNAME := $(patsubst %,plugin_llvmc_%,$(LLVMC_PLUGIN)) -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 -endif - -# TableGen stuff... -ifneq ($(BUILT_SOURCES),) - LLVMC_BUILD_AUTOGENERATED_INC=1 -endif - -endif # LLVMC_PLUGIN - ifdef LLVMC_BASED_DRIVER TOOLNAME = $(LLVMC_BASED_DRIVER) -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),) - -USEDLIBS += $(patsubst %,plugin_llvmc_%.a,$(LLVMC_BUILTIN_PLUGINS)) - -LLVMC_BUILTIN_PLUGIN_1 = $(word 1, $(LLVMC_BUILTIN_PLUGINS)) -LLVMC_BUILTIN_PLUGIN_2 = $(word 2, $(LLVMC_BUILTIN_PLUGINS)) -LLVMC_BUILTIN_PLUGIN_3 = $(word 3, $(LLVMC_BUILTIN_PLUGINS)) -LLVMC_BUILTIN_PLUGIN_4 = $(word 4, $(LLVMC_BUILTIN_PLUGINS)) -LLVMC_BUILTIN_PLUGIN_5 = $(word 5, $(LLVMC_BUILTIN_PLUGINS)) -LLVMC_BUILTIN_PLUGIN_6 = $(word 6, $(LLVMC_BUILTIN_PLUGINS)) -LLVMC_BUILTIN_PLUGIN_7 = $(word 7, $(LLVMC_BUILTIN_PLUGINS)) -LLVMC_BUILTIN_PLUGIN_8 = $(word 8, $(LLVMC_BUILTIN_PLUGINS)) -LLVMC_BUILTIN_PLUGIN_9 = $(word 9, $(LLVMC_BUILTIN_PLUGINS)) -LLVMC_BUILTIN_PLUGIN_10 = $(word 10, $(LLVMC_BUILTIN_PLUGINS)) - - -ifneq ($(LLVMC_BUILTIN_PLUGIN_1),) -CPP.Flags += -DLLVMC_BUILTIN_PLUGIN_1=$(LLVMC_BUILTIN_PLUGIN_1) -endif - -ifneq ($(LLVMC_BUILTIN_PLUGIN_2),) -CPP.Flags += -DLLVMC_BUILTIN_PLUGIN_2=$(LLVMC_BUILTIN_PLUGIN_2) -endif - -ifneq ($(LLVMC_BUILTIN_PLUGIN_3),) -CPP.Flags += -DLLVMC_BUILTIN_PLUGIN_3=$(LLVMC_BUILTIN_PLUGIN_3) -endif - -ifneq ($(LLVMC_BUILTIN_PLUGIN_4),) -CPP.Flags += -DLLVMC_BUILTIN_PLUGIN_4=$(LLVMC_BUILTIN_PLUGIN_4) -endif - -ifneq ($(LLVMC_BUILTIN_PLUGIN_5),) -CPP.Flags += -DLLVMC_BUILTIN_PLUGIN_5=$(LLVMC_BUILTIN_PLUGIN_5) -endif - -ifneq ($(LLVMC_BUILTIN_PLUGIN_6),) -CPP.Flags += -DLLVMC_BUILTIN_PLUGIN_5=$(LLVMC_BUILTIN_PLUGIN_6) -endif - -ifneq ($(LLVMC_BUILTIN_PLUGIN_7),) -CPP.Flags += -DLLVMC_BUILTIN_PLUGIN_5=$(LLVMC_BUILTIN_PLUGIN_7) -endif - -ifneq ($(LLVMC_BUILTIN_PLUGIN_8),) -CPP.Flags += -DLLVMC_BUILTIN_PLUGIN_5=$(LLVMC_BUILTIN_PLUGIN_8) -endif - -ifneq ($(LLVMC_BUILTIN_PLUGIN_9),) -CPP.Flags += -DLLVMC_BUILTIN_PLUGIN_5=$(LLVMC_BUILTIN_PLUGIN_9) -endif - -ifneq ($(LLVMC_BUILTIN_PLUGIN_10),) -CPP.Flags += -DLLVMC_BUILTIN_PLUGIN_5=$(LLVMC_BUILTIN_PLUGIN_10) -endif - - -endif +LLVMLIBS = CompilerDriver.a +LINK_COMPONENTS = support system endif # LLVMC_BASED_DRIVER @@ -500,6 +410,26 @@ LLVMLibDir := $(LLVM_OBJ_ROOT)/$(BuildMode)/lib LLVMToolDir := $(LLVM_OBJ_ROOT)/$(BuildMode)/bin LLVMExmplDir:= $(LLVM_OBJ_ROOT)/$(BuildMode)/examples +#-------------------------------------------------------------------- +# Locations of shared libraries +#-------------------------------------------------------------------- + +SharedPrefix := lib +SharedLibDir := $(LibDir) +LLVMSharedLibDir := $(LLVMLibDir) + +# Win32.DLL prefers to be located on the "PATH" of binaries. +ifeq ($(HOST_OS), $(filter $(HOST_OS), Cygwin MingW)) + SharedLibDir := $(ToolDir) + LLVMSharedLibDir := $(LLVMToolDir) + + ifeq ($(HOST_OS),Cygwin) + SharedPrefix := cyg + else + SharedPrefix := + endif +endif + #-------------------------------------------------------------------- # LLVM Capable Compiler #-------------------------------------------------------------------- @@ -573,12 +503,7 @@ ifeq ($(HOST_OS),Darwin) SharedLinkOptions += -mmacosx-version-min=$(DARWIN_VERSION) endif else - ifeq ($(HOST_OS),Cygwin) - SharedLinkOptions=-shared -nostdlib -Wl,--export-all-symbols \ - -Wl,--enable-auto-import -Wl,--enable-auto-image-base - else - SharedLinkOptions=-shared - endif + SharedLinkOptions=-shared endif ifeq ($(TARGET_OS),Darwin) @@ -588,11 +513,13 @@ ifeq ($(TARGET_OS),Darwin) endif ifdef SHARED_LIBRARY +ifneq ($(HOST_OS), $(filter $(HOST_OS), Cygwin MingW)) ifneq ($(HOST_OS),Darwin) LD.Flags += $(RPATH) -Wl,'$$ORIGIN' else ifneq ($(DARWIN_MAJVERS),4) - LD.Flags += $(RPATH) -Wl,$(LibDir) + LD.Flags += $(RPATH) -Wl,$(SharedLibDir) +endif endif endif endif @@ -621,8 +548,8 @@ ifndef KEEP_SYMBOLS endif # Adjust linker flags for building an executable -ifneq ($(HOST_OS),Darwin) -ifneq ($(DARWIN_MAJVERS),4) +ifneq ($(HOST_OS), $(filter $(HOST_OS), Cygwin MingW)) +ifneq ($(HOST_OS), Darwin) ifdef TOOLNAME LD.Flags += $(RPATH) -Wl,'$$ORIGIN/../lib' ifdef EXAMPLE_TOOL @@ -631,12 +558,12 @@ ifdef TOOLNAME LD.Flags += $(RPATH) -Wl,$(ToolDir) $(RDYNAMIC) endif endif -endif else ifneq ($(DARWIN_MAJVERS),4) LD.Flags += $(RPATH) -Wl,@executable_path/../lib endif endif +endif #---------------------------------------------------------- @@ -963,6 +890,13 @@ LLVMUsedLibs := $(patsubst %.a.o, lib%.a, $(addsuffix .o, $(LLVMLIBS))) LLVMLibsPaths := $(addprefix $(LLVMLibDir)/,$(LLVMUsedLibs)) endif +# Win32.DLL may refer to other components. +ifeq ($(HOST_OS), $(filter $(HOST_OS), Cygwin MingW)) + ifdef LOADABLE_MODULE + LINK_COMPONENTS := all + endif +endif + ifndef IS_CLEANING_TARGET ifdef LINK_COMPONENTS @@ -975,12 +909,28 @@ $(LLVM_CONFIG): $(ToolDir)/$(strip $(TOOLNAME))$(EXEEXT): $(LLVM_CONFIG) ifeq ($(ENABLE_SHARED), 1) +# We can take the "auto-import" feature to get rid of using dllimport. +ifeq ($(HOST_OS), $(filter $(HOST_OS), Cygwin MingW)) +LLVMLibsOptions += -Wl,--enable-auto-import,--enable-runtime-pseudo-reloc \ + -L $(SharedLibDir) +endif LLVMLibsOptions += -lLLVM-$(LLVMVersion) -LLVMLibsPaths += $(LibDir)/libLLVM-$(LLVMVersion)$(SHLIBEXT) +LLVMLibsPaths += $(SharedLibDir)/$(SharedPrefix)LLVM-$(LLVMVersion)$(SHLIBEXT) else -LLVMLibsOptions += $(shell $(LLVM_CONFIG) --libs $(LINK_COMPONENTS)) -LLVMLibsPaths += $(LLVM_CONFIG) \ - $(shell $(LLVM_CONFIG) --libfiles $(LINK_COMPONENTS)) + +ifndef NO_LLVM_CONFIG +LLVMConfigLibs := $(shell $(LLVM_CONFIG) --libs $(LINK_COMPONENTS) || echo Error) +ifeq ($(LLVMConfigLibs),Error) +$(error llvm-config --libs failed) +endif +LLVMLibsOptions += $(LLVMConfigLibs) +LLVMConfigLibfiles := $(shell $(LLVM_CONFIG) --libfiles $(LINK_COMPONENTS) || echo Error) +ifeq ($(LLVMConfigLibfiles),Error) +$(error llvm-config --libfiles failed) +endif +LLVMLibsPaths += $(LLVM_CONFIG) $(LLVMConfigLibfiles) +endif + endif endif endif @@ -1011,12 +961,25 @@ $(NativeExportsFile): $(EXPORTED_SYMBOL_FILE) $(ObjDir)/.dir clean-local:: -$(Verb) $(RM) -f $(NativeExportsFile) else +ifeq ($(HOST_OS), $(filter $(HOST_OS), Cygwin MingW)) +# GNU ld Win32 accepts .DEF files that contain "DATA" entries. +NativeExportsFile := $(ObjDir)/$(notdir $(EXPORTED_SYMBOL_FILE:.exports=.def)) +$(NativeExportsFile): $(EXPORTED_SYMBOL_FILE) $(ObjDir)/.dir + $(Echo) Generating $(notdir $@) + $(Verb) $(ECHO) "EXPORTS" > $@ + $(Verb) $(CAT) $< >> $@ +clean-local:: + -$(Verb) $(RM) -f $(NativeExportsFile) +else +# Default behavior: just use the exports file verbatim. NativeExportsFile := $(EXPORTED_SYMBOL_FILE) endif endif +endif # Now add the linker command-line options to use the native export file. +# Darwin ifeq ($(HOST_OS),Darwin) LLVMLibsOptions += -Wl,-exported_symbols_list,$(NativeExportsFile) endif @@ -1026,6 +989,12 @@ ifeq ($(HAVE_LINK_VERSION_SCRIPT),1) LLVMLibsOptions += -Wl,--version-script,$(NativeExportsFile) endif +# Windows +ifeq ($(HOST_OS), $(filter $(HOST_OS), Cygwin MingW)) +# LLVMLibsOptions is invalidated at processing tools/llvm-shlib. +SharedLinkOptions += $(NativeExportsFile) +endif + endif ############################################################################### @@ -1100,10 +1069,10 @@ ifdef LIBRARYNAME LIBRARYNAME := $(strip $(LIBRARYNAME)) ifdef LOADABLE_MODULE LibName.A := $(LibDir)/$(LIBRARYNAME).a -LibName.SO := $(LibDir)/$(LIBRARYNAME)$(SHLIBEXT) +LibName.SO := $(SharedLibDir)/$(LIBRARYNAME)$(SHLIBEXT) else LibName.A := $(LibDir)/lib$(LIBRARYNAME).a -LibName.SO := $(LibDir)/lib$(LIBRARYNAME)$(SHLIBEXT) +LibName.SO := $(SharedLibDir)/$(SharedPrefix)$(LIBRARYNAME)$(SHLIBEXT) endif LibName.O := $(LibDir)/$(LIBRARYNAME).o LibName.BCA:= $(LibDir)/lib$(LIBRARYNAME).bca @@ -1128,14 +1097,14 @@ SharedLibKindMessage := "Loadable Module" else SharedLibKindMessage := "Shared Library" endif -$(LibName.SO): $(ObjectsO) $(ProjLibsPaths) $(LLVMLibsPaths) $(LibDir)/.dir +$(LibName.SO): $(ObjectsO) $(ProjLibsPaths) $(LLVMLibsPaths) $(SharedLibDir)/.dir $(Echo) Linking $(BuildMode) $(SharedLibKindMessage) \ - $(LIBRARYNAME)$(SHLIBEXT) + $(notdir $@) $(Verb) $(Link) $(SharedLinkOptions) -o $@ $(ObjectsO) \ $(ProjLibsOptions) $(LLVMLibsOptions) $(LIBS) else -$(LibName.SO): $(ObjectsO) $(LibDir)/.dir - $(Echo) Linking $(BuildMode) Shared Library $(basename $@) +$(LibName.SO): $(ObjectsO) $(SharedLibDir)/.dir + $(Echo) Linking $(BuildMode) Shared Library $(notdir $@) $(Verb) $(Link) $(SharedLinkOptions) -o $@ $(ObjectsO) endif @@ -1151,21 +1120,23 @@ uninstall-local:: $(Echo) Uninstall circumvented with NO_INSTALL else -ifdef LOADABLE_MODULE -DestSharedLib = $(DESTDIR)$(PROJ_libdir)/$(LIBRARYNAME)$(SHLIBEXT) +# Win32.DLL prefers to be located on the "PATH" of binaries. +ifeq ($(HOST_OS), $(filter $(HOST_OS), Cygwin MingW)) +DestSharedLibDir := $(DESTDIR)$(PROJ_bindir) else -DestSharedLib = $(DESTDIR)$(PROJ_libdir)/lib$(LIBRARYNAME)$(SHLIBEXT) +DestSharedLibDir := $(DESTDIR)$(PROJ_libdir) endif +DestSharedLib := $(DestSharedLibDir)/$(SharedPrefix)$(LIBRARYNAME)$(SHLIBEXT) install-local:: $(DestSharedLib) -$(DestSharedLib): $(LibName.SO) $(DESTDIR)$(PROJ_libdir) +$(DestSharedLib): $(LibName.SO) $(DestSharedLibDir) $(Echo) Installing $(BuildMode) Shared Library $(DestSharedLib) $(Verb) $(INSTALL) $(LibName.SO) $(DestSharedLib) uninstall-local:: $(Echo) Uninstalling $(BuildMode) Shared Library $(DestSharedLib) - -$(Verb) $(RM) -f $(DESTDIR)$(PROJ_libdir)/lib$(LIBRARYNAME).* + -$(Verb) $(RM) -f $(DestSharedLibDir)/$(SharedPrefix)$(LIBRARYNAME).* endif endif @@ -1341,10 +1312,33 @@ endif endif ifeq ($(HOST_OS), $(filter $(HOST_OS), Linux NetBSD FreeBSD)) +ifneq ($(ARCH), Mips) LD.Flags += -Wl,--version-script=$(LLVM_SRC_ROOT)/autoconf/ExportMap.map endif endif +endif +#--------------------------------------------------------- +# Tool Version Info Support +#--------------------------------------------------------- + +ifeq ($(HOST_OS),Darwin) +ifdef TOOL_INFO_PLIST + +LD.Flags += -Wl,-sectcreate,__TEXT,__info_plist,$(ObjDir)/$(TOOL_INFO_PLIST) + +$(ToolBuildPath): $(ObjDir)/$(TOOL_INFO_PLIST) + +$(ObjDir)/$(TOOL_INFO_PLIST): $(PROJ_SRC_DIR)/$(TOOL_INFO_PLIST).in $(ObjDir)/.dir + $(Echo) "Creating $(TOOLNAME) '$(TOOL_INFO_PLIST)' file..." + $(Verb)sed -e "s#@TOOL_INFO_UTI@#$(TOOL_INFO_UTI)#g" \ + -e "s#@TOOL_INFO_NAME@#$(TOOL_INFO_NAME)#g" \ + -e "s#@TOOL_INFO_VERSION@#$(TOOL_INFO_VERSION)#g" \ + -e "s#@TOOL_INFO_BUILD_VERSION@#$(TOOL_INFO_BUILD_VERSION)#g" \ + $< > $@ + +endif +endif #--------------------------------------------------------- # Provide targets for building the tools @@ -1377,7 +1371,7 @@ $(ToolAliasBuildPath): $(ToolBuildPath) $(Echo) Creating $(BuildMode) Alias $(TOOLALIAS) $(StripWarnMsg) $(Verb) $(RM) -f $(ToolAliasBuildPath) $(Verb) $(AliasTool) $(TOOLEXENAME) $(ToolAliasBuildPath) - $(Echo) ======= Finished Creating $(BuildMode) Alias $(TOOLNAME) \ + $(Echo) ======= Finished Creating $(BuildMode) Alias $(TOOLALIAS) \ $(StripWarnMsg) endif @@ -1626,7 +1620,7 @@ ifdef TARGET TABLEGEN_INC_FILES_COMMON = 1 endif -ifdef LLVMC_BUILD_AUTOGENERATED_INC +ifdef LLVMC_BASED_DRIVER TABLEGEN_INC_FILES_COMMON = 1 endif @@ -1750,20 +1744,26 @@ clean-local:: endif # TARGET -ifdef LLVMC_BUILD_AUTOGENERATED_INC +ifdef LLVMC_BASED_DRIVER -LLVMCPluginSrc := $(sort $(strip $(wildcard $(PROJ_SRC_DIR)/*.td)) \ - $(strip $(wildcard $(PROJ_OBJ_DIR)/*.td))) +TDSrc := $(sort $(strip $(wildcard $(PROJ_SRC_DIR)/*.td)) \ + $(strip $(wildcard $(PROJ_OBJ_DIR)/*.td))) -TDFiles := $(LLVMCPluginSrc) \ - $(strip $(wildcard $(LLVM_SRC_ROOT)/include/llvm/CompilerDriver/*.td)) +TDCommon := $(strip $(wildcard \ + $(LLVM_SRC_ROOT)/include/llvm/CompilerDriver/*.td)) -$(ObjDir)/AutoGenerated.inc.tmp: $(LLVMCPluginSrc) $(ObjDir)/.dir \ - $(TBLGEN) $(TD_COMMON) - $(Echo) "Building LLVMC configuration library with tblgen" +TDFiles := $(TDSrc) $(TDCommon) + +$(INCTMPFiles) : $(TBLGEN) $(TDFiles) + +$(ObjDir)/%.inc.tmp: %.td $(ObjDir)/.dir + $(Echo) "Building LLVMC compilation graph description with tblgen" $(Verb) $(TableGen) -gen-llvmc -o $(call SYSPATH, $@) $< -endif # LLVMC_BUILD_AUTOGENERATED_INC +clean-local:: + -$(Verb) $(RM) -f $(INCFiles) + +endif # LLVMC_BASED_DRIVER ############################################################################### # OTHER RULES: Other rules needed @@ -1840,11 +1840,13 @@ check:: $(EchoCmd) No test directory ; \ fi -check-lit:: +check-lit:: check + +check-dg:: $(Verb) if test -d "$(PROJ_OBJ_ROOT)/test" ; then \ if test -f "$(PROJ_OBJ_ROOT)/test/Makefile" ; then \ $(EchoCmd) Running test suite ; \ - $(MAKE) -C $(PROJ_OBJ_ROOT)/test check-local-lit ; \ + $(MAKE) -C $(PROJ_OBJ_ROOT)/test check-local-dg ; \ else \ $(EchoCmd) No Makefile in test directory ; \ fi ; \ diff --git a/README.txt b/README.txt index 2ebe271b8e5..f54f5bf1b37 100644 --- a/README.txt +++ b/README.txt @@ -1,4 +1,4 @@ -Low Level Virtual Machine (LLVM) +\Low Level Virtual Machine (LLVM) ================================ This directory and its subdirectories contain source code for the Low Level @@ -13,3 +13,4 @@ assistance with LLVM. If you're writing a package for LLVM, see docs/Packaging.html for our suggestions. + diff --git a/autoconf/configure.ac b/autoconf/configure.ac index be320cf3981..de327449e23 100644 --- a/autoconf/configure.ac +++ b/autoconf/configure.ac @@ -31,7 +31,7 @@ dnl=== dnl===-----------------------------------------------------------------------=== dnl Initialize autoconf and define the package name, version number and dnl email address for reporting bugs. -AC_INIT([[llvm]],[[2.8svn]],[llvmbugs@cs.uiuc.edu]) +AC_INIT([[llvm]],[[2.8rc]],[llvmbugs@cs.uiuc.edu]) dnl Provide a copyright substitution and ensure the copyright notice is included dnl in the output of --version option of the generated configure script. @@ -101,7 +101,6 @@ for i in `ls ${srcdir}/projects` do if test -d ${srcdir}/projects/${i} ; then case ${i} in - CVS) ;; sample) AC_CONFIG_SUBDIRS([projects/sample]) ;; privbracket) AC_CONFIG_SUBDIRS([projects/privbracket]) ;; llvm-stacker) AC_CONFIG_SUBDIRS([projects/llvm-stacker]) ;; @@ -299,7 +298,7 @@ dnl Set the LINKALL and NOLINKALL Makefile variables based on the platform AC_SUBST(LINKALL,$llvm_cv_link_all_option) AC_SUBST(NOLINKALL,$llvm_cv_no_link_all_option) -dnl Set the "LLVM_ON_*" variables based on llvm_cvs_platform_type +dnl Set the "LLVM_ON_*" variables based on llvm_cv_platform_type dnl This is used by lib/System to determine the basic kind of implementation dnl to use. case $llvm_cv_platform_type in @@ -369,13 +368,13 @@ else AC_SUBST(LLVM_CROSS_COMPILING, [0]) fi -dnl Check to see if there's a "CVS" (or .svn or .git) directory indicating -dnl that this build is being done from a checkout. This sets up several -dnl defaults for the command line switches. When we build with a CVS directory, +dnl Check to see if there's a .svn or .git directory indicating that this +dnl build is being done from a checkout. This sets up several defaults for +dnl the command line switches. When we build with a checkout directory, dnl we get a debug with assertions turned on. Without, we assume a source dnl release and we get an optimized build without assertions. dnl See --enable-optimized and --enable-assertions below -if test -d "CVS" -o -d "${srcdir}/CVS" -o -d ".svn" -o -d "${srcdir}/.svn" -o -d ".git" -o -d "${srcdir}/.git"; then +if test -d ".svn" -o -d "${srcdir}/.svn" -o -d ".git" -o -d "${srcdir}/.git"; then cvsbuild="yes" optimize="no" AC_SUBST(CVSBUILD,[[CVSBUILD=1]]) @@ -392,7 +391,7 @@ dnl===-----------------------------------------------------------------------=== dnl --enable-optimized : check whether they want to do an optimized build: AC_ARG_ENABLE(optimized, AS_HELP_STRING( - --enable-optimized,[Compile with optimizations enabled (default is NO)]),,enableval=$optimize) + --enable-optimized,[Compile with optimizations enabled (default is YES)]),,enableval="yes") if test ${enableval} = "no" ; then AC_SUBST(ENABLE_OPTIMIZED,[[]]) else @@ -410,7 +409,7 @@ fi dnl --enable-assertions : check whether they want to turn on assertions or not: AC_ARG_ENABLE(assertions,AS_HELP_STRING( - --enable-assertions,[Compile with assertion checks enabled (default is YES)]),, enableval="yes") + --enable-assertions,[Compile with assertion checks enabled (default is NO)]),, enableval="no") if test ${enableval} = "yes" ; then AC_SUBST(DISABLE_ASSERTIONS,[[]]) else @@ -544,13 +543,13 @@ TARGETS_TO_BUILD="" AC_ARG_ENABLE([targets],AS_HELP_STRING([--enable-targets], [Build specific host targets: all or target1,target2,... Valid targets are: host, x86, x86_64, sparc, powerpc, alpha, arm, mips, spu, pic16, - xcore, msp430, systemz, blackfin, cbe, msil, and cpp (default=all)]),, + xcore, msp430, systemz, blackfin, cbe, and cpp (default=all)]),, enableval=all) if test "$enableval" = host-only ; then enableval=host fi case "$enableval" in - all) TARGETS_TO_BUILD="X86 Sparc PowerPC Alpha ARM Mips CellSPU PIC16 XCore MSP430 SystemZ Blackfin CBackend MSIL CppBackend MBlaze" ;; + all) TARGETS_TO_BUILD="X86 Sparc PowerPC Alpha ARM Mips CellSPU PIC16 XCore MSP430 SystemZ Blackfin CBackend CppBackend MBlaze" ;; *)for a_target in `echo $enableval|sed -e 's/,/ /g' ` ; do case "$a_target" in x86) TARGETS_TO_BUILD="X86 $TARGETS_TO_BUILD" ;; @@ -567,7 +566,6 @@ case "$enableval" in systemz) TARGETS_TO_BUILD="SystemZ $TARGETS_TO_BUILD" ;; blackfin) TARGETS_TO_BUILD="Blackfin $TARGETS_TO_BUILD" ;; cbe) TARGETS_TO_BUILD="CBackend $TARGETS_TO_BUILD" ;; - msil) TARGETS_TO_BUILD="MSIL $TARGETS_TO_BUILD" ;; cpp) TARGETS_TO_BUILD="CppBackend $TARGETS_TO_BUILD" ;; mblaze) TARGETS_TO_BUILD="MBlaze $TARGETS_TO_BUILD" ;; host) case "$llvm_cv_target_arch" in @@ -598,9 +596,17 @@ AC_SUBST(TARGETS_TO_BUILD,$TARGETS_TO_BUILD) # If so, define LLVM_NATIVE_ARCH to that LLVM target. for a_target in $TARGETS_TO_BUILD; do if test "$a_target" = "$LLVM_NATIVE_ARCH"; then - LLVM_NATIVE_ARCHTARGET="${LLVM_NATIVE_ARCH}Target" - AC_DEFINE_UNQUOTED(LLVM_NATIVE_ARCH,$LLVM_NATIVE_ARCHTARGET, + AC_DEFINE_UNQUOTED(LLVM_NATIVE_ARCH, $LLVM_NATIVE_ARCH, [LLVM architecture name for the native architecture, if available]) + LLVM_NATIVE_TARGET="LLVMInitialize${LLVM_NATIVE_ARCH}Target" + LLVM_NATIVE_TARGETINFO="LLVMInitialize${LLVM_NATIVE_ARCH}TargetInfo" + LLVM_NATIVE_ASMPRINTER="LLVMInitialize${LLVM_NATIVE_ARCH}AsmPrinter" + AC_DEFINE_UNQUOTED(LLVM_NATIVE_TARGET, $LLVM_NATIVE_TARGET, + [LLVM name for the native Target init function, if available]) + AC_DEFINE_UNQUOTED(LLVM_NATIVE_TARGETINFO, $LLVM_NATIVE_TARGETINFO, + [LLVM name for the native TargetInfo init function, if available]) + AC_DEFINE_UNQUOTED(LLVM_NATIVE_ASMPRINTER, $LLVM_NATIVE_ASMPRINTER, + [LLVM name for the native AsmPrinter init function, if available]) fi done @@ -857,35 +863,6 @@ AC_ARG_ENABLE(libffi,AS_HELP_STRING( esac], llvm_cv_enable_libffi=no) -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 @@ -1011,6 +988,13 @@ fi dnl Find the install program AC_PROG_INSTALL +dnl Prepend src dir to install path dir if it's a relative path +dnl This is a hack for installs that take place in something other +dnl than the top level. +case "$INSTALL" in + [[\\/$]]* | ?:[[\\/]]* ) ;; + *) INSTALL="\\\$(TOPSRCDIR)/$INSTALL" ;; +esac dnl Checks for documentation and testing tools that we can do without. If these dnl are not found then they are set to "true" which always succeeds but does @@ -1033,6 +1017,9 @@ AC_PATH_PROGS(OCAMLDEP, [ocamldep]) AC_PATH_PROGS(OCAMLDOC, [ocamldoc]) AC_PATH_PROGS(GAS, [gas as]) +dnl Get the version of the linker in use. +AC_LINK_GET_VERSION + dnl Determine whether the linker supports the -R option. AC_LINK_USE_R @@ -1345,6 +1332,9 @@ fi dnl atomic builtins are required for threading support. AC_MSG_CHECKING(for GCC atomic builtins) +dnl Since we'll be using these atomic builtins in C++ files we should test +dnl the C++ compiler. +AC_LANG_PUSH([C++]) AC_LINK_IFELSE( AC_LANG_SOURCE( [[int main() { @@ -1356,13 +1346,13 @@ AC_LINK_IFELSE( return 0; } ]]), + AC_LANG_POP([C++]) AC_MSG_RESULT(yes) AC_DEFINE(LLVM_MULTITHREADED, 1, Build multithreading support into LLVM), AC_MSG_RESULT(no) AC_DEFINE(LLVM_MULTITHREADED, 0, Build multithreading support into LLVM) AC_MSG_WARN([LLVM will be built thread-unsafe because atomic builtins are missing])) - dnl===-----------------------------------------------------------------------=== dnl=== dnl=== SECTION 9: Additional checks, variables, etc. @@ -1549,7 +1539,11 @@ dnl WARNING: dnl If you add or remove any of the following config headers, then dnl you MUST also update Makefile.rules so that the variable FilesToConfig dnl contains the same list of files as AC_CONFIG_HEADERS below. This ensures the dnl files can be updated automatically when their *.in sources change. -AC_CONFIG_HEADERS([include/llvm/Config/config.h]) +AC_CONFIG_HEADERS([include/llvm/Config/config.h include/llvm/Config/llvm-config.h]) +AH_TOP([#ifndef CONFIG_H +#define CONFIG_H]) +AH_BOTTOM([#endif]) + AC_CONFIG_FILES([include/llvm/Config/Targets.def]) AC_CONFIG_FILES([include/llvm/Config/AsmPrinters.def]) AC_CONFIG_FILES([include/llvm/Config/AsmParsers.def]) @@ -1563,7 +1557,7 @@ dnl Configure the RPM spec file for LLVM AC_CONFIG_FILES([llvm.spec]) dnl Configure llvmc's Base plugin -AC_CONFIG_FILES([tools/llvmc/plugins/Base/Base.td]) +AC_CONFIG_FILES([tools/llvmc/src/Base.td]) dnl Do the first stage of configuration for llvm-config.in. AC_CONFIG_FILES([tools/llvm-config/llvm-config.in]) diff --git a/autoconf/m4/link_options.m4 b/autoconf/m4/link_options.m4 index b48710c094d..4c5f2f435d0 100644 --- a/autoconf/m4/link_options.m4 +++ b/autoconf/m4/link_options.m4 @@ -1,3 +1,24 @@ +# +# Get the linker version string. +# +# This macro is specific to LLVM. +# +AC_DEFUN([AC_LINK_GET_VERSION], + [AC_CACHE_CHECK([for linker version],[llvm_cv_link_version], + [ + version_string="$(ld -v 2>&1 | head -1)" + + # Check for ld64. + if (echo "$version_string" | grep -q "ld64"); then + llvm_cv_link_version=$(echo "$version_string" | sed -e "s#.*ld64-\([^ ]*\)#\1#") + else + llvm_cv_link_version=$(echo "$version_string" | sed -e "s#[^0-9]*\([0-9.]*\).*#\1#") + fi + ]) + AC_DEFINE_UNQUOTED([HOST_LINK_VERSION],"$llvm_cv_link_version", + [Linker version detected at compile time.]) +]) + # # Determine if the system can handle the -R option being passed to the linker. # diff --git a/bindings/ada/llvm/llvm.ads b/bindings/ada/llvm/llvm.ads index ce74e670a68..20fc940f8c2 100644 --- a/bindings/ada/llvm/llvm.ads +++ b/bindings/ada/llvm/llvm.ads @@ -317,25 +317,27 @@ package llvm is LLVMGhostLinkage, LLVMCommonLinkage, LLVMLinkerPrivateLinkage, - LLVMLinkerPrivateWeakLinkage); + LLVMLinkerPrivateWeakLinkage, + LinkerPrivateWeakDefAutoLinkage); for LLVMLinkage use - (LLVMExternalLinkage => 0, - LLVMAvailableExternallyLinkage => 1, - LLVMLinkOnceAnyLinkage => 2, - LLVMLinkOnceODRLinkage => 3, - LLVMWeakAnyLinkage => 4, - LLVMWeakODRLinkage => 5, - LLVMAppendingLinkage => 6, - LLVMInternalLinkage => 7, - LLVMPrivateLinkage => 8, - LLVMDLLImportLinkage => 9, - LLVMDLLExportLinkage => 10, - LLVMExternalWeakLinkage => 11, - LLVMGhostLinkage => 12, - LLVMCommonLinkage => 13, - LLVMLinkerPrivateLinkage => 14, - LLVMLinkerPrivateWeakLinkage => 15); + (LLVMExternalLinkage => 0, + LLVMAvailableExternallyLinkage => 1, + LLVMLinkOnceAnyLinkage => 2, + LLVMLinkOnceODRLinkage => 3, + LLVMWeakAnyLinkage => 4, + LLVMWeakODRLinkage => 5, + LLVMAppendingLinkage => 6, + LLVMInternalLinkage => 7, + LLVMPrivateLinkage => 8, + LLVMDLLImportLinkage => 9, + LLVMDLLExportLinkage => 10, + LLVMExternalWeakLinkage => 11, + LLVMGhostLinkage => 12, + LLVMCommonLinkage => 13, + LLVMLinkerPrivateLinkage => 14, + LLVMLinkerPrivateWeakLinkage => 15, + LinkerPrivateWeakDefAutoLinkage => 16); pragma Convention (C, LLVMLinkage); diff --git a/bindings/ocaml/llvm/llvm.ml b/bindings/ocaml/llvm/llvm.ml index 7ab6f51efb9..462eb201694 100644 --- a/bindings/ocaml/llvm/llvm.ml +++ b/bindings/ocaml/llvm/llvm.ml @@ -35,7 +35,6 @@ module TypeKind = struct | Opaque | Vector | Metadata - | Union end module Linkage = struct @@ -210,11 +209,6 @@ external struct_element_types : lltype -> lltype array = "llvm_struct_element_types" external is_packed : lltype -> bool = "llvm_is_packed" -(*--... Operations on union types ..........................................--*) -external union_type : llcontext -> lltype array -> lltype = "llvm_union_type" -external union_element_types : lltype -> lltype array - = "llvm_union_element_types" - (*--... Operations on pointer, vector, and array types .....................--*) external array_type : lltype -> int -> lltype = "llvm_array_type" external pointer_type : lltype -> lltype = "llvm_pointer_type" @@ -280,6 +274,8 @@ let fold_right_uses f v init = (*--... Operations on users ................................................--*) external operand : llvalue -> int -> llvalue = "llvm_operand" +external set_operand : llvalue -> int -> llvalue -> unit = "llvm_set_operand" +external num_operands : llvalue -> int = "llvm_num_operands" (*--... Operations on constants of (mostly) any type .......................--*) external is_constant : llvalue -> bool = "llvm_is_constant" @@ -319,7 +315,6 @@ external const_struct : llcontext -> llvalue array -> llvalue external const_packed_struct : llcontext -> llvalue array -> llvalue = "llvm_const_packed_struct" external const_vector : llvalue array -> llvalue = "llvm_const_vector" -external const_union : lltype -> llvalue -> llvalue = "LLVMConstUnion" (*--... Constant expressions ...............................................--*) external align_of : lltype -> llvalue = "LLVMAlignOf" @@ -1050,9 +1045,6 @@ let rec string_of_lltype ty = if is_packed ty then "<" ^ s ^ ">" else s - | TypeKind.Union -> "union { " ^ (concat2 ", " ( - Array.map string_of_lltype (union_element_types ty) - )) ^ " }" | TypeKind.Array -> "[" ^ (string_of_int (array_length ty)) ^ " x " ^ (string_of_lltype (element_type ty)) ^ "]" | TypeKind.Vector -> "<" ^ (string_of_int (vector_size ty)) ^ diff --git a/bindings/ocaml/llvm/llvm.mli b/bindings/ocaml/llvm/llvm.mli index 742265cd3d5..ba3bbe248b7 100644 --- a/bindings/ocaml/llvm/llvm.mli +++ b/bindings/ocaml/llvm/llvm.mli @@ -72,7 +72,6 @@ module TypeKind : sig | Opaque | Vector | Metadata - | Union end (** The linkage of a global value, accessed with {!linkage} and @@ -408,19 +407,6 @@ external struct_element_types : lltype -> lltype array external is_packed : lltype -> bool = "llvm_is_packed" -(** {7 Operations on union types} *) - -(** [union_type context tys] returns the union type in the context [context] - containing the types in the array [tys]. See the method - [llvm::UnionType::get] *) -external union_type : llcontext -> lltype array -> lltype = "llvm_union_type" - -(** [union_element_types uty] returns the constituent types of the union type - [uty]. See the method [llvm::UnionType::getElementType]. *) -external union_element_types : lltype -> lltype array - = "llvm_union_element_types" - - (** {7 Operations on pointer, vector, and array types} *) (** [array_type ty n] returns the array type containing [n] elements of type @@ -557,6 +543,14 @@ val fold_right_uses : (lluse -> 'a -> 'a) -> llvalue -> 'a -> 'a method [llvm::User::getOperand]. *) external operand : llvalue -> int -> llvalue = "llvm_operand" +(** [set_operand v i o] sets the operand of the value [v] at the index [i] to + the value [o]. + See the method [llvm::User::setOperand]. *) +external set_operand : llvalue -> int -> llvalue -> unit = "llvm_set_operand" + +(** [num_operands v] returns the number of operands for the value [v]. + See the method [llvm::User::getNumOperands]. *) +external num_operands : llvalue -> int = "llvm_num_operands" (** {7 Operations on constants of (mostly) any type} *) @@ -689,10 +683,6 @@ external const_packed_struct : llcontext -> llvalue array -> llvalue values [elts]. See the method [llvm::ConstantVector::get]. *) external const_vector : llvalue array -> llvalue = "llvm_const_vector" -(** [const_union ty v] returns the union constant of type [union_type tys] and - containing the value [v]. See the method [llvm::ConstantUnion::get]. *) -external const_union : lltype -> llvalue -> llvalue = "LLVMConstUnion" - (** {7 Constant expressions} *) @@ -991,7 +981,7 @@ external const_insertelement : llvalue -> llvalue -> llvalue -> llvalue = "LLVMConstInsertElement" (** [const_shufflevector a b mask] returns a constant [shufflevector]. - See the LLVM Language Reference for details on the [sufflevector] + See the LLVM Language Reference for details on the [shufflevector] instruction. See the method [llvm::ConstantExpr::getShuffleVector]. *) external const_shufflevector : llvalue -> llvalue -> llvalue -> llvalue diff --git a/bindings/ocaml/llvm/llvm_ocaml.c b/bindings/ocaml/llvm/llvm_ocaml.c index c4355ba2dbf..ef2e3d66629 100644 --- a/bindings/ocaml/llvm/llvm_ocaml.c +++ b/bindings/ocaml/llvm/llvm_ocaml.c @@ -318,21 +318,6 @@ CAMLprim value llvm_is_packed(LLVMTypeRef StructTy) { return Val_bool(LLVMIsPackedStruct(StructTy)); } -/*--... Operations on union types ..........................................--*/ - -/* llcontext -> lltype array -> lltype */ -CAMLprim LLVMTypeRef llvm_union_type(LLVMContextRef C, value ElementTypes) { - return LLVMUnionTypeInContext(C, (LLVMTypeRef *) ElementTypes, - Wosize_val(ElementTypes)); -} - -/* lltype -> lltype array */ -CAMLprim value llvm_union_element_types(LLVMTypeRef UnionTy) { - value Tys = alloc(LLVMCountUnionElementTypes(UnionTy), 0); - LLVMGetUnionElementTypes(UnionTy, (LLVMTypeRef *) Tys); - return Tys; -} - /*--... Operations on array, pointer, and vector types .....................--*/ /* lltype -> int -> lltype */ @@ -452,6 +437,17 @@ CAMLprim LLVMValueRef llvm_operand(LLVMValueRef V, value I) { return LLVMGetOperand(V, Int_val(I)); } +/* llvalue -> int -> llvalue -> unit */ +CAMLprim value llvm_set_operand(LLVMValueRef U, value I, LLVMValueRef V) { + LLVMSetOperand(U, Int_val(I), V); + return Val_unit; +} + +/* llvalue -> int */ +CAMLprim value llvm_num_operands(LLVMValueRef V) { + return Val_int(LLVMGetNumOperands(V)); +} + /*--... Operations on constants of (mostly) any type .......................--*/ /* llvalue -> bool */ @@ -964,8 +960,8 @@ CAMLprim LLVMValueRef llvm_param(LLVMValueRef Fn, value Index) { return LLVMGetParam(Fn, Int_val(Index)); } -/* llvalue -> int -> llvalue */ -CAMLprim value llvm_params(LLVMValueRef Fn, value Index) { +/* llvalue -> llvalue */ +CAMLprim value llvm_params(LLVMValueRef Fn) { value Params = alloc(LLVMCountParams(Fn), 0); LLVMGetParams(Fn, (LLVMValueRef *) Op_val(Params)); return Params; diff --git a/cmake/config-ix.cmake b/cmake/config-ix.cmake index d9450d92585..f75e5dfb265 100755 --- a/cmake/config-ix.cmake +++ b/cmake/config-ix.cmake @@ -214,6 +214,9 @@ if (LLVM_NATIVE_ARCH) set(LLVM_NATIVE_ARCH) else () message(STATUS "Native target architecture is ${LLVM_NATIVE_ARCH}") + set(LLVM_NATIVE_TARGET LLVMInitialize${LLVM_NATIVE_ARCH}Target) + set(LLVM_NATIVE_TARGETINFO LLVMInitialize${LLVM_NATIVE_ARCH}TargetInfo) + set(LLVM_NATIVE_ASMPRINTER LLVMInitialize${LLVM_NATIVE_ARCH}AsmPrinter) endif () endif() @@ -259,11 +262,18 @@ else( ENABLE_THREADS ) message(STATUS "Threads disabled.") endif() +set(LLVM_PREFIX ${CMAKE_INSTALL_PREFIX}) + configure_file( ${LLVM_MAIN_INCLUDE_DIR}/llvm/Config/config.h.cmake ${LLVM_BINARY_DIR}/include/llvm/Config/config.h ) +configure_file( + ${LLVM_MAIN_INCLUDE_DIR}/llvm/Config/llvm-config.h.cmake + ${LLVM_BINARY_DIR}/include/llvm/Config/llvm-config.h + ) + configure_file( ${LLVM_MAIN_INCLUDE_DIR}/llvm/System/DataTypes.h.cmake ${LLVM_BINARY_DIR}/include/llvm/System/DataTypes.h diff --git a/cmake/modules/CMakeLists.txt b/cmake/modules/CMakeLists.txt new file mode 100644 index 00000000000..416d7f47856 --- /dev/null +++ b/cmake/modules/CMakeLists.txt @@ -0,0 +1,12 @@ +set(llvm_cmake_builddir "${LLVM_BINARY_DIR}/share/llvm/cmake") + +configure_file( + LLVM.cmake + ${llvm_cmake_builddir}/LLVM.cmake + @ONLY) + +install(FILES + ${llvm_cmake_builddir}/LLVM.cmake + LLVMConfig.cmake + LLVMLibDeps.cmake + DESTINATION share/llvm/cmake) diff --git a/cmake/modules/ChooseMSVCCRT.cmake b/cmake/modules/ChooseMSVCCRT.cmake new file mode 100644 index 00000000000..eb78f45c885 --- /dev/null +++ b/cmake/modules/ChooseMSVCCRT.cmake @@ -0,0 +1,106 @@ +# The macro choose_msvc_crt() takes a list of possible +# C runtimes to choose from, in the form of compiler flags, +# to present to the user. (MTd for /MTd, etc) +# +# The macro is invoked at the end of the file. +# +# CMake already sets CRT flags in the CMAKE_CXX_FLAGS_* and +# CMAKE_C_FLAGS_* variables by default. To let the user +# override that for each build type: +# 1. Detect which CRT is already selected, and reflect this in +# LLVM_USE_CRT_* so the user can have a better idea of what +# changes they're making. +# 2. Replace the flags in both variables with the new flag via a regex. +# 3. set() the variables back into the cache so the changes +# are user-visible. + +### Helper macros: ### +macro(make_crt_regex regex crts) + set(${regex} "") + foreach(crt ${${crts}}) + # Trying to match the beginning or end of the string with stuff + # like [ ^]+ didn't work, so use a bunch of parentheses instead. + set(${regex} "${${regex}}|(^| +)/${crt}($| +)") + endforeach(crt) + string(REGEX REPLACE "^\\|" "" ${regex} "${${regex}}") +endmacro(make_crt_regex) + +macro(get_current_crt crt_current regex flagsvar) + # Find the selected-by-CMake CRT for each build type, if any. + # Strip off the leading slash and any whitespace. + string(REGEX MATCH "${${regex}}" ${crt_current} "${${flagsvar}}") + string(REPLACE "/" " " ${crt_current} "${${crt_current}}") + string(STRIP "${${crt_current}}" ${crt_current}) +endmacro(get_current_crt) + +# Replaces or adds a flag to a variable. +# Expects 'flag' to be padded with spaces. +macro(set_flag_in_var flagsvar regex flag) + string(REGEX MATCH "${${regex}}" current_flag "${${flagsvar}}") + if("${current_flag}" STREQUAL "") + set(${flagsvar} "${${flagsvar}}${${flag}}") + else() + string(REGEX REPLACE "${${regex}}" "${${flag}}" ${flagsvar} "${${flagsvar}}") + endif() + string(STRIP "${${flagsvar}}" ${flagsvar}) + # Make sure this change gets reflected in the cache/gui. + # CMake requires the docstring parameter whenever set() touches the cache, + # so get the existing docstring and re-use that. + get_property(flagsvar_docs CACHE ${flagsvar} PROPERTY HELPSTRING) + set(${flagsvar} "${${flagsvar}}" CACHE STRING "${flagsvar_docs}" FORCE) +endmacro(set_flag_in_var) + + +macro(choose_msvc_crt MSVC_CRT) + if(LLVM_USE_CRT) + message(FATAL_ERROR + "LLVM_USE_CRT is deprecated. Use the CMAKE_BUILD_TYPE-specific +variables (LLVM_USE_CRT_DEBUG, etc) instead.") + endif() + + make_crt_regex(MSVC_CRT_REGEX ${MSVC_CRT}) + + foreach(build_type ${CMAKE_CONFIGURATION_TYPES}) + string(TOUPPER "${build_type}" build) + if (NOT LLVM_USE_CRT_${build}) + get_current_crt(LLVM_USE_CRT_${build} + MSVC_CRT_REGEX + CMAKE_CXX_FLAGS_${build}) + set(LLVM_USE_CRT_${build} + "${LLVM_USE_CRT_${build}}" + CACHE STRING "Specify VC++ CRT to use for ${build_type} configurations." + FORCE) + set_property(CACHE LLVM_USE_CRT_${build} + PROPERTY STRINGS "";${${MSVC_CRT}}) + endif(NOT LLVM_USE_CRT_${build}) + endforeach(build_type) + + foreach(build_type ${CMAKE_CONFIGURATION_TYPES}) + string(TOUPPER "${build_type}" build) + if ("${LLVM_USE_CRT_${build}}" STREQUAL "") + set(flag_string " ") + else() + set(flag_string " /${LLVM_USE_CRT_${build}} ") + list(FIND ${MSVC_CRT} ${LLVM_USE_CRT_${build}} idx) + if (idx LESS 0) + message(FATAL_ERROR + "Invalid value for LLVM_USE_CRT_${build}: ${LLVM_USE_CRT_${build}}. Valid options are one of: ${${MSVC_CRT}}") + endif (idx LESS 0) + message(STATUS "Using ${build_type} VC++ CRT: ${LLVM_USE_CRT_${build}}") + endif() + foreach(lang C CXX) + set_flag_in_var(CMAKE_${lang}_FLAGS_${build} MSVC_CRT_REGEX flag_string) + endforeach(lang) + endforeach(build_type) +endmacro(choose_msvc_crt MSVC_CRT) + + +# List of valid CRTs for MSVC +set(MSVC_CRT + MD + MDd + MT + MTd) + +choose_msvc_crt(MSVC_CRT) + diff --git a/cmake/modules/LLVM.cmake b/cmake/modules/LLVM.cmake new file mode 100644 index 00000000000..9621454f411 --- /dev/null +++ b/cmake/modules/LLVM.cmake @@ -0,0 +1,29 @@ +# This file provides information and services to the final user. + +set(LLVM_COMMON_DEPENDS @LLVM_COMMON_DEPENDS@) + +set(llvm_libs @llvm_libs@) + +set(llvm_lib_targets @llvm_lib_targets@) + +set(LLVM_TARGETS_TO_BUILD @LLVM_TARGETS_TO_BUILD@) + +set(LLVM_TOOLS_BINARY_DIR @LLVM_TOOLS_BINARY_DIR@) + +set(LLVM_ENABLE_THREADS @LLVM_ENABLE_THREADS@) + +set(LLVM_NATIVE_ARCH @LLVM_NATIVE_ARCH@) + +# We try to include using the current setting of CMAKE_MODULE_PATH, +# which suppossedly was filled by the user with the directory where +# this file was installed: +include( LLVMConfig OPTIONAL RESULT_VARIABLE LLVMCONFIG_INCLUDED ) + +# If failed, we assume that this is an un-installed build: +if( NOT LLVMCONFIG_INCLUDED ) + set(CMAKE_MODULE_PATH + ${CMAKE_MODULE_PATH} + "@LLVM_SOURCE_DIR@/cmake/modules") + include( LLVMConfig ) +endif() + diff --git a/cmake/modules/LLVMConfig.cmake b/cmake/modules/LLVMConfig.cmake index 0744b50d648..e5497084be8 100755 --- a/cmake/modules/LLVMConfig.cmake +++ b/cmake/modules/LLVMConfig.cmake @@ -16,6 +16,26 @@ function(get_system_libs return_var) endfunction(get_system_libs) +function(is_llvm_target_library library return_var) + # Sets variable `return_var' to ON if `library' corresponds to a + # LLVM supported target. To OFF if it doesn't. + set(${return_var} OFF PARENT_SCOPE) + string(TOUPPER "${library}" capitalized_lib) + string(TOUPPER "${LLVM_ALL_TARGETS}" targets) + foreach(t ${targets}) + if( capitalized_lib STREQUAL "LLVM${t}" OR + capitalized_lib STREQUAL "LLVM${t}CODEGEN" OR + capitalized_lib STREQUAL "LLVM${t}ASMPARSER" OR + capitalized_lib STREQUAL "LLVM${t}ASMPRINTER" OR + capitalized_lib STREQUAL "LLVM${t}DISASSEMBLER" OR + capitalized_lib STREQUAL "LLVM${t}INFO" ) + set(${return_var} ON PARENT_SCOPE) + break() + endif() + endforeach() +endfunction(is_llvm_target_library) + + macro(llvm_config executable) explicit_llvm_config(${executable} ${ARGN}) endmacro(llvm_config) @@ -29,6 +49,14 @@ function(explicit_llvm_config executable) endfunction(explicit_llvm_config) +# This is a variant intended for the final user: +function(llvm_map_components_to_libraries OUT_VAR) + explicit_map_components_to_libraries(result ${ARGN}) + get_system_libs(sys_result) + set( ${OUT_VAR} ${result} ${sys_result} PARENT_SCOPE ) +endfunction(llvm_map_components_to_libraries) + + function(explicit_map_components_to_libraries out_libs) set( link_components ${ARGN} ) foreach(c ${link_components}) @@ -86,16 +114,24 @@ function(explicit_map_components_to_libraries out_libs) list(GET expanded_components 0 c) string(TOUPPER "${c}" capitalized) list(FIND capitalized_libs ${capitalized} idx) + set(add_it ON) if( idx LESS 0 ) - message(FATAL_ERROR "Library ${c} not found in list of llvm libraries.") + # The library is unkown. Maybe is an ommitted target? + is_llvm_target_library(${c} iltl_result) + if( NOT iltl_result ) + message(FATAL_ERROR "Library ${c} not found in list of llvm libraries.") + endif() + set(add_it OFF) endif( idx LESS 0 ) list(GET llvm_libs ${idx} canonical_lib) list(REMOVE_ITEM result ${canonical_lib}) - list(APPEND result ${canonical_lib}) foreach(c ${MSVC_LIB_DEPS_${canonical_lib}}) list(REMOVE_ITEM expanded_components ${c}) endforeach() - list(APPEND expanded_components ${MSVC_LIB_DEPS_${canonical_lib}}) + if( add_it ) + list(APPEND result ${canonical_lib}) + list(APPEND expanded_components ${MSVC_LIB_DEPS_${canonical_lib}}) + endif() list(REMOVE_AT expanded_components 0) list(LENGTH expanded_components lst_size) endwhile( 0 LESS ${lst_size} ) @@ -115,13 +151,13 @@ endfunction(explicit_map_components_to_libraries) # The format generated by GenLibDeps.pl -# LLVMARMAsmPrinter.o: LLVMARMCodeGen.o libLLVMAsmPrinter.a libLLVMCodeGen.a libLLVMCore.a libLLVMSupport.a libLLVMTarget.a +# libLLVMARMAsmPrinter.a: libLLVMMC.a libLLVMSupport.a # is translated to: -# set(MSVC_LIB_DEPS_LLVMARMAsmPrinter LLVMARMCodeGen LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMSupport LLVMTarget) +# set(MSVC_LIB_DEPS_LLVMARMAsmPrinter LLVMMC LLVMSupport) -# It is necessary to remove the `lib' prefix and the `.a'. +# It is necessary to remove the `lib' prefix and the `.a' suffix. # This 'sed' script should do the trick: # sed -e s'#\.a##g' -e 's#libLLVM#LLVM#g' -e 's#: # #' -e 's#\(.*\)#set(MSVC_LIB_DEPS_\1)#' ~/llvm/tools/llvm-config/LibDeps.txt diff --git a/cmake/modules/LLVMLibDeps.cmake b/cmake/modules/LLVMLibDeps.cmake index c9798485dec..e639b04e980 100644 --- a/cmake/modules/LLVMLibDeps.cmake +++ b/cmake/modules/LLVMLibDeps.cmake @@ -1,6 +1,6 @@ -set(MSVC_LIB_DEPS_LLVMARMAsmParser LLVMARMInfo LLVMMCParser LLVMSupport) -set(MSVC_LIB_DEPS_LLVMARMAsmPrinter LLVMARMCodeGen LLVMARMInfo LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMSupport LLVMTarget) -set(MSVC_LIB_DEPS_LLVMARMCodeGen LLVMARMInfo LLVMCodeGen LLVMCore LLVMMC LLVMSelectionDAG LLVMSupport LLVMSystem LLVMTarget) +set(MSVC_LIB_DEPS_LLVMARMAsmParser LLVMARMInfo LLVMMC LLVMMCParser LLVMSupport LLVMTarget) +set(MSVC_LIB_DEPS_LLVMARMAsmPrinter LLVMMC LLVMSupport) +set(MSVC_LIB_DEPS_LLVMARMCodeGen LLVMARMInfo LLVMAnalysis LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMSelectionDAG LLVMSupport LLVMSystem LLVMTarget) set(MSVC_LIB_DEPS_LLVMARMInfo LLVMSupport) set(MSVC_LIB_DEPS_LLVMAlphaAsmPrinter LLVMAlphaInfo LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMSupport LLVMTarget) set(MSVC_LIB_DEPS_LLVMAlphaCodeGen LLVMAlphaInfo LLVMCodeGen LLVMCore LLVMMC LLVMSelectionDAG LLVMSupport LLVMSystem LLVMTarget) @@ -8,9 +8,9 @@ set(MSVC_LIB_DEPS_LLVMAlphaInfo LLVMSupport) set(MSVC_LIB_DEPS_LLVMAnalysis LLVMCore LLVMSupport LLVMSystem LLVMTarget) set(MSVC_LIB_DEPS_LLVMArchive LLVMBitReader LLVMCore LLVMSupport LLVMSystem) set(MSVC_LIB_DEPS_LLVMAsmParser LLVMCore LLVMSupport) -set(MSVC_LIB_DEPS_LLVMAsmPrinter LLVMAnalysis LLVMCodeGen LLVMCore LLVMMC LLVMSupport LLVMSystem LLVMTarget) +set(MSVC_LIB_DEPS_LLVMAsmPrinter LLVMAnalysis LLVMCodeGen LLVMCore LLVMMC LLVMMCParser LLVMSupport LLVMSystem LLVMTarget) set(MSVC_LIB_DEPS_LLVMBitReader LLVMCore LLVMSupport) -set(MSVC_LIB_DEPS_LLVMBitWriter LLVMCore LLVMSupport LLVMSystem) +set(MSVC_LIB_DEPS_LLVMBitWriter LLVMCore LLVMSupport) set(MSVC_LIB_DEPS_LLVMBlackfinAsmPrinter LLVMAsmPrinter LLVMBlackfinInfo LLVMCodeGen LLVMCore LLVMMC LLVMSupport LLVMTarget) set(MSVC_LIB_DEPS_LLVMBlackfinCodeGen LLVMBlackfinInfo LLVMCodeGen LLVMCore LLVMMC LLVMSelectionDAG LLVMSupport LLVMTarget) set(MSVC_LIB_DEPS_LLVMBlackfinInfo LLVMSupport) @@ -27,29 +27,28 @@ set(MSVC_LIB_DEPS_LLVMExecutionEngine LLVMCore LLVMSupport LLVMSystem LLVMTarget set(MSVC_LIB_DEPS_LLVMInstCombine LLVMAnalysis LLVMCore LLVMSupport LLVMSystem LLVMTarget LLVMTransformUtils) set(MSVC_LIB_DEPS_LLVMInstrumentation LLVMAnalysis LLVMCore LLVMSupport LLVMSystem LLVMTransformUtils) set(MSVC_LIB_DEPS_LLVMInterpreter LLVMCodeGen LLVMCore LLVMExecutionEngine LLVMSupport LLVMSystem LLVMTarget) -set(MSVC_LIB_DEPS_LLVMJIT LLVMAnalysis LLVMCodeGen LLVMCore LLVMExecutionEngine LLVMMC LLVMSupport LLVMSystem LLVMTarget) -set(MSVC_LIB_DEPS_LLVMLinker LLVMArchive LLVMBitReader LLVMCore LLVMSupport LLVMSystem) +set(MSVC_LIB_DEPS_LLVMJIT LLVMCodeGen LLVMCore LLVMExecutionEngine LLVMMC LLVMSupport LLVMSystem LLVMTarget) +set(MSVC_LIB_DEPS_LLVMLinker LLVMArchive LLVMBitReader LLVMCore LLVMSupport LLVMSystem LLVMTransformUtils) set(MSVC_LIB_DEPS_LLVMMBlazeAsmPrinter LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMBlazeCodeGen LLVMMBlazeInfo LLVMMC LLVMSupport LLVMTarget) set(MSVC_LIB_DEPS_LLVMMBlazeCodeGen LLVMCodeGen LLVMCore LLVMMBlazeInfo LLVMMC LLVMSelectionDAG LLVMSupport LLVMSystem LLVMTarget) set(MSVC_LIB_DEPS_LLVMMBlazeInfo LLVMSupport) set(MSVC_LIB_DEPS_LLVMMC LLVMSupport LLVMSystem) +set(MSVC_LIB_DEPS_LLVMMCDisassembler LLVMARMAsmParser LLVMARMCodeGen LLVMARMInfo LLVMAlphaAsmPrinter LLVMAlphaCodeGen LLVMAlphaInfo LLVMBlackfinAsmPrinter LLVMBlackfinCodeGen LLVMBlackfinInfo LLVMCBackend LLVMCBackendInfo LLVMCellSPUAsmPrinter LLVMCellSPUCodeGen LLVMCellSPUInfo LLVMCppBackend LLVMCppBackendInfo LLVMMBlazeAsmPrinter LLVMMBlazeCodeGen LLVMMBlazeInfo LLVMMC LLVMMCParser LLVMMSP430AsmPrinter LLVMMSP430CodeGen LLVMMSP430Info LLVMMipsAsmPrinter LLVMMipsCodeGen LLVMMipsInfo LLVMPIC16AsmPrinter LLVMPIC16CodeGen LLVMPIC16Info LLVMPowerPCAsmPrinter LLVMPowerPCCodeGen LLVMPowerPCInfo LLVMSparcAsmPrinter LLVMSparcCodeGen LLVMSparcInfo LLVMSupport LLVMSystem LLVMSystemZAsmPrinter LLVMSystemZCodeGen LLVMSystemZInfo LLVMX86AsmParser LLVMX86CodeGen LLVMX86Disassembler LLVMX86Info LLVMXCoreAsmPrinter LLVMXCoreCodeGen LLVMXCoreInfo) set(MSVC_LIB_DEPS_LLVMMCParser LLVMMC LLVMSupport) -set(MSVC_LIB_DEPS_LLVMMSIL LLVMAnalysis LLVMCodeGen LLVMCore LLVMMSILInfo LLVMScalarOpts LLVMSupport LLVMTarget LLVMTransformUtils LLVMipa) -set(MSVC_LIB_DEPS_LLVMMSILInfo LLVMSupport) set(MSVC_LIB_DEPS_LLVMMSP430AsmPrinter LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMMSP430Info LLVMSupport LLVMTarget) set(MSVC_LIB_DEPS_LLVMMSP430CodeGen LLVMCodeGen LLVMCore LLVMMC LLVMMSP430Info LLVMSelectionDAG LLVMSupport LLVMSystem LLVMTarget) set(MSVC_LIB_DEPS_LLVMMSP430Info LLVMSupport) set(MSVC_LIB_DEPS_LLVMMipsAsmPrinter LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMMipsCodeGen LLVMMipsInfo LLVMSupport LLVMTarget) set(MSVC_LIB_DEPS_LLVMMipsCodeGen LLVMCodeGen LLVMCore LLVMMC LLVMMipsInfo LLVMSelectionDAG LLVMSupport LLVMSystem LLVMTarget) set(MSVC_LIB_DEPS_LLVMMipsInfo LLVMSupport) -set(MSVC_LIB_DEPS_LLVMPIC16 LLVMAnalysis LLVMCodeGen LLVMCore LLVMMC LLVMPIC16Info LLVMSelectionDAG LLVMSupport LLVMTarget) -set(MSVC_LIB_DEPS_LLVMPIC16AsmPrinter LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMPIC16 LLVMPIC16Info LLVMSupport LLVMTarget) +set(MSVC_LIB_DEPS_LLVMPIC16AsmPrinter LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMPIC16CodeGen LLVMPIC16Info LLVMSupport LLVMTarget) +set(MSVC_LIB_DEPS_LLVMPIC16CodeGen LLVMAnalysis LLVMCodeGen LLVMCore LLVMMC LLVMPIC16Info LLVMSelectionDAG LLVMSupport LLVMTarget) set(MSVC_LIB_DEPS_LLVMPIC16Info LLVMSupport) -set(MSVC_LIB_DEPS_LLVMPowerPCAsmPrinter LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMPowerPCInfo LLVMSupport LLVMTarget) +set(MSVC_LIB_DEPS_LLVMPowerPCAsmPrinter LLVMAnalysis LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMPowerPCInfo LLVMSupport LLVMTarget) set(MSVC_LIB_DEPS_LLVMPowerPCCodeGen LLVMCodeGen LLVMCore LLVMMC LLVMPowerPCInfo LLVMSelectionDAG LLVMSupport LLVMSystem LLVMTarget) set(MSVC_LIB_DEPS_LLVMPowerPCInfo LLVMSupport) set(MSVC_LIB_DEPS_LLVMScalarOpts LLVMAnalysis LLVMCore LLVMInstCombine LLVMSupport LLVMSystem LLVMTarget LLVMTransformUtils) -set(MSVC_LIB_DEPS_LLVMSelectionDAG LLVMAnalysis LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMSupport LLVMSystem LLVMTarget) +set(MSVC_LIB_DEPS_LLVMSelectionDAG LLVMAnalysis LLVMCodeGen LLVMCore LLVMMC LLVMSupport LLVMSystem LLVMTarget) set(MSVC_LIB_DEPS_LLVMSparcAsmPrinter LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMSparcInfo LLVMSupport LLVMTarget) set(MSVC_LIB_DEPS_LLVMSparcCodeGen LLVMCodeGen LLVMCore LLVMMC LLVMSelectionDAG LLVMSparcInfo LLVMSupport LLVMSystem LLVMTarget) set(MSVC_LIB_DEPS_LLVMSparcInfo LLVMSupport) @@ -61,12 +60,12 @@ set(MSVC_LIB_DEPS_LLVMSystemZInfo LLVMSupport) set(MSVC_LIB_DEPS_LLVMTarget LLVMCore LLVMMC LLVMSupport) set(MSVC_LIB_DEPS_LLVMTransformUtils LLVMAnalysis LLVMCore LLVMSupport LLVMSystem LLVMTarget LLVMipa) set(MSVC_LIB_DEPS_LLVMX86AsmParser LLVMMC LLVMMCParser LLVMSupport LLVMTarget LLVMX86Info) -set(MSVC_LIB_DEPS_LLVMX86AsmPrinter LLVMAnalysis LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMSupport LLVMTarget LLVMX86CodeGen LLVMX86Info) -set(MSVC_LIB_DEPS_LLVMX86CodeGen LLVMCodeGen LLVMCore LLVMMC LLVMSelectionDAG LLVMSupport LLVMSystem LLVMTarget LLVMX86Info) +set(MSVC_LIB_DEPS_LLVMX86AsmPrinter LLVMMC LLVMSupport) +set(MSVC_LIB_DEPS_LLVMX86CodeGen LLVMAnalysis LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMSelectionDAG LLVMSupport LLVMSystem LLVMTarget LLVMX86AsmPrinter LLVMX86Info) set(MSVC_LIB_DEPS_LLVMX86Disassembler LLVMMC LLVMSupport LLVMX86Info) set(MSVC_LIB_DEPS_LLVMX86Info LLVMSupport) -set(MSVC_LIB_DEPS_LLVMXCore LLVMCodeGen LLVMCore LLVMMC LLVMSelectionDAG LLVMSupport LLVMTarget LLVMXCoreInfo) set(MSVC_LIB_DEPS_LLVMXCoreAsmPrinter LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMSupport LLVMTarget LLVMXCoreInfo) +set(MSVC_LIB_DEPS_LLVMXCoreCodeGen LLVMCodeGen LLVMCore LLVMMC LLVMSelectionDAG LLVMSupport LLVMTarget LLVMXCoreInfo) set(MSVC_LIB_DEPS_LLVMXCoreInfo LLVMSupport) set(MSVC_LIB_DEPS_LLVMipa LLVMAnalysis LLVMCore LLVMSupport LLVMSystem) -set(MSVC_LIB_DEPS_LLVMipo LLVMAnalysis LLVMCore LLVMSupport LLVMSystem LLVMTarget LLVMTransformUtils LLVMipa) +set(MSVC_LIB_DEPS_LLVMipo LLVMAnalysis LLVMCore LLVMScalarOpts LLVMSupport LLVMSystem LLVMTarget LLVMTransformUtils LLVMipa) diff --git a/cmake/modules/VersionFromVCS.cmake b/cmake/modules/VersionFromVCS.cmake new file mode 100644 index 00000000000..1016df22590 --- /dev/null +++ b/cmake/modules/VersionFromVCS.cmake @@ -0,0 +1,33 @@ +# Adds version control information to the variable VERS. For +# determining the Version Control System used (if any) it inspects the +# existence of certain subdirectories under CMAKE_CURRENT_SOURCE_DIR. + +function(add_version_info_from_vcs VERS) + set(result ${${VERS}}) + if( EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/.svn ) + set(result "${result}svn") + find_package(Subversion) + if( Subversion_FOUND ) + subversion_wc_info( ${CMAKE_CURRENT_SOURCE_DIR} Project ) + if( Project_WC_REVISION ) + set(result "${result}-r${Project_WC_REVISION}") + endif() + endif() + elseif( EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/.git ) + set(result "${result}git") + # Try to get a ref-id + find_program(git_executable NAMES git git.exe git.cmd) + if( git_executable ) + execute_process(COMMAND ${git_executable} show-ref HEAD + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} + TIMEOUT 5 + RESULT_VARIABLE git_result + OUTPUT_VARIABLE git_output) + if( git_result EQUAL 0 ) + string(SUBSTRING ${git_output} 0 7 git_ref_id) + set(result "${result}-${git_ref_id}") + endif() + endif() + endif() + set(${VERS} ${result} PARENT_SCOPE) +endfunction(add_version_info_from_vcs) diff --git a/configure b/configure index dc1b5b3fbe3..d2b98bfe661 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.60 for llvm 2.8svn. +# Generated by GNU Autoconf 2.60 for llvm 2.8rc. # # Report bugs to . # @@ -561,8 +561,8 @@ SHELL=${CONFIG_SHELL-/bin/sh} # Identity of this package. PACKAGE_NAME='llvm' PACKAGE_TARNAME='-llvm-' -PACKAGE_VERSION='2.8svn' -PACKAGE_STRING='llvm 2.8svn' +PACKAGE_VERSION='2.8rc' +PACKAGE_STRING='llvm 2.8rc' PACKAGE_BUGREPORT='llvmbugs@cs.uiuc.edu' ac_unique_file="lib/VMCore/Module.cpp" @@ -703,8 +703,6 @@ ENABLE_BUILT_CLANG OPTIMIZE_OPTION EXTRA_OPTIONS BINUTILS_INCDIR -ENABLE_LLVMC_DYNAMIC -ENABLE_LLVMC_DYNAMIC_PLUGINS CXX CXXFLAGS ac_ct_CXX @@ -1320,7 +1318,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures llvm 2.8svn to adapt to many kinds of systems. +\`configure' configures llvm 2.8rc to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1386,7 +1384,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of llvm 2.8svn:";; + short | recursive ) echo "Configuration of llvm 2.8rc:";; esac cat <<\_ACEOF @@ -1416,17 +1414,13 @@ Optional Features: --enable-targets Build specific host targets: all or target1,target2,... Valid targets are: host, x86, x86_64, sparc, powerpc, alpha, arm, mips, spu, - pic16, xcore, msp430, systemz, blackfin, cbe, msil, - and cpp (default=all) + pic16, xcore, msp430, systemz, blackfin, cbe, and + cpp (default=all) --enable-cbe-printf-a Enable C Backend output with hex floating point via %a (default is YES) --enable-bindings Build specific language bindings: all,auto,none,{binding-name} (default=auto) --enable-libffi Check for the presence of libffi (default is NO) - --enable-llvmc-dynamic Link LLVMC dynamically (default is NO, unless on - Win32) - --enable-llvmc-dynamic-plugins - Enable dynamic LLVMC plugins (default is YES) --enable-ltdl-install install libltdl Optional Packages: @@ -1539,7 +1533,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -llvm configure 2.8svn +llvm configure 2.8rc generated by GNU Autoconf 2.60 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -1555,7 +1549,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by llvm $as_me 2.8svn, which was +It was created by llvm $as_me 2.8rc, which was generated by GNU Autoconf 2.60. Invocation command line was $ $0 $@ @@ -1988,7 +1982,6 @@ for i in `ls ${srcdir}/projects` do if test -d ${srcdir}/projects/${i} ; then case ${i} in - CVS) ;; sample) subdirs="$subdirs projects/sample" ;; privbracket) subdirs="$subdirs projects/privbracket" @@ -4691,7 +4684,7 @@ else fi -if test -d "CVS" -o -d "${srcdir}/CVS" -o -d ".svn" -o -d "${srcdir}/.svn" -o -d ".git" -o -d "${srcdir}/.git"; then +if test -d ".svn" -o -d "${srcdir}/.svn" -o -d ".git" -o -d "${srcdir}/.git"; then cvsbuild="yes" optimize="no" CVSBUILD=CVSBUILD=1 @@ -4706,7 +4699,7 @@ fi if test "${enable_optimized+set}" = set; then enableval=$enable_optimized; else - enableval=$optimize + enableval="yes" fi if test ${enableval} = "no" ; then @@ -4736,7 +4729,7 @@ fi if test "${enable_assertions+set}" = set; then enableval=$enable_assertions; else - enableval="yes" + enableval="no" fi if test ${enableval} = "yes" ; then @@ -4962,7 +4955,7 @@ if test "$enableval" = host-only ; then enableval=host fi case "$enableval" in - all) TARGETS_TO_BUILD="X86 Sparc PowerPC Alpha ARM Mips CellSPU PIC16 XCore MSP430 SystemZ Blackfin CBackend MSIL CppBackend MBlaze" ;; + all) TARGETS_TO_BUILD="X86 Sparc PowerPC Alpha ARM Mips CellSPU PIC16 XCore MSP430 SystemZ Blackfin CBackend CppBackend MBlaze" ;; *)for a_target in `echo $enableval|sed -e 's/,/ /g' ` ; do case "$a_target" in x86) TARGETS_TO_BUILD="X86 $TARGETS_TO_BUILD" ;; @@ -4979,7 +4972,6 @@ case "$enableval" in systemz) TARGETS_TO_BUILD="SystemZ $TARGETS_TO_BUILD" ;; blackfin) TARGETS_TO_BUILD="Blackfin $TARGETS_TO_BUILD" ;; cbe) TARGETS_TO_BUILD="CBackend $TARGETS_TO_BUILD" ;; - msil) TARGETS_TO_BUILD="MSIL $TARGETS_TO_BUILD" ;; cpp) TARGETS_TO_BUILD="CppBackend $TARGETS_TO_BUILD" ;; mblaze) TARGETS_TO_BUILD="MBlaze $TARGETS_TO_BUILD" ;; host) case "$llvm_cv_target_arch" in @@ -5015,10 +5007,27 @@ TARGETS_TO_BUILD=$TARGETS_TO_BUILD # If so, define LLVM_NATIVE_ARCH to that LLVM target. for a_target in $TARGETS_TO_BUILD; do if test "$a_target" = "$LLVM_NATIVE_ARCH"; then - LLVM_NATIVE_ARCHTARGET="${LLVM_NATIVE_ARCH}Target" cat >>confdefs.h <<_ACEOF -#define LLVM_NATIVE_ARCH $LLVM_NATIVE_ARCHTARGET +#define LLVM_NATIVE_ARCH $LLVM_NATIVE_ARCH +_ACEOF + + LLVM_NATIVE_TARGET="LLVMInitialize${LLVM_NATIVE_ARCH}Target" + LLVM_NATIVE_TARGETINFO="LLVMInitialize${LLVM_NATIVE_ARCH}TargetInfo" + LLVM_NATIVE_ASMPRINTER="LLVMInitialize${LLVM_NATIVE_ARCH}AsmPrinter" + +cat >>confdefs.h <<_ACEOF +#define LLVM_NATIVE_TARGET $LLVM_NATIVE_TARGET +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define LLVM_NATIVE_TARGETINFO $LLVM_NATIVE_TARGETINFO +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define LLVM_NATIVE_ASMPRINTER $LLVM_NATIVE_ASMPRINTER _ACEOF fi @@ -5374,42 +5383,6 @@ else fi -if test "$llvm_cv_os_type" = "Win32" ; then - llvmc_dynamic="yes" -else - llvmc_dynamic="no" -fi - -# Check whether --enable-llvmc-dynamic was given. -if test "${enable_llvmc_dynamic+set}" = set; then - enableval=$enable_llvmc_dynamic; -else - enableval=$llvmc_dynamic -fi - -if test ${enableval} = "yes" && test "$ENABLE_PIC" -eq 1 ; then - ENABLE_LLVMC_DYNAMIC=ENABLE_LLVMC_DYNAMIC=1 - -else - ENABLE_LLVMC_DYNAMIC= - -fi - -# Check whether --enable-llvmc-dynamic-plugins was given. -if test "${enable_llvmc_dynamic_plugins+set}" = set; then - enableval=$enable_llvmc_dynamic_plugins; -else - enableval=yes -fi - -if test ${enableval} = "yes" ; then - ENABLE_LLVMC_DYNAMIC_PLUGINS=ENABLE_LLVMC_DYNAMIC_PLUGINS=1 - -else - ENABLE_LLVMC_DYNAMIC_PLUGINS= - -fi - ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -8004,6 +7977,10 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' +case "$INSTALL" in + [\\/$]* | ?:[\\/]* ) ;; + *) INSTALL="\\\$(TOPSRCDIR)/$INSTALL" ;; +esac # Extract the first word of "bzip2", so it can be a program name with args. set dummy bzip2; ac_word=$2 @@ -8721,6 +8698,31 @@ fi done +{ echo "$as_me:$LINENO: checking for linker version" >&5 +echo $ECHO_N "checking for linker version... $ECHO_C" >&6; } +if test "${llvm_cv_link_version+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + version_string="$(ld -v 2>&1 | head -1)" + + # Check for ld64. + if (echo "$version_string" | grep -q "ld64"); then + llvm_cv_link_version=$(echo "$version_string" | sed -e "s#.*ld64-\([^ ]*\)#\1#") + else + llvm_cv_link_version=$(echo "$version_string" | sed -e "s#[^0-9]*\([0-9.]*\).*#\1#") + fi + +fi +{ echo "$as_me:$LINENO: result: $llvm_cv_link_version" >&5 +echo "${ECHO_T}$llvm_cv_link_version" >&6; } + +cat >>confdefs.h <<_ACEOF +#define HOST_LINK_VERSION "$llvm_cv_link_version" +_ACEOF + + + { echo "$as_me:$LINENO: checking for compiler -Wl,-R option" >&5 echo $ECHO_N "checking for compiler -Wl,-R option... $ECHO_C" >&6; } if test "${llvm_cv_link_use_r+set}" = set; then @@ -11387,7 +11389,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <&5 echo $ECHO_N "checking for GCC atomic builtins... $ECHO_C" >&6; } +ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -20041,6 +20049,12 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } @@ -20067,7 +20081,6 @@ rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - if test "$llvm_cv_os_type" = "Linux" -a "$llvm_cv_target_arch" = "x86_64" ; then { echo "$as_me:$LINENO: checking for 32-bit userspace on 64-bit system" >&5 echo $ECHO_N "checking for 32-bit userspace on 64-bit system... $ECHO_C" >&6; } @@ -20563,7 +20576,12 @@ fi -ac_config_headers="$ac_config_headers include/llvm/Config/config.h" +ac_config_headers="$ac_config_headers include/llvm/Config/config.h include/llvm/Config/llvm-config.h" + + + + + ac_config_files="$ac_config_files include/llvm/Config/Targets.def" @@ -20582,7 +20600,7 @@ ac_config_files="$ac_config_files Makefile.config" ac_config_files="$ac_config_files llvm.spec" -ac_config_files="$ac_config_files tools/llvmc/plugins/Base/Base.td" +ac_config_files="$ac_config_files tools/llvmc/src/Base.td" ac_config_files="$ac_config_files tools/llvm-config/llvm-config.in" @@ -21027,7 +21045,7 @@ exec 6>&1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by llvm $as_me 2.8svn, which was +This file was extended by llvm $as_me 2.8rc, which was generated by GNU Autoconf 2.60. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -21080,7 +21098,7 @@ Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ -llvm config.status 2.8svn +llvm config.status 2.8rc configured by $0, generated by GNU Autoconf 2.60, with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" @@ -21194,6 +21212,7 @@ for ac_config_target in $ac_config_targets do case $ac_config_target in "include/llvm/Config/config.h") CONFIG_HEADERS="$CONFIG_HEADERS include/llvm/Config/config.h" ;; + "include/llvm/Config/llvm-config.h") CONFIG_HEADERS="$CONFIG_HEADERS include/llvm/Config/llvm-config.h" ;; "include/llvm/Config/Targets.def") CONFIG_FILES="$CONFIG_FILES include/llvm/Config/Targets.def" ;; "include/llvm/Config/AsmPrinters.def") CONFIG_FILES="$CONFIG_FILES include/llvm/Config/AsmPrinters.def" ;; "include/llvm/Config/AsmParsers.def") CONFIG_FILES="$CONFIG_FILES include/llvm/Config/AsmParsers.def" ;; @@ -21201,7 +21220,7 @@ do "include/llvm/System/DataTypes.h") CONFIG_HEADERS="$CONFIG_HEADERS include/llvm/System/DataTypes.h" ;; "Makefile.config") CONFIG_FILES="$CONFIG_FILES Makefile.config" ;; "llvm.spec") CONFIG_FILES="$CONFIG_FILES llvm.spec" ;; - "tools/llvmc/plugins/Base/Base.td") CONFIG_FILES="$CONFIG_FILES tools/llvmc/plugins/Base/Base.td" ;; + "tools/llvmc/src/Base.td") CONFIG_FILES="$CONFIG_FILES tools/llvmc/src/Base.td" ;; "tools/llvm-config/llvm-config.in") CONFIG_FILES="$CONFIG_FILES tools/llvm-config/llvm-config.in" ;; "setup") CONFIG_COMMANDS="$CONFIG_COMMANDS setup" ;; "Makefile") CONFIG_COMMANDS="$CONFIG_COMMANDS Makefile" ;; @@ -21421,8 +21440,6 @@ ENABLE_BUILT_CLANG!$ENABLE_BUILT_CLANG$ac_delim OPTIMIZE_OPTION!$OPTIMIZE_OPTION$ac_delim EXTRA_OPTIONS!$EXTRA_OPTIONS$ac_delim BINUTILS_INCDIR!$BINUTILS_INCDIR$ac_delim -ENABLE_LLVMC_DYNAMIC!$ENABLE_LLVMC_DYNAMIC$ac_delim -ENABLE_LLVMC_DYNAMIC_PLUGINS!$ENABLE_LLVMC_DYNAMIC_PLUGINS$ac_delim CXX!$CXX$ac_delim CXXFLAGS!$CXXFLAGS$ac_delim ac_ct_CXX!$ac_ct_CXX$ac_delim @@ -21514,7 +21531,7 @@ LIBOBJS!$LIBOBJS$ac_delim LTLIBOBJS!$LTLIBOBJS$ac_delim _ACEOF - if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 95; then + if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 93; then break elif $ac_last_try; then { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 diff --git a/docs/AliasAnalysis.html b/docs/AliasAnalysis.html index a23d90848e4..cffaa820622 100644 --- a/docs/AliasAnalysis.html +++ b/docs/AliasAnalysis.html @@ -238,10 +238,10 @@ a location, ModRef is returned.

The AliasAnalysis class also provides a getModRefInfo method for testing dependencies between function calls. This method takes two -call sites (CS1 & CS2), returns NoModRef if the two calls refer to disjoint -memory locations, Ref if CS1 reads memory written by CS2, Mod if CS1 writes to -memory read or written by CS2, or ModRef if CS1 might read or write memory -accessed by CS2. Note that this relation is not commutative.

+call sites (CS1 & CS2), returns NoModRef if neither call writes to memory +read or written by the other, Ref if CS1 reads memory written by CS2, Mod if CS1 +writes to memory read or written by CS2, or ModRef if CS1 might read or write +memory written to by CS2. Note that this relation is not commutative.

@@ -998,7 +998,7 @@ analysis directly.

Chris Lattner
LLVM Compiler Infrastructure
- Last modified: $Date: 2010-07-07 16:27:09 +0200 (Wed, 07 Jul 2010) $ + Last modified: $Date: 2010-08-31 01:47:24 +0200 (Tue, 31 Aug 2010) $ diff --git a/docs/BitCodeFormat.html b/docs/BitCodeFormat.html index f1f175d7055..bd53a1edd76 100644 --- a/docs/BitCodeFormat.html +++ b/docs/BitCodeFormat.html @@ -1367,21 +1367,6 @@ type to the type table.

- - - -
- -

[UNION, ...eltty...]

- -

The UNION record (code 17) adds a union type to -the type table. The eltty operand fields are zero or more type -indices representing the element types of the union. -

- -
- @@ -1489,7 +1474,7 @@ name. Each entry corresponds to a single named type. src="http://www.w3.org/Icons/valid-html401-blue" alt="Valid HTML 4.01"> Chris Lattner
The LLVM Compiler Infrastructure
-Last modified: $Date: 2010-05-22 00:20:54 +0200 (Sat, 22 May 2010) $ +Last modified: $Date: 2010-08-28 06:09:24 +0200 (Sat, 28 Aug 2010) $ diff --git a/docs/CMake.html b/docs/CMake.html index 40a2cec8e91..ca0b50f628e 100644 --- a/docs/CMake.html +++ b/docs/CMake.html @@ -313,9 +313,15 @@
-

LLVM testing is not supported on Visual Studio.

+

Testing is performed when the check target is built. For + instance, if you are using makefiles, execute this command while on + the top level of your build directory:

-

TODO

+
+

make check

+
+ +

Testing is not supported on Visual Studio.

@@ -348,7 +354,38 @@
-

TODO

+

The most difficult part of adding LLVM to the build of a project + is to determine the set of LLVM libraries corresponding to the set + of required LLVM features. What follows is an example of how to + obtain this information:

+ +
+
+    # A convenience variable:
+    set(LLVM_ROOT "" CACHE PATH "Root of LLVM install.")
+    # A bit of a sanity check:
+    if( NOT EXISTS ${LLVM_ROOT}/include/llvm )
+    message(FATAL_ERROR "LLVM_ROOT (${LLVM_ROOT}) is not a valid LLVM install")
+    endif()
+    # We incorporate the CMake features provided by LLVM:
+    set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${LLVM_ROOT}/share/llvm/cmake")
+    include(LLVM)
+    # Now set the header and library paths:
+    include_directories( ${LLVM_ROOT}/include )
+    link_directories( ${LLVM_ROOT}/lib )
+    # Let's suppose we want to build a JIT compiler with support for
+    # binary code (no interpreter):
+    llvm_map_components_to_libraries(REQ_LLVM_LIBRARIES jit native)
+    # Finally, we link the LLVM libraries to our executable:
+    target_link_libraries(mycompiler ${REQ_LLVM_LIBRARIES})
+    
+
+ +

This assumes that LLVM_ROOT points to an install of LLVM. The + procedure works too for uninstalled builds although we need to take + care to add an include_directories for the location of the + headers on the LLVM source directory (if we are building + out-of-source.)

@@ -377,7 +414,7 @@ Oscar Fuentes
LLVM Compiler Infrastructure
- Last modified: $Date: 2008-12-31 03:59:36 +0100 (Wed, 31 Dec 2008) $ + Last modified: $Date: 2010-08-09 03:59:36 +0100 (Mon, 9 Aug 2010) $ diff --git a/docs/CodeGenerator.html b/docs/CodeGenerator.html index 407178777a3..4b2e261094b 100644 --- a/docs/CodeGenerator.html +++ b/docs/CodeGenerator.html @@ -1457,8 +1457,8 @@ bool RegMapping_Fer::compatible_class(MachineFunction &mf, order to get and store values in memory. To assign a physical register to a virtual register present in a given operand, use MachineOperand::setReg(p_reg). To insert a store instruction, - use TargetRegisterInfo::storeRegToStackSlot(...), and to insert a - load instruction, use TargetRegisterInfo::loadRegFromStackSlot.

+ use TargetInstrInfo::storeRegToStackSlot(...), and to insert a + load instruction, use TargetInstrInfo::loadRegFromStackSlot.

The indirect mapping shields the application developer from the complexities of inserting load and store instructions. In order to map a virtual register @@ -2162,7 +2162,7 @@ MOVSX32rm16 -> movsx, 32-bit register, 16-bit memory Chris Lattner
The LLVM Compiler Infrastructure
- Last modified: $Date: 2010-06-15 23:58:33 +0200 (Tue, 15 Jun 2010) $ + Last modified: $Date: 2010-09-01 00:01:07 +0200 (Wed, 01 Sep 2010) $ diff --git a/docs/CommandGuide/bugpoint.pod b/docs/CommandGuide/bugpoint.pod index 7afeea1aba5..1870a0d84b6 100644 --- a/docs/CommandGuide/bugpoint.pod +++ b/docs/CommandGuide/bugpoint.pod @@ -67,6 +67,10 @@ tool. Pass all arguments specified after B<--gcc-tool-args> to the invocation of B. +=item B<--opt-args> I + +Pass all arguments specified after B<--opt-args> to the invocation of B. + =item B<--disable-{dce,simplifycfg}> Do not run the specified passes to clean up and reduce the size of the test diff --git a/docs/CommandGuide/index.html b/docs/CommandGuide/index.html index 62cb7765a47..67f0cfc1a11 100644 --- a/docs/CommandGuide/index.html +++ b/docs/CommandGuide/index.html @@ -72,6 +72,9 @@ options) arguments to the tool you are interested in.

  • llvmc - a generic customizable compiler driver
  • +
  • llvm-diff - + structurally compare two modules
  • + @@ -148,7 +151,7 @@ options) arguments to the tool you are interested in.

    src="http://www.w3.org/Icons/valid-html401-blue" alt="Valid HTML 4.01"> LLVM Compiler Infrastructure
    - Last modified: $Date: 2010-05-11 18:47:42 +0200 (Tue, 11 May 2010) $ + Last modified: $Date: 2010-09-08 01:32:02 +0200 (Wed, 08 Sep 2010) $ diff --git a/docs/CommandGuide/llvm-diff.pod b/docs/CommandGuide/llvm-diff.pod new file mode 100644 index 00000000000..c8cfdb3be94 --- /dev/null +++ b/docs/CommandGuide/llvm-diff.pod @@ -0,0 +1,53 @@ +=pod + +=head1 NAME + +llvm-diff - LLVM structural 'diff' + +=head1 SYNOPSIS + +B [I] I I [I] + +=head1 DESCRIPTION + +B compares the structure of two LLVM modules, primarily +focusing on differences in function definitions. Insignificant +differences, such as changes in the ordering of globals or in the +names of local values, are ignored. + +An input module will be interpreted as an assembly file if its name +ends in '.ll'; otherwise it will be read in as a bitcode file. + +If a list of global names is given, just the values with those names +are compared; otherwise, all global values are compared, and +diagnostics are produced for globals which only appear in one module +or the other. + +B compares two functions by comparing their basic blocks, +beginning with the entry blocks. If the terminators seem to match, +then the corresponding successors are compared; otherwise they are +ignored. This algorithm is very sensitive to changes in control flow, +which tend to stop any downstream changes from being detected. + +B is intended as a debugging tool for writers of LLVM +passes and frontends. It does not have a stable output format. + +=head1 EXIT STATUS + +If B finds no differences between the modules, it will exit +with 0 and produce no output. Otherwise it will exit with a non-zero +value. + +=head1 BUGS + +Many important differences, like changes in linkage or function +attributes, are not diagnosed. + +Changes in memory behavior (for example, coalescing loads) can cause +massive detected differences in blocks. + +=head1 AUTHORS + +Maintained by the LLVM Team (L). + +=cut diff --git a/docs/DeveloperPolicy.html b/docs/DeveloperPolicy.html index 37bfb8990e0..47352009ea0 100644 --- a/docs/DeveloperPolicy.html +++ b/docs/DeveloperPolicy.html @@ -43,7 +43,8 @@ is to eliminate miscommunication, rework, and confusion that might arise from the distributed nature of LLVM's development. By stating the policy in clear terms, we hope each developer can know ahead of time what to expect when - making LLVM contributions.

    + making LLVM contributions. This policy covers all llvm.org subprojects, + including Clang, LLDB, etc.

    This policy is also designed to accomplish the following objectives:

      @@ -77,17 +78,28 @@
      -

      Developers should stay informed by reading at least the - llvmdev email - list. If you are doing anything more than just casual work on LLVM, it is - suggested that you also subscribe to the - llvm-commits - list and pay attention to changes being made by others.

      +

      Developers should stay informed by reading at least the "dev" mailing list + for the projects you are interested in, such as + llvmdev for + LLVM, cfe-dev + for Clang, or lldb-dev + for LLDB. If you are doing anything more than just casual work on LLVM, it + is suggested that you also subscribe to the "commits" mailing list for the + subproject you're interested in, such as + llvm-commits, + cfe-commits, + or lldb-commits. + Reading the "commits" list and paying attention to changes being made by + others is a good way to see what other people are interested in and watching + the flow of the project as a whole.

      We recommend that active developers register an email account with LLVM Bugzilla and preferably subscribe to the llvm-bugs - email list to keep track of bugs and enhancements occurring in LLVM.

      + email list to keep track of bugs and enhancements occurring in LLVM. We + really appreciate people who are proactive at catching incoming bugs in their + components and dealing with them promptly.

      @@ -107,18 +119,13 @@ patches may not apply correctly if the underlying code changes between the time the patch was created and the time it is applied. -
    1. Patches should be made with this command: -
      -
      -svn diff
      -
      -
      - or with the utility utils/mkpatch, which makes it easy to read - the diff.
    2. +
    3. Patches should be made with svn diff, or similar. If you use + a different tool, make sure it uses the diff -u format and + that it doesn't contain clutter which makes it hard to read.
    4. -
    5. Patches should not include differences in generated code such as the code - generated by autoconf or tblgen. The - utils/mkpatch utility takes care of this for you.
    6. +
    7. If you are modifying generated files, such as the top-level + configure script, please separate out those changes into + a separate patch from the rest of your changes.

    When sending a patch to a mailing list, it is a good idea to send it as an @@ -239,8 +246,9 @@ svn diff them short. -

    Note that llvm/test is designed for regression and small feature tests - only. More extensive test cases (e.g., entire applications, benchmarks, etc) +

    Note that llvm/test and clang/test are designed for regression and small + feature tests only. More extensive test cases (e.g., entire applications, + benchmarks, etc) should be added to the llvm-test test suite. The llvm-test suite is for coverage (correctness, performance, etc) testing, not feature or regression testing.

    @@ -263,7 +271,7 @@ svn diff testcase so we know if the fix/feature ever regresses in the future. -
  • Code must pass the dejagnu (llvm/test) test suite.
  • +
  • Code must pass the llvm/test test suite.
  • The code must not cause regressions on a reasonable subset of llvm-test, where "reasonable" depends on the contributor's judgement and the scope of @@ -601,7 +609,7 @@ Changes Written by the LLVM Oversight Group
    The LLVM Compiler Infrastructure
    - Last modified: $Date: 2010-05-07 02:28:04 +0200 (Fri, 07 May 2010) $ + Last modified: $Date: 2010-09-02 02:09:17 +0200 (Thu, 02 Sep 2010) $ diff --git a/docs/GCCFEBuildInstrs.html b/docs/GCCFEBuildInstrs.html index f4eccf79a2a..0b2827c9d5c 100644 --- a/docs/GCCFEBuildInstrs.html +++ b/docs/GCCFEBuildInstrs.html @@ -84,7 +84,7 @@ top-level README.LLVM file, adding ",ada" to EXTRALANGS, for example:
  • The build requires having a compiler that supports Ada, C and C++. The Ada front-end is written in Ada so an Ada compiler is needed to build it. Compilers known to work with the - LLVM 2.5 release + LLVM 2.7 release are gcc-4.2 and the 2005, 2006 and 2007 versions of the GNAT GPL Edition. @@ -116,9 +116,9 @@ top-level README.LLVM file, adding ",ada" to EXTRALANGS, for example: and unpack it:

    -wget http://llvm.org/releases/2.5/llvm-2.5.tar.gz
    -tar xzf llvm-2.5.tar.gz
    -mv llvm-2.5 llvm
    +wget http://llvm.org/releases/2.7/llvm-2.7.tgz
    +tar xzf llvm-2.7.tgz
    +mv llvm-2.7 llvm
     

    or check out the @@ -133,9 +133,9 @@ mv llvm-2.5 llvm and unpack it:

    -wget http://llvm.org/releases/2.5/llvm-gcc-4.2-2.5.source.tar.gz
    -tar xzf llvm-gcc-4.2-2.5.source.tar.gz
    -mv llvm-gcc4.2-2.5.source llvm-gcc-4.2
    +wget http://llvm.org/releases/2.7/llvm-gcc-4.2-2.7.source.tgz
    +tar xzf llvm-gcc-4.2-2.7.source.tgz
    +mv llvm-gcc-4.2-2.7.source llvm-gcc-4.2
     

    or check out the @@ -272,7 +272,7 @@ More information is available in the FAQ. src="http://www.w3.org/Icons/valid-html401-blue" alt="Valid HTML 4.01"> LLVM Compiler Infrastructure
    - Last modified: $Date: 2010-05-07 02:28:04 +0200 (Fri, 07 May 2010) $ + Last modified: $Date: 2010-08-31 21:40:21 +0200 (Tue, 31 Aug 2010) $ diff --git a/docs/GetElementPtr.html b/docs/GetElementPtr.html index aa874ae4751..d840c9788ac 100644 --- a/docs/GetElementPtr.html +++ b/docs/GetElementPtr.html @@ -26,7 +26,6 @@

  • Why don't GEP x,0,0,1 and GEP x,1 alias?
  • Why do GEP x,1,0,0 and GEP x,1 alias?
  • Can GEP index into vector elements? -
  • Can GEP index into unions?
  • What effect do address spaces have on GEPs?
  • How is GEP different from ptrtoint, arithmetic, and inttoptr?
  • I'm writing a backend for a target which needs custom lowering for GEP. How do I do this? @@ -369,16 +368,6 @@ idx3 = (char*) &MyVar + 8 - -
    -

    Unknown.

    - -
    - - - @@ -730,7 +719,7 @@ idx3 = (char*) &MyVar + 8 Valid HTML 4.01 The LLVM Compiler Infrastructure
    - Last modified: $Date: 2010-07-06 17:26:33 +0200 (Tue, 06 Jul 2010) $ + Last modified: $Date: 2010-08-28 06:09:24 +0200 (Sat, 28 Aug 2010) $ diff --git a/docs/GoldPlugin.html b/docs/GoldPlugin.html index 66e099bad0a..3f2e9fb2e64 100644 --- a/docs/GoldPlugin.html +++ b/docs/GoldPlugin.html @@ -79,7 +79,7 @@ placed. the plugin .so file. To find out what link command gcc would run in a given situation, run gcc -v [...] and look for the line where it runs collect2. Replace that with - ld-new -plugin /path/to/libLLVMgold.so to test it out. Once you're + ld-new -plugin /path/to/LLVMgold.so to test it out. Once you're ready to switch to using gold, backup your existing /usr/bin/ld then replace it with ld-new.

    You can produce bitcode files from llvm-gcc using @@ -91,7 +91,7 @@ placed. linker, which is why you need gold to be the installed system linker in your path.

    If you want ar and nm to work seamlessly as well, install - libLLVMgold.so to /usr/lib/bfd-plugins. If you built your + LLVMgold.so to /usr/lib/bfd-plugins. If you built your own gold, be sure to install the ar and nm-new you built to /usr/bin.

    @@ -157,9 +157,9 @@ $ llvm-gcc -use-gold-plugin a.a b.o -o main # <-- link with LLVMgold plugin bitcode, everything is in place for an easy to use LTO build of autotooled projects:

      -
    • Follow the instructions on how to build libLLVMgold.so.
    • +
    • Follow the instructions on how to build LLVMgold.so.
    • Install the newly built binutils to $PREFIX
    • -
    • Copy Release/lib/libLLVMgold.so to +
    • Copy Release/lib/LLVMgold.so to $PREFIX/libexec/gcc/x86_64-unknown-linux-gnu/4.2.1/ and $PREFIX/lib/bfd-plugins/
    • Set environment variables ($PREFIX is where you installed llvm-gcc and diff --git a/docs/LangRef.html b/docs/LangRef.html index 4b4348d07f2..b717531e347 100644 --- a/docs/LangRef.html +++ b/docs/LangRef.html @@ -25,6 +25,7 @@
    • 'private' Linkage
    • 'linker_private' Linkage
    • 'linker_private_weak' Linkage
    • +
    • 'linker_private_weak_def_auto' Linkage
    • 'internal' Linkage
    • 'available_externally' Linkage
    • 'linkonce' Linkage
    • @@ -73,7 +74,6 @@
    • Array Type
    • Structure Type
    • Packed Structure Type
    • -
    • Union Type
    • Vector Type
    • @@ -491,20 +491,21 @@ the "hello world" module:

      -; Declare the string constant as a global constant.
      -@.LC0 = internal constant [13 x i8] c"hello world\0A\00"    ; [13 x i8]*
      +; Declare the string constant as a global constant. 
      +@.LC0 = internal constant [13 x i8] c"hello world\0A\00"      ; [13 x i8]* 
       
      -; External declaration of the puts function
      -declare i32 @puts(i8*)                                     ; i32 (i8*)* 
      +; External declaration of the puts function 
      +declare i32 @puts(i8*)                                      ; i32 (i8*)*  
       
       ; Definition of main function
      -define i32 @main() {                                        ; i32()* 
      -  ; Convert [13 x i8]* to i8  *...
      -  %cast210 = getelementptr [13 x i8]* @.LC0, i64 0, i64 0   ; i8*
      +define i32 @main() {   ; i32()*  
      +  ; Convert [13 x i8]* to i8  *... 
      +  %cast210 = getelementptr [13 x i8]* @.LC0, i64 0, i64 0   ; i8* 
       
      -  ; Call puts function to write out the string to stdout.
      -  call i32 @puts(i8* %cast210)                             ; i32
      -  ret i32 0
      } + ; Call puts function to write out the string to stdout.  + call i32 @puts(i8* %cast210) ; i32  + ret i32 0  +} ; Named metadata !1 = metadata !{i32 41} @@ -556,6 +557,15 @@ define i32 @main() { ; i32()* linker. The symbols are removed by the linker from the final linked image (executable or dynamic library). +
      linker_private_weak_def_auto
      +
      Similar to "linker_private_weak", but it's known that the address + of the object is not taken. For instance, functions that had an inline + definition, but the compiler decided not to inline it. Note, + unlike linker_private and linker_private_weak, + linker_private_weak_def_auto may have only default + visibility. The symbols are removed by the linker from the final linked + image (executable or dynamic library).
      +
      internal
      Similar to private, but the value shows as a local symbol (STB_LOCAL in the case of ELF) in the object file. This @@ -788,7 +798,7 @@ define i32 @main() { ; i32()*

      You may give a name to any type except - "void". Type name aliases may be used anywhere a type + "void". Type name aliases may be used anywhere a type is expected with the syntax "%mytype".

      Note that type names are aliases for the structural type that they indicate, @@ -949,15 +959,17 @@ define [linkage] [visibility]

      Named metadata is a collection of metadata. Metadata - nodes (but not metadata strings) and null are the only valid operands for + nodes (but not metadata strings) are the only valid operands for a named metadata.

      Syntax:
      -; An unnamed metadata node, which is referenced by the named metadata.
      +; Some unnamed metadata nodes, which are referenced by the named metadata.
      +!0 = metadata !{metadata !"zero"}
       !1 = metadata !{metadata !"one"}
      +!2 = metadata !{metadata !"two"}
       ; A named metadata.
      -!name = !{null, !1}
      +!name = !{!0, !1, !2}
       
      @@ -1462,7 +1474,6 @@ Classifications pointer, vector, structure, - union, array, label, metadata. @@ -1482,7 +1493,6 @@ Classifications pointer, structure, packed structure, - union, vector, opaque. @@ -1630,8 +1640,8 @@ Classifications

      Aggregate Types are a subset of derived types that can contain multiple member types. Arrays, - structs, vectors and - unions are aggregate types.

      + structs, and vectors are + aggregate types.

      @@ -1701,9 +1711,7 @@ Classifications
      Overview:

      The function type can be thought of as a function signature. It consists of a return type and a list of formal parameter types. The return type of a - function type is a scalar type, a void type, a struct type, or a union - type. If the return type is a struct type then all struct elements must be - of first class types, and the struct must have at least one element.

      + function type is a first class type or a void type.

      Syntax:
      @@ -1824,53 +1832,6 @@ Classifications 
       
       
       
      -
      -
      -
      -
      - -
      Overview:
      -

      A union type describes an object with size and alignment suitable for - an object of any one of a given set of types (also known as an "untagged" - union). It is similar in concept and usage to a - struct, except that all members of the union - have an offset of zero. The elements of a union may be any type that has a - size. Unions must have at least one member - empty unions are not allowed. -

      - -

      The size of the union as a whole will be the size of its largest member, - and the alignment requirements of the union as a whole will be the largest - alignment requirement of any member.

      - -

      Union members are accessed using 'load and - 'store' by getting a pointer to a field with - the 'getelementptr' instruction. - Since all members are at offset zero, the getelementptr instruction does - not affect the address, only the type of the resulting pointer.

      - -
      Syntax:
      -
      -  union { <type list> }
      -
      - -
      Examples:
      - - - - - - - - -
      union { i32, i32*, float }A union of three types: an i32, a pointer to - an i32, and a float.
      - union { float, i32 (i32) * }A union, where the first element is a float and the - second element is a pointer to a - function that takes an i32, returning - an i32.
      - -
      - @@ -2112,14 +2073,6 @@ Classifications the number and types of elements must match those specified by the type. -
      Union constants
      -
      Union constants are represented with notation similar to a structure with - a single element - that is, a single typed element surrounded - by braces ({})). For example: "{ i32 4 }". The - union type can be initialized with a single-element - struct as long as the type of the struct element matches the type of - one of the union members.
      -
      Array constants
      Array constants are represented with notation similar to array type definitions (a comma separated list of elements, surrounded by square @@ -4140,7 +4093,7 @@ Instruction
      Arguments:

      The first operand of an 'extractvalue' instruction is a value - of struct, union or + of struct or array type. The operands are constant indices to specify which value to extract in a similar manner as indices in a 'getelementptr' instruction.

      @@ -4174,7 +4127,7 @@ Instruction
      Arguments:

      The first operand of an 'insertvalue' instruction is a value - of struct, union or + of struct or array type. The second operand is a first-class value to insert. The following operands are constant indices indicating the position at which to insert the value in a similar manner as indices in a @@ -4407,12 +4360,12 @@ Instruction indexes a value of the type pointed to (not necessarily the value directly pointed to, since the first index can be non-zero), etc. The first type indexed into must be a pointer value, subsequent types can be arrays, - vectors, structs and unions. Note that subsequent types being indexed into + vectors, and structs. Note that subsequent types being indexed into can never be pointers, since that would require loading the pointer before continuing calculation.

      The type of each index argument depends on the type it is indexing into. - When indexing into a (optionally packed) structure or union, only i32 + When indexing into a (optionally packed) structure, only i32 integer constants are allowed. When indexing into an array, pointer or vector, integers of any width are allowed, and they are not required to be constant.

      @@ -6117,8 +6070,8 @@ LLVM.

      Syntax:

      This is an overloaded intrinsic. You can use llvm.memset on any integer bit - width and for different address spaces. Not all targets support all bit - widths however.

      + width and for different address spaces. However, not all targets support all + bit widths.

         declare void @llvm.memset.p0i8.i32(i8* <dest>, i8 <val>,
      @@ -6132,14 +6085,14 @@ LLVM.

      particular byte value.

      Note that, unlike the standard libc function, the llvm.memset - intrinsic does not return a value, takes extra alignment/volatile arguments, - and the destination can be in an arbitrary address space.

      + intrinsic does not return a value and takes extra alignment/volatile + arguments. Also, the destination can be in an arbitrary address space.

      Arguments:

      The first argument is a pointer to the destination to fill, the second is the - byte value to fill it with, the third argument is an integer argument + byte value with which to fill it, the third argument is an integer argument specifying the number of bytes to fill, and the fourth argument is the known - alignment of destination location.

      + alignment of the destination location.

      If the call to this intrinsic has an alignment value that is not 0 or 1, then the caller guarantees that the destination pointer is aligned to that @@ -7746,7 +7699,7 @@ LLVM.

      Chris Lattner
      The LLVM Compiler Infrastructure
      - Last modified: $Date: 2010-07-13 21:48:13 +0200 (Tue, 13 Jul 2010) $ + Last modified: $Date: 2010-08-28 06:09:24 +0200 (Sat, 28 Aug 2010) $ diff --git a/docs/MakefileGuide.html b/docs/MakefileGuide.html index dd904786600..38b7ae19fa6 100644 --- a/docs/MakefileGuide.html +++ b/docs/MakefileGuide.html @@ -785,6 +785,9 @@ not.
      PROJ_SRC_DIR
      The directory which contains the source files to be built.
      +
      BUILD_EXAMPLES
      +
      If set to 1, build examples in examples and (if building + Clang) tools/clang/examples directories.
      BZIP2(configured)
      The path to the bzip2 tool.
      CC(configured)
      @@ -1025,7 +1028,7 @@ Reid Spencer
      The LLVM Compiler Infrastructure
      - Last modified: $Date: 2010-07-07 09:48:00 +0200 (Wed, 07 Jul 2010) $ + Last modified: $Date: 2010-07-24 19:54:00 +0200 (Sat, 24 Jul 2010) $ diff --git a/docs/Passes.html b/docs/Passes.html index 70d909796e6..0358745f79f 100644 --- a/docs/Passes.html +++ b/docs/Passes.html @@ -120,6 +120,7 @@ perl -e '$/ = undef; for (split(/\n/, <>)) { s:^ *///? ?::; print "

      \n" if ! -print-used-typesFind Used Types -profile-estimatorEstimate profiling information -profile-loaderLoad profile information from llvmprof.out +-regionsDetect single entry single exit regions in a function -profile-verifierVerify profiling information -scalar-evolutionScalar Evolution Analysis -scev-aaScalarEvolution-based Alias Analysis @@ -166,6 +167,7 @@ perl -e '$/ = undef; for (split(/\n/, <>)) { s:^ *///? ?::; print "

      \n" if ! -loop-unrollUnroll loops -loop-unswitchUnswitch loops -loopsimplifyCanonicalize natural loops +-loweratomicLower atomic intrinsics -lowerinvokeLower invoke and unwind, for unwindless code generators -lowersetjmpLower Set Jump -lowerswitchLower SwitchInst's to branches @@ -647,7 +649,7 @@ perl -e '$/ = undef; for (split(/\n/, <>)) { s:^ *///? ?::; print "

      \n" if !

      This pass, only available in opt, prints the call graph to - standard output in a human-readable form. + standard error in a human-readable form.

      @@ -658,7 +660,7 @@ perl -e '$/ = undef; for (split(/\n/, <>)) { s:^ *///? ?::; print "

      \n" if !

      This pass, only available in opt, prints the SCCs of the call - graph to standard output in a human-readable form. + graph to standard error in a human-readable form.

      @@ -669,7 +671,7 @@ perl -e '$/ = undef; for (split(/\n/, <>)) { s:^ *///? ?::; print "

      \n" if !

      This pass, only available in opt, prints the SCCs of each - function CFG to standard output in a human-readable form. + function CFG to standard error in a human-readable form.

      @@ -678,15 +680,13 @@ perl -e '$/ = undef; for (split(/\n/, <>)) { s:^ *///? ?::; print "

      \n" if ! -print-dbginfo: Print debug info in human readable form

      -

      Pass that prints instructions, and associated debug info: +

      Pass that prints instructions, and associated debug info:

      • source/line/col information
      • original variable name
      • original type name
      - -

      @@ -771,6 +771,17 @@ perl -e '$/ = undef; for (split(/\n/, <>)) { s:^ *///? ?::; print "

      \n" if !

      Pass that checks profiling information for plausibility.

      + +
      +

      + The RegionInfo pass detects single entry single exit regions in a + function, where a region is defined as any subgraph that is connected to the + remaining graph at only two spots. Furthermore, an hierarchical region tree is + built. +

      +
      @@ -1535,6 +1546,24 @@ if (X < 3) {

      + + +
      +

      + This pass lowers atomic intrinsics to non-atomic form for use in a known + non-preemptible environment. +

      + +

      + The pass does not verify that the environment is non-preemptible (in + general this would require knowledge of the entire call graph of the + program including any libraries which may not be available in bitcode form); + it simply lowers every atomic intrinsic. +

      +
      +
      -

      This pass implements code stripping. Specifically, it can delete: +

      This pass implements code stripping. Specifically, it can delete:

      • names for virtual registers
      • symbols for internal globals and functions
      • debug information
      +

      Note that this transformation makes code much less readable, so it should only be used in situations where the 'strip' utility would be used, such as reducing code size or making it harder to reverse engineer code. @@ -1946,12 +1976,13 @@ if (X < 3) { -strip-nondebug: Strip all symbols, except dbg symbols, from a module

      -

      This pass implements code stripping. Specifically, it can delete: +

      This pass implements code stripping. Specifically, it can delete:

      • names for virtual registers
      • symbols for internal globals and functions
      • debug information
      +

      Note that this transformation makes code much less readable, so it should only be used in situations where the 'strip' utility would be used, such as reducing code size or making it harder to reverse engineer code. @@ -2211,7 +2242,7 @@ if (X < 3) { Reid Spencer
      LLVM Compiler Infrastructure
      - Last modified: $Date: 2010-07-06 17:52:15 +0200 (Tue, 06 Jul 2010) $ + Last modified: $Date: 2010-08-20 03:03:44 +0200 (Fri, 20 Aug 2010) $ diff --git a/docs/ProgrammersManual.html b/docs/ProgrammersManual.html index 9992cd91b65..8fdd8a00b9b 100644 --- a/docs/ProgrammersManual.html +++ b/docs/ProgrammersManual.html @@ -309,8 +309,6 @@ to write maintainable code more than where to put your curly braces.

        -
      1. CVS -Branch and Tag Primer
      2. Using static and shared libraries across platforms
      @@ -1436,7 +1434,7 @@ to the key string for a value.

      The StringMap is very fast for several reasons: quadratic probing is very cache efficient for lookups, the hash value of strings in buckets is not -recomputed when lookup up an element, StringMap rarely has to touch the +recomputed when looking up an element, StringMap rarely has to touch the memory for unrelated objects when looking up a value (even when hash collisions happen), hash table growth does not recompute the hash values for strings already in the table, and each pair in the map is store in a single allocation @@ -3942,7 +3940,7 @@ arguments. An argument has a pointer to the parent Function.

      Dinakar Dhurjati and Chris Lattner
      The LLVM Compiler Infrastructure
      - Last modified: $Date: 2010-07-15 00:38:02 +0200 (Thu, 15 Jul 2010) $ + Last modified: $Date: 2010-08-04 17:59:16 +0200 (Wed, 04 Aug 2010) $ diff --git a/docs/ReleaseNotes.html b/docs/ReleaseNotes.html index a5a35dd84e6..d346e1ccb1f 100644 --- a/docs/ReleaseNotes.html +++ b/docs/ReleaseNotes.html @@ -67,9 +67,7 @@ Almost dead code. include/llvm/Analysis/LiveValues.h => Dan lib/Transforms/IPO/MergeFunctions.cpp => consider for 2.8. llvm/Analysis/PointerTracking.h => Edwin wants this, consider for 2.8. - ABCD, GEPSplitterPass - MSIL backend? - lib/Transforms/Utils/SSI.cpp -> ABCD depends on it. + GEPSplitterPass --> @@ -78,6 +76,7 @@ Almost dead code. strong phi elim llvm.dbg.value: variable debug info for optimized code loop dependence analysis + TBAA --> @@ -312,171 +251,13 @@ LLVM MC Project Blog Post.

      An exciting aspect of LLVM is that it is used as an enabling technology for a lot of other language and tools projects. This section lists some of the - projects that have already been updated to work with LLVM 2.7.

      -
      - - -
      -Pure -
      - -
      -

      -Pure -is an algebraic/functional programming language based on term rewriting. -Programs are collections of equations which are used to evaluate expressions in -a symbolic fashion. Pure offers dynamic typing, eager and lazy evaluation, -lexical closures, a hygienic macro system (also based on term rewriting), -built-in list and matrix support (including list and matrix comprehensions) and -an easy-to-use C interface. The interpreter uses LLVM as a backend to - JIT-compile Pure programs to fast native code.

      - -

      Pure versions 0.43 and later have been tested and are known to work with -LLVM 2.7 (and continue to work with older LLVM releases >= 2.5).

      - -
      - - - - -
      -

      -Roadsend PHP (rphp) is an open -source implementation of the PHP programming -language that uses LLVM for its optimizer, JIT and static compiler. This is a -reimplementation of an earlier project that is now based on LLVM. -

      -
      - - - - -
      -

      -Unladen Swallow is a -branch of Python intended to be fully -compatible and significantly faster. It uses LLVM's optimization passes and JIT -compiler. -

      -
      - - - - -
      -

      -TCE is a toolset for designing -application-specific processors (ASP) based on the Transport triggered -architecture (TTA). The toolset provides a complete co-design flow from C/C++ -programs down to synthesizable VHDL and parallel program binaries. Processor -customization points include the register files, function units, supported -operations, and the interconnection network.

      - -

      TCE uses llvm-gcc/Clang and LLVM for C/C++ language support, target -independent optimizations and also for parts of code generation. It generates -new LLVM-based code generators "on the fly" for the designed TTA processors and -loads them in to the compiler backend as runtime libraries to avoid per-target -recompilation of larger parts of the compiler chain.

      - -
      - - - - -
      -

      -SAFECode is a memory safe C -compiler built using LLVM. It takes standard, unannotated C code, analyzes the -code to ensure that memory accesses and array indexing operations are safe, and -instruments the code with run-time checks when safety cannot be proven -statically. -

      -
      - - - - -
      -

      -IcedTea provides a -harness to build OpenJDK using only free software build tools and to provide -replacements for the not-yet free parts of OpenJDK. One of the extensions that -IcedTea provides is a new JIT compiler named Shark which uses LLVM -to provide native code generation without introducing processor-dependent -code. -

      -

      Icedtea6 1.8 and later have been tested and are known to work with -LLVM 2.7 (and continue to work with older LLVM releases >= 2.6 as well). -

      -
      - - - - -
      -

      -LLVM-Lua uses LLVM - to add JIT and static compiling support to the Lua VM. Lua -bytecode is analyzed to remove type checks, then LLVM is used to compile the -bytecode down to machine code. -

      -

      LLVM-Lua 1.2.0 have been tested and is known to work with LLVM 2.7. -

      -
      - - - - -
      -

      -MacRuby is an implementation of Ruby based on -core Mac OS technologies, sponsored by Apple Inc. It uses LLVM at runtime for -optimization passes, JIT compilation and exception handling. It also allows -static (ahead-of-time) compilation of Ruby code straight to machine code. -

      -

      The upcoming MacRuby 0.6 release works with LLVM 2.7. -

      -
      - - - - -
      -

      -GHC is an open source, -state-of-the-art programming suite for Haskell, a standard lazy -functional programming language. It includes an optimizing static -compiler generating good code for a variety of platforms, together -with an interactive system for convenient, quick development.

      - -

      In addition to the existing C and native code generators, GHC now -supports an LLVM -code generator. GHC supports LLVM 2.7.

      - + projects that have already been updated to work with LLVM 2.8.

      @@ -496,29 +277,11 @@ in this section.
      -

      In addition to changes to the code, between LLVM 2.6 and 2.7, a number of +

      In addition to changes to the code, between LLVM 2.7 and 2.8, a number of organization changes have happened:

        -
      • LLVM has a new official logo!
      • - -
      • Ted Kremenek and Doug Gregor have stepped forward as Code Owners of the - Clang static analyzer and the Clang frontend, respectively.
      • - -
      • LLVM now has an official Blog at - http://blog.llvm.org. This is a great way - to learn about new LLVM-related features as they are implemented. Several - features in this release are already explained on the blog.
      • - -
      • The LLVM web pages are now checked into the SVN server, in the "www", - "www-pubs" and "www-releases" SVN modules. Previously they were hidden in a - largely inaccessible old CVS server.
      • - -
      • llvm.org is now hosted on a new (and much - faster) server. It is still graciously hosted at the University of Illinois - of Urbana Champaign.
      @@ -529,43 +292,10 @@ organization changes have happened:
      -

      LLVM 2.7 includes several major new capabilities:

      +

      LLVM 2.8 includes several major new capabilities:

        -
      • 2.7 includes initial support for the MicroBlaze target. - MicroBlaze is a soft processor core designed for Xilinx FPGAs.
      • - -
      • 2.7 includes a new LLVM IR "extensible metadata" feature. This feature - supports many different use cases, including allowing front-end authors to - encode source level information into LLVM IR, which is consumed by later - language-specific passes. This is a great way to do high-level optimizations - like devirtualization, type-based alias analysis, etc. See the - Extensible Metadata Blog Post for more information.
      • - -
      • 2.7 encodes debug information -in a completely new way, built on extensible metadata. The new implementation -is much more memory efficient and paves the way for improvements to optimized -code debugging experience.
      • - -
      • 2.7 now directly supports taking the address of a label and doing an - indirect branch through a pointer. This is particularly useful for - interpreter loops, and is used to implement the GCC "address of label" - extension. For more information, see the -Address of Label and Indirect Branches in LLVM IR Blog Post. - -
      • 2.7 is the first release to start supporting APIs for assembling and - disassembling target machine code. These APIs are useful for a variety of - low level clients, and are surfaced in the new "enhanced disassembly" API. - For more information see the The X86 - Disassembler Blog Post for more information.
      • - -
      • 2.7 includes major parts of the work required by the new MC Project, - see the MC update above for more information.
      • - +
      • .
      @@ -580,30 +310,56 @@ Address of Label and Indirect Branches in LLVM IR Blog Post. expose new optimization opportunities:

        -
      • LLVM IR now supports a 16-bit "half float" data type through two new intrinsics and APFloat support.
      • -
      • LLVM IR supports two new function - attributes: inlinehint and alignstack(n). The former is a hint to the - optimizer that a function was declared 'inline' and thus the inliner should - weight it higher when considering inlining it. The later - indicates to the code generator that the function diverges from the platform - ABI on stack alignment.
      • -
      • The new llvm.objectsize intrinsic - allows the optimizer to infer the sizes of memory objects in some cases. - This intrinsic is used to implement the GCC __builtin_object_size - extension.
      • -
      • LLVM IR now supports marking load and store instructions with "non-temporal" hints (building on the new - metadata feature). This hint encourages the code - generator to generate non-temporal accesses when possible, which are useful - for code that is carefully managing cache behavior. Currently, only the - X86 backend provides target support for this feature.
      • - -
      • LLVM 2.7 has pre-alpha support for unions in LLVM IR. - Unfortunately, this support is not really usable in 2.7, so if you're - interested in pushing it forward, please help contribute to LLVM mainline.
      • +
      • LLVM 2.8 changes the internal order of operands in InvokeInst + and CallInst. + To be portable across releases, resort to CallSite and the + high-level accessors, such as getCalledValue and setUnwindDest. +
      • +
      • + You can no longer pass use_iterators directly to cast<> (and similar), because + these routines tend to perform costly dereference operations more than once. You + have to dereference the iterators yourself and pass them in. +
      • +
      • + llvm.memcpy.*, llvm.memset.*, llvm.memmove.* (and possibly other?) intrinsics + take an extra parameter now (i1 isVolatile), totaling 5 parameters. + If you were creating these intrinsic calls and prototypes yourself (as opposed + to using Intrinsic::getDeclaration), you can use UpgradeIntrinsicFunction/UpgradeIntrinsicCall + to be portable accross releases. + Note that you cannot use Intrinsic::getDeclaration() in a backwards compatible + way (needs 2/3 types now, in 2.7 it needed just 1). +
      • +
      • + SetCurrentDebugLocation takes a DebugLoc now instead of a MDNode. + Change your code to use + SetCurrentDebugLocation(DebugLoc::getFromDILocation(...)). +
      • +
      • + VISIBILITY_HIDDEN is gone. +
      • +
      • + The RegisterPass and RegisterAnalysisGroup templates are + considered deprecated, but continue to function in LLVM 2.8. Clients are + strongly advised to use the upcoming INITIALIZE_PASS() and + INITIALIZE_AG_PASS() macros instead. +
      • + SMDiagnostic takes different parameters now. //FIXME: how to upgrade? +
      • +
      • + The constructor for the Triple class no longer tries to understand odd triple + specifications. Frontends should ensure that they only pass valid triples to + LLVM. The Triple::normalize utility method has been added to help front-ends + deal with funky triples. +
      • + Some APIs got renamed: +
          +
        • llvm_report_error -> report_fatal_error
        • +
        • llvm_install_error_handler -> install_fatal_error_handler
        • +
        • llvm::DwarfExceptionHandling -> llvm::JITExceptionHandling
        • +
        +
      @@ -620,48 +376,7 @@ release includes a few major enhancements and additions to the optimizers:

        -
      • The inliner now merges arrays stack objects in different callees when - inlining multiple call sites into one function. This reduces the stack size - of the resultant function.
      • -
      • The -basicaa alias analysis pass (which is the default) has been improved to - be less dependent on "type safe" pointers. It can now look through bitcasts - and other constructs more aggressively, allowing better load/store - optimization.
      • -
      • The load elimination optimization in the GVN Pass [intro - blog post] has been substantially improved to be more aggressive about - partial redundancy elimination and do more aggressive phi translation. Please - see the - Advanced Topics in Redundant Load Elimination with a Focus on PHI Translation - Blog Post for more details.
      • -
      • The module target data string now - includes a notion of 'native' integer data types for the target. This - helps mid-level optimizations avoid promoting complex sequences of - operations to data types that are not natively supported (e.g. converting - i32 operations to i64 on 32-bit chips).
      • -
      • The mid-level optimizer is now conservative when operating on a module with - no target data. Previously, it would default to SparcV9 settings, which is - not what most people expected.
      • -
      • Jump threading is now much more aggressive at simplifying correlated - conditionals and threading blocks with otherwise complex logic. It has - subsumed the old "Conditional Propagation" pass, and -condprop has been - removed from LLVM 2.7.
      • -
      • The -instcombine pass has been refactored from being one huge file to being - a library of its own. Internally, it uses a customized IRBuilder to clean - it up and simplify it.
      • - -
      • The optimal edge profiling pass is reliable and much more complete than in - 2.6. It can be used with the llvm-prof tool but isn't wired up to the - llvm-gcc and clang command line options yet.
      • - -
      • A new experimental alias analysis implementation, -scev-aa, has been added. - It uses LLVM's Scalar Evolution implementation to do symbolic analysis of - pointer offset expressions to disambiguate pointers. It can catch a few - cases that basicaa cannot, particularly in complex loop nests.
      • - -
      • The default pass ordering has been tweaked for improved optimization - effectiveness.
      • +
      @@ -676,19 +391,7 @@ href="http://blog.llvm.org/2009/12/introduction-to-load-elimination-in-gvn.html"
        -
      • The JIT now supports generating debug information and is compatible with -the new GDB 7.0 (and later) interfaces for registering dynamically generated -debug info.
      • - -
      • The JIT now defaults -to compiling eagerly to avoid a race condition in the lazy JIT. -Clients that still want the lazy JIT can switch it on by calling -ExecutionEngine::DisableLazyCompilation(false).
      • - -
      • It is now possible to create more than one JIT instance in the same process. -These JITs can generate machine code in parallel, -although you -still have to obey the other threading restrictions.
      • +
      @@ -706,49 +409,7 @@ infrastructure, which allows us to implement more aggressive algorithms and make it run faster:

        -
      • The 'llc -asm-verbose' option (which is now the default) has been enhanced - to emit many useful comments to .s files indicating information about spill - slots and loop nest structure. This should make it much easier to read and - understand assembly files. This is wired up in llvm-gcc and clang to - the -fverbose-asm option.
      • - -
      • New LSR with "full strength reduction" mode, which can reduce address - register pressure in loops where address generation is important.
      • - -
      • A new codegen level Common Subexpression Elimination pass (MachineCSE) - is available and enabled by default. It catches redundancies exposed by - lowering.
      • -
      • A new pre-register-allocation tail duplication pass is available and enabled - by default, it can substantially improve branch prediction quality in some - cases.
      • -
      • A new sign and zero extension optimization pass (OptimizeExtsPass) - is available and enabled by default. This pass can takes advantage - architecture features like x86-64 implicit zero extension behavior and - sub-registers.
      • -
      • The code generator now supports a mode where it attempts to preserve the - order of instructions in the input code. This is important for source that - is hand scheduled and extremely sensitive to scheduling. It is compatible - with the GCC -fno-schedule-insns option.
      • -
      • The target-independent code generator now supports generating code with - arbitrary numbers of result values. Returning more values than was - previously supported is handled by returning through a hidden pointer. In - 2.7, only the X86 and XCore targets have adopted support for this - though.
      • -
      • The code generator now supports generating code that follows the - Glasgow Haskell Compiler Calling - Convention and ABI.
      • -
      • The "DAG instruction - selection" phase of the code generator has been largely rewritten for - 2.7. Previously, tblgen spit out tons of C++ code which was compiled and - linked into the target to do the pattern matching, now it emits a much - smaller table which is read by the target-independent code. The primary - advantages of this approach is that the size and compile time of various - targets is much improved. The X86 code generator shrunk by 1.5MB of code, - for example.
      • -
      • Almost the entire code generator has switched to emitting code through the - MC interfaces instead of printing textually to the .s file. This led to a - number of cleanups and speedups. In 2.7, debug an exception handling - information does not go through MC yet.
      • +
      • MachO writer works.
      @@ -762,11 +423,9 @@ it run faster:

        -
      • The X86 backend now optimizes tails calls much more aggressively for - functions that use the standard C calling convention.
      • -
      • The X86 backend now models scalar SSE registers as subregs of the SSE vector - registers, making the code generator more aggressive in cases where scalars - and vector types are mixed.
      • +
      • The X86 backend now supports holding X87 floating point stack values + in registers across basic blocks, dramatically improving performance of code + that uses long double, and when targetting CPUs that don't support SSE.
      @@ -783,27 +442,7 @@ it run faster:

        -
      • The ARM backend now generates instructions in unified assembly syntax.
      • - -
      • llvm-gcc now has complete support for the ARM v7 NEON instruction set. This - support differs slightly from the GCC implementation. Please see the - - ARM Advanced SIMD (NEON) Intrinsics and Types in LLVM Blog Post for - helpful information if migrating code from GCC to LLVM-GCC.
      • - -
      • The ARM and Thumb code generators now use register scavenging for stack - object address materialization. This allows the use of R3 as a general - purpose register in Thumb1 code, as it was previous reserved for use in - stack address materialization. Secondly, sequential uses of the same - value will now re-use the materialized constant.
      • - -
      • The ARM backend now has good support for ARMv4 targets and has been tested - on StrongARM hardware. Previously, LLVM only supported ARMv4T and - newer chips.
      • - -
      • Atomic builtins are now supported for ARMv6 and ARMv7 (__sync_synchronize, - __sync_fetch_and_add, etc.).
      • +
      @@ -822,34 +461,7 @@ href="http://blog.llvm.org/2010/04/arm-advanced-simd-neon-intrinsics-and.html">

        -
      • The optimizer uses the new CodeMetrics class to measure the size of code. - Various passes (like the inliner, loop unswitcher, etc) all use this to make - more accurate estimates of the code size impact of various - optimizations.
      • -
      • A new - llvm/Analysis/InstructionSimplify.h interface is available for doing - symbolic simplification of instructions (e.g. a+0 -> a) - without requiring the instruction to exist. This centralizes a lot of - ad-hoc symbolic manipulation code scattered in various passes.
      • -
      • The optimizer now uses a new SSAUpdater - class which efficiently supports - doing unstructured SSA update operations. This centralized a bunch of code - scattered throughout various passes (e.g. jump threading, lcssa, - loop rotate, etc) for doing this sort of thing. The code generator has a - similar - MachineSSAUpdater class.
      • -
      • The - llvm/Support/Regex.h header exposes a platform independent regular - expression API. Building on this, the FileCheck utility now supports - regular exressions.
      • -
      • raw_ostream now supports a circular "debug stream" accessed with "dbgs()". - By default, this stream works the same way as "errs()", but if you pass - -debug-buffer-size=1000 to opt, the debug stream is capped to a - fixed sized circular buffer and the output is printed at the end of the - program's execution. This is helpful if you have a long lived compiler - process and you're interested in seeing snapshots in time.
      • +
      @@ -864,16 +476,7 @@ href="http://blog.llvm.org/2010/04/arm-advanced-simd-neon-intrinsics-and.html">

      Other miscellaneous features include:

        -
      • You can now build LLVM as a big dynamic library (e.g. "libllvm2.7.so"). To - get this, configure LLVM with the --enable-shared option.
      • - -
      • LLVM command line tools now overwrite their output by default. Previously, - they would only do this with -f. This makes them more convenient to use, and - behave more like standard unix tools.
      • - -
      • The opt and llc tools now autodetect whether their input is a .ll or .bc - file, and automatically do the right thing. This means you don't need to - explicitly use the llvm-as tool for most things.
      • +
      @@ -887,48 +490,21 @@ href="http://blog.llvm.org/2010/04/arm-advanced-simd-neon-intrinsics-and.html">

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

        - -
      • -The Andersen's alias analysis ("anders-aa") pass, the Predicate Simplifier -("predsimplify") pass, the LoopVR pass, the GVNPRE pass, and the random sampling -profiling ("rsprofiling") passes have all been removed. They were not being -actively maintained and had substantial problems. If you are interested in -these components, you are welcome to ressurect them from SVN, fix the -correctness problems, and resubmit them to mainline.
      • - -
      • LLVM now defaults to building most libraries with RTTI turned off, providing -a code size reduction. Packagers who are interested in building LLVM to support -plugins that require RTTI information should build with "make REQUIRE_RTTI=1" -and should read the new Advice on Packaging LLVM -document.
      • - -
      • The LLVM interpreter now defaults to not using libffi even -if you have it installed. This makes it more likely that an LLVM built on one -system will work when copied to a similar system. To use libffi, -configure with --enable-libffi.
      • - -
      • Debug information uses a completely different representation, an LLVM 2.6 -.bc file should work with LLVM 2.7, but debug info won't come forward.
      • - -
      • The LLVM 2.6 (and earlier) "malloc" and "free" instructions got removed, - along with LowerAllocations pass. Now you should just use a call to the - malloc and free functions in libc. These calls are optimized as well as - the old instructions were.
      • +
      • .ll file doesn't produce #uses comments anymore, to get them, run a .bc file + through "llvm-dis --show-annotations".
      • +
      • MSIL Backend removed.
      • +
      • ABCD and SSI passes removed.
      • +
      • 'Union' LLVM IR feature removed.

      In addition, many APIs have changed in this release. Some of the major LLVM API changes are:

        - -
      • The add, sub, and mul instructions no longer -support floating-point operands. The fadd, fsub, and -fmul instructions should be used for this purpose instead.
      • -
      @@ -985,6 +561,9 @@ See: Broken versions of GCC and other to However, A Modern GCC Build for x86/x86-64 has been made available from the third party AuroraUX Project that has been meticulously tested for bootstrapping LLVM & Clang. +
    • There have been reports of Solaris and/or OpenSolaris build failures due +to an incompatibility in the nm program as well. The nm from binutils does seem +to work.
    @@ -1004,11 +583,10 @@ components, please contact us on the LLVMdev list.

      -
    • The MSIL, Alpha, SPU, MIPS, PIC16, Blackfin, MSP430, SystemZ and MicroBlaze +
    • The Alpha, SPU, MIPS, PIC16, Blackfin, MSP430, SystemZ and MicroBlaze backends are experimental.
    • llc "-filetype=asm" (the default) is the only - supported value for this option. The MachO writer is experimental, and - works much better in mainline SVN.
    • + supported value for this option. XXX Update me
    @@ -1025,8 +603,6 @@ href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev">LLVMdev list.

    all inline assembly that uses the X86 floating point stack. It supports the 'f' and 't' constraints, but not 'u'.
  • -
  • The X86 backend generates inefficient floating point code when configured - to generate code for systems that don't have SSE2.
  • Win64 code generation wasn't widely tested. Everything should work, but we expect small issues to happen. Also, llvm-gcc cannot build the mingw64 runtime currently due to lack of support for the 'u' inline assembly @@ -1230,7 +806,7 @@ lists.

    src="http://www.w3.org/Icons/valid-html401-blue" alt="Valid HTML 4.01"> LLVM Compiler Infrastructure
    - Last modified: $Date: 2010-05-07 02:28:04 +0200 (Fri, 07 May 2010) $ + Last modified: $Date: 2010-09-03 01:22:50 +0200 (Fri, 03 Sep 2010) $ diff --git a/docs/TestingGuide.html b/docs/TestingGuide.html index 3149f46cb5c..c7353ebb0d4 100644 --- a/docs/TestingGuide.html +++ b/docs/TestingGuide.html @@ -16,22 +16,22 @@
  • Requirements
  • LLVM testing infrastructure organization
  • Quick start
  • -
  • DejaGNU structure +
  • Regression test structure
  • Test suite structure
  • @@ -43,12 +43,10 @@
  • Writing custom tests for llvm-test
  • -
  • Running the nightly tester
  • -

    Written by John T. Criswell, Reid Spencer, and Tanya Lattner

    +

    Written by John T. Criswell, Daniel Dunbar, Reid Spencer, and Tanya Lattner

    @@ -57,9 +55,9 @@
    -

    This document is the reference manual for the LLVM testing infrastructure. It documents -the structure of the LLVM testing infrastructure, the tools needed to use it, -and how to add and run tests.

    +

    This document is the reference manual for the LLVM testing infrastructure. It +documents the structure of the LLVM testing infrastructure, the tools needed to +use it, and how to add and run tests.

    @@ -69,17 +67,9 @@ and how to add and run tests.

    -

    In order to use the LLVM testing infrastructure, you will need all of the software -required to build LLVM, plus the following:

    - -
    -
    DejaGNU
    -
    The Feature and Regressions tests are organized and run by DejaGNU.
    -
    Expect
    -
    Expect is required by DejaGNU.
    -
    tcl
    -
    Tcl is required by DejaGNU.
    -
    +

    In order to use the LLVM testing infrastructure, you will need all of the +software required to build LLVM, as well +as Python 2.4 or later.

    @@ -89,29 +79,28 @@ required to build LLVM, plus the following:

    -

    The LLVM testing infrastructure contains two major categories of tests: code -fragments and whole programs. Code fragments are referred to as the "DejaGNU -tests" and are in the llvm module in subversion under the -llvm/test directory. The whole programs tests are referred to as the -"Test suite" and are in the test-suite module in subversion. +

    The LLVM testing infrastructure contains two major categories of tests: +regression tests and whole programs. The regression tests are contained inside +the LLVM repository itself under llvm/test and are expected to always +pass -- they should be run before every commit. The whole programs tests are +referred to as the "LLVM test suite" and are in the test-suite module +in subversion.

    - +
    -

    Code fragments are small pieces of code that test a specific -feature of LLVM or trigger a specific bug in LLVM. They are usually -written in LLVM assembly language, but can be written in other -languages if the test targets a particular language front end (and the -appropriate --with-llvmgcc options were used -at configure time of the llvm module). These tests -are driven by the DejaGNU testing framework, which is hidden behind a -few simple makefiles.

    +

    The regression tests are small pieces of code that test a specific feature of +LLVM or trigger a specific bug in LLVM. They are usually written in LLVM +assembly language, but can be written in other languages if the test targets a +particular language front end (and the appropriate --with-llvmgcc +options were used at configure time of the llvm module). These +tests are driven by the 'lit' testing tool, which is part of LLVM.

    These code fragments are not complete programs. The code generated from them is never executed to determine correct behavior.

    @@ -158,8 +147,8 @@ generates code.

    -

    The tests are located in two separate Subversion modules. The - DejaGNU tests are in the main "llvm" module under the directory +

    The tests are located in two separate Subversion modules. The regressions + tests are in the main "llvm" module under the directory llvm/test (so you get these tests for free with the main llvm tree). The more comprehensive test suite that includes whole programs in C and C++ is in the test-suite module. This module should @@ -171,10 +160,10 @@ the test-suite directory will be automatically configured. Alternatively, you can configure the test-suite module manually.

    - + -

    To run all of the simple tests in LLVM using DejaGNU, use the master Makefile - in the llvm/test directory:

    +

    To run all of the LLVM regression tests, use master Makefile in + the llvm/test directory:

    @@ -190,26 +179,14 @@ Alternatively, you can configure the test-suite module manually.

    -

    To run only a subdirectory of tests in llvm/test using DejaGNU (ie. -Transforms), just set the TESTSUITE variable to the path of the -subdirectory (relative to llvm/test):

    +

    If you have Clang checked out and built, +you can run the LLVM and Clang tests simultaneously using:

    + +

    or

    -% gmake TESTSUITE=Transforms check
    -
    -
    - -

    Note: If you are running the tests with objdir != subdir, you -must have run the complete testsuite before you can specify a -subdirectory.

    - -

    To run only a single test, set TESTONE to its path (relative to -llvm/test) and make the check-one target:

    - -
    -
    -% gmake TESTONE=Feature/basictest.ll check-one
    +% gmake check-all
     
    @@ -222,6 +199,27 @@ subdirectory.

    +

    To run individual tests or subsets of tests, you can use the 'llvm-lit' +script which is built as part of LLVM. For example, to run the +'Integer/BitCast.ll' test by itself you can run:

    + +
    +
    +% llvm-lit ~/llvm/test/Integer/BitCast.ll 
    +
    +
    + +

    or to run all of the ARM CodeGen tests:

    + +
    +
    +% llvm-lit ~/llvm/test/CodeGen/ARM
    +
    +
    + +

    For more information on using the 'lit' tool, see 'llvm-lit --help' or the +'lit' man page.

    + @@ -275,11 +273,11 @@ that subdirectory.

    - +
    -

    The LLVM DejaGNU tests are driven by DejaGNU together with GNU Make and are - located in the llvm/test directory. +

    The LLVM regression tests are driven by 'lit' and are located in + the llvm/test directory.

    This directory contains a large array of small tests that exercise various features of LLVM and to ensure that regressions do not @@ -302,23 +300,24 @@ that subdirectory.

    - +
    -

    The DejaGNU structure is very simple, but does require some information to - be set. This information is gathered via configure and is written - to a file, site.exp in llvm/test. The llvm/test - Makefile does this work for you.

    +

    The regression test structure is very simple, but does require some + information to be set. This information is gathered via configure and + is written to a file, lit.site.cfg + in llvm/test. The llvm/test Makefile does this work for + you.

    -

    In order for DejaGNU to work, each directory of tests must have a - dg.exp file. DejaGNU looks for this file to determine how to run the - tests. This file is just a Tcl script and it can do anything you want, but - we've standardized it for the LLVM regression tests. If you're adding a +

    In order for the regression tests to work, each directory of tests must + have a dg.exp file. Lit looks for this file to determine how to + run the tests. This file is just a Tcl script and it can do anything you want, + but we've standardized it for the LLVM regression tests. If you're adding a directory of tests, just copy dg.exp from another directory to get - running. The standard dg.exp simply loads a Tcl - library (test/lib/llvm.exp) and calls the llvm_runtests - function defined in that library with a list of file names to run. The names - are obtained by using Tcl's glob command. Any directory that contains only + running. The standard dg.exp simply loads a Tcl library + (test/lib/llvm.exp) and calls the llvm_runtests function + defined in that library with a list of file names to run. The names are + obtained by using Tcl's glob command. Any directory that contains only directories does not need the dg.exp file.

    The llvm-runtests function lookas at each file that is passed to @@ -379,7 +378,8 @@ that subdirectory.

    There are some quoting rules that you must pay attention to when writing your RUN lines. In general nothing needs to be quoted. Tcl won't strip off any - ' or " so they will get passed to the invoked program. For example:

    + quote characters so they will get passed to the invoked program. For + example:

    @@ -696,7 +696,7 @@ define two separate CHECK lines that match on the same line.
     
    -
    Variables and +
    @@ -792,7 +792,7 @@ substitutions
    - +

    To make RUN line writing easier, there are several shell scripts located @@ -818,7 +818,7 @@ substitutions

    Sometimes it is necessary to mark a test case as "expected fail" or XFAIL. You can easily mark a test as XFAIL just by including XFAIL: on a line near the top of the file. This signals that the test case should succeed - if the test fails. Such test cases are counted separately by DejaGnu. To + if the test fails. Such test cases are counted separately by the testing tool. To specify an expected fail, use the XFAIL keyword in the comments of the test program followed by a colon and one or more regular expressions (separated by a comma). The regular expressions allow you to XFAIL the test conditionally by @@ -906,9 +906,10 @@ benchmarks, regression tests, code that is strange grammatically, etc. These organizations should be relatively self explanatory.

    Some tests are known to fail. Some are bugs that we have not fixed yet; -others are features that we haven't added yet (or may never add). In DejaGNU, -the result for such tests will be XFAIL (eXpected FAILure). In this way, you -can tell the difference between an expected and unexpected failure.

    +others are features that we haven't added yet (or may never add). In the +regression tests, the result for such tests will be XFAIL (eXpected FAILure). +In this way, you can tell the difference between an expected and unexpected +failure.

    The tests in the test suite have no such feature at this time. If the test passes, only warnings and other miscellaneous output will be generated. If @@ -1135,66 +1136,6 @@ example reports that can do fancy stuff.

    - - - - -
    - -

    -The LLVM Nightly Testers -automatically check out an LLVM tree, build it, run the "nightly" -program test (described above), run all of the DejaGNU tests, -delete the checked out tree, and then submit the results to -http://llvm.org/nightlytest/. -After test results are submitted to -http://llvm.org/nightlytest/, -they are processed and displayed on the tests page. An email to - -llvm-testresults@cs.uiuc.edu summarizing the results is also generated. -This testing scheme is designed to ensure that programs don't break as well -as keep track of LLVM's progress over time.

    - -

    If you'd like to set up an instance of the nightly tester to run on your -machine, take a look at the comments at the top of the -utils/NewNightlyTest.pl file. If you decide to set up a nightly tester -please choose a unique nickname and invoke utils/NewNightlyTest.pl -with the "-nickname [yournickname]" command line option. - -

    You can create a shell script to encapsulate the running of the script. -The optimized x86 Linux nightly test is run from just such a script:

    - -
    -
    -#!/bin/bash
    -BASE=/proj/work/llvm/nightlytest
    -export BUILDDIR=$BASE/build 
    -export WEBDIR=$BASE/testresults 
    -export LLVMGCCDIR=/proj/work/llvm/cfrontend/install
    -export PATH=/proj/install/bin:$LLVMGCCDIR/bin:$PATH
    -export LD_LIBRARY_PATH=/proj/install/lib
    -cd $BASE
    -cp /proj/work/llvm/llvm/utils/NewNightlyTest.pl .
    -nice ./NewNightlyTest.pl -nice -release -verbose -parallel -enable-linscan \
    -   -nickname NightlyTester -noexternals > output.log 2>&1 
    -
    -
    - -

    It is also possible to specify the the location your nightly test results -are submitted. You can do this by passing the command line option -"-submit-server [server_address]" and "-submit-script [script_on_server]" to -utils/NewNightlyTest.pl. For example, to submit to the llvm.org -nightly test results page, you would invoke the nightly test script with -"-submit-server llvm.org -submit-script /nightlytest/NightlyTestAccept.cgi". -If these options are not specified, the nightly test script sends the results -to the llvm.org nightly test results page.

    - -

    Take a look at the NewNightlyTest.pl file to see what all of the -flags and strings do. If you start running the nightly tests, please let us -know. Thanks!

    - -
    -
    @@ -1204,9 +1145,9 @@ know. Thanks!

    Valid HTML 4.01 - John T. Criswell, Reid Spencer, and Tanya Lattner
    + John T. Criswell, Daniel Dunbar, Reid Spencer, and Tanya Lattner
    The LLVM Compiler Infrastructure
    - Last modified: $Date: 2010-05-07 02:28:04 +0200 (Fri, 07 May 2010) $ + Last modified: $Date: 2010-08-02 03:20:23 +0200 (Mon, 02 Aug 2010) $ diff --git a/docs/WritingAnLLVMBackend.html b/docs/WritingAnLLVMBackend.html index aa2612c2e92..2dc0ef772cc 100644 --- a/docs/WritingAnLLVMBackend.html +++ b/docs/WritingAnLLVMBackend.html @@ -1299,9 +1299,6 @@ implementation in SparcInstrInfo.cpp:

  • Blocks
  • Function Overloading in C
  • @@ -301,32 +302,34 @@ not yet implemented will be noted.

    C++0x attributes

    Use __has_feature(cxx_attributes) to determine if support for -attribute parsing with C++0x's square bracket notation is enabled. +attribute parsing with C++0x's square bracket notation is enabled.

    C++0x deleted functions

    Use __has_feature(cxx_deleted_functions) to determine if support for -deleted function definitions (with = delete) is enabled. +deleted function definitions (with = delete) is enabled.

    C++ TR concepts

    Use __has_feature(cxx_concepts) to determine if support for -concepts is enabled. clang does not currently implement this feature. +concepts is enabled. clang does not currently implement this feature.

    C++0x lambdas

    Use __has_feature(cxx_lambdas) to determine if support for -lambdas is enabled. clang does not currently implement this feature. +lambdas is enabled. clang does not currently implement this feature.

    C++0x nullptr

    Use __has_feature(cxx_nullptr) to determine if support for -nullptr is enabled. clang does not yet fully implement this feature. +nullptr is enabled. clang does not yet fully implement this +feature.

    C++0x rvalue references

    Use __has_feature(cxx_rvalue_references) to determine if support for -rvalue references is enabled. clang does not yet fully implement this feature. +rvalue references is enabled. clang does not yet fully implement this +feature.

    C++0x static_assert()

    @@ -339,12 +342,17 @@ compile-time assertions using static_assert is enabled.

    is supported using the auto specifier. If this is disabled, auto will instead be a storage class specifier, as in C or C++98.

    -

    C++0x variadic templates

    +

    C++0x variadic templates

    Use __has_feature(cxx_variadic_templates) to determine if support for templates taking any number of arguments with the ellipsis notation is enabled. clang does not yet fully implement this feature.

    +

    C++0x inline namespaces

    + +

    Use __has_feature(cxx_inline_namespaces) to determine if support for +inline namespaces is enabled.

    +

    Blocks

    diff --git a/docs/UsersManual.html b/docs/UsersManual.html index 51e699fc32c..75241610a32 100644 --- a/docs/UsersManual.html +++ b/docs/UsersManual.html @@ -39,6 +39,7 @@ td {
  • Diagnostic Categories
  • Controlling Diagnostics via Command Line Flags
  • Controlling Diagnostics via Pragmas
  • +
  • Controlling Static Analyzer Diagnostics
  • Precompiled Headers
  • Controlling Code Generation
  • @@ -358,6 +359,18 @@ exprs.c:47:15:{47:8-47:14}{47:17-47:24}: error: invalid operands to binary expre

    The {}'s are generated by -fdiagnostics-print-source-range-info.

    + +
    +-fdiagnostics-parseable-fixits: +Print Fix-Its in a machine parseable form.
    +

    This option makes Clang print available Fix-Its in a machine parseable format at the end of diagnostics. The following example illustrates the format:

    + +
    + fix-it:"t.cpp":{7:25-7:29}:"Gamma"
    +
    + +

    The range printed is a half-open range, so in this example the characters at column 25 up to but not including column 29 on line 7 in t.cpp should be replaced with the string "Gamma". Either the range or the replacement string may be empty (representing strict insertions and strict erasures, respectively). Both the file name and the insertion string escape backslash (as "\\"), tabs (as "\t"), newlines (as "\n"), double quotes(as "\"") and non-printable characters (as octal "\xxx").

    +
    @@ -579,6 +592,42 @@ GCC do not support the exact same set of warnings, so even when using GCC compatible #pragmas there is no guarantee that they will have identical behaviour on both compilers.

    +

    Controlling Static Analyzer Diagnostics

    + +

    While not strictly part of the compiler, the diagnostics from Clang's static analyzer can also be influenced +by the user via changes to the source code. This can be done in two ways: + +

      + +
    • Annotations: The static analyzer recognizes various GCC-style +attributes (e.g., __attribute__((nonnull)))) that can either suppress +static analyzer warnings or teach the analyzer about code invariants which +enable it to find more bugs. While many of these attributes are standard GCC +attributes, additional ones have added to Clang to specifically support the +static analyzer. Detailed information on these annotations can be found in the +analyzer's +documentation.
    • + +
    • __clang_analyzer__: When the static analyzer is using Clang +to parse source files, it implicitly defines the preprocessor macro +__clang_analyzer__. While discouraged, code can use this macro to +selectively exclude code the analyzer examines. Here is an example: + +
      +#ifndef __clang_analyzer__
      +// Code not to be analyzed
      +#endif
      +
      + +In general, this usage is discouraged. Instead, we prefer that users file bugs +against the analyzer when it flags false positives. There is also active +discussion of allowing users in the future to selectively silence specific +analyzer warnings (some which can already be done using annotations).
    • + +
    +

    Precompiled Headers

    @@ -789,11 +838,6 @@ soon. the uses described in the bug, this is likely to be implemented at some point, at least partially. -
  • clang does not support #pragma align -(bug 3811). This is a -relatively small feature, so it is likely to be implemented relatively -soon.
  • -
  • clang does not support code generation for local variables pinned to registers (bug 3933). This is a relatively small feature, so it is likely to be implemented diff --git a/docs/tools/clang.pod b/docs/tools/clang.pod index 0c1ab574d53..032efcfcabc 100644 --- a/docs/tools/clang.pod +++ b/docs/tools/clang.pod @@ -168,6 +168,10 @@ Enable support for Pascal-style strings with "\pfoo". Enable support for Microsoft extensions. +=item B<-fborland-extensions> + +Enable support for Borland extensions. + =item B<-fwritable-strings> Make all string literals default to writable. This disables uniquing of @@ -395,6 +399,7 @@ Show commands to run and use verbose output. B<-fshow-source-location> B<-fcaret-diagnostics> B<-fdiagnostics-fixit-info> +B<-fdiagnostics-parseable-fixits> B<-fdiagnostics-print-source-range-info> B<-fprint-source-range-info> B<-fdiagnostics-show-option> @@ -515,7 +520,6 @@ targets. =head1 BUGS -Clang currently does not have C++ support, and this manual page is incomplete. To report bugs, please visit L. Most bug reports should include preprocessed source files (use the B<-E> option) and the full output of the compiler, along with information to reproduce. diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt index d2738c69035..9a32ee40652 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -1,4 +1,3 @@ add_subdirectory(clang-interpreter) add_subdirectory(PrintFunctionNames) -add_subdirectory(wpa) diff --git a/examples/Makefile b/examples/Makefile index c4af2526339..8cb431d7391 100644 --- a/examples/Makefile +++ b/examples/Makefile @@ -9,6 +9,6 @@ CLANG_LEVEL := .. -PARALLEL_DIRS := clang-interpreter PrintFunctionNames wpa +PARALLEL_DIRS := clang-interpreter PrintFunctionNames include $(CLANG_LEVEL)/Makefile diff --git a/examples/PrintFunctionNames/Makefile b/examples/PrintFunctionNames/Makefile index 0ff5189437c..125ac4854ff 100644 --- a/examples/PrintFunctionNames/Makefile +++ b/examples/PrintFunctionNames/Makefile @@ -10,10 +10,15 @@ CLANG_LEVEL := ../.. LIBRARYNAME = PrintFunctionNames +# If we don't need RTTI or EH, there's no reason to export anything +# from the plugin. +ifneq ($(REQUIRES_RTTI), 1) +ifneq ($(REQUIRES_EH), 1) +EXPORTED_SYMBOL_FILE = $(PROJ_SRC_DIR)/PrintFunctionNames.exports +endif +endif + LINK_LIBS_IN_SHARED = 1 SHARED_LIBRARY = 1 -USEDLIBS = clangIndex.a clangFrontend.a clangDriver.a clangSema.a \ - clangAnalysis.a clangAST.a clangParse.a clangLex.a clangBasic.a - include $(CLANG_LEVEL)/Makefile diff --git a/examples/PrintFunctionNames/PrintFunctionNames.cpp b/examples/PrintFunctionNames/PrintFunctionNames.cpp index 397cf843fa7..cc138f56dbb 100644 --- a/examples/PrintFunctionNames/PrintFunctionNames.cpp +++ b/examples/PrintFunctionNames/PrintFunctionNames.cpp @@ -15,6 +15,7 @@ #include "clang/Frontend/FrontendPluginRegistry.h" #include "clang/AST/ASTConsumer.h" #include "clang/AST/AST.h" +#include "clang/Frontend/CompilerInstance.h" #include "llvm/Support/raw_ostream.h" using namespace clang; @@ -29,7 +30,7 @@ public: llvm::errs() << "top-level-decl: \"" << ND->getNameAsString() << "\"\n"; } } -}; +}; class PrintFunctionNamesAction : public PluginASTAction { protected: @@ -37,15 +38,26 @@ protected: return new PrintFunctionsConsumer(); } - bool ParseArgs(const std::vector& args) { - for (unsigned i=0; i& args) { + for (unsigned i = 0, e = args.size(); i != e; ++i) { llvm::errs() << "PrintFunctionNames arg = " << args[i] << "\n"; + + // Example error handling. + if (args[i] == "-an-error") { + Diagnostic &D = CI.getDiagnostics(); + unsigned DiagID = D.getCustomDiagID( + Diagnostic::Error, "invalid argument '" + args[i] + "'"); + D.Report(DiagID); + return false; + } + } if (args.size() && args[0] == "help") PrintHelp(llvm::errs()); return true; } - void PrintHelp(llvm::raw_ostream& ros) { + void PrintHelp(llvm::raw_ostream& ros) { ros << "Help for PrintFunctionNames plugin goes here\n"; } @@ -53,5 +65,5 @@ protected: } -FrontendPluginRegistry::Add +static FrontendPluginRegistry::Add X("print-fns", "print function names"); diff --git a/examples/PrintFunctionNames/PrintFunctionNames.exports b/examples/PrintFunctionNames/PrintFunctionNames.exports new file mode 100644 index 00000000000..0ff590d30d7 --- /dev/null +++ b/examples/PrintFunctionNames/PrintFunctionNames.exports @@ -0,0 +1 @@ +_ZN4llvm8Registry* diff --git a/examples/clang-interpreter/CMakeLists.txt b/examples/clang-interpreter/CMakeLists.txt index 1aa9b2b5922..73f28bb7a2e 100644 --- a/examples/clang-interpreter/CMakeLists.txt +++ b/examples/clang-interpreter/CMakeLists.txt @@ -2,10 +2,12 @@ set(LLVM_NO_RTTI 1) set(LLVM_USED_LIBS clangFrontend + clangSerialization clangDriver clangCodeGen clangSema clangChecker + clangIndex clangAnalysis clangRewrite clangAST diff --git a/examples/clang-interpreter/Makefile b/examples/clang-interpreter/Makefile index 6fa58d22cbd..2f5e017af80 100644 --- a/examples/clang-interpreter/Makefile +++ b/examples/clang-interpreter/Makefile @@ -17,8 +17,8 @@ TOOL_NO_EXPORTS = 1 LINK_COMPONENTS := jit interpreter nativecodegen bitreader bitwriter ipo \ selectiondag asmparser -USEDLIBS = clangFrontend.a clangDriver.a clangCodeGen.a clangSema.a \ - clangChecker.a clangAnalysis.a clangRewrite.a clangAST.a \ - clangParse.a clangLex.a clangBasic.a +USEDLIBS = clangFrontend.a clangSerialization.a clangDriver.a clangCodeGen.a \ + clangSema.a clangChecker.a clangAnalysis.a clangRewrite.a \ + clangAST.a clangParse.a clangLex.a clangBasic.a include $(CLANG_LEVEL)/Makefile diff --git a/examples/clang-interpreter/main.cpp b/examples/clang-interpreter/main.cpp index ec4e8619829..2ccba8b24a8 100644 --- a/examples/clang-interpreter/main.cpp +++ b/examples/clang-interpreter/main.cpp @@ -66,11 +66,11 @@ int Execute(llvm::Module *Mod, char * const *envp) { int main(int argc, const char **argv, char * const *envp) { void *MainAddr = (void*) (intptr_t) GetExecutablePath; llvm::sys::Path Path = GetExecutablePath(argv[0]); - TextDiagnosticPrinter DiagClient(llvm::errs(), DiagnosticOptions()); + TextDiagnosticPrinter *DiagClient = + new TextDiagnosticPrinter(llvm::errs(), DiagnosticOptions()); - Diagnostic Diags(&DiagClient); - Driver TheDriver(Path.getBasename(), Path.getDirname(), - llvm::sys::getHostTriple(), + Diagnostic Diags(DiagClient); + Driver TheDriver(Path.str(), llvm::sys::getHostTriple(), "a.out", /*IsProduction=*/false, /*CXXIsProduction=*/false, Diags); TheDriver.setTitle("clang interpreter"); diff --git a/examples/wpa/CMakeLists.txt b/examples/wpa/CMakeLists.txt index c2b2ce63a93..13e4298c1f2 100644 --- a/examples/wpa/CMakeLists.txt +++ b/examples/wpa/CMakeLists.txt @@ -6,6 +6,7 @@ set(LLVM_USED_LIBS clangDriver clangSema clangAnalysis + clangSerialization clangChecker clangRewrite clangAST diff --git a/examples/wpa/Makefile b/examples/wpa/Makefile index bd6ebfdc9bf..0a70ea6359c 100644 --- a/examples/wpa/Makefile +++ b/examples/wpa/Makefile @@ -17,7 +17,7 @@ TOOL_NO_EXPORTS = 1 LINK_COMPONENTS := asmparser bitreader mc core USEDLIBS = clangChecker.a clangIndex.a clangFrontend.a clangDriver.a \ - clangSema.a clangAnalysis.a clangAST.a clangParse.a clangLex.a \ - clangBasic.a + clangSema.a clangAnalysis.a clangSerialization.a \ + clangAST.a clangParse.a clangLex.a clangBasic.a include $(CLANG_LEVEL)/Makefile diff --git a/examples/wpa/clang-wpa.cpp b/examples/wpa/clang-wpa.cpp index 74ec368cfbe..41dca0dc451 100644 --- a/examples/wpa/clang-wpa.cpp +++ b/examples/wpa/clang-wpa.cpp @@ -62,6 +62,10 @@ public: return AST->getPreprocessor(); } + virtual Diagnostic &getDiagnostic() { + return AST->getDiagnostics(); + } + virtual DeclReferenceMap &getDeclReferenceMap() { return DeclRefMap; } @@ -87,7 +91,7 @@ int main(int argc, char **argv) { = CompilerInstance::createDiagnostics(DiagOpts, argc, argv); for (unsigned i = 0, e = InputFilenames.size(); i != e; ++i) { const std::string &InFile = InputFilenames[i]; - llvm::OwningPtr AST(ASTUnit::LoadFromPCHFile(InFile, Diags)); + llvm::OwningPtr AST(ASTUnit::LoadFromASTFile(InFile, Diags)); if (!AST) return 1; @@ -129,17 +133,18 @@ int main(int argc, char **argv) { AnalysisManager AMgr(TU->getASTContext(), PP.getDiagnostics(), PP.getLangOptions(), /* PathDiagnostic */ 0, CreateRegionStoreManager, - CreateRangeConstraintManager, + CreateRangeConstraintManager, &Idxer, /* MaxNodes */ 300000, /* MaxLoop */ 3, /* VisualizeEG */ false, /* VisualizeEGUbi */ false, /* PurgeDead */ true, /* EagerlyAssume */ false, - /* TrimGraph */ false, /* InlineCall */ true); + /* TrimGraph */ false, /* InlineCall */ true, + /* UseUnoptimizedCFG */ false); GRTransferFuncs* TF = MakeCFRefCountTF(AMgr.getASTContext(), /*GC*/false, AMgr.getLangOptions()); GRExprEngine Eng(AMgr, TF); - Eng.ExecuteWorkList(AMgr.getStackFrame(FD), AMgr.getMaxNodes()); + Eng.ExecuteWorkList(AMgr.getStackFrame(FD, TU), AMgr.getMaxNodes()); return 0; } diff --git a/include/clang-c/Index.h b/include/clang-c/Index.h index b377b6d5fe2..4631c65bf05 100644 --- a/include/clang-c/Index.h +++ b/include/clang-c/Index.h @@ -97,6 +97,27 @@ struct CXUnsavedFile { unsigned long Length; }; +/** + * \brief Describes the availability of a particular entity, which indicates + * whether the use of this entity will result in a warning or error due to + * it being deprecated or unavailable. + */ +enum CXAvailabilityKind { + /** + * \brief The entity is available. + */ + CXAvailability_Available, + /** + * \brief The entity is available, but has been deprecated (and its use is + * not recommended). + */ + CXAvailability_Deprecated, + /** + * \brief The entity is not available; any use of it will be an error. + */ + CXAvailability_NotAvailable +}; + /** * \defgroup CINDEX_STRING String manipulation routines * @@ -624,7 +645,7 @@ CINDEX_LINKAGE CXTranslationUnit clang_createTranslationUnitFromSourceFile( CXIndex CIdx, const char *source_filename, int num_clang_command_line_args, - const char **clang_command_line_args, + const char * const *clang_command_line_args, unsigned num_unsaved_files, struct CXUnsavedFile *unsaved_files); @@ -634,11 +655,261 @@ CINDEX_LINKAGE CXTranslationUnit clang_createTranslationUnitFromSourceFile( CINDEX_LINKAGE CXTranslationUnit clang_createTranslationUnit(CXIndex, const char *ast_filename); +/** + * \brief Flags that control the creation of translation units. + * + * The enumerators in this enumeration type are meant to be bitwise + * ORed together to specify which options should be used when + * constructing the translation unit. + */ +enum CXTranslationUnit_Flags { + /** + * \brief Used to indicate that no special translation-unit options are + * needed. + */ + CXTranslationUnit_None = 0x0, + + /** + * \brief Used to indicate that the parser should construct a "detailed" + * preprocessing record, including all macro definitions and instantiations. + * + * Constructing a detailed preprocessing record requires more memory + * and time to parse, since the information contained in the record + * is usually not retained. However, it can be useful for + * applications that require more detailed information about the + * behavior of the preprocessor. + */ + CXTranslationUnit_DetailedPreprocessingRecord = 0x01, + + /** + * \brief Used to indicate that the translation unit is incomplete. + * + * When a translation unit is considered "incomplete", semantic + * analysis that is typically performed at the end of the + * translation unit will be suppressed. For example, this suppresses + * the completion of tentative declarations in C and of + * instantiation of implicitly-instantiation function templates in + * C++. This option is typically used when parsing a header with the + * intent of producing a precompiled header. + */ + CXTranslationUnit_Incomplete = 0x02, + + /** + * \brief Used to indicate that the translation unit should be built with an + * implicit precompiled header for the preamble. + * + * An implicit precompiled header is used as an optimization when a + * particular translation unit is likely to be reparsed many times + * when the sources aren't changing that often. In this case, an + * implicit precompiled header will be built containing all of the + * initial includes at the top of the main file (what we refer to as + * the "preamble" of the file). In subsequent parses, if the + * preamble or the files in it have not changed, \c + * clang_reparseTranslationUnit() will re-use the implicit + * precompiled header to improve parsing performance. + */ + CXTranslationUnit_PrecompiledPreamble = 0x04, + + /** + * \brief Used to indicate that the translation unit should cache some + * code-completion results with each reparse of the source file. + * + * Caching of code-completion results is a performance optimization that + * introduces some overhead to reparsing but improves the performance of + * code-completion operations. + */ + CXTranslationUnit_CacheCompletionResults = 0x08 +}; + +/** + * \brief Returns the set of flags that is suitable for parsing a translation + * unit that is being edited. + * + * The set of flags returned provide options for \c clang_parseTranslationUnit() + * to indicate that the translation unit is likely to be reparsed many times, + * either explicitly (via \c clang_reparseTranslationUnit()) or implicitly + * (e.g., by code completion (\c clang_codeCompletionAt())). The returned flag + * set contains an unspecified set of optimizations (e.g., the precompiled + * preamble) geared toward improving the performance of these routines. The + * set of optimizations enabled may change from one version to the next. + */ +CINDEX_LINKAGE unsigned clang_defaultEditingTranslationUnitOptions(void); + +/** + * \brief Parse the given source file and the translation unit corresponding + * to that file. + * + * This routine is the main entry point for the Clang C API, providing the + * ability to parse a source file into a translation unit that can then be + * queried by other functions in the API. This routine accepts a set of + * command-line arguments so that the compilation can be configured in the same + * way that the compiler is configured on the command line. + * + * \param CIdx The index object with which the translation unit will be + * associated. + * + * \param source_filename The name of the source file to load, or NULL if the + * source file is included in \p clang_command_line_args. + * + * \param command_line_args The command-line arguments that would be + * passed to the \c clang executable if it were being invoked out-of-process. + * These command-line options will be parsed and will affect how the translation + * unit is parsed. Note that the following options are ignored: '-c', + * '-emit-ast', '-fsyntex-only' (which is the default), and '-o '. + * + * \param num_command_line_args The number of command-line arguments in + * \p command_line_args. + * + * \param unsaved_files the files that have not yet been saved to disk + * but may be required for parsing, including the contents of + * those files. The contents and name of these files (as specified by + * CXUnsavedFile) are copied when necessary, so the client only needs to + * guarantee their validity until the call to this function returns. + * + * \param num_unsaved_files the number of unsaved file entries in \p + * unsaved_files. + * + * \param options A bitmask of options that affects how the translation unit + * is managed but not its compilation. This should be a bitwise OR of the + * CXTranslationUnit_XXX flags. + * + * \returns A new translation unit describing the parsed code and containing + * any diagnostics produced by the compiler. If there is a failure from which + * the compiler cannot recover, returns NULL. + */ +CINDEX_LINKAGE CXTranslationUnit clang_parseTranslationUnit(CXIndex CIdx, + const char *source_filename, + const char * const *command_line_args, + int num_command_line_args, + struct CXUnsavedFile *unsaved_files, + unsigned num_unsaved_files, + unsigned options); + +/** + * \brief Flags that control how translation units are saved. + * + * The enumerators in this enumeration type are meant to be bitwise + * ORed together to specify which options should be used when + * saving the translation unit. + */ +enum CXSaveTranslationUnit_Flags { + /** + * \brief Used to indicate that no special saving options are needed. + */ + CXSaveTranslationUnit_None = 0x0 +}; + +/** + * \brief Returns the set of flags that is suitable for saving a translation + * unit. + * + * The set of flags returned provide options for + * \c clang_saveTranslationUnit() by default. The returned flag + * set contains an unspecified set of options that save translation units with + * the most commonly-requested data. + */ +CINDEX_LINKAGE unsigned clang_defaultSaveOptions(CXTranslationUnit TU); + +/** + * \brief Saves a translation unit into a serialized representation of + * that translation unit on disk. + * + * Any translation unit that was parsed without error can be saved + * into a file. The translation unit can then be deserialized into a + * new \c CXTranslationUnit with \c clang_createTranslationUnit() or, + * if it is an incomplete translation unit that corresponds to a + * header, used as a precompiled header when parsing other translation + * units. + * + * \param TU The translation unit to save. + * + * \param FileName The file to which the translation unit will be saved. + * + * \param options A bitmask of options that affects how the translation unit + * is saved. This should be a bitwise OR of the + * CXSaveTranslationUnit_XXX flags. + * + * \returns Zero if the translation unit was saved successfully, a + * non-zero value otherwise. + */ +CINDEX_LINKAGE int clang_saveTranslationUnit(CXTranslationUnit TU, + const char *FileName, + unsigned options); + /** * \brief Destroy the specified CXTranslationUnit object. */ CINDEX_LINKAGE void clang_disposeTranslationUnit(CXTranslationUnit); +/** + * \brief Flags that control the reparsing of translation units. + * + * The enumerators in this enumeration type are meant to be bitwise + * ORed together to specify which options should be used when + * reparsing the translation unit. + */ +enum CXReparse_Flags { + /** + * \brief Used to indicate that no special reparsing options are needed. + */ + CXReparse_None = 0x0 +}; + +/** + * \brief Returns the set of flags that is suitable for reparsing a translation + * unit. + * + * The set of flags returned provide options for + * \c clang_reparseTranslationUnit() by default. The returned flag + * set contains an unspecified set of optimizations geared toward common uses + * of reparsing. The set of optimizations enabled may change from one version + * to the next. + */ +CINDEX_LINKAGE unsigned clang_defaultReparseOptions(CXTranslationUnit TU); + +/** + * \brief Reparse the source files that produced this translation unit. + * + * This routine can be used to re-parse the source files that originally + * created the given translation unit, for example because those source files + * have changed (either on disk or as passed via \p unsaved_files). The + * source code will be reparsed with the same command-line options as it + * was originally parsed. + * + * Reparsing a translation unit invalidates all cursors and source locations + * that refer into that translation unit. This makes reparsing a translation + * unit semantically equivalent to destroying the translation unit and then + * creating a new translation unit with the same command-line arguments. + * However, it may be more efficient to reparse a translation + * unit using this routine. + * + * \param TU The translation unit whose contents will be re-parsed. The + * translation unit must originally have been built with + * \c clang_createTranslationUnitFromSourceFile(). + * + * \param num_unsaved_files The number of unsaved file entries in \p + * unsaved_files. + * + * \param unsaved_files The files that have not yet been saved to disk + * but may be required for parsing, including the contents of + * those files. The contents and name of these files (as specified by + * CXUnsavedFile) are copied when necessary, so the client only needs to + * guarantee their validity until the call to this function returns. + * + * \param options A bitset of options composed of the flags in CXReparse_Flags. + * The function \c clang_defaultReparseOptions() produces a default set of + * options recommended for most uses, based on the translation unit. + * + * \returns 0 if the sources could be reparsed. A non-zero value will be + * returned if reparsing was impossible, such that the translation unit is + * invalid. In such cases, the only valid call for \p TU is + * \c clang_disposeTranslationUnit(TU). + */ +CINDEX_LINKAGE int clang_reparseTranslationUnit(CXTranslationUnit TU, + unsigned num_unsaved_files, + struct CXUnsavedFile *unsaved_files, + unsigned options); + /** * @} */ @@ -705,9 +976,33 @@ enum CXCursorKind { CXCursor_Namespace = 22, /** \brief A linkage specification, e.g. 'extern "C"'. */ CXCursor_LinkageSpec = 23, - + /** \brief A C++ constructor. */ + CXCursor_Constructor = 24, + /** \brief A C++ destructor. */ + CXCursor_Destructor = 25, + /** \brief A C++ conversion function. */ + CXCursor_ConversionFunction = 26, + /** \brief A C++ template type parameter. */ + CXCursor_TemplateTypeParameter = 27, + /** \brief A C++ non-type template parameter. */ + CXCursor_NonTypeTemplateParameter = 28, + /** \brief A C++ template template parameter. */ + CXCursor_TemplateTemplateParameter = 29, + /** \brief A C++ function template. */ + CXCursor_FunctionTemplate = 30, + /** \brief A C++ class template. */ + CXCursor_ClassTemplate = 31, + /** \brief A C++ class template partial specialization. */ + CXCursor_ClassTemplatePartialSpecialization = 32, + /** \brief A C++ namespace alias declaration. */ + CXCursor_NamespaceAlias = 33, + /** \brief A C++ using directive. */ + CXCursor_UsingDirective = 34, + /** \brief A using declaration. */ + CXCursor_UsingDeclaration = 35, + CXCursor_FirstDecl = CXCursor_UnexposedDecl, - CXCursor_LastDecl = CXCursor_LinkageSpec, + CXCursor_LastDecl = CXCursor_UsingDeclaration, /* References */ CXCursor_FirstRef = 40, /* Decl references */ @@ -730,7 +1025,17 @@ enum CXCursorKind { * referenced by the type of size is the typedef for size_type. */ CXCursor_TypeRef = 43, - CXCursor_LastRef = 43, + CXCursor_CXXBaseSpecifier = 44, + /** + * \brief A reference to a class template, function template, or template + * template parameter. + */ + CXCursor_TemplateRef = 45, + /** + * \brief A reference to a namespace or namespace alias. + */ + CXCursor_NamespaceRef = 46, + CXCursor_LastRef = CXCursor_NamespaceRef, /* Error conditions */ CXCursor_FirstInvalid = 70, @@ -948,6 +1253,16 @@ enum CXLinkageKind { */ CINDEX_LINKAGE enum CXLinkageKind clang_getCursorLinkage(CXCursor cursor); +/** + * \brief Determine the availability of the entity that this cursor refers to. + * + * \param cursor The cursor to query. + * + * \returns The availability of the cursor. + */ +CINDEX_LINKAGE enum CXAvailabilityKind +clang_getCursorAvailability(CXCursor cursor); + /** * \brief Describe the "language" of the entity referred to by a cursor. */ @@ -1023,7 +1338,7 @@ CINDEX_LINKAGE CXSourceRange clang_getCursorExtent(CXCursor); /** * @} */ - + /** * \defgroup CINDEX_TYPES Type information for CXCursors * @@ -1151,6 +1466,53 @@ CINDEX_LINKAGE CXType clang_getResultType(CXType T); */ CINDEX_LINKAGE CXType clang_getCursorResultType(CXCursor C); +/** + * \brief Return 1 if the CXType is a POD (plain old data) type, and 0 + * otherwise. + */ +CINDEX_LINKAGE unsigned clang_isPODType(CXType T); + +/** + * \brief Returns 1 if the base class specified by the cursor with kind + * CX_CXXBaseSpecifier is virtual. + */ +CINDEX_LINKAGE unsigned clang_isVirtualBase(CXCursor); + +/** + * \brief Represents the C++ access control level to a base class for a + * cursor with kind CX_CXXBaseSpecifier. + */ +enum CX_CXXAccessSpecifier { + CX_CXXInvalidAccessSpecifier, + CX_CXXPublic, + CX_CXXProtected, + CX_CXXPrivate +}; + +/** + * \brief Returns the access control level for the C++ base specifier + * represented by a cursor with kind CX_CXXBaseSpecifier. + */ +CINDEX_LINKAGE enum CX_CXXAccessSpecifier clang_getCXXAccessSpecifier(CXCursor); + +/** + * @} + */ + +/** + * \defgroup CINDEX_ATTRIBUTES Information for attributes + * + * @{ + */ + + +/** + * \brief For cursors representing an iboutletcollection attribute, + * this function returns the collection element type. + * + */ +CINDEX_LINKAGE CXType clang_getIBOutletCollectionType(CXCursor); + /** * @} */ @@ -1364,10 +1726,60 @@ CINDEX_LINKAGE unsigned clang_isCursorDefinition(CXCursor); */ /** - * \brief Determine if a C++ member function is declared 'static'. + * \brief Determine if a C++ member function or member function template is + * declared 'static'. */ CINDEX_LINKAGE unsigned clang_CXXMethod_isStatic(CXCursor C); +/** + * \brief Given a cursor that represents a template, determine + * the cursor kind of the specializations would be generated by instantiating + * the template. + * + * This routine can be used to determine what flavor of function template, + * class template, or class template partial specialization is stored in the + * cursor. For example, it can describe whether a class template cursor is + * declared with "struct", "class" or "union". + * + * \param C The cursor to query. This cursor should represent a template + * declaration. + * + * \returns The cursor kind of the specializations that would be generated + * by instantiating the template \p C. If \p C is not a template, returns + * \c CXCursor_NoDeclFound. + */ +CINDEX_LINKAGE enum CXCursorKind clang_getTemplateCursorKind(CXCursor C); + +/** + * \brief Given a cursor that may represent a specialization or instantiation + * of a template, retrieve the cursor that represents the template that it + * specializes or from which it was instantiated. + * + * This routine determines the template involved both for explicit + * specializations of templates and for implicit instantiations of the template, + * both of which are referred to as "specializations". For a class template + * specialization (e.g., \c std::vector), this routine will return + * either the primary template (\c std::vector) or, if the specialization was + * instantiated from a class template partial specialization, the class template + * partial specialization. For a class template partial specialization and a + * function template specialization (including instantiations), this + * this routine will return the specialized template. + * + * For members of a class template (e.g., member functions, member classes, or + * static data members), returns the specialized or instantiated member. + * Although not strictly "templates" in the C++ language, members of class + * templates have the same notions of specializations and instantiations that + * templates do, so this routine treats them similarly. + * + * \param C A cursor that may be a specialization of a template or a member + * of a template. + * + * \returns If the given cursor is a specialization or instantiation of a + * template or a member thereof, the template or member that it specializes or + * from which it was instantiated. Otherwise, returns a NULL cursor. + */ +CINDEX_LINKAGE CXCursor clang_getSpecializedCursorTemplate(CXCursor C); + /** * @} */ @@ -1816,6 +2228,17 @@ clang_getNumCompletionChunks(CXCompletionString completion_string); CINDEX_LINKAGE unsigned clang_getCompletionPriority(CXCompletionString completion_string); +/** + * \brief Determine the availability of the entity that this code-completion + * string refers to. + * + * \param completion_string The completion string to query. + * + * \returns The availability of the completion string. + */ +CINDEX_LINKAGE enum CXAvailabilityKind +clang_getCompletionAvailability(CXCompletionString completion_string); + /** * \brief Contains the results of code-completion. * @@ -1922,19 +2345,134 @@ CINDEX_LINKAGE CXCodeCompleteResults *clang_codeComplete(CXIndex CIdx, const char *source_filename, int num_command_line_args, - const char **command_line_args, + const char * const *command_line_args, unsigned num_unsaved_files, struct CXUnsavedFile *unsaved_files, const char *complete_filename, unsigned complete_line, unsigned complete_column); +/** + * \brief Flags that can be passed to \c clang_codeCompleteAt() to + * modify its behavior. + * + * The enumerators in this enumeration can be bitwise-OR'd together to + * provide multiple options to \c clang_codeCompleteAt(). + */ +enum CXCodeComplete_Flags { + /** + * \brief Whether to include macros within the set of code + * completions returned. + */ + CXCodeComplete_IncludeMacros = 0x01, + + /** + * \brief Whether to include code patterns for language constructs + * within the set of code completions, e.g., for loops. + */ + CXCodeComplete_IncludeCodePatterns = 0x02 +}; + +/** + * \brief Returns a default set of code-completion options that can be + * passed to\c clang_codeCompleteAt(). + */ +CINDEX_LINKAGE unsigned clang_defaultCodeCompleteOptions(void); + +/** + * \brief Perform code completion at a given location in a translation unit. + * + * This function performs code completion at a particular file, line, and + * column within source code, providing results that suggest potential + * code snippets based on the context of the completion. The basic model + * for code completion is that Clang will parse a complete source file, + * performing syntax checking up to the location where code-completion has + * been requested. At that point, a special code-completion token is passed + * to the parser, which recognizes this token and determines, based on the + * current location in the C/Objective-C/C++ grammar and the state of + * semantic analysis, what completions to provide. These completions are + * returned via a new \c CXCodeCompleteResults structure. + * + * Code completion itself is meant to be triggered by the client when the + * user types punctuation characters or whitespace, at which point the + * code-completion location will coincide with the cursor. For example, if \c p + * is a pointer, code-completion might be triggered after the "-" and then + * after the ">" in \c p->. When the code-completion location is afer the ">", + * the completion results will provide, e.g., the members of the struct that + * "p" points to. The client is responsible for placing the cursor at the + * beginning of the token currently being typed, then filtering the results + * based on the contents of the token. For example, when code-completing for + * the expression \c p->get, the client should provide the location just after + * the ">" (e.g., pointing at the "g") to this code-completion hook. Then, the + * client can filter the results based on the current token text ("get"), only + * showing those results that start with "get". The intent of this interface + * is to separate the relatively high-latency acquisition of code-completion + * results from the filtering of results on a per-character basis, which must + * have a lower latency. + * + * \param TU The translation unit in which code-completion should + * occur. The source files for this translation unit need not be + * completely up-to-date (and the contents of those source files may + * be overridden via \p unsaved_files). Cursors referring into the + * translation unit may be invalidated by this invocation. + * + * \param complete_filename The name of the source file where code + * completion should be performed. This filename may be any file + * included in the translation unit. + * + * \param complete_line The line at which code-completion should occur. + * + * \param complete_column The column at which code-completion should occur. + * Note that the column should point just after the syntactic construct that + * initiated code completion, and not in the middle of a lexical token. + * + * \param unsaved_files the Tiles that have not yet been saved to disk + * but may be required for parsing or code completion, including the + * contents of those files. The contents and name of these files (as + * specified by CXUnsavedFile) are copied when necessary, so the + * client only needs to guarantee their validity until the call to + * this function returns. + * + * \param num_unsaved_files The number of unsaved file entries in \p + * unsaved_files. + * + * \param options Extra options that control the behavior of code + * completion, expressed as a bitwise OR of the enumerators of the + * CXCodeComplete_Flags enumeration. The + * \c clang_defaultCodeCompleteOptions() function returns a default set + * of code-completion options. + * + * \returns If successful, a new \c CXCodeCompleteResults structure + * containing code-completion results, which should eventually be + * freed with \c clang_disposeCodeCompleteResults(). If code + * completion fails, returns NULL. + */ +CINDEX_LINKAGE +CXCodeCompleteResults *clang_codeCompleteAt(CXTranslationUnit TU, + const char *complete_filename, + unsigned complete_line, + unsigned complete_column, + struct CXUnsavedFile *unsaved_files, + unsigned num_unsaved_files, + unsigned options); + +/** + * \brief Sort the code-completion results in case-insensitive alphabetical + * order. + * + * \param Results The set of results to sort. + * \param NumResults The number of results in \p Results. + */ +CINDEX_LINKAGE +void clang_sortCodeCompletionResults(CXCompletionResult *Results, + unsigned NumResults); + /** * \brief Free the given set of code-completion results. */ CINDEX_LINKAGE void clang_disposeCodeCompleteResults(CXCodeCompleteResults *Results); - + /** * \brief Determine the number of diagnostics produced prior to the * location where code completion was performed. diff --git a/include/clang/AST/ASTConsumer.h b/include/clang/AST/ASTConsumer.h index 06113954fc4..84833c099f9 100644 --- a/include/clang/AST/ASTConsumer.h +++ b/include/clang/AST/ASTConsumer.h @@ -18,9 +18,10 @@ namespace clang { class ASTContext; class CXXRecordDecl; class DeclGroupRef; - class TagDecl; class HandleTagDeclDefinition; + class ASTDeserializationListener; // layering violation because void* is ugly class SemaConsumer; // layering violation required for safe SemaConsumer + class TagDecl; class VarDecl; /// ASTConsumer - This is an abstract interface that should be implemented by @@ -48,6 +49,11 @@ public: /// elements). Use Decl::getNextDeclarator() to walk the chain. virtual void HandleTopLevelDecl(DeclGroupRef D); + /// HandleInterestingDecl - Handle the specified interesting declaration. This + /// is called by the AST reader when deserializing things that might interest + /// the consumer. The default implementation forwards to HandleTopLevelDecl. + virtual void HandleInterestingDecl(DeclGroupRef D); + /// HandleTranslationUnit - This method is called when the ASTs for entire /// translation unit have been parsed. virtual void HandleTranslationUnit(ASTContext &Ctx) {} @@ -80,6 +86,12 @@ public: /// it was actually used. virtual void HandleVTable(CXXRecordDecl *RD, bool DefinitionRequired) {} + /// \brief If the consumer is interested in entities being deserialized from + /// AST files, it should return a pointer to a ASTDeserializationListener here + /// + /// The return type is void* because ASTDS lives in Frontend. + virtual ASTDeserializationListener *GetASTDeserializationListener() { return 0; } + /// PrintStats - If desired, print any statistics. virtual void PrintStats() {} diff --git a/include/clang/AST/ASTContext.h b/include/clang/AST/ASTContext.h index 3799451360f..ae4ee946fe2 100644 --- a/include/clang/AST/ASTContext.h +++ b/include/clang/AST/ASTContext.h @@ -18,7 +18,6 @@ #include "clang/Basic/LangOptions.h" #include "clang/Basic/OperatorKinds.h" #include "clang/Basic/PartialDiagnostic.h" -#include "clang/AST/Attr.h" #include "clang/AST/Decl.h" #include "clang/AST/NestedNameSpecifier.h" #include "clang/AST/PrettyPrinter.h" @@ -50,6 +49,7 @@ namespace clang { class SelectorTable; class SourceManager; class TargetInfo; + class CXXABI; // Decls class DeclContext; class CXXMethodDecl; @@ -198,7 +198,7 @@ class ASTContext { /// /// Since so few decls have attrs, we keep them in a hash map instead of /// wasting space in the Decl class. - llvm::DenseMap DeclAttrs; + llvm::DenseMap DeclAttrs; /// \brief Keeps track of the static data member templates from which /// static data members of class template specializations were instantiated. @@ -275,13 +275,18 @@ class ASTContext { /// this ASTContext object. LangOptions LangOpts; - /// MallocAlloc/BumpAlloc - The allocator objects used to create AST objects. - bool FreeMemory; - llvm::MallocAllocator MallocAlloc; + /// \brief The allocator used to create AST objects. + /// + /// AST objects are never destructed; rather, all memory associated with the + /// AST objects will be released when the ASTContext itself is destroyed. llvm::BumpPtrAllocator BumpAlloc; /// \brief Allocator for partial diagnostics. PartialDiagnostic::StorageAllocator DiagAllocator; + + /// \brief The current C++ ABI. + llvm::OwningPtr ABI; + CXXABI *createCXXABI(const TargetInfo &T); public: const TargetInfo &Target; @@ -301,13 +306,9 @@ public: SourceManager& getSourceManager() { return SourceMgr; } const SourceManager& getSourceManager() const { return SourceMgr; } void *Allocate(unsigned Size, unsigned Align = 8) { - return FreeMemory ? MallocAlloc.Allocate(Size, Align) : - BumpAlloc.Allocate(Size, Align); - } - void Deallocate(void *Ptr) { - if (FreeMemory) - MallocAlloc.Deallocate(Ptr); + return BumpAlloc.Allocate(Size, Align); } + void Deallocate(void *Ptr) { } PartialDiagnostic::StorageAllocator &getDiagAllocator() { return DiagAllocator; @@ -320,10 +321,10 @@ public: } /// \brief Retrieve the attributes for the given declaration. - Attr*& getDeclAttrs(const Decl *D) { return DeclAttrs[D]; } + AttrVec& getDeclAttrs(const Decl *D); /// \brief Erase the attributes corresponding to the given declaration. - void eraseDeclAttrs(const Decl *D) { DeclAttrs.erase(D); } + void eraseDeclAttrs(const Decl *D); /// \brief If this variable is an instantiated static data member of a /// class template specialization, returns the templated static data member @@ -393,7 +394,7 @@ public: ASTContext(const LangOptions& LOpts, SourceManager &SM, const TargetInfo &t, IdentifierTable &idents, SelectorTable &sels, Builtin::Context &builtins, - bool FreeMemory = true, unsigned size_reserve=0); + unsigned size_reserve); ~ASTContext(); @@ -520,7 +521,7 @@ public: llvm::SmallVectorImpl &Layout); /// This builds the struct used for __block variables. - QualType BuildByRefType(const char *DeclName, QualType Ty); + QualType BuildByRefType(llvm::StringRef DeclName, QualType Ty); /// Returns true iff we need copy/dispose helpers for the given type. bool BlockRequiresCopying(QualType Ty); @@ -873,7 +874,8 @@ public: return getExtQualType(T, Qs); } - DeclarationName getNameForTemplate(TemplateName Name); + DeclarationNameInfo getNameForTemplate(TemplateName Name, + SourceLocation NameLoc); TemplateName getOverloadedTemplateName(UnresolvedSetIterator Begin, UnresolvedSetIterator End); @@ -909,6 +911,11 @@ public: /// Qualifiers::GC getObjCGCAttrKind(const QualType &Ty) const; + /// areCompatibleVectorTypes - Return true if the given vector types either + /// are of the same unqualified type or if one is GCC and other - equivalent + /// AltiVec vector type. + bool areCompatibleVectorTypes(QualType FirstVec, QualType SecondVec); + /// isObjCNSObjectType - Return true if this is an NSObject object with /// its NSObject attribute set. bool isObjCNSObjectType(QualType Ty) const; @@ -1002,13 +1009,12 @@ public: /// of class definition. const CXXMethodDecl *getKeyFunction(const CXXRecordDecl *RD); - void CollectObjCIvars(const ObjCInterfaceDecl *OI, - llvm::SmallVectorImpl &Fields); - void ShallowCollectObjCIvars(const ObjCInterfaceDecl *OI, llvm::SmallVectorImpl &Ivars); - void CollectNonClassIvars(const ObjCInterfaceDecl *OI, - llvm::SmallVectorImpl &Ivars); + + void DeepCollectObjCIvars(const ObjCInterfaceDecl *OI, bool leafClass, + llvm::SmallVectorImpl &Ivars); + unsigned CountNonClassIvars(const ObjCInterfaceDecl *OI); void CollectInheritedProtocols(const Decl *CDecl, llvm::SmallPtrSet &Protocols); @@ -1067,8 +1073,6 @@ public: bool UnwrapSimilarPointerTypes(QualType &T1, QualType &T2); - /// \brief Retrieves the "canonical" declaration of - /// \brief Retrieves the "canonical" nested name specifier for a /// given nested name specifier. /// @@ -1218,7 +1222,8 @@ public: //===--------------------------------------------------------------------===// /// Compatibility predicates used to check assignment expressions. - bool typesAreCompatible(QualType, QualType); // C99 6.2.7p1 + bool typesAreCompatible(QualType T1, QualType T2, + bool CompareUnqualified = false); // C99 6.2.7p1 bool typesAreBlockPointerCompatible(QualType, QualType); @@ -1235,6 +1240,8 @@ public: bool ObjCQualifiedIdTypesAreCompatible(QualType LHS, QualType RHS, bool ForCompare); + bool ObjCQualifiedClassTypesAreCompatible(QualType LHS, QualType RHS); + // Check the safety of assignment from LHS to RHS bool canAssignObjCInterfaces(const ObjCObjectPointerType *LHSOPT, const ObjCObjectPointerType *RHSOPT); @@ -1246,10 +1253,13 @@ public: bool areComparableObjCPointerTypes(QualType LHS, QualType RHS); QualType areCommonBaseCompatible(const ObjCObjectPointerType *LHSOPT, const ObjCObjectPointerType *RHSOPT); - + bool canBindObjCObjectType(QualType To, QualType From); + // Functions for calculating composite types - QualType mergeTypes(QualType, QualType, bool OfBlockPointer=false); - QualType mergeFunctionTypes(QualType, QualType, bool OfBlockPointer=false); + QualType mergeTypes(QualType, QualType, bool OfBlockPointer=false, + bool Unqualified = false); + QualType mergeFunctionTypes(QualType, QualType, bool OfBlockPointer=false, + bool Unqualified = false); QualType mergeObjCGCQualifiers(QualType, QualType); @@ -1257,6 +1267,10 @@ public: /// that are common to binary operators (C99 6.3.1.8, C++ [expr]p9) /// and returns the result type of that conversion. QualType UsualArithmeticConversionsType(QualType lhs, QualType rhs); + + void ResetObjCLayout(const ObjCContainerDecl *CD) { + ObjCLayouts[CD] = 0; + } //===--------------------------------------------------------------------===// // Integer Predicates @@ -1337,6 +1351,17 @@ public: /// when it is called. void AddDeallocation(void (*Callback)(void*), void *Data); + GVALinkage GetGVALinkageForFunction(const FunctionDecl *FD); + GVALinkage GetGVALinkageForVariable(const VarDecl *VD); + + /// \brief Determines if the decl can be CodeGen'ed or deserialized from PCH + /// lazily, only when used; this is only relevant for function or file scoped + /// var definitions. + /// + /// \returns true if the function/var must be CodeGen'ed/deserialized even if + /// it is not used. + bool DeclMustBeEmitted(const Decl *D); + //===--------------------------------------------------------------------===// // Statistics //===--------------------------------------------------------------------===// @@ -1386,7 +1411,7 @@ private: const ASTRecordLayout &getObjCLayout(const ObjCInterfaceDecl *D, const ObjCImplementationDecl *Impl); - + private: /// \brief A set of deallocations that should be performed when the /// ASTContext is destroyed. diff --git a/include/clang/AST/ASTImporter.h b/include/clang/AST/ASTImporter.h index 7975c437887..9380058118c 100644 --- a/include/clang/AST/ASTImporter.h +++ b/include/clang/AST/ASTImporter.h @@ -14,8 +14,8 @@ #ifndef LLVM_CLANG_AST_ASTIMPORTER_H #define LLVM_CLANG_AST_ASTIMPORTER_H -#include "clang/AST/Type.h" #include "clang/AST/DeclarationName.h" +#include "clang/AST/Type.h" #include "clang/Basic/SourceLocation.h" #include "llvm/ADT/DenseMap.h" #include "llvm/ADT/DenseSet.h" diff --git a/include/clang/AST/Attr.h b/include/clang/AST/Attr.h index 9faa62eef6f..62ca49fbf3b 100644 --- a/include/clang/AST/Attr.h +++ b/include/clang/AST/Attr.h @@ -15,8 +15,11 @@ #define LLVM_CLANG_AST_ATTR_H #include "llvm/Support/Casting.h" +#include "llvm/ADT/SmallVector.h" #include "llvm/ADT/StringRef.h" #include "clang/Basic/AttrKinds.h" +#include "clang/AST/Type.h" +#include "clang/Basic/SourceLocation.h" #include #include #include @@ -27,28 +30,39 @@ namespace clang { class IdentifierInfo; class ObjCInterfaceDecl; class Expr; + class QualType; + class FunctionDecl; + class TypeSourceInfo; } // Defined in ASTContext.h void *operator new(size_t Bytes, clang::ASTContext &C, size_t Alignment = 16) throw (); +// FIXME: Being forced to not have a default argument here due to redeclaration +// rules on default arguments sucks +void *operator new[](size_t Bytes, clang::ASTContext &C, + size_t Alignment) throw (); // It is good practice to pair new/delete operators. Also, MSVC gives many // warnings if a matching delete overload is not declared, even though the // throw() spec guarantees it will not be implicitly called. void operator delete(void *Ptr, clang::ASTContext &C, size_t) throw (); +void operator delete[](void *Ptr, clang::ASTContext &C, size_t) + throw (); namespace clang { /// Attr - This represents one attribute. class Attr { private: - Attr *Next; - attr::Kind AttrKind; + SourceLocation Loc; + unsigned AttrKind : 16; bool Inherited : 1; protected: + virtual ~Attr(); + void* operator new(size_t bytes) throw() { assert(0 && "Attrs cannot be allocated with regular 'new'."); return 0; @@ -57,41 +71,36 @@ protected: assert(0 && "Attrs cannot be released with regular 'delete'."); } -protected: - Attr(attr::Kind AK) : Next(0), AttrKind(AK), Inherited(false) {} - virtual ~Attr() { - assert(Next == 0 && "Destroy didn't work"); - } public: - virtual void Destroy(ASTContext &C); + // Forward so that the regular new and delete do not hide global ones. + void* operator new(size_t Bytes, ASTContext &C, + size_t Alignment = 16) throw() { + return ::operator new(Bytes, C, Alignment); + } + void operator delete(void *Ptr, ASTContext &C, + size_t Alignment) throw() { + return ::operator delete(Ptr, C, Alignment); + } + +protected: + Attr(attr::Kind AK, SourceLocation L) + : Loc(L), AttrKind(AK), Inherited(false) {} + +public: /// \brief Whether this attribute should be merged to new /// declarations. virtual bool isMerged() const { return true; } - attr::Kind getKind() const { return AttrKind; } - - Attr *getNext() { return Next; } - const Attr *getNext() const { return Next; } - void setNext(Attr *next) { Next = next; } - - template const T *getNext() const { - for (const Attr *attr = getNext(); attr; attr = attr->getNext()) - if (const T *V = dyn_cast(attr)) - return V; - return 0; + attr::Kind getKind() const { + return static_cast(AttrKind); } + SourceLocation getLocation() const { return Loc; } + void setLocation(SourceLocation L) { Loc = L; } + bool isInherited() const { return Inherited; } - void setInherited(bool value) { Inherited = value; } - - void addAttr(Attr *attr) { - assert((attr != 0) && "addAttr(): attr is null"); - - // FIXME: This doesn't preserve the order in any way. - attr->Next = Next; - Next = attr; - } + void setInherited(bool I) { Inherited = I; } // Clone this attribute. virtual Attr* clone(ASTContext &C) const = 0; @@ -101,490 +110,112 @@ public: }; #include "clang/AST/Attrs.inc" - -class AttrWithString : public Attr { -private: - const char *Str; - unsigned StrLen; -protected: - AttrWithString(attr::Kind AK, ASTContext &C, llvm::StringRef s); - llvm::StringRef getString() const { return llvm::StringRef(Str, StrLen); } - void ReplaceString(ASTContext &C, llvm::StringRef newS); -public: - virtual void Destroy(ASTContext &C); -}; -#define DEF_SIMPLE_ATTR(ATTR) \ -class ATTR##Attr : public Attr { \ -public: \ - ATTR##Attr() : Attr(attr::ATTR) {} \ - virtual Attr *clone(ASTContext &C) const; \ - static bool classof(const Attr *A) { return A->getKind() == attr::ATTR; } \ - static bool classof(const ATTR##Attr *A) { return true; } \ +/// AttrVec - A vector of Attr, which is how they are stored on the AST. +typedef llvm::SmallVector AttrVec; +typedef llvm::SmallVector ConstAttrVec; + +/// DestroyAttrs - Destroy the contents of an AttrVec. +inline void DestroyAttrs (AttrVec& V, ASTContext &C) { } -DEF_SIMPLE_ATTR(Packed); +/// specific_attr_iterator - Iterates over a subrange of an AttrVec, only +/// providing attributes that are of a specifc type. +template +class specific_attr_iterator { + /// Current - The current, underlying iterator. + /// In order to ensure we don't dereference an invalid iterator unless + /// specifically requested, we don't necessarily advance this all the + /// way. Instead, we advance it when an operation is requested; if the + /// operation is acting on what should be a past-the-end iterator, + /// then we offer no guarantees, but this way we do not dererence a + /// past-the-end iterator when we move to a past-the-end position. + mutable AttrVec::const_iterator Current; -/// \brief Attribute for specifying a maximum field alignment; this is only -/// valid on record decls. -class MaxFieldAlignmentAttr : public Attr { - unsigned Alignment; + void AdvanceToNext() const { + while (!llvm::isa(*Current)) + ++Current; + } + + void AdvanceToNext(AttrVec::const_iterator I) const { + while (Current != I && !llvm::isa(*Current)) + ++Current; + } public: - MaxFieldAlignmentAttr(unsigned alignment) - : Attr(attr::MaxFieldAlignment), Alignment(alignment) {} + typedef SpecificAttr* value_type; + typedef SpecificAttr* reference; + typedef SpecificAttr* pointer; + typedef std::forward_iterator_tag iterator_category; + typedef std::ptrdiff_t difference_type; - /// getAlignment - The specified alignment in bits. - unsigned getAlignment() const { return Alignment; } + specific_attr_iterator() : Current() { } + explicit specific_attr_iterator(AttrVec::const_iterator i) : Current(i) { } - virtual Attr* clone(ASTContext &C) const; - - // Implement isa/cast/dyncast/etc. - static bool classof(const Attr *A) { - return A->getKind() == attr::MaxFieldAlignment; + reference operator*() const { + AdvanceToNext(); + return llvm::cast(*Current); } - static bool classof(const MaxFieldAlignmentAttr *A) { return true; } -}; - -DEF_SIMPLE_ATTR(AlignMac68k); - -/// \brief Atribute for specifying the alignment of a variable or type. -/// -/// This node will either contain the precise Alignment (in bits, not bytes!) -/// or will contain the expression for the alignment attribute in the case of -/// a dependent expression within a class or function template. At template -/// instantiation time these are transformed into concrete attributes. -class AlignedAttr : public Attr { - unsigned Alignment; - Expr *AlignmentExpr; -public: - AlignedAttr(unsigned alignment) - : Attr(attr::Aligned), Alignment(alignment), AlignmentExpr(0) {} - AlignedAttr(Expr *E) - : Attr(attr::Aligned), Alignment(0), AlignmentExpr(E) {} - - /// getAlignmentExpr - Get a dependent alignment expression if one is present. - Expr *getAlignmentExpr() const { - return AlignmentExpr; + pointer operator->() const { + AdvanceToNext(); + return llvm::cast(*Current); } - /// isDependent - Is the alignment a dependent expression - bool isDependent() const { - return getAlignmentExpr(); + specific_attr_iterator& operator++() { + ++Current; + return *this; + } + specific_attr_iterator operator++(int) { + specific_attr_iterator Tmp(*this); + ++(*this); + return Tmp; } - /// getAlignment - The specified alignment in bits. Requires !isDependent(). - unsigned getAlignment() const { - assert(!isDependent() && "Cannot get a value dependent alignment"); - return Alignment; - } - - /// getMaxAlignment - Get the maximum alignment of attributes on this list. - unsigned getMaxAlignment() const { - const AlignedAttr *Next = getNext(); - if (Next) - return std::max(Next->getMaxAlignment(), getAlignment()); + friend bool operator==(specific_attr_iterator Left, + specific_attr_iterator Right) { + if (Left.Current < Right.Current) + Left.AdvanceToNext(Right.Current); else - return getAlignment(); + Right.AdvanceToNext(Left.Current); + return Left.Current == Right.Current; } - - virtual Attr* clone(ASTContext &C) const; - - // Implement isa/cast/dyncast/etc. - static bool classof(const Attr *A) { - return A->getKind() == attr::Aligned; + friend bool operator!=(specific_attr_iterator Left, + specific_attr_iterator Right) { + return !(Left == Right); } - static bool classof(const AlignedAttr *A) { return true; } }; -class AnnotateAttr : public AttrWithString { -public: - AnnotateAttr(ASTContext &C, llvm::StringRef ann) - : AttrWithString(attr::Annotate, C, ann) {} - - llvm::StringRef getAnnotation() const { return getString(); } - - virtual Attr* clone(ASTContext &C) const; - - // Implement isa/cast/dyncast/etc. - static bool classof(const Attr *A) { - return A->getKind() == attr::Annotate; - } - static bool classof(const AnnotateAttr *A) { return true; } -}; - -class AsmLabelAttr : public AttrWithString { -public: - AsmLabelAttr(ASTContext &C, llvm::StringRef L) - : AttrWithString(attr::AsmLabel, C, L) {} - - llvm::StringRef getLabel() const { return getString(); } - - virtual Attr* clone(ASTContext &C) const; - - // Implement isa/cast/dyncast/etc. - static bool classof(const Attr *A) { - return A->getKind() == attr::AsmLabel; - } - static bool classof(const AsmLabelAttr *A) { return true; } -}; - -DEF_SIMPLE_ATTR(AlwaysInline); - -class AliasAttr : public AttrWithString { -public: - AliasAttr(ASTContext &C, llvm::StringRef aliasee) - : AttrWithString(attr::Alias, C, aliasee) {} - - llvm::StringRef getAliasee() const { return getString(); } - - virtual Attr *clone(ASTContext &C) const; - - // Implement isa/cast/dyncast/etc. - static bool classof(const Attr *A) { return A->getKind() == attr::Alias; } - static bool classof(const AliasAttr *A) { return true; } -}; - -class ConstructorAttr : public Attr { - int priority; -public: - ConstructorAttr(int p) : Attr(attr::Constructor), priority(p) {} - - int getPriority() const { return priority; } - - virtual Attr *clone(ASTContext &C) const; - - // Implement isa/cast/dyncast/etc. - static bool classof(const Attr *A) - { return A->getKind() == attr::Constructor; } - static bool classof(const ConstructorAttr *A) { return true; } -}; - -class DestructorAttr : public Attr { - int priority; -public: - DestructorAttr(int p) : Attr(attr::Destructor), priority(p) {} - - int getPriority() const { return priority; } - - virtual Attr *clone(ASTContext &C) const; - - // Implement isa/cast/dyncast/etc. - static bool classof(const Attr *A) - { return A->getKind() == attr::Destructor; } - static bool classof(const DestructorAttr *A) { return true; } -}; - -class IBOutletAttr : public Attr { -public: - IBOutletAttr() : Attr(attr::IBOutlet) {} - - virtual Attr *clone(ASTContext &C) const; - - // Implement isa/cast/dyncast/etc. - static bool classof(const Attr *A) { - return A->getKind() == attr::IBOutlet; - } - static bool classof(const IBOutletAttr *A) { return true; } -}; - -class IBOutletCollectionAttr : public Attr { - const ObjCInterfaceDecl *D; -public: - IBOutletCollectionAttr(const ObjCInterfaceDecl *d = 0) - : Attr(attr::IBOutletCollection), D(d) {} - - const ObjCInterfaceDecl *getClass() const { return D; } - - virtual Attr *clone(ASTContext &C) const; - - // Implement isa/cast/dyncast/etc. - static bool classof(const Attr *A) { - return A->getKind() == attr::IBOutletCollection; - } - static bool classof(const IBOutletCollectionAttr *A) { return true; } -}; - -class IBActionAttr : public Attr { -public: - IBActionAttr() : Attr(attr::IBAction) {} - - virtual Attr *clone(ASTContext &C) const; - - // Implement isa/cast/dyncast/etc. - static bool classof(const Attr *A) { - return A->getKind() == attr::IBAction; - } - static bool classof(const IBActionAttr *A) { return true; } -}; - -DEF_SIMPLE_ATTR(AnalyzerNoReturn); -DEF_SIMPLE_ATTR(Deprecated); -DEF_SIMPLE_ATTR(GNUInline); -DEF_SIMPLE_ATTR(Malloc); -DEF_SIMPLE_ATTR(NoReturn); -DEF_SIMPLE_ATTR(NoInstrumentFunction); - -class SectionAttr : public AttrWithString { -public: - SectionAttr(ASTContext &C, llvm::StringRef N) - : AttrWithString(attr::Section, C, N) {} - - llvm::StringRef getName() const { return getString(); } - - virtual Attr *clone(ASTContext &C) const; - - // Implement isa/cast/dyncast/etc. - static bool classof(const Attr *A) { - return A->getKind() == attr::Section; - } - static bool classof(const SectionAttr *A) { return true; } -}; - -DEF_SIMPLE_ATTR(Unavailable); -DEF_SIMPLE_ATTR(Unused); -DEF_SIMPLE_ATTR(Used); -DEF_SIMPLE_ATTR(Weak); -DEF_SIMPLE_ATTR(WeakImport); -DEF_SIMPLE_ATTR(WeakRef); -DEF_SIMPLE_ATTR(NoThrow); -DEF_SIMPLE_ATTR(Const); -DEF_SIMPLE_ATTR(Pure); - -class NonNullAttr : public Attr { - unsigned* ArgNums; - unsigned Size; -public: - NonNullAttr(ASTContext &C, unsigned* arg_nums = 0, unsigned size = 0); - - virtual void Destroy(ASTContext &C); - - typedef const unsigned *iterator; - iterator begin() const { return ArgNums; } - iterator end() const { return ArgNums + Size; } - unsigned size() const { return Size; } - - bool isNonNull(unsigned arg) const { - return ArgNums ? std::binary_search(ArgNums, ArgNums+Size, arg) : true; - } - - virtual Attr *clone(ASTContext &C) const; - - static bool classof(const Attr *A) { return A->getKind() == attr::NonNull; } - static bool classof(const NonNullAttr *A) { return true; } -}; - -class FormatAttr : public AttrWithString { - int formatIdx, firstArg; -public: - FormatAttr(ASTContext &C, llvm::StringRef type, int idx, int first) - : AttrWithString(attr::Format, C, type), formatIdx(idx), firstArg(first) {} - - llvm::StringRef getType() const { return getString(); } - void setType(ASTContext &C, llvm::StringRef type); - int getFormatIdx() const { return formatIdx; } - int getFirstArg() const { return firstArg; } - - virtual Attr *clone(ASTContext &C) const; - - // Implement isa/cast/dyncast/etc. - static bool classof(const Attr *A) { return A->getKind() == attr::Format; } - static bool classof(const FormatAttr *A) { return true; } -}; - -class FormatArgAttr : public Attr { - int formatIdx; -public: - FormatArgAttr(int idx) : Attr(attr::FormatArg), formatIdx(idx) {} - int getFormatIdx() const { return formatIdx; } - - virtual Attr *clone(ASTContext &C) const; - - // Implement isa/cast/dyncast/etc. - static bool classof(const Attr *A) { return A->getKind() == attr::FormatArg; } - static bool classof(const FormatArgAttr *A) { return true; } -}; - -class SentinelAttr : public Attr { - int sentinel, NullPos; -public: - SentinelAttr(int sentinel_val, int nullPos) : Attr(attr::Sentinel), - sentinel(sentinel_val), NullPos(nullPos) {} - int getSentinel() const { return sentinel; } - int getNullPos() const { return NullPos; } - - virtual Attr *clone(ASTContext &C) const; - - // Implement isa/cast/dyncast/etc. - static bool classof(const Attr *A) { return A->getKind() == attr::Sentinel; } - static bool classof(const SentinelAttr *A) { return true; } -}; - -class VisibilityAttr : public Attr { -public: - /// @brief An enumeration for the kinds of visibility of symbols. - enum VisibilityTypes { - DefaultVisibility = 0, - HiddenVisibility, - ProtectedVisibility - }; -private: - VisibilityTypes VisibilityType; -public: - VisibilityAttr(VisibilityTypes v) : Attr(attr::Visibility), - VisibilityType(v) {} - - VisibilityTypes getVisibility() const { return VisibilityType; } - - virtual Attr *clone(ASTContext &C) const; - - // Implement isa/cast/dyncast/etc. - static bool classof(const Attr *A) - { return A->getKind() == attr::Visibility; } - static bool classof(const VisibilityAttr *A) { return true; } -}; - -DEF_SIMPLE_ATTR(FastCall); -DEF_SIMPLE_ATTR(StdCall); -DEF_SIMPLE_ATTR(ThisCall); -DEF_SIMPLE_ATTR(CDecl); -DEF_SIMPLE_ATTR(TransparentUnion); -DEF_SIMPLE_ATTR(ObjCNSObject); -DEF_SIMPLE_ATTR(ObjCException); - -class OverloadableAttr : public Attr { -public: - OverloadableAttr() : Attr(attr::Overloadable) { } - - virtual bool isMerged() const { return false; } - - virtual Attr *clone(ASTContext &C) const; - - static bool classof(const Attr *A) - { return A->getKind() == attr::Overloadable; } - static bool classof(const OverloadableAttr *) { return true; } -}; - -class BlocksAttr : public Attr { -public: - enum BlocksAttrTypes { - ByRef = 0 - }; -private: - BlocksAttrTypes BlocksAttrType; -public: - BlocksAttr(BlocksAttrTypes t) : Attr(attr::Blocks), BlocksAttrType(t) {} - - BlocksAttrTypes getType() const { return BlocksAttrType; } - - virtual Attr *clone(ASTContext &C) const; - - // Implement isa/cast/dyncast/etc. - static bool classof(const Attr *A) { return A->getKind() == attr::Blocks; } - static bool classof(const BlocksAttr *A) { return true; } -}; - -class FunctionDecl; - -class CleanupAttr : public Attr { - FunctionDecl *FD; - -public: - CleanupAttr(FunctionDecl *fd) : Attr(attr::Cleanup), FD(fd) {} - - const FunctionDecl *getFunctionDecl() const { return FD; } - - virtual Attr *clone(ASTContext &C) const; - - // Implement isa/cast/dyncast/etc. - static bool classof(const Attr *A) { return A->getKind() == attr::Cleanup; } - static bool classof(const CleanupAttr *A) { return true; } -}; - -DEF_SIMPLE_ATTR(NoDebug); -DEF_SIMPLE_ATTR(WarnUnusedResult); -DEF_SIMPLE_ATTR(NoInline); - -class RegparmAttr : public Attr { - unsigned NumParams; - -public: - RegparmAttr(unsigned np) : Attr(attr::Regparm), NumParams(np) {} - - unsigned getNumParams() const { return NumParams; } - - virtual Attr *clone(ASTContext &C) const; - - // Implement isa/cast/dyncast/etc. - static bool classof(const Attr *A) { return A->getKind() == attr::Regparm; } - static bool classof(const RegparmAttr *A) { return true; } -}; - -class ReqdWorkGroupSizeAttr : public Attr { - unsigned X, Y, Z; -public: - ReqdWorkGroupSizeAttr(unsigned X, unsigned Y, unsigned Z) - : Attr(attr::ReqdWorkGroupSize), X(X), Y(Y), Z(Z) {} - - unsigned getXDim() const { return X; } - unsigned getYDim() const { return Y; } - unsigned getZDim() const { return Z; } - - virtual Attr *clone(ASTContext &C) const; - - // Implement isa/cast/dyncast/etc. - static bool classof(const Attr *A) { - return A->getKind() == attr::ReqdWorkGroupSize; - } - static bool classof(const ReqdWorkGroupSizeAttr *A) { return true; } -}; - -class InitPriorityAttr : public Attr { - unsigned Priority; -public: - InitPriorityAttr(unsigned priority) - : Attr(attr::InitPriority), Priority(priority) {} - - virtual void Destroy(ASTContext &C) { Attr::Destroy(C); } - - unsigned getPriority() const { return Priority; } - - virtual Attr *clone(ASTContext &C) const; - - static bool classof(const Attr *A) - { return A->getKind() == attr::InitPriority; } - static bool classof(const InitPriorityAttr *A) { return true; } -}; - -// Checker-specific attributes. -DEF_SIMPLE_ATTR(CFReturnsNotRetained); -DEF_SIMPLE_ATTR(CFReturnsRetained); -DEF_SIMPLE_ATTR(NSReturnsNotRetained); -DEF_SIMPLE_ATTR(NSReturnsRetained); - -// Target-specific attributes -DEF_SIMPLE_ATTR(DLLImport); -DEF_SIMPLE_ATTR(DLLExport); - -class MSP430InterruptAttr : public Attr { - unsigned Number; - -public: - MSP430InterruptAttr(unsigned n) : Attr(attr::MSP430Interrupt), Number(n) {} - - unsigned getNumber() const { return Number; } - - virtual Attr *clone(ASTContext &C) const; - - // Implement isa/cast/dyncast/etc. - static bool classof(const Attr *A) - { return A->getKind() == attr::MSP430Interrupt; } - static bool classof(const MSP430InterruptAttr *A) { return true; } -}; - -DEF_SIMPLE_ATTR(X86ForceAlignArgPointer); - -#undef DEF_SIMPLE_ATTR +template +inline specific_attr_iterator specific_attr_begin(const AttrVec& vec) { + return specific_attr_iterator(vec.begin()); +} +template +inline specific_attr_iterator specific_attr_end(const AttrVec& vec) { + return specific_attr_iterator(vec.end()); +} + +template +inline bool hasSpecificAttr(const AttrVec& vec) { + return specific_attr_begin(vec) != specific_attr_end(vec); +} +template +inline T *getSpecificAttr(const AttrVec& vec) { + specific_attr_iterator i = specific_attr_begin(vec); + if (i != specific_attr_end(vec)) + return *i; + else + return 0; +} + +/// getMaxAlignment - Returns the highest alignment value found among +/// AlignedAttrs in an AttrVec, or 0 if there are none. +inline unsigned getMaxAttrAlignment(const AttrVec& V, ASTContext &Ctx) { + unsigned Align = 0; + specific_attr_iterator i(V.begin()), e(V.end()); + for(; i != e; ++i) + Align = std::max(Align, i->getAlignment(Ctx)); + return Align; +} } // end namespace clang diff --git a/include/clang/AST/CMakeLists.txt b/include/clang/AST/CMakeLists.txt index 3b090715e08..800c58361b0 100644 --- a/include/clang/AST/CMakeLists.txt +++ b/include/clang/AST/CMakeLists.txt @@ -5,6 +5,12 @@ tablegen(Attrs.inc add_custom_target(ClangAttrClasses DEPENDS Attrs.inc) +tablegen(AttrImpl.inc + -gen-clang-attr-impl + -I ${CMAKE_CURRENT_SOURCE_DIR}/../../) +add_custom_target(ClangAttrImpl + DEPENDS AttrImpl.inc) + set(LLVM_TARGET_DEFINITIONS ../Basic/StmtNodes.td) tablegen(StmtNodes.inc -gen-clang-stmt-nodes) diff --git a/include/clang/AST/CanonicalType.h b/include/clang/AST/CanonicalType.h index 9f97fd8a7ae..dad4dfc926e 100644 --- a/include/clang/AST/CanonicalType.h +++ b/include/clang/AST/CanonicalType.h @@ -273,6 +273,9 @@ public: LLVM_CLANG_CANPROXY_SIMPLE_ACCESSOR(bool, isArrayType) LLVM_CLANG_CANPROXY_SIMPLE_ACCESSOR(bool, hasPointerRepresentation) LLVM_CLANG_CANPROXY_SIMPLE_ACCESSOR(bool, hasObjCPointerRepresentation) + LLVM_CLANG_CANPROXY_SIMPLE_ACCESSOR(bool, hasIntegerRepresentation) + LLVM_CLANG_CANPROXY_SIMPLE_ACCESSOR(bool, hasSignedIntegerRepresentation) + LLVM_CLANG_CANPROXY_SIMPLE_ACCESSOR(bool, hasUnsignedIntegerRepresentation) LLVM_CLANG_CANPROXY_SIMPLE_ACCESSOR(bool, hasFloatingRepresentation) LLVM_CLANG_CANPROXY_SIMPLE_ACCESSOR(bool, isPromotableIntegerType) LLVM_CLANG_CANPROXY_SIMPLE_ACCESSOR(bool, isSignedIntegerType) @@ -700,9 +703,9 @@ inline CanQual CanQual::getNonReferenceType() const { template CanQual CanQual::getFromOpaquePtr(void *Ptr) { CanQual Result; - Result.Stored.setFromOpaqueValue(Ptr); - assert((!Result || Result.Stored.isCanonical()) - && "Type is not canonical!"); + Result.Stored = QualType::getFromOpaquePtr(Ptr); + assert((!Result || Result.Stored.getAsOpaquePtr() == (void*)-1 || + Result.Stored.isCanonical()) && "Type is not canonical!"); return Result; } diff --git a/include/clang/AST/Decl.h b/include/clang/AST/Decl.h index 39cd51f606b..67492553221 100644 --- a/include/clang/AST/Decl.h +++ b/include/clang/AST/Decl.h @@ -118,16 +118,6 @@ public: return getIdentifier() ? getIdentifier()->getName() : ""; } - /// getNameAsCString - Get the name of identifier for this declaration as a - /// C string (const char*). This requires that the declaration have a name - /// and that it be a simple identifier. - // - // FIXME: Deprecated, move clients to getName(). - const char *getNameAsCString() const { - assert(Name.isIdentifier() && "Name is not a simple identifier"); - return getIdentifier() ? getIdentifier()->getNameStart() : ""; - } - /// getNameAsString - Get a human-readable name for the declaration, even if /// it is one of the special kinds of names (C++ constructor, Objective-C /// selector, etc). Creating this name requires expensive string @@ -229,6 +219,8 @@ inline llvm::raw_ostream &operator<<(llvm::raw_ostream &OS, /// NamespaceDecl - Represent a C++ namespace. class NamespaceDecl : public NamedDecl, public DeclContext { + bool IsInline : 1; + SourceLocation LBracLoc, RBracLoc; // For extended namespace definitions: @@ -239,7 +231,7 @@ class NamespaceDecl : public NamedDecl, public DeclContext { // there will be one NamespaceDecl for each declaration. // NextNamespace points to the next extended declaration. // OrigNamespace points to the original namespace declaration. - // OrigNamespace of the first namespace decl points to itself. + // OrigNamespace of the first namespace decl points to its anonymous namespace NamespaceDecl *NextNamespace; /// \brief A pointer to either the original namespace definition for @@ -258,28 +250,36 @@ class NamespaceDecl : public NamedDecl, public DeclContext { NamespaceDecl(DeclContext *DC, SourceLocation L, IdentifierInfo *Id) : NamedDecl(Namespace, DC, L, Id), DeclContext(Namespace), - NextNamespace(0), OrigOrAnonNamespace(0, true) { } + IsInline(false), NextNamespace(0), OrigOrAnonNamespace(0, true) { } public: static NamespaceDecl *Create(ASTContext &C, DeclContext *DC, SourceLocation L, IdentifierInfo *Id); - virtual void Destroy(ASTContext& C); - - // \brief Returns true if this is an anonymous namespace declaration. - // - // For example: + /// \brief Returns true if this is an anonymous namespace declaration. + /// + /// For example: /// \code - // namespace { - // ... - // }; - // \endcode - // q.v. C++ [namespace.unnamed] + /// namespace { + /// ... + /// }; + /// \endcode + /// q.v. C++ [namespace.unnamed] bool isAnonymousNamespace() const { return !getIdentifier(); } - /// \brief Return the next extended namespace declaration or null if this + /// \brief Returns true if this is an inline namespace declaration. + bool isInline() const { + return IsInline; + } + + /// \brief Set whether this is an inline namespace declaration. + void setInline(bool Inline) { + IsInline = Inline; + } + + /// \brief Return the next extended namespace declaration or null if there /// is none. NamespaceDecl *getNextNamespace() { return NextNamespace; } const NamespaceDecl *getNextNamespace() const { return NextNamespace; } @@ -345,8 +345,8 @@ public: return static_cast(const_cast(DC)); } - friend class PCHDeclReader; - friend class PCHDeclWriter; + friend class ASTDeclReader; + friend class ASTDeclWriter; }; /// ValueDecl - Represent the declaration of a variable (in which case it is @@ -392,8 +392,6 @@ struct QualifierInfo { unsigned NumTPLists, TemplateParameterList **TPLists); - void Destroy(ASTContext &Context); - private: // Copy constructor and copy assignment are disabled. QualifierInfo(const QualifierInfo&); @@ -421,9 +419,6 @@ protected: : ValueDecl(DK, DC, L, N, T), DeclInfo(TInfo) {} public: - virtual ~DeclaratorDecl(); - virtual void Destroy(ASTContext &C); - TypeSourceInfo *getTypeSourceInfo() const { return hasExtInfo() ? getExtInfo()->TInfo @@ -507,36 +502,11 @@ struct EvaluatedStmt { APValue Evaluated; }; -// \brief Describes the kind of template specialization that a -// particular template specialization declaration represents. -enum TemplateSpecializationKind { - /// This template specialization was formed from a template-id but - /// has not yet been declared, defined, or instantiated. - TSK_Undeclared = 0, - /// This template specialization was implicitly instantiated from a - /// template. (C++ [temp.inst]). - TSK_ImplicitInstantiation, - /// This template specialization was declared or defined by an - /// explicit specialization (C++ [temp.expl.spec]) or partial - /// specialization (C++ [temp.class.spec]). - TSK_ExplicitSpecialization, - /// This template specialization was instantiated from a template - /// due to an explicit instantiation declaration request - /// (C++0x [temp.explicit]). - TSK_ExplicitInstantiationDeclaration, - /// This template specialization was instantiated from a template - /// due to an explicit instantiation definition request - /// (C++ [temp.explicit]). - TSK_ExplicitInstantiationDefinition -}; - /// VarDecl - An instance of this class is created to represent a variable /// declaration or definition. class VarDecl : public DeclaratorDecl, public Redeclarable { public: - enum StorageClass { - None, Auto, Register, Extern, Static, PrivateExtern - }; + typedef clang::StorageClass StorageClass; /// getStorageClassSpecifierString - Return the string used to /// specify the storage class \arg SC. @@ -568,10 +538,6 @@ private: bool ThreadSpecified : 1; bool HasCXXDirectInit : 1; - /// DeclaredInCondition - Whether this variable was declared in a - /// condition, e.g., if (int x = foo()) { ... }. - bool DeclaredInCondition : 1; - /// \brief Whether this variable is the exception variable in a C++ catch /// or an Objective-C @catch statement. bool ExceptionVar : 1; @@ -587,7 +553,7 @@ protected: StorageClass SCAsWritten) : DeclaratorDecl(DK, DC, L, Id, T, TInfo), Init(), ThreadSpecified(false), HasCXXDirectInit(false), - DeclaredInCondition(false), ExceptionVar(false), NRVOVariable(false) { + ExceptionVar(false), NRVOVariable(false) { SClass = SC; SClassAsWritten = SCAsWritten; } @@ -609,9 +575,6 @@ public: QualType T, TypeSourceInfo *TInfo, StorageClass S, StorageClass SCAsWritten); - virtual void Destroy(ASTContext& C); - virtual ~VarDecl(); - virtual SourceLocation getInnerLocStart() const; virtual SourceRange getSourceRange() const; @@ -619,8 +582,14 @@ public: StorageClass getStorageClassAsWritten() const { return (StorageClass) SClassAsWritten; } - void setStorageClass(StorageClass SC) { SClass = SC; } - void setStorageClassAsWritten(StorageClass SC) { SClassAsWritten = SC; } + void setStorageClass(StorageClass SC) { + assert(isLegalForVariable(SC)); + SClass = SC; + } + void setStorageClassAsWritten(StorageClass SC) { + assert(isLegalForVariable(SC)); + SClassAsWritten = SC; + } void setThreadSpecified(bool T) { ThreadSpecified = T; } bool isThreadSpecified() const { @@ -630,25 +599,26 @@ public: /// hasLocalStorage - Returns true if a variable with function scope /// is a non-static local variable. bool hasLocalStorage() const { - if (getStorageClass() == None) + if (getStorageClass() == SC_None) return !isFileVarDecl(); // Return true for: Auto, Register. // Return false for: Extern, Static, PrivateExtern. - return getStorageClass() <= Register; + return getStorageClass() >= SC_Auto; } /// isStaticLocal - Returns true if a variable with function scope is a /// static local variable. bool isStaticLocal() const { - return getStorageClass() == Static && !isFileVarDecl(); + return getStorageClass() == SC_Static && !isFileVarDecl(); } /// hasExternStorage - Returns true if a variable has extern or /// __private_extern__ storage. bool hasExternalStorage() const { - return getStorageClass() == Extern || getStorageClass() == PrivateExtern; + return getStorageClass() == SC_Extern || + getStorageClass() == SC_PrivateExtern; } /// hasGlobalStorage - Returns true for all variables that do not @@ -670,7 +640,7 @@ public: if (getKind() != Decl::Var) return false; if (const DeclContext *DC = getDeclContext()) - return DC->getLookupContext()->isFunctionOrMethod(); + return DC->getRedeclContext()->isFunctionOrMethod(); return false; } @@ -679,10 +649,8 @@ public: bool isFunctionOrMethodVarDecl() const { if (getKind() != Decl::Var) return false; - if (const DeclContext *DC = getDeclContext()) - return DC->getLookupContext()->isFunctionOrMethod() && - DC->getLookupContext()->getDeclKind() != Decl::Block; - return false; + const DeclContext *DC = getDeclContext()->getRedeclContext(); + return DC->isFunctionOrMethod() && DC->getDeclKind() != Decl::Block; } /// \brief Determines whether this is a static data member. @@ -696,7 +664,7 @@ public: /// \endcode bool isStaticDataMember() const { // If it wasn't static, it would be a FieldDecl. - return getDeclContext()->isRecord(); + return getKind() != Decl::ParmVar && getDeclContext()->isRecord(); } virtual VarDecl *getCanonicalDecl(); @@ -743,11 +711,10 @@ public: bool isFileVarDecl() const { if (getKind() != Decl::Var) return false; - if (const DeclContext *Ctx = getDeclContext()) { - Ctx = Ctx->getLookupContext(); - if (isa(Ctx) || isa(Ctx) ) - return true; - } + + if (getDeclContext()->getRedeclContext()->isFileContext()) + return true; + if (isStaticDataMember()) return true; @@ -912,18 +879,6 @@ public: return HasCXXDirectInit; } - /// isDeclaredInCondition - Whether this variable was declared as - /// part of a condition in an if/switch/while statement, e.g., - /// @code - /// if (int x = foo()) { ... } - /// @endcode - bool isDeclaredInCondition() const { - return DeclaredInCondition; - } - void setDeclaredInCondition(bool InCondition) { - DeclaredInCondition = InCondition; - } - /// \brief Determine whether this variable is the exception variable in a /// C++ catch statememt or an Objective-C @catch statement. bool isExceptionVariable() const { @@ -973,7 +928,7 @@ class ImplicitParamDecl : public VarDecl { protected: ImplicitParamDecl(Kind DK, DeclContext *DC, SourceLocation L, IdentifierInfo *Id, QualType Tw) - : VarDecl(DK, DC, L, Id, Tw, /*TInfo=*/0, VarDecl::None, VarDecl::None) {} + : VarDecl(DK, DC, L, Id, Tw, /*TInfo=*/0, SC_None, SC_None) {} public: static ImplicitParamDecl *Create(ASTContext &C, DeclContext *DC, SourceLocation L, IdentifierInfo *Id, @@ -1117,9 +1072,7 @@ public: class FunctionDecl : public DeclaratorDecl, public DeclContext, public Redeclarable { public: - enum StorageClass { - None, Extern, Static, PrivateExtern - }; + typedef clang::StorageClass StorageClass; /// \brief The kind of templated function a FunctionDecl can be. enum TemplatedKind { @@ -1179,11 +1132,15 @@ private: DependentFunctionTemplateSpecializationInfo *> TemplateOrSpecialization; + /// DNLoc - Provides source/type location info for the + /// declaration name embedded in the DeclaratorDecl base class. + DeclarationNameLoc DNLoc; + protected: - FunctionDecl(Kind DK, DeclContext *DC, SourceLocation L, - DeclarationName N, QualType T, TypeSourceInfo *TInfo, + FunctionDecl(Kind DK, DeclContext *DC, const DeclarationNameInfo &NameInfo, + QualType T, TypeSourceInfo *TInfo, StorageClass S, StorageClass SCAsWritten, bool isInline) - : DeclaratorDecl(DK, DC, L, N, T, TInfo), + : DeclaratorDecl(DK, DC, NameInfo.getLoc(), NameInfo.getName(), T, TInfo), DeclContext(DK), ParamInfo(0), Body(), SClass(S), SClassAsWritten(SCAsWritten), IsInline(isInline), @@ -1191,10 +1148,9 @@ protected: HasWrittenPrototype(true), IsDeleted(false), IsTrivial(false), IsCopyAssignment(false), HasImplicitReturnZero(false), - EndRangeLoc(L), TemplateOrSpecialization() {} - - virtual ~FunctionDecl() {} - virtual void Destroy(ASTContext& C); + EndRangeLoc(NameInfo.getEndLoc()), + TemplateOrSpecialization(), + DNLoc(NameInfo.getInfo()) {} typedef Redeclarable redeclarable_base; virtual FunctionDecl *getNextRedeclaration() { return RedeclLink.getNext(); } @@ -1211,11 +1167,27 @@ public: static FunctionDecl *Create(ASTContext &C, DeclContext *DC, SourceLocation L, DeclarationName N, QualType T, TypeSourceInfo *TInfo, - StorageClass S = None, - StorageClass SCAsWritten = None, + StorageClass S = SC_None, + StorageClass SCAsWritten = SC_None, + bool isInline = false, + bool hasWrittenPrototype = true) { + DeclarationNameInfo NameInfo(N, L); + return FunctionDecl::Create(C, DC, NameInfo, T, TInfo, S, SCAsWritten, + isInline, hasWrittenPrototype); + } + + static FunctionDecl *Create(ASTContext &C, DeclContext *DC, + const DeclarationNameInfo &NameInfo, + QualType T, TypeSourceInfo *TInfo, + StorageClass S = SC_None, + StorageClass SCAsWritten = SC_None, bool isInline = false, bool hasWrittenPrototype = true); + DeclarationNameInfo getNameInfo() const { + return DeclarationNameInfo(getDeclName(), getLocation(), DNLoc); + } + virtual void getNameForDiagnostic(std::string &S, const PrintingPolicy &Policy, bool Qualified) const; @@ -1245,7 +1217,7 @@ public: /// set that function declaration to the actual declaration /// containing the body (if there is one). /// NOTE: For checking if there is a body, use hasBody() instead, to avoid - /// unnecessary PCH de-serialization of the body. + /// unnecessary AST de-serialization of the body. Stmt *getBody(const FunctionDecl *&Definition) const; virtual Stmt *getBody() const { @@ -1389,12 +1361,18 @@ public: } StorageClass getStorageClass() const { return StorageClass(SClass); } - void setStorageClass(StorageClass SC) { SClass = SC; } + void setStorageClass(StorageClass SC) { + assert(isLegalForFunction(SC)); + SClass = SC; + } StorageClass getStorageClassAsWritten() const { return StorageClass(SClassAsWritten); } - void setStorageClassAsWritten(StorageClass SC) { SClassAsWritten = SC; } + void setStorageClassAsWritten(StorageClass SC) { + assert(isLegalForFunction(SC)); + SClassAsWritten = SC; + } /// \brief Determine whether the "inline" keyword was specified for this /// function. @@ -1632,8 +1610,8 @@ public: return static_cast(const_cast(DC)); } - friend class PCHDeclReader; - friend class PCHDeclWriter; + friend class ASTDeclReader; + friend class ASTDeclWriter; }; @@ -1705,7 +1683,6 @@ protected: const llvm::APSInt &V) : ValueDecl(EnumConstant, DC, L, Id, T), Init((Stmt*)E), Val(V) {} - virtual ~EnumConstantDecl() {} public: static EnumConstantDecl *Create(ASTContext &C, EnumDecl *DC, @@ -1713,8 +1690,6 @@ public: QualType T, Expr *E, const llvm::APSInt &V); - virtual void Destroy(ASTContext& C); - const Expr *getInitExpr() const { return (const Expr*) Init; } Expr *getInitExpr() { return (Expr*) Init; } const llvm::APSInt &getInitVal() const { return Val; } @@ -1722,6 +1697,8 @@ public: void setInitExpr(Expr *E) { Init = (Stmt*) E; } void setInitVal(const llvm::APSInt &V) { Val = V; } + SourceRange getSourceRange() const; + // Implement isa/cast/dyncast/etc. static bool classof(const Decl *D) { return classofKind(D->getKind()); } static bool classof(const EnumConstantDecl *D) { return true; } @@ -1770,8 +1747,6 @@ class TypedefDecl : public TypeDecl, public Redeclarable { IdentifierInfo *Id, TypeSourceInfo *TInfo) : TypeDecl(Typedef, DC, L, Id), TInfo(TInfo) {} - virtual ~TypedefDecl(); - protected: typedef Redeclarable redeclarable_base; virtual TypedefDecl *getNextRedeclaration() { return RedeclLink.getNext(); } @@ -1832,6 +1807,9 @@ private: /// it is a declaration ("struct foo;"). bool IsDefinition : 1; + /// IsBeingDefined - True if this is currently being defined. + bool IsBeingDefined : 1; + /// IsEmbeddedInDeclarator - True if this tag declaration is /// "embedded" (i.e., defined or declared for the very first time) /// in the syntax of a declarator. @@ -1873,6 +1851,7 @@ protected: "EnumDecl not matched with TTK_Enum"); TagDeclKind = TK; IsDefinition = false; + IsBeingDefined = false; IsEmbeddedInDeclarator = false; setPreviousDeclaration(PrevDecl); } @@ -1881,8 +1860,6 @@ protected: virtual TagDecl *getNextRedeclaration() { return RedeclLink.getNext(); } public: - void Destroy(ASTContext &C); - typedef redeclarable_base::redecl_iterator redecl_iterator; redecl_iterator redecls_begin() const { return redeclarable_base::redecls_begin(); @@ -1911,11 +1888,22 @@ public: return const_cast(this)->getCanonicalDecl(); } + /// isThisDeclarationADefinition() - Return true if this declaration + /// defines the type. Provided for consistency. + bool isThisDeclarationADefinition() const { + return isDefinition(); + } + /// isDefinition - Return true if this decl has its body specified. bool isDefinition() const { return IsDefinition; } + /// isBeingDefined - Return true if this decl is currently being defined. + bool isBeingDefined() const { + return IsBeingDefined; + } + bool isEmbeddedInDeclarator() const { return IsEmbeddedInDeclarator; } @@ -2003,8 +1991,8 @@ public: return static_cast(const_cast(DC)); } - friend class PCHDeclReader; - friend class PCHDeclWriter; + friend class ASTDeclReader; + friend class ASTDeclWriter; }; /// EnumDecl - Represents an enum. As an extension, we allow forward-declared @@ -2037,6 +2025,8 @@ class EnumDecl : public TagDecl { IdentifierInfo *Id, EnumDecl *PrevDecl, SourceLocation TKL) : TagDecl(Enum, TTK_Enum, DC, L, Id, PrevDecl, TKL), InstantiatedFrom(0) { IntegerType = QualType(); + NumNegativeBits = 0; + NumPositiveBits = 0; } public: EnumDecl *getCanonicalDecl() { @@ -2058,8 +2048,6 @@ public: SourceLocation TKL, EnumDecl *PrevDecl); static EnumDecl *Create(ASTContext &C, EmptyShell Empty); - virtual void Destroy(ASTContext& C); - /// completeDefinition - When created, the EnumDecl corresponds to a /// forward-declared enum. This method is used to mark the /// declaration as being defined; it's enumerators have already been @@ -2167,7 +2155,6 @@ protected: RecordDecl(Kind DK, TagKind TK, DeclContext *DC, SourceLocation L, IdentifierInfo *Id, RecordDecl *PrevDecl, SourceLocation TKL); - virtual ~RecordDecl(); public: static RecordDecl *Create(ASTContext &C, TagKind TK, DeclContext *DC, @@ -2183,8 +2170,6 @@ public: return cast_or_null(TagDecl::getPreviousDeclaration()); } - virtual void Destroy(ASTContext& C); - bool hasFlexibleArrayMember() const { return HasFlexibleArrayMember; } void setHasFlexibleArrayMember(bool V) { HasFlexibleArrayMember = V; } @@ -2307,9 +2292,6 @@ protected: IsVariadic(false), ParamInfo(0), NumParams(0), Body(0), SignatureAsWritten(0) {} - virtual ~BlockDecl(); - virtual void Destroy(ASTContext& C); - public: static BlockDecl *Create(ASTContext &C, DeclContext *DC, SourceLocation L); diff --git a/include/clang/AST/DeclBase.h b/include/clang/AST/DeclBase.h index be30b8ed296..1369c2b5955 100644 --- a/include/clang/AST/DeclBase.h +++ b/include/clang/AST/DeclBase.h @@ -222,11 +222,13 @@ protected: // NOTE: VC++ treats enums as signed, avoid using the AccessSpecifier enum unsigned Access : 2; friend class CXXClassMemberWrapper; - - // PCHLevel - the "level" of precompiled header/AST file from which this - // declaration was built. - unsigned PCHLevel : 3; - + + /// PCHLevel - the "level" of AST file from which this declaration was built. + unsigned PCHLevel : 2; + + /// ChangedAfterLoad - if this declaration has changed since being loaded + bool ChangedAfterLoad : 1; + /// IdentifierNamespace - This specifies what IDNS_* namespace this lives in. unsigned IdentifierNamespace : 15; @@ -243,7 +245,7 @@ protected: : NextDeclInContext(0), DeclCtx(DC), Loc(L), DeclKind(DK), InvalidDecl(0), HasAttrs(false), Implicit(false), Used(false), - Access(AS_none), PCHLevel(0), + Access(AS_none), PCHLevel(0), ChangedAfterLoad(false), IdentifierNamespace(getIdentifierNamespaceForKind(DK)) { if (Decl::CollectingStats()) add(DK); } @@ -251,7 +253,7 @@ protected: Decl(Kind DK, EmptyShell Empty) : NextDeclInContext(0), DeclKind(DK), InvalidDecl(0), HasAttrs(false), Implicit(false), Used(false), - Access(AS_none), PCHLevel(0), + Access(AS_none), PCHLevel(0), ChangedAfterLoad(false), IdentifierNamespace(getIdentifierNamespaceForKind(DK)) { if (Decl::CollectingStats()) add(DK); } @@ -305,24 +307,52 @@ public: } bool hasAttrs() const { return HasAttrs; } - void initAttrs(Attr *attrs); - void addAttr(Attr *attr); - const Attr *getAttrs() const { - if (!HasAttrs) return 0; // common case, no attributes. - return getAttrsImpl(); // Uncommon case, out of line hash lookup. + void setAttrs(const AttrVec& Attrs); + AttrVec& getAttrs() { + return const_cast(const_cast(this)->getAttrs()); } + const AttrVec &getAttrs() const; void swapAttrs(Decl *D); - void invalidateAttrs(); + void dropAttrs(); - 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; + void addAttr(Attr *A) { + if (hasAttrs()) + getAttrs().push_back(A); + else + setAttrs(AttrVec(1, A)); } + typedef AttrVec::const_iterator attr_iterator; + + // FIXME: Do not rely on iterators having comparable singular values. + // Note that this should error out if they do not. + attr_iterator attr_begin() const { + return hasAttrs() ? getAttrs().begin() : 0; + } + attr_iterator attr_end() const { + return hasAttrs() ? getAttrs().end() : 0; + } + + template + specific_attr_iterator specific_attr_begin() const { + return specific_attr_iterator(attr_begin()); + } + template + specific_attr_iterator specific_attr_end() const { + return specific_attr_iterator(attr_end()); + } + + template T *getAttr() const { + return hasAttrs() ? getSpecificAttr(getAttrs()) : 0; + } template bool hasAttr() const { - return getAttr() != 0; + return hasAttrs() && hasSpecificAttr(getAttrs()); + } + + /// getMaxAlignment - return the maximum alignment specified by attributes + /// on this decl, 0 if there are none. + unsigned getMaxAlignment() const { + return hasAttrs() ? getMaxAttrAlignment(getAttrs(), getASTContext()) : 0; } /// setInvalidDecl - Indicates the Decl had a semantic error. This @@ -343,22 +373,21 @@ public: /// (in addition to the "used" bit set by \c setUsed()) when determining /// whether the function is used. bool isUsed(bool CheckUsedAttr = true) const; - + void setUsed(bool U = true) { Used = U; } /// \brief Retrieve the level of precompiled header from which this /// declaration was generated. /// /// The PCH level of a declaration describes where the declaration originated - /// from. A PCH level of 0 indicates that the declaration was not from a - /// precompiled header. A PCH level of 1 indicates that the declaration was - /// from a top-level precompiled header; 2 indicates that the declaration - /// comes from a precompiled header on which the top-level precompiled header - /// depends, and so on. + /// from. A PCH level of 0 indicates that the declaration was parsed from + /// source. A PCH level of 1 indicates that the declaration was loaded from + /// a top-level AST file. A PCH level 2 indicates that the declaration was + /// loaded from a PCH file the AST file depends on, and so on. unsigned getPCHLevel() const { return PCHLevel; } /// \brief The maximum PCH level that any declaration may have. - static const unsigned MaxPCHLevel = 7; + static const unsigned MaxPCHLevel = 3; /// \brief Set the PCH level of this declaration. void setPCHLevel(unsigned Level) { @@ -366,6 +395,19 @@ public: PCHLevel = Level; } + /// \brief Query whether this declaration was changed in a significant way + /// since being loaded from an AST file. + /// + /// In an epic violation of layering, what is "significant" is entirely + /// up to the serialization system, but implemented in AST and Sema. + bool isChangedSinceDeserialization() const { return ChangedAfterLoad; } + + /// \brief Mark this declaration as having changed since deserialization, or + /// reset the flag. + void setChangedSinceDeserialization(bool Changed) { + ChangedAfterLoad = Changed; + } + unsigned getIdentifierNamespace() const { return IdentifierNamespace; } @@ -411,10 +453,10 @@ public: void setLexicalDeclContext(DeclContext *DC); - // isDefinedOutsideFunctionOrMethod - This predicate returns true if this - // scoped decl is defined outside the current function or method. This is - // roughly global variables and functions, but also handles enums (which could - // be defined inside or outside a function etc). + /// isDefinedOutsideFunctionOrMethod - This predicate returns true if this + /// scoped decl is defined outside the current function or method. This is + /// roughly global variables and functions, but also handles enums (which + /// could be defined inside or outside a function etc). bool isDefinedOutsideFunctionOrMethod() const; /// \brief Retrieves the "canonical" declaration of the given declaration. @@ -572,9 +614,6 @@ public: static DeclContext *castToDeclContext(const Decl *); static Decl *castFromDeclContext(const DeclContext *); - /// Destroy - Call destructors and release memory. - virtual void Destroy(ASTContext& C); - void print(llvm::raw_ostream &Out, unsigned Indentation = 0) const; void print(llvm::raw_ostream &Out, const PrintingPolicy &Policy, unsigned Indentation = 0) const; @@ -603,6 +642,29 @@ public: virtual void print(llvm::raw_ostream &OS) const; }; +class DeclContextLookupResult + : public std::pair { +public: + DeclContextLookupResult(NamedDecl **I, NamedDecl **E) + : std::pair(I, E) {} + DeclContextLookupResult() + : std::pair() {} + + using std::pair::operator=; +}; + +class DeclContextLookupConstResult + : public std::pair { +public: + DeclContextLookupConstResult(std::pair R) + : std::pair(R) {} + DeclContextLookupConstResult(NamedDecl * const *I, NamedDecl * const *E) + : std::pair(I, E) {} + DeclContextLookupConstResult() + : std::pair() {} + + using std::pair::operator=; +}; /// DeclContext - This is used only as base class of specific decl types that /// can act as declaration contexts. These decls are (only the top classes @@ -654,8 +716,6 @@ protected: ExternalVisibleStorage(false), LookupPtr(0), FirstDecl(0), LastDecl(0) { } - void DestroyDecls(ASTContext &C); - public: ~DeclContext(); @@ -724,6 +784,8 @@ public: return DeclKind == Decl::Namespace; } + bool isInlineNamespace() const; + /// \brief Determines whether this context is dependent on a /// template parameter. bool isDependentContext() const; @@ -742,19 +804,18 @@ public: /// Here, E is a transparent context, so its enumerator (Val1) will /// appear (semantically) that it is in the same context of E. /// Examples of transparent contexts include: enumerations (except for - /// C++0x scoped enums), C++ linkage specifications, and C++0x - /// inline namespaces. + /// C++0x scoped enums), and C++ linkage specifications. bool isTransparentContext() const; /// \brief Determine whether this declaration context is equivalent /// to the declaration context DC. - bool Equals(DeclContext *DC) { + bool Equals(const DeclContext *DC) const { return DC && this->getPrimaryContext() == DC->getPrimaryContext(); } /// \brief Determine whether this declaration context encloses the /// declaration context DC. - bool Encloses(DeclContext *DC); + bool Encloses(const DeclContext *DC) const; /// getPrimaryContext - There may be many different /// declarations of the same entity (including forward declarations @@ -767,13 +828,12 @@ public: return const_cast(this)->getPrimaryContext(); } - /// getLookupContext - Retrieve the innermost non-transparent - /// context of this context, which corresponds to the innermost - /// location from which name lookup can find the entities in this - /// context. - DeclContext *getLookupContext(); - const DeclContext *getLookupContext() const { - return const_cast(this)->getLookupContext(); + /// getRedeclContext - Retrieve the context in which an entity conflicts with + /// other entities of the same name, or where it is a redeclaration if the + /// two entities are compatible. This skips through transparent contexts. + DeclContext *getRedeclContext(); + const DeclContext *getRedeclContext() const { + return const_cast(this)->getRedeclContext(); } /// \brief Retrieve the nearest enclosing namespace context. @@ -782,6 +842,14 @@ public: return const_cast(this)->getEnclosingNamespaceContext(); } + /// \brief Test if this context is part of the enclosing namespace set of + /// the context NS, as defined in C++0x [namespace.def]p9. If either context + /// isn't a namespace, this is equivalent to Equals(). + /// + /// The enclosing namespace set of a namespace is the namespace and, if it is + /// inline, its enclosing namespace, recursively. + bool InEnclosingNamespaceSetOf(const DeclContext *NS) const; + /// getNextContext - If this is a DeclContext that may have other /// DeclContexts that are semantically connected but syntactically /// different, such as C++ namespaces, this routine retrieves the @@ -845,6 +913,12 @@ public: decl_iterator decls_end() const; bool decls_empty() const; + /// noload_decls_begin/end - Iterate over the declarations stored in this + /// context that are currently loaded; don't attempt to retrieve anything + /// from an external source. + decl_iterator noload_decls_begin() const; + decl_iterator noload_decls_end() const; + /// specific_decl_iterator - Iterates over a subrange of /// declarations stored in a DeclContext, providing only those that /// are of type SpecificDecl (or a class derived from it). This @@ -1020,9 +1094,8 @@ public: /// access to the results of lookup up a name within this context. typedef NamedDecl * const * lookup_const_iterator; - typedef std::pair lookup_result; - typedef std::pair - lookup_const_result; + typedef DeclContextLookupResult lookup_result; + typedef DeclContextLookupConstResult lookup_const_result; /// lookup - Find the declarations (if any) with the given Name in /// this context. Returns a range of iterators that contains all of @@ -1052,6 +1125,14 @@ public: /// the declaration chains. void makeDeclVisibleInContext(NamedDecl *D, bool Recoverable = true); + /// \brief Deserialize all the visible declarations from external storage. + /// + /// Name lookup deserializes visible declarations lazily, thus a DeclContext + /// may not have a complete name lookup table. This function deserializes + /// the rest of visible declarations from the external storage and completes + /// the name lookup table. + void MaterializeVisibleDeclsFromExternalStorage(); + /// udir_iterator - Iterates through the using-directives stored /// within this context. typedef UsingDirectiveDecl * const * udir_iterator; @@ -1109,7 +1190,6 @@ public: private: void LoadLexicalDeclsFromExternalStorage() const; - void LoadVisibleDeclsFromExternalStorage() const; friend class DependentDiagnostic; StoredDeclsMap *CreateStoredDeclsMap(ASTContext &C) const; @@ -1123,7 +1203,6 @@ inline bool Decl::isTemplateParameter() const { getKind() == TemplateTemplateParm; } - // Specialization selected when ToTy is not a known subclass of DeclContext. template ::value> diff --git a/include/clang/AST/DeclCXX.h b/include/clang/AST/DeclCXX.h index 41474ab21e3..a9802bfcaf4 100644 --- a/include/clang/AST/DeclCXX.h +++ b/include/clang/AST/DeclCXX.h @@ -17,6 +17,7 @@ #include "clang/AST/Expr.h" #include "clang/AST/Decl.h" +#include "clang/AST/TypeLoc.h" #include "clang/AST/UnresolvedSet.h" #include "llvm/ADT/SmallVector.h" #include "llvm/ADT/SmallPtrSet.h" @@ -159,7 +160,6 @@ class CXXBaseSpecifier { /// Range - The source code range that covers the full base /// specifier, including the "virtual" (if present) and access /// specifier (if present). - // FIXME: Move over to a TypeLoc! SourceRange Range; /// Virtual - Whether this is a virtual base class or not. @@ -177,15 +177,17 @@ class CXXBaseSpecifier { /// VC++ bug. unsigned Access : 2; - /// BaseType - The type of the base class. This will be a class or - /// struct (or a typedef of such). - QualType BaseType; + /// BaseTypeInfo - The type of the base class. This will be a class or struct + /// (or a typedef of such). The source code range does not include the + /// "virtual" or access specifier. + TypeSourceInfo *BaseTypeInfo; public: CXXBaseSpecifier() { } - CXXBaseSpecifier(SourceRange R, bool V, bool BC, AccessSpecifier A, QualType T) - : Range(R), Virtual(V), BaseOfClass(BC), Access(A), BaseType(T) { } + CXXBaseSpecifier(SourceRange R, bool V, bool BC, AccessSpecifier A, + TypeSourceInfo *TInfo) + : Range(R), Virtual(V), BaseOfClass(BC), Access(A), BaseTypeInfo(TInfo) { } /// getSourceRange - Retrieves the source range that contains the /// entire base specifier. @@ -195,7 +197,7 @@ public: /// class (or not). bool isVirtual() const { return Virtual; } - /// \brief Determine whether this base class if a base of a class declared + /// \brief Determine whether this base class is a base of a class declared /// with the 'class' keyword (vs. one declared with the 'struct' keyword). bool isBaseOfClass() const { return BaseOfClass; } @@ -221,7 +223,10 @@ public: /// getType - Retrieves the type of the base class. This type will /// always be an unqualified class type. - QualType getType() const { return BaseType; } + QualType getType() const { return BaseTypeInfo->getType(); } + + /// getTypeLoc - Retrieves the type and source location of the base class. + TypeSourceInfo *getTypeSourceInfo() const { return BaseTypeInfo; } }; /// CXXRecordDecl - Represents a C++ struct/union/class. @@ -400,8 +405,6 @@ protected: CXXRecordDecl *PrevDecl, SourceLocation TKL = SourceLocation()); - ~CXXRecordDecl(); - public: /// base_class_iterator - Iterator that traverses the base classes /// of a class. @@ -449,8 +452,6 @@ public: bool DelayTypeCreation = false); static CXXRecordDecl *Create(ASTContext &C, EmptyShell Empty); - virtual void Destroy(ASTContext& C); - bool isDynamicClass() const { return data().Polymorphic || data().NumVBases != 0; } @@ -1056,29 +1057,30 @@ public: return true; } - friend class PCHDeclReader; - friend class PCHDeclWriter; + friend class ASTDeclReader; + friend class ASTDeclWriter; }; /// CXXMethodDecl - Represents a static or instance method of a /// struct/union/class. class CXXMethodDecl : public FunctionDecl { protected: - CXXMethodDecl(Kind DK, CXXRecordDecl *RD, SourceLocation L, - DeclarationName N, QualType T, TypeSourceInfo *TInfo, + CXXMethodDecl(Kind DK, CXXRecordDecl *RD, + const DeclarationNameInfo &NameInfo, + QualType T, TypeSourceInfo *TInfo, bool isStatic, StorageClass SCAsWritten, bool isInline) - : FunctionDecl(DK, RD, L, N, T, TInfo, (isStatic ? Static : None), + : FunctionDecl(DK, RD, NameInfo, T, TInfo, (isStatic ? SC_Static : SC_None), SCAsWritten, isInline) {} public: static CXXMethodDecl *Create(ASTContext &C, CXXRecordDecl *RD, - SourceLocation L, DeclarationName N, - QualType T, TypeSourceInfo *TInfo, - bool isStatic = false, - StorageClass SCAsWritten = FunctionDecl::None, - bool isInline = false); + const DeclarationNameInfo &NameInfo, + QualType T, TypeSourceInfo *TInfo, + bool isStatic = false, + StorageClass SCAsWritten = SC_None, + bool isInline = false); - bool isStatic() const { return getStorageClass() == Static; } + bool isStatic() const { return getStorageClass() == SC_Static; } bool isInstance() const { return !isStatic(); } bool isVirtual() const { @@ -1249,9 +1251,6 @@ public: VarDecl **Indices, unsigned NumIndices); - /// \brief Destroy the base or member initializer. - void Destroy(ASTContext &Context); - /// isBaseInitializer - Returns true when this initializer is /// initializing a base class. bool isBaseInitializer() const { return BaseOrMember.is(); } @@ -1285,7 +1284,7 @@ public: /// getMember - If this is a member initializer, returns the /// declaration of the non-static data member being /// initialized. Otherwise, returns NULL. - FieldDecl *getMember() { + FieldDecl *getMember() const { if (isMemberInitializer()) return BaseOrMember.get(); else @@ -1363,7 +1362,7 @@ public: reinterpret_cast(this + 1)[I] = Index; } - Expr *getInit() { return static_cast(Init); } + Expr *getInit() const { return static_cast(Init); } }; /// CXXConstructorDecl - Represents a C++ constructor within a @@ -1394,22 +1393,21 @@ class CXXConstructorDecl : public CXXMethodDecl { CXXBaseOrMemberInitializer **BaseOrMemberInitializers; unsigned NumBaseOrMemberInitializers; - CXXConstructorDecl(CXXRecordDecl *RD, SourceLocation L, - DeclarationName N, QualType T, TypeSourceInfo *TInfo, + CXXConstructorDecl(CXXRecordDecl *RD, const DeclarationNameInfo &NameInfo, + QualType T, TypeSourceInfo *TInfo, bool isExplicitSpecified, bool isInline, bool isImplicitlyDeclared) - : CXXMethodDecl(CXXConstructor, RD, L, N, T, TInfo, false, - FunctionDecl::None, isInline), + : CXXMethodDecl(CXXConstructor, RD, NameInfo, T, TInfo, false, + SC_None, isInline), IsExplicitSpecified(isExplicitSpecified), ImplicitlyDefined(false), BaseOrMemberInitializers(0), NumBaseOrMemberInitializers(0) { setImplicit(isImplicitlyDeclared); } - virtual void Destroy(ASTContext& C); public: static CXXConstructorDecl *Create(ASTContext &C, EmptyShell Empty); static CXXConstructorDecl *Create(ASTContext &C, CXXRecordDecl *RD, - SourceLocation L, DeclarationName N, + const DeclarationNameInfo &NameInfo, QualType T, TypeSourceInfo *TInfo, bool isExplicit, bool isInline, bool isImplicitlyDeclared); @@ -1519,8 +1517,8 @@ public: static bool classof(const CXXConstructorDecl *D) { return true; } static bool classofKind(Kind K) { return K == CXXConstructor; } - friend class PCHDeclReader; - friend class PCHDeclWriter; + friend class ASTDeclReader; + friend class ASTDeclWriter; }; /// CXXDestructorDecl - Represents a C++ destructor within a @@ -1543,11 +1541,10 @@ class CXXDestructorDecl : public CXXMethodDecl { FunctionDecl *OperatorDelete; - CXXDestructorDecl(CXXRecordDecl *RD, SourceLocation L, - DeclarationName N, QualType T, - bool isInline, bool isImplicitlyDeclared) - : CXXMethodDecl(CXXDestructor, RD, L, N, T, /*TInfo=*/0, false, - FunctionDecl::None, isInline), + CXXDestructorDecl(CXXRecordDecl *RD, const DeclarationNameInfo &NameInfo, + QualType T, bool isInline, bool isImplicitlyDeclared) + : CXXMethodDecl(CXXDestructor, RD, NameInfo, T, /*TInfo=*/0, false, + SC_None, isInline), ImplicitlyDefined(false), OperatorDelete(0) { setImplicit(isImplicitlyDeclared); } @@ -1555,7 +1552,7 @@ class CXXDestructorDecl : public CXXMethodDecl { public: static CXXDestructorDecl *Create(ASTContext& C, EmptyShell Empty); static CXXDestructorDecl *Create(ASTContext &C, CXXRecordDecl *RD, - SourceLocation L, DeclarationName N, + const DeclarationNameInfo &NameInfo, QualType T, bool isInline, bool isImplicitlyDeclared); @@ -1585,8 +1582,8 @@ public: static bool classof(const CXXDestructorDecl *D) { return true; } static bool classofKind(Kind K) { return K == CXXDestructor; } - friend class PCHDeclReader; - friend class PCHDeclWriter; + friend class ASTDeclReader; + friend class ASTDeclWriter; }; /// CXXConversionDecl - Represents a C++ conversion function within a @@ -1604,17 +1601,17 @@ class CXXConversionDecl : public CXXMethodDecl { /// explicitly wrote a cast. This is a C++0x feature. bool IsExplicitSpecified : 1; - CXXConversionDecl(CXXRecordDecl *RD, SourceLocation L, - DeclarationName N, QualType T, TypeSourceInfo *TInfo, + CXXConversionDecl(CXXRecordDecl *RD, const DeclarationNameInfo &NameInfo, + QualType T, TypeSourceInfo *TInfo, bool isInline, bool isExplicitSpecified) - : CXXMethodDecl(CXXConversion, RD, L, N, T, TInfo, false, - FunctionDecl::None, isInline), + : CXXMethodDecl(CXXConversion, RD, NameInfo, T, TInfo, false, + SC_None, isInline), IsExplicitSpecified(isExplicitSpecified) { } public: static CXXConversionDecl *Create(ASTContext &C, EmptyShell Empty); static CXXConversionDecl *Create(ASTContext &C, CXXRecordDecl *RD, - SourceLocation L, DeclarationName N, + const DeclarationNameInfo &NameInfo, QualType T, TypeSourceInfo *TInfo, bool isInline, bool isExplicit); @@ -1642,8 +1639,8 @@ public: static bool classof(const CXXConversionDecl *D) { return true; } static bool classofKind(Kind K) { return K == CXXConversion; } - friend class PCHDeclReader; - friend class PCHDeclWriter; + friend class ASTDeclReader; + friend class ASTDeclWriter; }; /// LinkageSpecDecl - This represents a linkage specification. For example: @@ -1710,7 +1707,9 @@ public: // artificial name, for all using-directives in order to store // them in DeclContext effectively. class UsingDirectiveDecl : public NamedDecl { - + /// \brief The location of the "using" keyword. + SourceLocation UsingLoc; + /// SourceLocation - Location of 'namespace' token. SourceLocation NamespaceLoc; @@ -1722,10 +1721,6 @@ class UsingDirectiveDecl : public NamedDecl { /// name, if any. NestedNameSpecifier *Qualifier; - /// IdentLoc - Location of nominated namespace-name identifier. - // FIXME: We don't store location of scope specifier. - SourceLocation IdentLoc; - /// NominatedNamespace - Namespace nominated by using-directive. NamedDecl *NominatedNamespace; @@ -1740,17 +1735,16 @@ class UsingDirectiveDecl : public NamedDecl { return DeclarationName::getUsingDirectiveName(); } - UsingDirectiveDecl(DeclContext *DC, SourceLocation L, + UsingDirectiveDecl(DeclContext *DC, SourceLocation UsingLoc, SourceLocation NamespcLoc, SourceRange QualifierRange, NestedNameSpecifier *Qualifier, SourceLocation IdentLoc, NamedDecl *Nominated, DeclContext *CommonAncestor) - : NamedDecl(UsingDirective, DC, L, getName()), + : NamedDecl(UsingDirective, DC, IdentLoc, getName()), UsingLoc(UsingLoc), NamespaceLoc(NamespcLoc), QualifierRange(QualifierRange), - Qualifier(Qualifier), IdentLoc(IdentLoc), - NominatedNamespace(Nominated), + Qualifier(Qualifier), NominatedNamespace(Nominated), CommonAncestor(CommonAncestor) { } @@ -1759,18 +1753,10 @@ public: /// that qualifies the namespace name. SourceRange getQualifierRange() const { return QualifierRange; } - /// \brief Set the source range of the nested-name-specifier that - /// qualifies the namespace name. - void setQualifierRange(SourceRange R) { QualifierRange = R; } - /// \brief Retrieve the nested-name-specifier that qualifies the /// name of the namespace. NestedNameSpecifier *getQualifier() const { return Qualifier; } - /// \brief Set the nested-name-specifier that qualifes the name of the - /// namespace. - void setQualifier(NestedNameSpecifier *NNS) { Qualifier = NNS; } - NamedDecl *getNominatedNamespaceAsWritten() { return NominatedNamespace; } const NamedDecl *getNominatedNamespaceAsWritten() const { return NominatedNamespace; @@ -1783,34 +1769,23 @@ public: return const_cast(this)->getNominatedNamespace(); } - /// setNominatedNamespace - Set the namespace nominataed by the - /// using-directive. - void setNominatedNamespace(NamedDecl* NS); - /// \brief Returns the common ancestor context of this using-directive and /// its nominated namespace. DeclContext *getCommonAncestor() { return CommonAncestor; } const DeclContext *getCommonAncestor() const { return CommonAncestor; } - /// \brief Set the common ancestor context of this using-directive and its - /// nominated namespace. - void setCommonAncestor(DeclContext* Cxt) { CommonAncestor = Cxt; } - + /// \brief Return the location of the "using" keyword. + SourceLocation getUsingLoc() const { return UsingLoc; } + // FIXME: Could omit 'Key' in name. /// getNamespaceKeyLocation - Returns location of namespace keyword. SourceLocation getNamespaceKeyLocation() const { return NamespaceLoc; } - /// setNamespaceKeyLocation - Set the the location of the namespacekeyword. - void setNamespaceKeyLocation(SourceLocation L) { NamespaceLoc = L; } - /// getIdentLocation - Returns location of identifier. - SourceLocation getIdentLocation() const { return IdentLoc; } - - /// setIdentLocation - set the location of the identifier. - void setIdentLocation(SourceLocation L) { IdentLoc = L; } + SourceLocation getIdentLocation() const { return getLocation(); } static UsingDirectiveDecl *Create(ASTContext &C, DeclContext *DC, - SourceLocation L, + SourceLocation UsingLoc, SourceLocation NamespaceLoc, SourceRange QualifierRange, NestedNameSpecifier *Qualifier, @@ -1818,12 +1793,18 @@ public: NamedDecl *Nominated, DeclContext *CommonAncestor); + SourceRange getSourceRange() const { + return SourceRange(UsingLoc, getLocation()); + } + static bool classof(const Decl *D) { return classofKind(D->getKind()); } static bool classof(const UsingDirectiveDecl *D) { return true; } static bool classofKind(Kind K) { return K == UsingDirective; } // Friend for getUsingDirectiveName. friend class DeclContext; + + friend class ASTDeclReader; }; /// NamespaceAliasDecl - Represents a C++ namespace alias. For example: @@ -1832,7 +1813,8 @@ public: /// namespace Foo = Bar; /// @endcode class NamespaceAliasDecl : public NamedDecl { - SourceLocation AliasLoc; + /// \brief The location of the "namespace" keyword. + SourceLocation NamespaceLoc; /// \brief The source range that covers the nested-name-specifier /// preceding the namespace name. @@ -1849,15 +1831,17 @@ class NamespaceAliasDecl : public NamedDecl { /// NamespaceDecl or a NamespaceAliasDecl. NamedDecl *Namespace; - NamespaceAliasDecl(DeclContext *DC, SourceLocation L, + NamespaceAliasDecl(DeclContext *DC, SourceLocation NamespaceLoc, SourceLocation AliasLoc, IdentifierInfo *Alias, SourceRange QualifierRange, NestedNameSpecifier *Qualifier, SourceLocation IdentLoc, NamedDecl *Namespace) - : NamedDecl(NamespaceAlias, DC, L, Alias), AliasLoc(AliasLoc), - QualifierRange(QualifierRange), Qualifier(Qualifier), - IdentLoc(IdentLoc), Namespace(Namespace) { } + : NamedDecl(NamespaceAlias, DC, AliasLoc, Alias), + NamespaceLoc(NamespaceLoc), QualifierRange(QualifierRange), + Qualifier(Qualifier), IdentLoc(IdentLoc), Namespace(Namespace) { } + friend class ASTDeclReader; + public: /// \brief Retrieve the source range of the nested-name-specifier /// that qualifiers the namespace name. @@ -1889,41 +1873,31 @@ public: /// Returns the location of the alias name, i.e. 'foo' in /// "namespace foo = ns::bar;". - SourceLocation getAliasLoc() const { return AliasLoc; } - - /// Set the location o;f the alias name, e.e., 'foo' in - /// "namespace foo = ns::bar;". - void setAliasLoc(SourceLocation L) { AliasLoc = L; } + SourceLocation getAliasLoc() const { return getLocation(); } /// Returns the location of the 'namespace' keyword. - SourceLocation getNamespaceLoc() const { return getLocation(); } + SourceLocation getNamespaceLoc() const { return NamespaceLoc; } /// Returns the location of the identifier in the named namespace. SourceLocation getTargetNameLoc() const { return IdentLoc; } - /// Set the location of the identifier in the named namespace. - void setTargetNameLoc(SourceLocation L) { IdentLoc = L; } - /// \brief Retrieve the namespace that this alias refers to, which /// may either be a NamespaceDecl or a NamespaceAliasDecl. NamedDecl *getAliasedNamespace() const { return Namespace; } - /// \brief Set the namespace or namespace alias pointed to by this - /// alias decl. - void setAliasedNamespace(NamedDecl *ND) { - assert((isa(ND) || isa(ND)) && - "expecting namespace or namespace alias decl"); - Namespace = ND; - } - static NamespaceAliasDecl *Create(ASTContext &C, DeclContext *DC, - SourceLocation L, SourceLocation AliasLoc, + SourceLocation NamespaceLoc, + SourceLocation AliasLoc, IdentifierInfo *Alias, SourceRange QualifierRange, NestedNameSpecifier *Qualifier, SourceLocation IdentLoc, NamedDecl *Namespace); + virtual SourceRange getSourceRange() const { + return SourceRange(NamespaceLoc, IdentLoc); + } + static bool classof(const Decl *D) { return classofKind(D->getKind()); } static bool classof(const NamespaceAliasDecl *D) { return true; } static bool classofKind(Kind K) { return K == NamespaceAlias; } @@ -2002,6 +1976,10 @@ class UsingDecl : public NamedDecl { /// \brief Target nested name specifier. NestedNameSpecifier* TargetNestedName; + /// DNLoc - Provides source/type location info for the + /// declaration name embedded in the ValueDecl base class. + DeclarationNameLoc DNLoc; + /// \brief The collection of shadow declarations associated with /// this using declaration. This set can change as a class is /// processed. @@ -2010,34 +1988,31 @@ class UsingDecl : public NamedDecl { // \brief Has 'typename' keyword. bool IsTypeName; - UsingDecl(DeclContext *DC, SourceLocation L, SourceRange NNR, + UsingDecl(DeclContext *DC, SourceRange NNR, SourceLocation UL, NestedNameSpecifier* TargetNNS, - DeclarationName Name, bool IsTypeNameArg) - : NamedDecl(Using, DC, L, Name), + const DeclarationNameInfo &NameInfo, bool IsTypeNameArg) + : NamedDecl(Using, DC, NameInfo.getLoc(), NameInfo.getName()), NestedNameRange(NNR), UsingLocation(UL), TargetNestedName(TargetNNS), - IsTypeName(IsTypeNameArg) { + DNLoc(NameInfo.getInfo()), IsTypeName(IsTypeNameArg) { } public: - // FIXME: Should be const? /// \brief Returns the source range that covers the nested-name-specifier /// preceding the namespace name. - SourceRange getNestedNameRange() { return NestedNameRange; } + SourceRange getNestedNameRange() const { return NestedNameRange; } /// \brief Set the source range of the nested-name-specifier. void setNestedNameRange(SourceRange R) { NestedNameRange = R; } - // FIXME; Should be const? // FIXME: Naming is inconsistent with other get*Loc functions. /// \brief Returns the source location of the "using" keyword. - SourceLocation getUsingLocation() { return UsingLocation; } + SourceLocation getUsingLocation() const { return UsingLocation; } /// \brief Set the source location of the 'using' keyword. void setUsingLocation(SourceLocation L) { UsingLocation = L; } - /// \brief Get the target nested name declaration. - NestedNameSpecifier* getTargetNestedNameDecl() { + NestedNameSpecifier* getTargetNestedNameDecl() const { return TargetNestedName; } @@ -2046,6 +2021,10 @@ public: TargetNestedName = NNS; } + DeclarationNameInfo getNameInfo() const { + return DeclarationNameInfo(getDeclName(), getLocation(), DNLoc); + } + /// \brief Return true if the using declaration has 'typename'. bool isTypeName() const { return IsTypeName; } @@ -2076,15 +2055,21 @@ public: } static UsingDecl *Create(ASTContext &C, DeclContext *DC, - SourceLocation IdentL, SourceRange NNR, SourceLocation UsingL, - NestedNameSpecifier* TargetNNS, DeclarationName Name, bool IsTypeNameArg); + SourceRange NNR, SourceLocation UsingL, + NestedNameSpecifier* TargetNNS, + const DeclarationNameInfo &NameInfo, + bool IsTypeNameArg); + + SourceRange getSourceRange() const { + return SourceRange(UsingLocation, getNameInfo().getEndLoc()); + } static bool classof(const Decl *D) { return classofKind(D->getKind()); } static bool classof(const UsingDecl *D) { return true; } static bool classofKind(Kind K) { return K == Using; } - friend class PCHDeclReader; - friend class PCHDeclWriter; + friend class ASTDeclReader; + friend class ASTDeclWriter; }; /// UnresolvedUsingValueDecl - Represents a dependent using @@ -2105,14 +2090,18 @@ class UnresolvedUsingValueDecl : public ValueDecl { NestedNameSpecifier *TargetNestedNameSpecifier; + /// DNLoc - Provides source/type location info for the + /// declaration name embedded in the ValueDecl base class. + DeclarationNameLoc DNLoc; + UnresolvedUsingValueDecl(DeclContext *DC, QualType Ty, SourceLocation UsingLoc, SourceRange TargetNNR, NestedNameSpecifier *TargetNNS, - SourceLocation TargetNameLoc, - DeclarationName TargetName) - : ValueDecl(UnresolvedUsingValue, DC, TargetNameLoc, TargetName, Ty), - TargetNestedNameRange(TargetNNR), UsingLocation(UsingLoc), - TargetNestedNameSpecifier(TargetNNS) + const DeclarationNameInfo &NameInfo) + : ValueDecl(UnresolvedUsingValue, DC, + NameInfo.getLoc(), NameInfo.getName(), Ty), + TargetNestedNameRange(TargetNNR), UsingLocation(UsingLoc), + TargetNestedNameSpecifier(TargetNNS), DNLoc(NameInfo.getInfo()) { } public: @@ -2125,7 +2114,7 @@ public: void setTargetNestedNameRange(SourceRange R) { TargetNestedNameRange = R; } /// \brief Get target nested name declaration. - NestedNameSpecifier* getTargetNestedNameSpecifier() { + NestedNameSpecifier* getTargetNestedNameSpecifier() const { return TargetNestedNameSpecifier; } @@ -2140,10 +2129,18 @@ public: /// \brief Set the source location of the 'using' keyword. void setUsingLoc(SourceLocation L) { UsingLocation = L; } + DeclarationNameInfo getNameInfo() const { + return DeclarationNameInfo(getDeclName(), getLocation(), DNLoc); + } + static UnresolvedUsingValueDecl * Create(ASTContext &C, DeclContext *DC, SourceLocation UsingLoc, SourceRange TargetNNR, NestedNameSpecifier *TargetNNS, - SourceLocation TargetNameLoc, DeclarationName TargetName); + const DeclarationNameInfo &NameInfo); + + SourceRange getSourceRange() const { + return SourceRange(UsingLocation, getNameInfo().getEndLoc()); + } static bool classof(const Decl *D) { return classofKind(D->getKind()); } static bool classof(const UnresolvedUsingValueDecl *D) { return true; } @@ -2181,43 +2178,34 @@ class UnresolvedUsingTypenameDecl : public TypeDecl { TypenameLocation(TypenameLoc), TargetNestedNameSpecifier(TargetNNS) { } + friend class ASTDeclReader; + public: /// \brief Returns the source range that covers the nested-name-specifier /// preceding the namespace name. SourceRange getTargetNestedNameRange() const { return TargetNestedNameRange; } - /// \brief Set the source range coverting the nested-name-specifier preceding - /// the namespace name. - void setTargetNestedNameRange(SourceRange R) { TargetNestedNameRange = R; } - /// \brief Get target nested name declaration. NestedNameSpecifier* getTargetNestedNameSpecifier() { return TargetNestedNameSpecifier; } - /// \brief Set the nested name declaration. - void setTargetNestedNameSpecifier(NestedNameSpecifier* NNS) { - TargetNestedNameSpecifier = NNS; - } - /// \brief Returns the source location of the 'using' keyword. SourceLocation getUsingLoc() const { return UsingLocation; } - /// \brief Set the source location of the 'using' keyword. - void setUsingLoc(SourceLocation L) { UsingLocation = L; } - /// \brief Returns the source location of the 'typename' keyword. SourceLocation getTypenameLoc() const { return TypenameLocation; } - /// \brief Set the source location of the 'typename' keyword. - void setTypenameLoc(SourceLocation L) { TypenameLocation = L; } - static UnresolvedUsingTypenameDecl * Create(ASTContext &C, DeclContext *DC, SourceLocation UsingLoc, SourceLocation TypenameLoc, SourceRange TargetNNR, NestedNameSpecifier *TargetNNS, SourceLocation TargetNameLoc, DeclarationName TargetName); + SourceRange getSourceRange() const { + return SourceRange(UsingLocation, getLocation()); + } + static bool classof(const Decl *D) { return classofKind(D->getKind()); } static bool classof(const UnresolvedUsingTypenameDecl *D) { return true; } static bool classofKind(Kind K) { return K == UnresolvedUsingTypename; } @@ -2243,12 +2231,11 @@ public: StringLiteral *getMessage() { return Message; } const StringLiteral *getMessage() const { return Message; } - virtual ~StaticAssertDecl(); - virtual void Destroy(ASTContext& C); - static bool classof(const Decl *D) { return classofKind(D->getKind()); } static bool classof(StaticAssertDecl *D) { return true; } static bool classofKind(Kind K) { return K == StaticAssert; } + + friend class ASTDeclReader; }; /// Insertion operator for diagnostics. This allows sending AccessSpecifier's diff --git a/include/clang/AST/DeclContextInternals.h b/include/clang/AST/DeclContextInternals.h index 9602b677fca..97da6ca9a1e 100644 --- a/include/clang/AST/DeclContextInternals.h +++ b/include/clang/AST/DeclContextInternals.h @@ -29,108 +29,54 @@ class DependentDiagnostic; /// StoredDeclsList - This is an array of decls optimized a common case of only /// containing one entry. struct StoredDeclsList { - /// The kind of data encoded in this list. - enum DataKind { - /// \brief The data is a NamedDecl*. - DK_Decl = 0, - /// \brief The data is a declaration ID (an unsigned value), - /// shifted left by 2 bits. - DK_DeclID = 1, - /// \brief The data is a pointer to a vector (of type VectorTy) - /// that contains declarations. - DK_Decl_Vector = 2, - /// \brief The data is a pointer to a vector (of type VectorTy) - /// that contains declaration ID. - DK_ID_Vector = 3 - }; - /// VectorTy - When in vector form, this is what the Data pointer points to. - typedef llvm::SmallVector VectorTy; + /// DeclsTy - When in vector form, this is what the Data pointer points to. + typedef llvm::SmallVector DeclsTy; - /// \brief The stored data, which will be either a declaration ID, a - /// pointer to a NamedDecl, or a pointer to a vector. - uintptr_t Data; + /// \brief The stored data, which will be either a pointer to a NamedDecl, + /// or a pointer to a vector. + llvm::PointerUnion Data; public: - StoredDeclsList() : Data(0) {} + StoredDeclsList() {} StoredDeclsList(const StoredDeclsList &RHS) : Data(RHS.Data) { - if (VectorTy *RHSVec = RHS.getAsVector()) { - VectorTy *New = new VectorTy(*RHSVec); - Data = reinterpret_cast(New) | (Data & 0x03); - } + if (DeclsTy *RHSVec = RHS.getAsVector()) + Data = new DeclsTy(*RHSVec); } ~StoredDeclsList() { // If this is a vector-form, free the vector. - if (VectorTy *Vector = getAsVector()) + if (DeclsTy *Vector = getAsVector()) delete Vector; } StoredDeclsList &operator=(const StoredDeclsList &RHS) { - if (VectorTy *Vector = getAsVector()) + if (DeclsTy *Vector = getAsVector()) delete Vector; Data = RHS.Data; - if (VectorTy *RHSVec = RHS.getAsVector()) { - VectorTy *New = new VectorTy(*RHSVec); - Data = reinterpret_cast(New) | (Data & 0x03); - } + if (DeclsTy *RHSVec = RHS.getAsVector()) + Data = new DeclsTy(*RHSVec); return *this; } - bool isNull() const { return (Data & ~0x03) == 0; } + bool isNull() const { return Data.isNull(); } NamedDecl *getAsDecl() const { - if ((Data & 0x03) != DK_Decl) - return 0; - - return reinterpret_cast(Data & ~0x03); + return Data.dyn_cast(); } - VectorTy *getAsVector() const { - if ((Data & 0x03) != DK_ID_Vector && (Data & 0x03) != DK_Decl_Vector) - return 0; - - return reinterpret_cast(Data & ~0x03); + DeclsTy *getAsVector() const { + return Data.dyn_cast(); } void setOnlyValue(NamedDecl *ND) { assert(!getAsVector() && "Not inline"); - Data = reinterpret_cast(ND); - } - - void setFromDeclIDs(const llvm::SmallVectorImpl &Vec) { - if (Vec.size() > 1) { - VectorTy *Vector = getAsVector(); - if (!Vector) { - Vector = new VectorTy; - Data = reinterpret_cast(Vector) | DK_ID_Vector; - } - - Vector->resize(Vec.size()); - std::copy(Vec.begin(), Vec.end(), Vector->begin()); - return; - } - - if (VectorTy *Vector = getAsVector()) - delete Vector; - - if (Vec.empty()) - Data = 0; - else - Data = (Vec[0] << 2) | DK_DeclID; - } - - /// \brief Force the stored declarations list to contain actual - /// declarations. - /// - /// This routine will resolve any declaration IDs for declarations - /// that may not yet have been loaded from external storage. - void materializeDecls(ASTContext &Context); - - bool hasDeclarationIDs() const { - DataKind DK = (DataKind)(Data & 0x03); - return DK == DK_DeclID || DK == DK_ID_Vector; + Data = ND; + // Make sure that Data is a plain NamedDecl* so we can use its address + // at getLookupResult. + assert(*(NamedDecl **)&Data == ND && + "PointerUnion mangles the NamedDecl pointer!"); } void remove(NamedDecl *D) { @@ -138,30 +84,26 @@ public: if (NamedDecl *Singleton = getAsDecl()) { assert(Singleton == D && "list is different singleton"); (void)Singleton; - Data = 0; + Data = (NamedDecl *)0; return; } - VectorTy &Vec = *getAsVector(); - VectorTy::iterator I = std::find(Vec.begin(), Vec.end(), - reinterpret_cast(D)); + DeclsTy &Vec = *getAsVector(); + DeclsTy::iterator I = std::find(Vec.begin(), Vec.end(), D); assert(I != Vec.end() && "list does not contain decl"); Vec.erase(I); - assert(std::find(Vec.begin(), Vec.end(), reinterpret_cast(D)) + assert(std::find(Vec.begin(), Vec.end(), D) == Vec.end() && "list still contains decl"); } /// getLookupResult - Return an array of all the decls that this list /// represents. - DeclContext::lookup_result getLookupResult(ASTContext &Context) { + DeclContext::lookup_result getLookupResult() { if (isNull()) return DeclContext::lookup_result(DeclContext::lookup_iterator(0), DeclContext::lookup_iterator(0)); - if (hasDeclarationIDs()) - materializeDecls(Context); - // If we have a single NamedDecl, return it. if (getAsDecl()) { assert(!isNull() && "Empty list isn't allowed"); @@ -172,19 +114,15 @@ public: } assert(getAsVector() && "Must have a vector at this point"); - VectorTy &Vector = *getAsVector(); + DeclsTy &Vector = *getAsVector(); // Otherwise, we have a range result. - return DeclContext::lookup_result((NamedDecl **)&Vector[0], - (NamedDecl **)&Vector[0]+Vector.size()); + return DeclContext::lookup_result(&Vector[0], &Vector[0]+Vector.size()); } /// HandleRedeclaration - If this is a redeclaration of an existing decl, /// replace the old one with D and return true. Otherwise return false. - bool HandleRedeclaration(ASTContext &Context, NamedDecl *D) { - if (hasDeclarationIDs()) - materializeDecls(Context); - + bool HandleRedeclaration(NamedDecl *D) { // Most decls only have one entry in their list, special case it. if (NamedDecl *OldD = getAsDecl()) { if (!D->declarationReplaces(OldD)) @@ -194,12 +132,12 @@ public: } // Determine if this declaration is actually a redeclaration. - VectorTy &Vec = *getAsVector(); - for (VectorTy::iterator OD = Vec.begin(), ODEnd = Vec.end(); + DeclsTy &Vec = *getAsVector(); + for (DeclsTy::iterator OD = Vec.begin(), ODEnd = Vec.end(); OD != ODEnd; ++OD) { - NamedDecl *OldD = reinterpret_cast(*OD); + NamedDecl *OldD = *OD; if (D->declarationReplaces(OldD)) { - *OD = reinterpret_cast(D); + *OD = D; return true; } } @@ -211,17 +149,15 @@ public: /// not a redeclaration to merge it into the appropriate place in our list. /// void AddSubsequentDecl(NamedDecl *D) { - assert(!hasDeclarationIDs() && "Must materialize before adding decls"); - // If this is the second decl added to the list, convert this to vector // form. if (NamedDecl *OldD = getAsDecl()) { - VectorTy *VT = new VectorTy(); - VT->push_back(reinterpret_cast(OldD)); - Data = reinterpret_cast(VT) | DK_Decl_Vector; + DeclsTy *VT = new DeclsTy(); + VT->push_back(OldD); + Data = VT; } - VectorTy &Vec = *getAsVector(); + DeclsTy &Vec = *getAsVector(); // Using directives end up in a special entry which contains only // other using directives, so all this logic is wasted for them. @@ -232,32 +168,30 @@ public: // iterator which points at the first tag will start a span of // decls that only contains tags. if (D->hasTagIdentifierNamespace()) - Vec.push_back(reinterpret_cast(D)); + Vec.push_back(D); // Resolved using declarations go at the front of the list so that // they won't show up in other lookup results. Unresolved using // declarations (which are always in IDNS_Using | IDNS_Ordinary) // follow that so that the using declarations will be contiguous. else if (D->getIdentifierNamespace() & Decl::IDNS_Using) { - VectorTy::iterator I = Vec.begin(); + DeclsTy::iterator I = Vec.begin(); if (D->getIdentifierNamespace() != Decl::IDNS_Using) { while (I != Vec.end() && - reinterpret_cast(*I) - ->getIdentifierNamespace() == Decl::IDNS_Using) + (*I)->getIdentifierNamespace() == Decl::IDNS_Using) ++I; } - Vec.insert(I, reinterpret_cast(D)); + Vec.insert(I, D); // All other declarations go at the end of the list, but before any // tag declarations. But we can be clever about tag declarations // because there can only ever be one in a scope. - } else if (reinterpret_cast(Vec.back()) - ->hasTagIdentifierNamespace()) { - uintptr_t TagD = Vec.back(); - Vec.back() = reinterpret_cast(D); + } else if (Vec.back()->hasTagIdentifierNamespace()) { + NamedDecl *TagD = Vec.back(); + Vec.back() = D; Vec.push_back(TagD); } else - Vec.push_back(reinterpret_cast(D)); + Vec.push_back(D); } }; diff --git a/include/clang/AST/DeclFriend.h b/include/clang/AST/DeclFriend.h index 2807d16379a..4b5e6fd48bb 100644 --- a/include/clang/AST/DeclFriend.h +++ b/include/clang/AST/DeclFriend.h @@ -68,16 +68,16 @@ public: SourceLocation FriendL); static FriendDecl *Create(ASTContext &C, EmptyShell Empty); - /// If this friend declaration names an (untemplated but - /// possibly dependent) type, return the type; otherwise - /// return null. This is used only for C++0x's unelaborated - /// friend type declarations. + /// If this friend declaration names an (untemplated but possibly + /// dependent) type, return the type; otherwise return null. This + /// is used for elaborated-type-specifiers and, in C++0x, for + /// arbitrary friend type declarations. TypeSourceInfo *getFriendType() const { return Friend.dyn_cast(); } - /// If this friend declaration doesn't name an unelaborated - /// type, return the inner declaration. + /// If this friend declaration doesn't name a type, return the inner + /// declaration. NamedDecl *getFriendDecl() const { return Friend.dyn_cast(); } @@ -92,8 +92,8 @@ public: static bool classof(const FriendDecl *D) { return true; } static bool classofKind(Kind K) { return K == Decl::Friend; } - friend class PCHDeclReader; - friend class PCHDeclWriter; + friend class ASTDeclReader; + friend class ASTDeclWriter; }; /// An iterator over the friend declarations of a class. diff --git a/include/clang/AST/DeclGroup.h b/include/clang/AST/DeclGroup.h index e1fae8f2ae6..030291ea734 100644 --- a/include/clang/AST/DeclGroup.h +++ b/include/clang/AST/DeclGroup.h @@ -34,7 +34,6 @@ private: public: static DeclGroup *Create(ASTContext &C, Decl **Decls, unsigned NumDecls); - void Destroy(ASTContext& C); unsigned size() const { return NumDecls; } diff --git a/include/clang/AST/DeclObjC.h b/include/clang/AST/DeclObjC.h index 30f63d89595..ad26748e134 100644 --- a/include/clang/AST/DeclObjC.h +++ b/include/clang/AST/DeclObjC.h @@ -21,7 +21,6 @@ namespace clang { class Expr; class Stmt; class FunctionDecl; -class AttributeList; class RecordDecl; class ObjCIvarDecl; class ObjCMethodDecl; @@ -41,12 +40,6 @@ protected: public: ObjCListBase() : List(0), NumElts(0) {} - ~ObjCListBase() { - assert(List == 0 && "Destroy should have been called before dtor"); - } - - void Destroy(ASTContext &Ctx); - unsigned size() const { return NumElts; } bool empty() const { return NumElts == 0; } @@ -92,7 +85,6 @@ public: void set(ObjCProtocolDecl* const* InList, unsigned Elts, const SourceLocation *Locs, ASTContext &Ctx); - void Destroy(ASTContext &Ctx); }; @@ -128,6 +120,9 @@ private: // Synthesized declaration method for a property setter/getter bool IsSynthesized : 1; + + // Method has a definition. + bool IsDefined : 1; // NOTE: VC++ treats enums as signed, avoid using ImplementationControl enum /// @required/@optional @@ -171,29 +166,25 @@ private: bool isInstance = true, bool isVariadic = false, bool isSynthesized = false, + bool isDefined = false, ImplementationControl impControl = None, unsigned numSelectorArgs = 0) : NamedDecl(ObjCMethod, contextDecl, beginLoc, SelInfo), DeclContext(ObjCMethod), IsInstance(isInstance), IsVariadic(isVariadic), IsSynthesized(isSynthesized), + IsDefined(isDefined), DeclImplementation(impControl), objcDeclQualifier(OBJC_TQ_None), NumSelectorArgs(numSelectorArgs), MethodDeclType(T), ResultTInfo(ResultTInfo), EndLoc(endLoc), Body(0), SelfDecl(0), CmdDecl(0) {} - virtual ~ObjCMethodDecl() {} - /// \brief A definition will return its interface declaration. /// An interface declaration will return its definition. /// Otherwise it will return itself. virtual ObjCMethodDecl *getNextRedeclaration(); public: - - /// Destroy - Call destructors and release memory. - virtual void Destroy(ASTContext& C); - static ObjCMethodDecl *Create(ASTContext &C, SourceLocation beginLoc, SourceLocation endLoc, Selector SelInfo, @@ -203,6 +194,7 @@ public: bool isInstance = true, bool isVariadic = false, bool isSynthesized = false, + bool isDefined = false, ImplementationControl impControl = None, unsigned numSelectorArgs = 0); @@ -296,6 +288,9 @@ public: bool isSynthesized() const { return IsSynthesized; } void setSynthesized(bool isSynth) { IsSynthesized = isSynth; } + + bool isDefined() const { return IsDefined; } + void setDefined(bool isDefined) { IsDefined = isDefined; } // Related to protocols declared in @protocol void setDeclImplementation(ImplementationControl ic) { @@ -326,21 +321,6 @@ public: } }; -/// ObjCMethodList - a linked list of methods with different signatures. -struct ObjCMethodList { - ObjCMethodDecl *Method; - ObjCMethodList *Next; - - ObjCMethodList() { - Method = 0; - Next = 0; - } - ObjCMethodList(ObjCMethodDecl *M, ObjCMethodList *C) { - Method = M; - Next = C; - } -}; - /// ObjCContainerDecl - Represents a container for method declarations. /// Current sub-classes are ObjCInterfaceDecl, ObjCCategoryDecl, /// ObjCProtocolDecl, and ObjCImplDecl. @@ -355,8 +335,6 @@ public: IdentifierInfo *Id) : NamedDecl(DK, DC, L, Id), DeclContext(DK) {} - virtual ~ObjCContainerDecl() {} - // Iterator access to properties. typedef specific_decl_iterator prop_iterator; prop_iterator prop_begin() const { @@ -465,12 +443,19 @@ class ObjCInterfaceDecl : public ObjCContainerDecl { /// Class's super class. ObjCInterfaceDecl *SuperClass; - /// Protocols referenced in interface header declaration + /// Protocols referenced in the @interface declaration ObjCProtocolList ReferencedProtocols; + + /// Protocols reference in both the @interface and class extensions. + ObjCList AllReferencedProtocols; /// List of categories defined for this class. /// FIXME: Why is this a linked list?? ObjCCategoryDecl *CategoryList; + + /// IvarList - List of all ivars defined by this class; including class + /// extensions and implementation. This list is built lazily. + ObjCIvarDecl *IvarList; bool ForwardDecl:1; // declared with @class. bool InternalInterface:1; // true - no @interface for @implementation @@ -482,13 +467,7 @@ class ObjCInterfaceDecl : public ObjCContainerDecl { ObjCInterfaceDecl(DeclContext *DC, SourceLocation atLoc, IdentifierInfo *Id, SourceLocation CLoc, bool FD, bool isInternal); - virtual ~ObjCInterfaceDecl() {} - public: - - /// Destroy - Call destructors and release memory. - virtual void Destroy(ASTContext& C); - static ObjCInterfaceDecl *Create(ASTContext &C, DeclContext *DC, SourceLocation atLoc, IdentifierInfo *Id, @@ -513,25 +492,49 @@ public: } typedef ObjCProtocolList::iterator protocol_iterator; - protocol_iterator protocol_begin() const {return ReferencedProtocols.begin();} - protocol_iterator protocol_end() const { return ReferencedProtocols.end(); } + + protocol_iterator protocol_begin() const { + return ReferencedProtocols.begin(); + } + protocol_iterator protocol_end() const { + return ReferencedProtocols.end(); + } + typedef ObjCProtocolList::loc_iterator protocol_loc_iterator; + protocol_loc_iterator protocol_loc_begin() const { return ReferencedProtocols.loc_begin(); } + protocol_loc_iterator protocol_loc_end() const { return ReferencedProtocols.loc_end(); } - unsigned protocol_size() const { return ReferencedProtocols.size(); } + + typedef ObjCList::iterator all_protocol_iterator; + + all_protocol_iterator all_referenced_protocol_begin() const { + return AllReferencedProtocols.empty() ? protocol_begin() + : AllReferencedProtocols.begin(); + } + all_protocol_iterator all_referenced_protocol_end() const { + return AllReferencedProtocols.empty() ? protocol_end() + : AllReferencedProtocols.end(); + } typedef specific_decl_iterator ivar_iterator; + ivar_iterator ivar_begin() const { return ivar_iterator(decls_begin()); } ivar_iterator ivar_end() const { return ivar_iterator(decls_end()); } + unsigned ivar_size() const { return std::distance(ivar_begin(), ivar_end()); } + bool ivar_empty() const { return ivar_begin() == ivar_end(); } - + + ObjCIvarDecl *all_declared_ivar_begin(); + void setIvarList(ObjCIvarDecl *ivar) { IvarList = ivar; } + /// setProtocolList - Set the list of protocols that this interface /// implements. void setProtocolList(ObjCProtocolDecl *const* List, unsigned Num, @@ -543,7 +546,6 @@ public: /// into the protocol list for this class. void mergeClassExtensionProtocolList(ObjCProtocolDecl *const* List, unsigned Num, - const SourceLocation *Locs, ASTContext &C); bool isForwardDecl() const { return ForwardDecl; } @@ -625,6 +627,9 @@ public: static bool classof(const Decl *D) { return classofKind(D->getKind()); } static bool classof(const ObjCInterfaceDecl *D) { return true; } static bool classofKind(Kind K) { return K == ObjCInterface; } + + friend class ASTDeclReader; + friend class ASTDeclWriter; }; /// ObjCIvarDecl - Represents an ObjC instance variable. In general, ObjC @@ -650,21 +655,26 @@ public: private: ObjCIvarDecl(ObjCContainerDecl *DC, SourceLocation L, IdentifierInfo *Id, - QualType T, TypeSourceInfo *TInfo, AccessControl ac, Expr *BW) + QualType T, TypeSourceInfo *TInfo, AccessControl ac, Expr *BW, + bool synthesized) : FieldDecl(ObjCIvar, DC, L, Id, T, TInfo, BW, /*Mutable=*/false), - DeclAccess(ac) {} + NextIvar(0), DeclAccess(ac), Synthesized(synthesized) {} public: static ObjCIvarDecl *Create(ASTContext &C, ObjCContainerDecl *DC, SourceLocation L, IdentifierInfo *Id, QualType T, TypeSourceInfo *TInfo, - AccessControl ac, Expr *BW = NULL); + AccessControl ac, Expr *BW = NULL, + bool synthesized=false); /// \brief Return the class interface that this ivar is logically contained /// in; this is either the interface where the ivar was declared, or the /// interface the ivar is conceptually a part of in the case of synthesized /// ivars. const ObjCInterfaceDecl *getContainingInterface() const; + + ObjCIvarDecl *getNextIvar() { return NextIvar; } + void setNextIvar(ObjCIvarDecl *ivar) { NextIvar = ivar; } void setAccessControl(AccessControl ac) { DeclAccess = ac; } @@ -674,13 +684,21 @@ public: return DeclAccess == None ? Protected : AccessControl(DeclAccess); } + void setSynthesize(bool synth) { Synthesized = synth; } + bool getSynthesize() const { return Synthesized; } + // Implement isa/cast/dyncast/etc. static bool classof(const Decl *D) { return classofKind(D->getKind()); } static bool classof(const ObjCIvarDecl *D) { return true; } static bool classofKind(Kind K) { return K == ObjCIvar; } private: + /// NextIvar - Next Ivar in the list of ivars declared in class; class's + /// extensions and class's implementation + ObjCIvarDecl *NextIvar; + // NOTE: VC++ treats enums as signed, avoid using the AccessControl enum unsigned DeclAccess : 3; + unsigned Synthesized : 1; }; @@ -700,8 +718,6 @@ public: IdentifierInfo *Id, QualType T, Expr *BW); - virtual void Destroy(ASTContext& C); - // Implement isa/cast/dyncast/etc. static bool classof(const Decl *D) { return classofKind(D->getKind()); } static bool classof(const ObjCAtDefsFieldDecl *D) { return true; } @@ -745,15 +761,10 @@ class ObjCProtocolDecl : public ObjCContainerDecl { isForwardProtoDecl(true) { } - virtual ~ObjCProtocolDecl() {} - public: static ObjCProtocolDecl *Create(ASTContext &C, DeclContext *DC, SourceLocation L, IdentifierInfo *Id); - /// Destroy - Call destructors and release memory. - virtual void Destroy(ASTContext& C); - const ObjCProtocolList &getReferencedProtocols() const { return ReferencedProtocols; } @@ -822,12 +833,7 @@ private: ObjCClassDecl(DeclContext *DC, SourceLocation L, ObjCInterfaceDecl *const *Elts, const SourceLocation *Locs, unsigned nElts, ASTContext &C); - virtual ~ObjCClassDecl() {} public: - - /// Destroy - Call destructors and release memory. - virtual void Destroy(ASTContext& C); - static ObjCClassDecl *Create(ASTContext &C, DeclContext *DC, SourceLocation L, ObjCInterfaceDecl *const *Elts = 0, const SourceLocation *Locs = 0, @@ -860,7 +866,6 @@ class ObjCForwardProtocolDecl : public Decl { ObjCForwardProtocolDecl(DeclContext *DC, SourceLocation L, ObjCProtocolDecl *const *Elts, unsigned nElts, const SourceLocation *Locs, ASTContext &C); - virtual ~ObjCForwardProtocolDecl() {} public: static ObjCForwardProtocolDecl *Create(ASTContext &C, DeclContext *DC, @@ -874,9 +879,6 @@ public: return Create(C, DC, L, 0, 0, 0); } - /// Destroy - Call destructors and release memory. - virtual void Destroy(ASTContext& C); - typedef ObjCProtocolList::iterator protocol_iterator; protocol_iterator protocol_begin() const {return ReferencedProtocols.begin();} protocol_iterator protocol_end() const { return ReferencedProtocols.end(); } @@ -928,6 +930,9 @@ class ObjCCategoryDecl : public ObjCContainerDecl { /// FIXME: this should not be a singly-linked list. Move storage elsewhere. ObjCCategoryDecl *NextClassCategory; + /// true of class extension has at least one bitfield ivar. + bool HasSynthBitfield : 1; + /// \brief The location of the '@' in '@interface' SourceLocation AtLoc; @@ -938,8 +943,8 @@ class ObjCCategoryDecl : public ObjCContainerDecl { SourceLocation ClassNameLoc, SourceLocation CategoryNameLoc, IdentifierInfo *Id) : ObjCContainerDecl(ObjCCategory, DC, ClassNameLoc, Id), - ClassInterface(0), NextClassCategory(0), AtLoc(AtLoc), - CategoryNameLoc(CategoryNameLoc) { + ClassInterface(0), NextClassCategory(0), HasSynthBitfield(false), + AtLoc(AtLoc), CategoryNameLoc(CategoryNameLoc) { } public: @@ -991,6 +996,9 @@ public: bool IsClassExtension() const { return getIdentifier() == 0; } const ObjCCategoryDecl *getNextClassExtension() const; + bool hasSynthBitfield() const { return HasSynthBitfield; } + void setHasSynthBitfield (bool val) { HasSynthBitfield = val; } + typedef specific_decl_iterator ivar_iterator; ivar_iterator ivar_begin() const { return ivar_iterator(decls_begin()); @@ -1032,8 +1040,6 @@ protected: ClassInterface(classInterface) {} public: - virtual ~ObjCImplDecl() {} - const ObjCInterfaceDecl *getClassInterface() const { return ClassInterface; } ObjCInterfaceDecl *getClassInterface() { return ClassInterface; } void setClassInterface(ObjCInterfaceDecl *IFace); @@ -1165,11 +1171,15 @@ class ObjCImplementationDecl : public ObjCImplDecl { CXXBaseOrMemberInitializer **IvarInitializers; unsigned NumIvarInitializers; + /// true of class extension has at least one bitfield ivar. + bool HasSynthBitfield : 1; + ObjCImplementationDecl(DeclContext *DC, SourceLocation L, ObjCInterfaceDecl *classInterface, ObjCInterfaceDecl *superDecl) : ObjCImplDecl(ObjCImplementation, DC, L, classInterface), - SuperClass(superDecl), IvarInitializers(0), NumIvarInitializers(0) {} + SuperClass(superDecl), IvarInitializers(0), NumIvarInitializers(0), + HasSynthBitfield(false) {} public: static ObjCImplementationDecl *Create(ASTContext &C, DeclContext *DC, SourceLocation L, @@ -1207,6 +1217,9 @@ public: void setIvarInitializers(ASTContext &C, CXXBaseOrMemberInitializer ** initializers, unsigned numInitializers); + + bool hasSynthBitfield() const { return HasSynthBitfield; } + void setHasSynthBitfield (bool val) { HasSynthBitfield = val; } /// getIdentifier - Get the identifier that names the class /// interface associated with this implementation. @@ -1262,6 +1275,9 @@ public: static bool classof(const Decl *D) { return classofKind(D->getKind()); } static bool classof(const ObjCImplementationDecl *D) { return true; } static bool classofKind(Kind K) { return K == ObjCImplementation; } + + friend class ASTDeclReader; + friend class ASTDeclWriter; }; llvm::raw_ostream &operator<<(llvm::raw_ostream &OS, diff --git a/include/clang/AST/DeclTemplate.h b/include/clang/AST/DeclTemplate.h index 135dd3ae78d..b532668242f 100644 --- a/include/clang/AST/DeclTemplate.h +++ b/include/clang/AST/DeclTemplate.h @@ -23,6 +23,7 @@ namespace clang { class TemplateParameterList; class TemplateDecl; +class RedeclarableTemplateDecl; class FunctionTemplateDecl; class ClassTemplateDecl; class ClassTemplatePartialSpecializationDecl; @@ -193,13 +194,6 @@ public: TemplateArgumentList() : NumFlatArguments(0), NumStructuredArguments(0) { } - /// Used to release the memory associated with a TemplateArgumentList - /// object. FIXME: This is currently not called anywhere, but the - /// memory will still be freed when using a BumpPtrAllocator. - void Destroy(ASTContext &C); - - ~TemplateArgumentList(); - /// \brief Copies the template arguments into a locally new[]'d array. void init(ASTContext &Context, const TemplateArgument *Args, unsigned NumArgs); @@ -255,8 +249,6 @@ protected: : NamedDecl(DK, DC, L, Name), TemplatedDecl(Decl), TemplateParams(Params) { } public: - ~TemplateDecl(); - /// Get the list of template parameters TemplateParameterList *getTemplateParameters() const { return TemplateParams; @@ -268,6 +260,7 @@ public: // Implement isa/cast/dyncast/etc. static bool classof(const Decl *D) { return classofKind(D->getKind()); } static bool classof(const TemplateDecl *D) { return true; } + static bool classof(const RedeclarableTemplateDecl *D) { return true; } static bool classof(const FunctionTemplateDecl *D) { return true; } static bool classof(const ClassTemplateDecl *D) { return true; } static bool classof(const TemplateTemplateParmDecl *D) { return true; } @@ -490,122 +483,179 @@ public: } }; -/// Declaration of a template function. -class FunctionTemplateDecl : public TemplateDecl { - static void DeallocateCommon(void *Ptr); - -protected: - /// \brief Data that is common to all of the declarations of a given - /// function template. - struct Common { - Common() : InstantiatedFromMember(0, false) { } +/// Declaration of a redeclarable template. +class RedeclarableTemplateDecl : public TemplateDecl { - /// \brief The function template specializations for this function - /// template, including explicit specializations and instantiations. - llvm::FoldingSet Specializations; - - /// \brief The member function template from which this was most - /// directly instantiated (or null). - /// - /// The boolean value indicates whether this member function template - /// was explicitly specialized. - llvm::PointerIntPair InstantiatedFromMember; - }; - - /// \brief A pointer to the previous declaration (if this is a redeclaration) - /// or to the data that is common to all declarations of this function - /// template. - llvm::PointerUnion CommonOrPrev; - - /// \brief Retrieves the "common" pointer shared by all - /// (re-)declarations of the same function template. Calling this routine - /// may implicitly allocate memory for the common pointer. - Common *getCommonPtr(); - - FunctionTemplateDecl(DeclContext *DC, SourceLocation L, DeclarationName Name, - TemplateParameterList *Params, NamedDecl *Decl) - : TemplateDecl(FunctionTemplate, DC, L, Name, Params, Decl), - CommonOrPrev((Common*)0) { } - -public: - void Destroy(ASTContext &C); - - /// Get the underlying function declaration of the template. - FunctionDecl *getTemplatedDecl() const { - return static_cast(TemplatedDecl); + RedeclarableTemplateDecl *getPreviousDeclarationImpl() { + return CommonOrPrev.dyn_cast(); } - /// \brief Retrieve the set of function template specializations of this - /// function template. - llvm::FoldingSet &getSpecializations() { - return getCommonPtr()->Specializations; - } + RedeclarableTemplateDecl *getCanonicalDeclImpl(); - /// \brief Retrieve the previous declaration of this function template, or - /// NULL if no such declaration exists. - const FunctionTemplateDecl *getPreviousDeclaration() const { - return CommonOrPrev.dyn_cast(); - } + void setPreviousDeclarationImpl(RedeclarableTemplateDecl *Prev); - /// \brief Retrieve the previous declaration of this function template, or - /// NULL if no such declaration exists. - FunctionTemplateDecl *getPreviousDeclaration() { - return CommonOrPrev.dyn_cast(); - } - - /// \brief Set the previous declaration of this function template. - void setPreviousDeclaration(FunctionTemplateDecl *Prev) { - if (Prev) - CommonOrPrev = Prev; - } - - virtual FunctionTemplateDecl *getCanonicalDecl(); - - /// \brief Retrieve the member function template that this function template - /// was instantiated from. - /// - /// This routine will return non-NULL for member function templates of - /// class templates. For example, given: - /// - /// \code - /// template - /// struct X { - /// template void f(); - /// }; - /// \endcode - /// - /// X::A is a CXXMethodDecl (whose parent is X, a - /// ClassTemplateSpecializationDecl) for which getPrimaryTemplate() will - /// return X::f, a FunctionTemplateDecl (whose parent is again - /// X) for which getInstantiatedFromMemberTemplate() will return - /// X::f, a FunctionTemplateDecl (whose parent is X, a - /// ClassTemplateDecl). - /// - /// \returns NULL if this is not an instantiation of a member function - /// template. - FunctionTemplateDecl *getInstantiatedFromMemberTemplate() { + RedeclarableTemplateDecl *getInstantiatedFromMemberTemplateImpl() { return getCommonPtr()->InstantiatedFromMember.getPointer(); } - void setInstantiatedFromMemberTemplate(FunctionTemplateDecl *FTD) { + void setInstantiatedFromMemberTemplateImpl(RedeclarableTemplateDecl *TD) { assert(!getCommonPtr()->InstantiatedFromMember.getPointer()); - getCommonPtr()->InstantiatedFromMember.setPointer(FTD); + getCommonPtr()->InstantiatedFromMember.setPointer(TD); + } + +protected: + template struct SpecEntryTraits { + typedef EntryType DeclType; + + static DeclType *getMostRecentDeclaration(EntryType *D) { + return D->getMostRecentDeclaration(); + } + }; + + template , + typename _DeclType = typename _SETraits::DeclType> + class SpecIterator : public std::iterator { + typedef _SETraits SETraits; + typedef _DeclType DeclType; + + typedef typename llvm::FoldingSet::iterator SetIteratorType; + + SetIteratorType SetIter; + + public: + SpecIterator() : SetIter() {} + SpecIterator(SetIteratorType SetIter) : SetIter(SetIter) {} + + DeclType *operator*() const { + return SETraits::getMostRecentDeclaration(&*SetIter); + } + DeclType *operator->() const { return **this; } + + SpecIterator &operator++() { ++SetIter; return *this; } + SpecIterator operator++(int) { + SpecIterator tmp(*this); + ++(*this); + return tmp; + } + + bool operator==(SpecIterator Other) const { + return SetIter == Other.SetIter; + } + bool operator!=(SpecIterator Other) const { + return SetIter != Other.SetIter; + } + }; + + template + SpecIterator makeSpecIterator(llvm::FoldingSet &Specs, + bool isEnd) { + return SpecIterator(isEnd ? Specs.end() : Specs.begin()); + } + + template typename SpecEntryTraits::DeclType* + findSpecializationImpl(llvm::FoldingSet &Specs, + const TemplateArgument *Args, unsigned NumArgs, + void *&InsertPos); + + struct CommonBase { + CommonBase() : InstantiatedFromMember(0, false) { } + + /// \brief The template from which this was most + /// directly instantiated (or null). + /// + /// The boolean value indicates whether this template + /// was explicitly specialized. + llvm::PointerIntPair + InstantiatedFromMember; + + /// \brief The latest declaration of this template. + RedeclarableTemplateDecl *Latest; + }; + + /// \brief A pointer to the previous declaration (if this is a redeclaration) + /// or to the data that is common to all declarations of this template. + llvm::PointerUnion CommonOrPrev; + + /// \brief Retrieves the "common" pointer shared by all (re-)declarations of + /// the same template. Calling this routine may implicitly allocate memory + /// for the common pointer. + CommonBase *getCommonPtr(); + + virtual CommonBase *newCommon() = 0; + + // Construct a template decl with name, parameters, and templated element. + RedeclarableTemplateDecl(Kind DK, DeclContext *DC, SourceLocation L, + DeclarationName Name, TemplateParameterList *Params, + NamedDecl *Decl) + : TemplateDecl(DK, DC, L, Name, Params, Decl), + CommonOrPrev((CommonBase*)0) { } + +public: + template friend class RedeclarableTemplate; + + RedeclarableTemplateDecl *getCanonicalDecl() { + return getCanonicalDeclImpl(); + } + + /// \brief Retrieve the previous declaration of this template, or + /// NULL if no such declaration exists. + RedeclarableTemplateDecl *getPreviousDeclaration() { + return getPreviousDeclarationImpl(); + } + + /// \brief Retrieve the previous declaration of this template, or + /// NULL if no such declaration exists. + const RedeclarableTemplateDecl *getPreviousDeclaration() const { + return + const_cast(this)->getPreviousDeclaration(); + } + + /// \brief Retrieve the first declaration of this template, or itself + /// if this the first one. + RedeclarableTemplateDecl *getFirstDeclaration() { + return getCanonicalDecl(); + } + + /// \brief Retrieve the first declaration of this template, or itself + /// if this the first one. + const RedeclarableTemplateDecl *getFirstDeclaration() const { + return + const_cast(this)->getFirstDeclaration(); + } + + /// \brief Retrieve the most recent declaration of this template, or itself + /// if this the most recent one. + RedeclarableTemplateDecl *getMostRecentDeclaration() { + return getCommonPtr()->Latest; + } + + /// \brief Retrieve the most recent declaration of this template, or itself + /// if this the most recent one. + const RedeclarableTemplateDecl *getMostRecentDeclaration() const { + return + const_cast(this)->getMostRecentDeclaration(); } /// \brief Determines whether this template was a specialization of a /// member template. /// - /// In the following example, the function template \c X::f is a - /// member specialization. + /// In the following example, the function template \c X::f and the + /// member template \c X::Inner are member specializations. /// /// \code /// template /// struct X { /// template void f(T, U); + /// template struct Inner; /// }; /// /// template<> template /// void X::f(int, T); + /// template<> template + /// struct X::Inner { /* ... */ }; /// \endcode bool isMemberSpecialization() { return getCommonPtr()->InstantiatedFromMember.getInt(); @@ -618,6 +668,197 @@ public: getCommonPtr()->InstantiatedFromMember.setInt(true); } + /// \brief Retrieve the previous declaration of this template, or + /// NULL if no such declaration exists. + RedeclarableTemplateDecl *getInstantiatedFromMemberTemplate() { + return getInstantiatedFromMemberTemplateImpl(); + } + + virtual RedeclarableTemplateDecl *getNextRedeclaration(); + + // Implement isa/cast/dyncast/etc. + static bool classof(const Decl *D) { return classofKind(D->getKind()); } + static bool classof(const RedeclarableTemplateDecl *D) { return true; } + static bool classof(const FunctionTemplateDecl *D) { return true; } + static bool classof(const ClassTemplateDecl *D) { return true; } + static bool classofKind(Kind K) { + return K >= firstRedeclarableTemplate && K <= lastRedeclarableTemplate; + } + + friend class ASTDeclReader; + friend class ASTDeclWriter; +}; + +template +class RedeclarableTemplate { + RedeclarableTemplateDecl *thisDecl() { + return static_cast(this); + } + +public: + /// \brief Retrieve the previous declaration of this function template, or + /// NULL if no such declaration exists. + decl_type *getPreviousDeclaration() { + return static_cast(thisDecl()->getPreviousDeclarationImpl()); + } + + /// \brief Retrieve the previous declaration of this function template, or + /// NULL if no such declaration exists. + const decl_type *getPreviousDeclaration() const { + return const_cast(this)->getPreviousDeclaration(); + } + + /// \brief Set the previous declaration of this function template. + void setPreviousDeclaration(decl_type *Prev) { + thisDecl()->setPreviousDeclarationImpl(Prev); + } + + decl_type *getCanonicalDecl() { + return static_cast(thisDecl()->getCanonicalDeclImpl()); + } + + const decl_type *getCanonicalDecl() const { + return const_cast(this)->getCanonicalDecl(); + } + + /// \brief Retrieve the member template that this template was instantiated + /// from. + /// + /// This routine will return non-NULL for member templates of + /// class templates. For example, given: + /// + /// \code + /// template + /// struct X { + /// template void f(); + /// template struct A {}; + /// }; + /// \endcode + /// + /// X::f is a CXXMethodDecl (whose parent is X, a + /// ClassTemplateSpecializationDecl) for which getPrimaryTemplate() will + /// return X::f, a FunctionTemplateDecl (whose parent is again + /// X) for which getInstantiatedFromMemberTemplate() will return + /// X::f, a FunctionTemplateDecl (whose parent is X, a + /// ClassTemplateDecl). + /// + /// X::A is a ClassTemplateSpecializationDecl (whose parent + /// is X, also a CTSD) for which getSpecializedTemplate() will + /// return X::A, a ClassTemplateDecl (whose parent is again + /// X) for which getInstantiatedFromMemberTemplate() will return + /// X::A, a ClassTemplateDecl (whose parent is X, also a CTD). + /// + /// \returns NULL if this is not an instantiation of a member template. + decl_type *getInstantiatedFromMemberTemplate() { + return static_cast( + thisDecl()->getInstantiatedFromMemberTemplateImpl()); + } + + void setInstantiatedFromMemberTemplate(decl_type *TD) { + thisDecl()->setInstantiatedFromMemberTemplateImpl(TD); + } +}; + +template <> struct RedeclarableTemplateDecl:: +SpecEntryTraits { + typedef FunctionDecl DeclType; + + static DeclType * + getMostRecentDeclaration(FunctionTemplateSpecializationInfo *I) { + return I->Function->getMostRecentDeclaration(); + } +}; + +/// Declaration of a template function. +class FunctionTemplateDecl : public RedeclarableTemplateDecl, + public RedeclarableTemplate { + static void DeallocateCommon(void *Ptr); + +protected: + typedef RedeclarableTemplate redeclarable_base; + + /// \brief Data that is common to all of the declarations of a given + /// function template. + struct Common : CommonBase { + /// \brief The function template specializations for this function + /// template, including explicit specializations and instantiations. + llvm::FoldingSet Specializations; + }; + + FunctionTemplateDecl(DeclContext *DC, SourceLocation L, DeclarationName Name, + TemplateParameterList *Params, NamedDecl *Decl) + : RedeclarableTemplateDecl(FunctionTemplate, DC, L, Name, Params, Decl) { } + + CommonBase *newCommon(); + + Common *getCommonPtr() { + return static_cast(RedeclarableTemplateDecl::getCommonPtr()); + } + + friend void FunctionDecl::setFunctionTemplateSpecialization( + FunctionTemplateDecl *Template, + const TemplateArgumentList *TemplateArgs, + void *InsertPos, + TemplateSpecializationKind TSK, + const TemplateArgumentListInfo *TemplateArgsAsWritten, + SourceLocation PointOfInstantiation); + + /// \brief Retrieve the set of function template specializations of this + /// function template. + llvm::FoldingSet &getSpecializations() { + return getCommonPtr()->Specializations; + } + +public: + /// Get the underlying function declaration of the template. + FunctionDecl *getTemplatedDecl() const { + return static_cast(TemplatedDecl); + } + + /// Returns whether this template declaration defines the primary + /// pattern. + bool isThisDeclarationADefinition() const { + return getTemplatedDecl()->isThisDeclarationADefinition(); + } + + /// \brief Return the specialization with the provided arguments if it exists, + /// otherwise return the insertion point. + FunctionDecl *findSpecialization(const TemplateArgument *Args, + unsigned NumArgs, void *&InsertPos); + + FunctionTemplateDecl *getCanonicalDecl() { + return redeclarable_base::getCanonicalDecl(); + } + const FunctionTemplateDecl *getCanonicalDecl() const { + return redeclarable_base::getCanonicalDecl(); + } + + /// \brief Retrieve the previous declaration of this function template, or + /// NULL if no such declaration exists. + FunctionTemplateDecl *getPreviousDeclaration() { + return redeclarable_base::getPreviousDeclaration(); + } + + /// \brief Retrieve the previous declaration of this function template, or + /// NULL if no such declaration exists. + const FunctionTemplateDecl *getPreviousDeclaration() const { + return redeclarable_base::getPreviousDeclaration(); + } + + FunctionTemplateDecl *getInstantiatedFromMemberTemplate() { + return redeclarable_base::getInstantiatedFromMemberTemplate(); + } + + typedef SpecIterator spec_iterator; + + spec_iterator spec_begin() { + return makeSpecIterator(getSpecializations(), false); + } + + spec_iterator spec_end() { + return makeSpecIterator(getSpecializations(), true); + } + /// Create a template function node. static FunctionTemplateDecl *Create(ASTContext &C, DeclContext *DC, SourceLocation L, @@ -630,8 +871,8 @@ public: static bool classof(const FunctionTemplateDecl *D) { return true; } static bool classofKind(Kind K) { return K == FunctionTemplate; } - friend class PCHDeclReader; - friend class PCHDeclWriter; + friend class ASTDeclReader; + friend class ASTDeclWriter; }; //===----------------------------------------------------------------------===// @@ -781,8 +1022,7 @@ class NonTypeTemplateParmDecl NonTypeTemplateParmDecl(DeclContext *DC, SourceLocation L, unsigned D, unsigned P, IdentifierInfo *Id, QualType T, TypeSourceInfo *TInfo) - : VarDecl(NonTypeTemplateParm, DC, L, Id, T, TInfo, VarDecl::None, - VarDecl::None), + : VarDecl(NonTypeTemplateParm, DC, L, Id, T, TInfo, SC_None, SC_None), TemplateParmPosition(D, P), DefaultArgumentAndInherited(0, false) { } @@ -904,13 +1144,20 @@ public: DefaultArgumentWasInherited = false; } + SourceRange getSourceRange() const { + SourceLocation End = getLocation(); + if (hasDefaultArgument() && !defaultArgumentWasInherited()) + End = getDefaultArgument().getSourceRange().getEnd(); + return SourceRange(getTemplateParameters()->getTemplateLoc(), End); + } + // Implement isa/cast/dyncast/etc. static bool classof(const Decl *D) { return classofKind(D->getKind()); } static bool classof(const TemplateTemplateParmDecl *D) { return true; } static bool classofKind(Kind K) { return K == TemplateTemplateParm; } - friend class PCHDeclReader; - friend class PCHDeclWriter; + friend class ASTDeclReader; + friend class ASTDeclWriter; }; /// \brief Represents a class template specialization, which refers to @@ -991,12 +1238,21 @@ public: static ClassTemplateSpecializationDecl * Create(ASTContext &Context, EmptyShell Empty); - virtual void Destroy(ASTContext& C); - virtual void getNameForDiagnostic(std::string &S, const PrintingPolicy &Policy, bool Qualified) const; + ClassTemplateSpecializationDecl *getMostRecentDeclaration() { + CXXRecordDecl *Recent + = cast(CXXRecordDecl::getMostRecentDeclaration()); + if (!isa(Recent)) { + // FIXME: Does injected class name need to be in the redeclarations chain? + assert(Recent->isInjectedClassName() && Recent->getPreviousDeclaration()); + Recent = Recent->getPreviousDeclaration(); + } + return cast(Recent); + } + /// \brief Retrieve the template that this specialization specializes. ClassTemplateDecl *getSpecializedTemplate() const; @@ -1044,7 +1300,8 @@ public: if (getSpecializationKind() != TSK_ImplicitInstantiation && getSpecializationKind() != TSK_ExplicitInstantiationDefinition && getSpecializationKind() != TSK_ExplicitInstantiationDeclaration) - return (ClassTemplateDecl*)0; + return llvm::PointerUnion(); if (SpecializedPartialSpecialization *PartialSpec = SpecializedTemplate.dyn_cast()) @@ -1123,7 +1380,8 @@ public: /// \brief Sets the type of this specialization as it was written by /// the user. This will be a class template specialization type. void setTypeAsWritten(TypeSourceInfo *T) { - if (!ExplicitInfo) ExplicitInfo = new ExplicitSpecializationInfo; + if (!ExplicitInfo) + ExplicitInfo = new (getASTContext()) ExplicitSpecializationInfo; ExplicitInfo->TypeAsWritten = T; } /// \brief Gets the type of this specialization as it was written by @@ -1138,13 +1396,15 @@ public: } /// \brief Sets the location of the extern keyword. void setExternLoc(SourceLocation Loc) { - if (!ExplicitInfo) ExplicitInfo = new ExplicitSpecializationInfo; + if (!ExplicitInfo) + ExplicitInfo = new (getASTContext()) ExplicitSpecializationInfo; ExplicitInfo->ExternLoc = Loc; } /// \brief Sets the location of the template keyword. void setTemplateKeywordLoc(SourceLocation Loc) { - if (!ExplicitInfo) ExplicitInfo = new ExplicitSpecializationInfo; + if (!ExplicitInfo) + ExplicitInfo = new (getASTContext()) ExplicitSpecializationInfo; ExplicitInfo->TemplateKeywordLoc = Loc; } /// \brief Gets the location of the template keyword, if present. @@ -1242,6 +1502,11 @@ public: static ClassTemplatePartialSpecializationDecl * Create(ASTContext &Context, EmptyShell Empty); + ClassTemplatePartialSpecializationDecl *getMostRecentDeclaration() { + return cast( + ClassTemplateSpecializationDecl::getMostRecentDeclaration()); + } + /// Get the list of template parameters TemplateParameterList *getTemplateParameters() const { return TemplateParams; @@ -1355,15 +1620,16 @@ public: }; /// Declaration of a class template. -class ClassTemplateDecl : public TemplateDecl { +class ClassTemplateDecl : public RedeclarableTemplateDecl, + public RedeclarableTemplate { static void DeallocateCommon(void *Ptr); protected: + typedef RedeclarableTemplate redeclarable_base; + /// \brief Data that is common to all of the declarations of a given /// class template. - struct Common { - Common() : InstantiatedFromMember(0, 0) {} - + struct Common : CommonBase { /// \brief The class template specializations for this class /// template, including explicit specializations and instantiations. llvm::FoldingSet Specializations; @@ -1375,67 +1641,8 @@ protected: /// \brief The injected-class-name type for this class template. QualType InjectedClassNameType; - - /// \brief The templated member class from which this was most - /// directly instantiated (or null). - /// - /// The boolean value indicates whether this member class template - /// was explicitly specialized. - llvm::PointerIntPair InstantiatedFromMember; }; - /// \brief A pointer to the previous declaration (if this is a redeclaration) - /// or to the data that is common to all declarations of this class template. - llvm::PointerUnion CommonOrPrev; - - /// \brief Retrieves the "common" pointer shared by all - /// (re-)declarations of the same class template. Calling this routine - /// may implicitly allocate memory for the common pointer. - Common *getCommonPtr(); - - ClassTemplateDecl(DeclContext *DC, SourceLocation L, DeclarationName Name, - TemplateParameterList *Params, NamedDecl *Decl) - : TemplateDecl(ClassTemplate, DC, L, Name, Params, Decl), - CommonOrPrev((Common*)0) { } - -public: - /// Get the underlying class declarations of the template. - CXXRecordDecl *getTemplatedDecl() const { - return static_cast(TemplatedDecl); - } - - /// \brief Retrieve the previous declaration of this class template, or - /// NULL if no such declaration exists. - const ClassTemplateDecl *getPreviousDeclaration() const { - return CommonOrPrev.dyn_cast(); - } - - /// \brief Retrieve the previous declaration of this function template, or - /// NULL if no such declaration exists. - ClassTemplateDecl *getPreviousDeclaration() { - return CommonOrPrev.dyn_cast(); - } - - /// \brief Set the previous declaration of this class template. - void setPreviousDeclaration(ClassTemplateDecl *Prev) { - if (Prev) - CommonOrPrev = Prev; - } - - virtual ClassTemplateDecl *getCanonicalDecl(); - - const ClassTemplateDecl *getCanonicalDecl() const { - return const_cast(this)->getCanonicalDecl(); - } - - /// Create a class template node. - static ClassTemplateDecl *Create(ASTContext &C, DeclContext *DC, - SourceLocation L, - DeclarationName Name, - TemplateParameterList *Params, - NamedDecl *Decl, - ClassTemplateDecl *PrevDecl); - /// \brief Retrieve the set of specializations of this class template. llvm::FoldingSet &getSpecializations() { return getCommonPtr()->Specializations; @@ -1448,6 +1655,89 @@ public: return getCommonPtr()->PartialSpecializations; } + ClassTemplateDecl(DeclContext *DC, SourceLocation L, DeclarationName Name, + TemplateParameterList *Params, NamedDecl *Decl) + : RedeclarableTemplateDecl(ClassTemplate, DC, L, Name, Params, Decl) { } + + CommonBase *newCommon(); + + Common *getCommonPtr() { + return static_cast(RedeclarableTemplateDecl::getCommonPtr()); + } + +public: + /// Get the underlying class declarations of the template. + CXXRecordDecl *getTemplatedDecl() const { + return static_cast(TemplatedDecl); + } + + /// Returns whether this template declaration defines the primary + /// class pattern. + bool isThisDeclarationADefinition() const { + return getTemplatedDecl()->isThisDeclarationADefinition(); + } + + /// Create a class template node. + static ClassTemplateDecl *Create(ASTContext &C, DeclContext *DC, + SourceLocation L, + DeclarationName Name, + TemplateParameterList *Params, + NamedDecl *Decl, + ClassTemplateDecl *PrevDecl); + + /// \brief Return the specialization with the provided arguments if it exists, + /// otherwise return the insertion point. + ClassTemplateSpecializationDecl * + findSpecialization(const TemplateArgument *Args, unsigned NumArgs, + void *&InsertPos); + + /// \brief Insert the specified specialization knowing that it is not already + /// in. InsertPos must be obtained from findSpecialization. + void AddSpecialization(ClassTemplateSpecializationDecl *D, void *InsertPos) { + getSpecializations().InsertNode(D, InsertPos); + } + + ClassTemplateDecl *getCanonicalDecl() { + return redeclarable_base::getCanonicalDecl(); + } + const ClassTemplateDecl *getCanonicalDecl() const { + return redeclarable_base::getCanonicalDecl(); + } + + /// \brief Retrieve the previous declaration of this class template, or + /// NULL if no such declaration exists. + ClassTemplateDecl *getPreviousDeclaration() { + return redeclarable_base::getPreviousDeclaration(); + } + + /// \brief Retrieve the previous declaration of this class template, or + /// NULL if no such declaration exists. + const ClassTemplateDecl *getPreviousDeclaration() const { + return redeclarable_base::getPreviousDeclaration(); + } + + ClassTemplateDecl *getInstantiatedFromMemberTemplate() { + return redeclarable_base::getInstantiatedFromMemberTemplate(); + } + + /// \brief Return the partial specialization with the provided arguments if it + /// exists, otherwise return the insertion point. + ClassTemplatePartialSpecializationDecl * + findPartialSpecialization(const TemplateArgument *Args, unsigned NumArgs, + void *&InsertPos); + + /// \brief Insert the specified partial specialization knowing that it is not + /// already in. InsertPos must be obtained from findPartialSpecialization. + void AddPartialSpecialization(ClassTemplatePartialSpecializationDecl *D, + void *InsertPos) { + getPartialSpecializations().InsertNode(D, InsertPos); + } + + /// \brief Return the next partial specialization sequence number. + unsigned getNextPartialSpecSequenceNumber() { + return getPartialSpecializations().size(); + } + /// \brief Retrieve the partial specializations as an ordered list. void getPartialSpecializations( llvm::SmallVectorImpl &PS); @@ -1455,12 +1745,24 @@ public: /// \brief Find a class template partial specialization with the given /// type T. /// - /// \brief A dependent type that names a specialization of this class + /// \param T a dependent type that names a specialization of this class /// template. /// /// \returns the class template partial specialization that exactly matches /// the type \p T, or NULL if no such partial specialization exists. ClassTemplatePartialSpecializationDecl *findPartialSpecialization(QualType T); + + /// \brief Find a class template partial specialization which was instantiated + /// from the given member partial specialization. + /// + /// \param D a member class template partial specialization. + /// + /// \returns the class template partial specialization which was instantiated + /// from the given member partial specialization, or NULL if no such partial + /// specialization exists. + ClassTemplatePartialSpecializationDecl * + findPartialSpecInstantiatedFromMember( + ClassTemplatePartialSpecializationDecl *D); /// \brief Retrieve the template specialization type of the /// injected-class-name for this class template. @@ -1478,78 +1780,45 @@ public: /// \endcode QualType getInjectedClassNameSpecialization(); - /// \brief Retrieve the member class template that this class template was - /// derived from. - /// - /// This routine will return non-NULL for templated member classes of - /// class templates. For example, given: - /// - /// \code - /// template - /// struct X { - /// template struct A {}; - /// }; - /// \endcode - /// - /// X::A is a ClassTemplateSpecializationDecl (whose parent - /// is X, also a CTSD) for which getSpecializedTemplate() will - /// return X::A, a TemplateClassDecl (whose parent is again - /// X) for which getInstantiatedFromMemberTemplate() will return - /// X::A, a TemplateClassDecl (whose parent is X, also a TCD). - /// - /// \returns null if this is not an instantiation of a member class template. - ClassTemplateDecl *getInstantiatedFromMemberTemplate() { - return getCommonPtr()->InstantiatedFromMember.getPointer(); + typedef SpecIterator spec_iterator; + + spec_iterator spec_begin() { + return makeSpecIterator(getSpecializations(), false); } - void setInstantiatedFromMemberTemplate(ClassTemplateDecl *CTD) { - assert(!getCommonPtr()->InstantiatedFromMember.getPointer()); - getCommonPtr()->InstantiatedFromMember.setPointer(CTD); + spec_iterator spec_end() { + return makeSpecIterator(getSpecializations(), true); } - /// \brief Determines whether this template was a specialization of a - /// member template. - /// - /// In the following example, the member template \c X::Inner is a - /// member specialization. - /// - /// \code - /// template - /// struct X { - /// template struct Inner; - /// }; - /// - /// template<> template - /// struct X::Inner { /* ... */ }; - /// \endcode - bool isMemberSpecialization() { - return getCommonPtr()->InstantiatedFromMember.getInt(); + typedef SpecIterator + partial_spec_iterator; + + partial_spec_iterator partial_spec_begin() { + return makeSpecIterator(getPartialSpecializations(), false); } - - /// \brief Note that this member template is a specialization. - void setMemberSpecialization() { - assert(getCommonPtr()->InstantiatedFromMember.getPointer() && - "Only member templates can be member template specializations"); - getCommonPtr()->InstantiatedFromMember.setInt(true); + + partial_spec_iterator partial_spec_end() { + return makeSpecIterator(getPartialSpecializations(), true); } - + // Implement isa/cast/dyncast support static bool classof(const Decl *D) { return classofKind(D->getKind()); } static bool classof(const ClassTemplateDecl *D) { return true; } static bool classofKind(Kind K) { return K == ClassTemplate; } - virtual void Destroy(ASTContext& C); - - friend class PCHDeclReader; - friend class PCHDeclWriter; + friend class ASTDeclReader; + friend class ASTDeclWriter; }; /// Declaration of a friend template. For example: /// /// template class A { /// friend class MyVector; // not a friend template -/// template friend class B; // friend template +/// template friend class B; // not a friend template /// template friend class Foo::Nested; // friend template +/// }; +/// NOTE: This class is not currently in use. All of the above +/// will yield a FriendDecl, not a FriendTemplateDecl. class FriendTemplateDecl : public Decl { public: typedef llvm::PointerUnion FriendUnion; @@ -1580,6 +1849,12 @@ private: FriendLoc(FriendLoc) {} + FriendTemplateDecl(EmptyShell Empty) + : Decl(Decl::FriendTemplate, Empty), + NumParams(0), + Params(0) + {} + public: static FriendTemplateDecl *Create(ASTContext &Context, DeclContext *DC, SourceLocation Loc, @@ -1588,6 +1863,8 @@ public: FriendUnion Friend, SourceLocation FriendLoc); + static FriendTemplateDecl *Create(ASTContext &Context, EmptyShell Empty); + /// If this friend declaration names a templated type (or /// a dependent member type of a templated type), return that /// type; otherwise return null. @@ -1620,6 +1897,8 @@ public: static bool classof(const Decl *D) { return classofKind(D->getKind()); } static bool classofKind(Kind K) { return K == Decl::FriendTemplate; } static bool classof(const FriendTemplateDecl *D) { return true; } + + friend class ASTDeclReader; }; /// Implementation of inline functions that require the template declarations diff --git a/include/clang/AST/DeclarationName.h b/include/clang/AST/DeclarationName.h index 8a771d513c4..8bb62759752 100644 --- a/include/clang/AST/DeclarationName.h +++ b/include/clang/AST/DeclarationName.h @@ -30,6 +30,7 @@ namespace clang { class IdentifierInfo; class MultiKeywordSelector; class UsingDirectiveDecl; + class TypeSourceInfo; /// DeclarationName - The name of a declaration. In the common case, /// this just stores an IdentifierInfo pointer to a normal @@ -367,6 +368,146 @@ public: DeclarationName getCXXLiteralOperatorName(IdentifierInfo *II); }; +/// DeclarationNameLoc - Additional source/type location info +/// for a declaration name. Needs a DeclarationName in order +/// to be interpreted correctly. +struct DeclarationNameLoc { + union { + // The source location for identifier stored elsewhere. + // struct {} Identifier; + + // Type info for constructors, destructors and conversion functions. + // Locations (if any) for the tilde (destructor) or operator keyword + // (conversion) are stored elsewhere. + struct { + TypeSourceInfo* TInfo; + } NamedType; + + // The location (if any) of the operator keyword is stored elsewhere. + struct { + unsigned BeginOpNameLoc; + unsigned EndOpNameLoc; + } CXXOperatorName; + + // The location (if any) of the operator keyword is stored elsewhere. + struct { + unsigned OpNameLoc; + } CXXLiteralOperatorName; + + // struct {} CXXUsingDirective; + // struct {} ObjCZeroArgSelector; + // struct {} ObjCOneArgSelector; + // struct {} ObjCMultiArgSelector; + }; + + DeclarationNameLoc(DeclarationName Name); + // FIXME: this should go away once all DNLocs are properly initialized. + DeclarationNameLoc() { NamedType.TInfo = 0; } +}; // struct DeclarationNameLoc + + +/// DeclarationNameInfo - A collector data type for bundling together +/// a DeclarationName and the correspnding source/type location info. +struct DeclarationNameInfo { +private: + /// Name - The declaration name, also encoding name kind. + DeclarationName Name; + /// Loc - The main source location for the declaration name. + SourceLocation NameLoc; + /// Info - Further source/type location info for special kinds of names. + DeclarationNameLoc LocInfo; + +public: + // FIXME: remove it. + DeclarationNameInfo() {} + + DeclarationNameInfo(DeclarationName Name, SourceLocation NameLoc) + : Name(Name), NameLoc(NameLoc), LocInfo(Name) {} + + DeclarationNameInfo(DeclarationName Name, SourceLocation NameLoc, + DeclarationNameLoc LocInfo) + : Name(Name), NameLoc(NameLoc), LocInfo(LocInfo) {} + + /// getName - Returns the embedded declaration name. + DeclarationName getName() const { return Name; } + /// setName - Sets the embedded declaration name. + void setName(DeclarationName N) { Name = N; } + + /// getLoc - Returns the main location of the declaration name. + SourceLocation getLoc() const { return NameLoc; } + /// setLoc - Sets the main location of the declaration name. + void setLoc(SourceLocation L) { NameLoc = L; } + + const DeclarationNameLoc &getInfo() const { return LocInfo; } + DeclarationNameLoc &getInfo() { return LocInfo; } + void setInfo(const DeclarationNameLoc &Info) { LocInfo = Info; } + + /// getNamedTypeInfo - Returns the source type info associated to + /// the name. Assumes it is a constructor, destructor or conversion. + TypeSourceInfo *getNamedTypeInfo() const { + assert(Name.getNameKind() == DeclarationName::CXXConstructorName || + Name.getNameKind() == DeclarationName::CXXDestructorName || + Name.getNameKind() == DeclarationName::CXXConversionFunctionName); + return LocInfo.NamedType.TInfo; + } + /// setNamedTypeInfo - Sets the source type info associated to + /// the name. Assumes it is a constructor, destructor or conversion. + void setNamedTypeInfo(TypeSourceInfo *TInfo) { + assert(Name.getNameKind() == DeclarationName::CXXConstructorName || + Name.getNameKind() == DeclarationName::CXXDestructorName || + Name.getNameKind() == DeclarationName::CXXConversionFunctionName); + LocInfo.NamedType.TInfo = TInfo; + } + + /// getCXXOperatorNameRange - Gets the range of the operator name + /// (without the operator keyword). Assumes it is a (non-literal) operator. + SourceRange getCXXOperatorNameRange() const { + assert(Name.getNameKind() == DeclarationName::CXXOperatorName); + return SourceRange( + SourceLocation::getFromRawEncoding(LocInfo.CXXOperatorName.BeginOpNameLoc), + SourceLocation::getFromRawEncoding(LocInfo.CXXOperatorName.EndOpNameLoc) + ); + } + /// setCXXOperatorNameRange - Sets the range of the operator name + /// (without the operator keyword). Assumes it is a C++ operator. + void setCXXOperatorNameRange(SourceRange R) { + assert(Name.getNameKind() == DeclarationName::CXXOperatorName); + LocInfo.CXXOperatorName.BeginOpNameLoc = R.getBegin().getRawEncoding(); + LocInfo.CXXOperatorName.EndOpNameLoc = R.getEnd().getRawEncoding(); + } + + /// getCXXLiteralOperatorNameLoc - Returns the location of the literal + /// operator name (not the operator keyword). + /// Assumes it is a literal operator. + SourceLocation getCXXLiteralOperatorNameLoc() const { + assert(Name.getNameKind() == DeclarationName::CXXLiteralOperatorName); + return SourceLocation:: + getFromRawEncoding(LocInfo.CXXLiteralOperatorName.OpNameLoc); + } + /// setCXXLiteralOperatorNameLoc - Sets the location of the literal + /// operator name (not the operator keyword). + /// Assumes it is a literal operator. + void setCXXLiteralOperatorNameLoc(SourceLocation Loc) { + assert(Name.getNameKind() == DeclarationName::CXXLiteralOperatorName); + LocInfo.CXXLiteralOperatorName.OpNameLoc = Loc.getRawEncoding(); + } + + /// getAsString - Retrieve the human-readable string for this name. + std::string getAsString() const; + + /// printName - Print the human-readable name to a stream. + void printName(llvm::raw_ostream &OS) const; + + /// getBeginLoc - Retrieve the location of the first token. + SourceLocation getBeginLoc() const { return NameLoc; } + /// getEndLoc - Retrieve the location of the last token. + SourceLocation getEndLoc() const; + /// getSourceRange - The range of the declaration name. + SourceRange getSourceRange() const { + return SourceRange(getBeginLoc(), getEndLoc()); + } +}; + /// Insertion operator for diagnostics. This allows sending DeclarationName's /// into a diagnostic with <<. inline const DiagnosticBuilder &operator<<(const DiagnosticBuilder &DB, @@ -385,6 +526,12 @@ inline const PartialDiagnostic &operator<<(const PartialDiagnostic &PD, return PD; } +inline llvm::raw_ostream &operator<<(llvm::raw_ostream &OS, + DeclarationNameInfo DNInfo) { + DNInfo.printName(OS); + return OS; +} + } // end namespace clang namespace llvm { diff --git a/include/clang/AST/Expr.h b/include/clang/AST/Expr.h index ade2b09c80c..48130becf3b 100644 --- a/include/clang/AST/Expr.h +++ b/include/clang/AST/Expr.h @@ -18,6 +18,7 @@ #include "clang/AST/Stmt.h" #include "clang/AST/Type.h" #include "clang/AST/DeclAccessPair.h" +#include "clang/AST/OperationKinds.h" #include "clang/AST/ASTVector.h" #include "clang/AST/UsuallyTinyPtrVector.h" #include "llvm/ADT/APSInt.h" @@ -42,7 +43,7 @@ namespace clang { class TemplateArgumentListInfo; /// \brief A simple array of base specifiers. -typedef UsuallyTinyPtrVector CXXBaseSpecifierArray; +typedef llvm::SmallVector CXXCastPath; /// Expr - This represents one expression. Note that Expr's are subclasses of /// Stmt. This allows an expression to be transparently used any place a Stmt @@ -61,8 +62,14 @@ protected: /// (C++ [temp.dep.constexpr]). bool ValueDependent : 1; + /// ValueKind - The value classification of this expression. + /// Only actually used by certain subclasses. + unsigned ValueKind : 2; + + enum { BitsRemaining = 28 }; + Expr(StmtClass SC, QualType T, bool TD, bool VD) - : Stmt(SC), TypeDependent(TD), ValueDependent(VD) { + : Stmt(SC), TypeDependent(TD), ValueDependent(VD), ValueKind(0) { setType(T); } @@ -258,7 +265,6 @@ public: /// function returning an rvalue reference. /// lvalues and xvalues are collectively referred to as glvalues, while /// prvalues and xvalues together form rvalues. - /// If a Classification Classify(ASTContext &Ctx) const { return ClassifyImpl(Ctx, 0); } @@ -310,7 +316,7 @@ public: } /// isConstantInitializer - Returns true if this expression is a constant /// initializer, which can be emitted at compile-time. - bool isConstantInitializer(ASTContext &Ctx) const; + bool isConstantInitializer(ASTContext &Ctx, bool ForRef) const; /// EvalResult is a struct with detailed info about an evaluated expression. struct EvalResult { @@ -521,10 +527,14 @@ class DeclRefExpr : public Expr { // (2) the declaration's name was followed by an explicit template // argument list. llvm::PointerIntPair DecoratedD; - + // Loc - The location of the declaration name itself. SourceLocation Loc; + /// DNLoc - Provides source/type location info for the + /// declaration name embedded in DecoratedD. + DeclarationNameLoc DNLoc; + /// \brief Retrieve the qualifier that preceded the declaration name, if any. NameQualifier *getNameQualifier() { if ((DecoratedD.getInt() & HasQualifierFlag) == 0) @@ -537,31 +547,17 @@ class DeclRefExpr : public Expr { const NameQualifier *getNameQualifier() const { return const_cast(this)->getNameQualifier(); } - - /// \brief Retrieve the explicit template argument list that followed the - /// member template name, if any. - ExplicitTemplateArgumentList *getExplicitTemplateArgumentList() { - if ((DecoratedD.getInt() & HasExplicitTemplateArgumentListFlag) == 0) - return 0; - - if ((DecoratedD.getInt() & HasQualifierFlag) == 0) - return reinterpret_cast(this + 1); - - return reinterpret_cast( - getNameQualifier() + 1); - } - - /// \brief Retrieve the explicit template argument list that followed the - /// member template name, if any. - const ExplicitTemplateArgumentList *getExplicitTemplateArgumentList() const { - return const_cast(this)->getExplicitTemplateArgumentList(); - } - + DeclRefExpr(NestedNameSpecifier *Qualifier, SourceRange QualifierRange, ValueDecl *D, SourceLocation NameLoc, const TemplateArgumentListInfo *TemplateArgs, QualType T); + DeclRefExpr(NestedNameSpecifier *Qualifier, SourceRange QualifierRange, + ValueDecl *D, const DeclarationNameInfo &NameInfo, + const TemplateArgumentListInfo *TemplateArgs, + QualType T); + /// \brief Construct an empty declaration reference expression. explicit DeclRefExpr(EmptyShell Empty) : Expr(DeclRefExprClass, Empty) { } @@ -584,6 +580,14 @@ public: QualType T, const TemplateArgumentListInfo *TemplateArgs = 0); + static DeclRefExpr *Create(ASTContext &Context, + NestedNameSpecifier *Qualifier, + SourceRange QualifierRange, + ValueDecl *D, + const DeclarationNameInfo &NameInfo, + QualType T, + const TemplateArgumentListInfo *TemplateArgs = 0); + /// \brief Construct an empty declaration reference expression. static DeclRefExpr *CreateEmpty(ASTContext &Context, bool HasQualifier, unsigned NumTemplateArgs); @@ -592,6 +596,10 @@ public: const ValueDecl *getDecl() const { return DecoratedD.getPointer(); } void setDecl(ValueDecl *NewD) { DecoratedD.setPointer(NewD); } + DeclarationNameInfo getNameInfo() const { + return DeclarationNameInfo(getDecl()->getDeclName(), Loc, DNLoc); + } + SourceLocation getLocation() const { return Loc; } void setLocation(SourceLocation L) { Loc = L; } virtual SourceRange getSourceRange() const; @@ -619,53 +627,77 @@ public: return getNameQualifier()->NNS; } - /// \brief Determines whether this member expression actually had a C++ - /// template argument list explicitly specified, e.g., x.f. - bool hasExplicitTemplateArgumentList() const { - return DecoratedD.getInt() & HasExplicitTemplateArgumentListFlag; + bool hasExplicitTemplateArgs() const { + return (DecoratedD.getInt() & HasExplicitTemplateArgumentListFlag); + } + + /// \brief Retrieve the explicit template argument list that followed the + /// member template name. + ExplicitTemplateArgumentList &getExplicitTemplateArgs() { + assert(hasExplicitTemplateArgs()); + + if ((DecoratedD.getInt() & HasQualifierFlag) == 0) + return *reinterpret_cast(this + 1); + + return *reinterpret_cast( + getNameQualifier() + 1); + } + + /// \brief Retrieve the explicit template argument list that followed the + /// member template name. + const ExplicitTemplateArgumentList &getExplicitTemplateArgs() const { + return const_cast(this)->getExplicitTemplateArgs(); } + /// \brief Retrieves the optional explicit template arguments. + /// This points to the same data as getExplicitTemplateArgs(), but + /// returns null if there are no explicit template arguments. + const ExplicitTemplateArgumentList *getExplicitTemplateArgsOpt() const { + if (!hasExplicitTemplateArgs()) return 0; + return &getExplicitTemplateArgs(); + } + /// \brief Copies the template arguments (if present) into the given /// structure. void copyTemplateArgumentsInto(TemplateArgumentListInfo &List) const { - if (hasExplicitTemplateArgumentList()) - getExplicitTemplateArgumentList()->copyInto(List); + if (hasExplicitTemplateArgs()) + getExplicitTemplateArgs().copyInto(List); } /// \brief Retrieve the location of the left angle bracket following the /// member name ('<'), if any. SourceLocation getLAngleLoc() const { - if (!hasExplicitTemplateArgumentList()) + if (!hasExplicitTemplateArgs()) return SourceLocation(); - return getExplicitTemplateArgumentList()->LAngleLoc; + return getExplicitTemplateArgs().LAngleLoc; } /// \brief Retrieve the template arguments provided as part of this /// template-id. const TemplateArgumentLoc *getTemplateArgs() const { - if (!hasExplicitTemplateArgumentList()) + if (!hasExplicitTemplateArgs()) return 0; - return getExplicitTemplateArgumentList()->getTemplateArgs(); + return getExplicitTemplateArgs().getTemplateArgs(); } /// \brief Retrieve the number of template arguments provided as part of this /// template-id. unsigned getNumTemplateArgs() const { - if (!hasExplicitTemplateArgumentList()) + if (!hasExplicitTemplateArgs()) return 0; - return getExplicitTemplateArgumentList()->NumTemplateArgs; + return getExplicitTemplateArgs().NumTemplateArgs; } /// \brief Retrieve the location of the right angle bracket following the /// template arguments ('>'). SourceLocation getRAngleLoc() const { - if (!hasExplicitTemplateArgumentList()) + if (!hasExplicitTemplateArgs()) return SourceLocation(); - return getExplicitTemplateArgumentList()->RAngleLoc; + return getExplicitTemplateArgs().RAngleLoc; } static bool classof(const Stmt *T) { @@ -677,8 +709,8 @@ public: virtual child_iterator child_begin(); virtual child_iterator child_end(); - friend class PCHStmtReader; - friend class PCHStmtWriter; + friend class ASTStmtReader; + friend class ASTStmtWriter; }; /// PredefinedExpr - [C99 6.4.2.2] - A predefined identifier such as __func__. @@ -725,28 +757,84 @@ public: virtual child_iterator child_end(); }; -class IntegerLiteral : public Expr { - llvm::APInt Value; - SourceLocation Loc; -public: - // type should be IntTy, LongTy, LongLongTy, UnsignedIntTy, UnsignedLongTy, - // or UnsignedLongLongTy - IntegerLiteral(const llvm::APInt &V, QualType type, SourceLocation l) - : Expr(IntegerLiteralClass, type, false, false), Value(V), Loc(l) { - assert(type->isIntegerType() && "Illegal type in IntegerLiteral"); +/// \brief Used by IntegerLiteral/FloatingLiteral to store the numeric without +/// leaking memory. +/// +/// For large floats/integers, APFloat/APInt will allocate memory from the heap +/// to represent these numbers. Unfortunately, when we use a BumpPtrAllocator +/// to allocate IntegerLiteral/FloatingLiteral nodes the memory associated with +/// the APFloat/APInt values will never get freed. APNumericStorage uses +/// ASTContext's allocator for memory allocation. +class APNumericStorage { + unsigned BitWidth; + union { + uint64_t VAL; ///< Used to store the <= 64 bits integer value. + uint64_t *pVal; ///< Used to store the >64 bits integer value. + }; + + bool hasAllocation() const { return llvm::APInt::getNumWords(BitWidth) > 1; } + + APNumericStorage(const APNumericStorage&); // do not implement + APNumericStorage& operator=(const APNumericStorage&); // do not implement + +protected: + APNumericStorage() : BitWidth(0), VAL(0) { } + + llvm::APInt getIntValue() const { + unsigned NumWords = llvm::APInt::getNumWords(BitWidth); + if (NumWords > 1) + return llvm::APInt(BitWidth, NumWords, pVal); + else + return llvm::APInt(BitWidth, VAL); } + void setIntValue(ASTContext &C, const llvm::APInt &Val); +}; + +class APIntStorage : public APNumericStorage { +public: + llvm::APInt getValue() const { return getIntValue(); } + void setValue(ASTContext &C, const llvm::APInt &Val) { setIntValue(C, Val); } +}; + +class APFloatStorage : public APNumericStorage { +public: + llvm::APFloat getValue() const { return llvm::APFloat(getIntValue()); } + void setValue(ASTContext &C, const llvm::APFloat &Val) { + setIntValue(C, Val.bitcastToAPInt()); + } +}; + +class IntegerLiteral : public Expr { + APIntStorage Num; + SourceLocation Loc; /// \brief Construct an empty integer literal. explicit IntegerLiteral(EmptyShell Empty) : Expr(IntegerLiteralClass, Empty) { } - const llvm::APInt &getValue() const { return Value; } +public: + // type should be IntTy, LongTy, LongLongTy, UnsignedIntTy, UnsignedLongTy, + // or UnsignedLongLongTy + IntegerLiteral(ASTContext &C, const llvm::APInt &V, + QualType type, SourceLocation l) + : Expr(IntegerLiteralClass, type, false, false), Loc(l) { + assert(type->isIntegerType() && "Illegal type in IntegerLiteral"); + setValue(C, V); + } + + // type should be IntTy, LongTy, LongLongTy, UnsignedIntTy, UnsignedLongTy, + // or UnsignedLongLongTy + static IntegerLiteral *Create(ASTContext &C, const llvm::APInt &V, + QualType type, SourceLocation l); + static IntegerLiteral *Create(ASTContext &C, EmptyShell Empty); + + llvm::APInt getValue() const { return Num.getValue(); } virtual SourceRange getSourceRange() const { return SourceRange(Loc); } /// \brief Retrieve the location of the literal. SourceLocation getLocation() const { return Loc; } - void setValue(const llvm::APInt &Val) { Value = Val; } + void setValue(ASTContext &C, const llvm::APInt &Val) { Num.setValue(C, Val); } void setLocation(SourceLocation Location) { Loc = Location; } static bool classof(const Stmt *T) { @@ -795,21 +883,30 @@ public: }; class FloatingLiteral : public Expr { - llvm::APFloat Value; + APFloatStorage Num; bool IsExact : 1; SourceLocation Loc; -public: - FloatingLiteral(const llvm::APFloat &V, bool isexact, + + FloatingLiteral(ASTContext &C, const llvm::APFloat &V, bool isexact, QualType Type, SourceLocation L) - : Expr(FloatingLiteralClass, Type, false, false), Value(V), - IsExact(isexact), Loc(L) {} + : Expr(FloatingLiteralClass, Type, false, false), + IsExact(isexact), Loc(L) { + setValue(C, V); + } /// \brief Construct an empty floating-point literal. explicit FloatingLiteral(EmptyShell Empty) - : Expr(FloatingLiteralClass, Empty), Value(0.0) { } + : Expr(FloatingLiteralClass, Empty), IsExact(false) { } - const llvm::APFloat &getValue() const { return Value; } - void setValue(const llvm::APFloat &Val) { Value = Val; } +public: + static FloatingLiteral *Create(ASTContext &C, const llvm::APFloat &V, + bool isexact, QualType Type, SourceLocation L); + static FloatingLiteral *Create(ASTContext &C, EmptyShell Empty); + + llvm::APFloat getValue() const { return Num.getValue(); } + void setValue(ASTContext &C, const llvm::APFloat &Val) { + Num.setValue(C, Val); + } bool isExact() const { return IsExact; } void setExact(bool E) { IsExact = E; } @@ -889,9 +986,6 @@ class StringLiteral : public Expr { StringLiteral(QualType Ty) : Expr(StringLiteralClass, Ty, false, false) {} -protected: - virtual void DoDestroy(ASTContext &C); - public: /// This is the "fully general" constructor that allows representation of /// strings formed from multiple concatenated tokens. @@ -912,8 +1006,7 @@ public: llvm::StringRef getString() const { return llvm::StringRef(StrData, ByteLength); } - // FIXME: These are deprecated, replace with StringRef. - const char *getStrData() const { return StrData; } + unsigned getByteLength() const { return ByteLength; } /// \brief Sets the string data to the given string data. @@ -1009,40 +1102,27 @@ public: /// applied to a non-complex value, the former returns its operand and the /// later returns zero in the type of the operand. /// -/// __builtin_offsetof(type, a.b[10]) is represented as a unary operator whose -/// subexpression is a compound literal with the various MemberExpr and -/// ArraySubscriptExpr's applied to it. (This is only used in C) -/// class UnaryOperator : public Expr { public: - // Note that additions to this should also update the StmtVisitor class. - enum Opcode { - PostInc, PostDec, // [C99 6.5.2.4] Postfix increment and decrement operators - PreInc, PreDec, // [C99 6.5.3.1] Prefix increment and decrement operators. - AddrOf, Deref, // [C99 6.5.3.2] Address and indirection operators. - Plus, Minus, // [C99 6.5.3.3] Unary arithmetic operators. - Not, LNot, // [C99 6.5.3.3] Unary arithmetic operators. - Real, Imag, // "__real expr"/"__imag expr" Extension. - Extension, // __extension__ marker. - OffsetOf // __builtin_offsetof - }; + typedef UnaryOperatorKind Opcode; + private: - Stmt *Val; - Opcode Opc; + unsigned Opc : 5; SourceLocation Loc; + Stmt *Val; public: UnaryOperator(Expr *input, Opcode opc, QualType type, SourceLocation l) : Expr(UnaryOperatorClass, type, - input->isTypeDependent() && opc != OffsetOf, + input->isTypeDependent() || type->isDependentType(), input->isValueDependent()), - Val(input), Opc(opc), Loc(l) {} + Opc(opc), Loc(l), Val(input) {} /// \brief Build an empty unary operator. explicit UnaryOperator(EmptyShell Empty) - : Expr(UnaryOperatorClass, Empty), Opc(AddrOf) { } + : Expr(UnaryOperatorClass, Empty), Opc(UO_AddrOf) { } - Opcode getOpcode() const { return Opc; } + Opcode getOpcode() const { return static_cast(Opc); } void setOpcode(Opcode O) { Opc = O; } Expr *getSubExpr() const { return cast(Val); } @@ -1054,21 +1134,26 @@ public: /// isPostfix - Return true if this is a postfix operation, like x++. static bool isPostfix(Opcode Op) { - return Op == PostInc || Op == PostDec; + return Op == UO_PostInc || Op == UO_PostDec; } /// isPostfix - Return true if this is a prefix operation, like --x. static bool isPrefix(Opcode Op) { - return Op == PreInc || Op == PreDec; + return Op == UO_PreInc || Op == UO_PreDec; } - bool isPrefix() const { return isPrefix(Opc); } - bool isPostfix() const { return isPostfix(Opc); } - bool isIncrementOp() const {return Opc==PreInc || Opc==PostInc; } - bool isIncrementDecrementOp() const { return Opc>=PostInc && Opc<=PreDec; } - bool isOffsetOfOp() const { return Opc == OffsetOf; } - static bool isArithmeticOp(Opcode Op) { return Op >= Plus && Op <= LNot; } - bool isArithmeticOp() const { return isArithmeticOp(Opc); } + bool isPrefix() const { return isPrefix(getOpcode()); } + bool isPostfix() const { return isPostfix(getOpcode()); } + bool isIncrementOp() const { + return Opc == UO_PreInc || Opc == UO_PostInc; + } + bool isIncrementDecrementOp() const { + return Opc <= UO_PreDec; + } + static bool isArithmeticOp(Opcode Op) { + return Op >= UO_Plus && Op <= UO_LNot; + } + bool isArithmeticOp() const { return isArithmeticOp(getOpcode()); } /// getOpcodeStr - Turn an Opcode enum value into the punctuation char it /// corresponds to, e.g. "sizeof" or "[pre]++" @@ -1310,9 +1395,6 @@ class SizeOfAlignOfExpr : public Expr { } Argument; SourceLocation OpLoc, RParenLoc; -protected: - virtual void DoDestroy(ASTContext& C); - public: SizeOfAlignOfExpr(bool issizeof, TypeSourceInfo *TInfo, QualType resultType, SourceLocation op, @@ -1485,8 +1567,6 @@ protected: CallExpr(ASTContext& C, StmtClass SC, Expr *fn, Expr **args, unsigned numargs, QualType t, SourceLocation rparenloc); - virtual void DoDestroy(ASTContext& C); - public: CallExpr(ASTContext& C, Expr *fn, Expr **args, unsigned numargs, QualType t, SourceLocation rparenloc); @@ -1494,8 +1574,6 @@ public: /// \brief Build an empty call expression. CallExpr(ASTContext &C, StmtClass SC, EmptyShell Empty); - ~CallExpr() {} - const Expr *getCallee() const { return cast(SubExprs[FN]); } Expr *getCallee() { return cast(SubExprs[FN]); } void setCallee(Expr *F) { SubExprs[FN] = F; } @@ -1594,6 +1672,10 @@ class MemberExpr : public Expr { /// MemberLoc - This is the location of the member name. SourceLocation MemberLoc; + /// MemberDNLoc - Provides source/type location info for the + /// declaration name embedded in MemberDecl. + DeclarationNameLoc MemberDNLoc; + /// IsArrow - True if this is "X->F", false if this is "X.F". bool IsArrow : 1; @@ -1621,37 +1703,33 @@ class MemberExpr : public Expr { return const_cast(this)->getMemberQualifier(); } - /// \brief Retrieve the explicit template argument list that followed the - /// member template name, if any. - ExplicitTemplateArgumentList *getExplicitTemplateArgumentList() { - if (!HasExplicitTemplateArgumentList) - return 0; - - if (!HasQualifierOrFoundDecl) - return reinterpret_cast(this + 1); - - return reinterpret_cast( - getMemberQualifier() + 1); - } - - /// \brief Retrieve the explicit template argument list that followed the - /// member template name, if any. - const ExplicitTemplateArgumentList *getExplicitTemplateArgumentList() const { - return const_cast(this)->getExplicitTemplateArgumentList(); - } - public: + MemberExpr(Expr *base, bool isarrow, ValueDecl *memberdecl, + const DeclarationNameInfo &NameInfo, QualType ty) + : Expr(MemberExprClass, ty, + base->isTypeDependent(), base->isValueDependent()), + Base(base), MemberDecl(memberdecl), MemberLoc(NameInfo.getLoc()), + MemberDNLoc(NameInfo.getInfo()), IsArrow(isarrow), + HasQualifierOrFoundDecl(false), HasExplicitTemplateArgumentList(false) { + assert(memberdecl->getDeclName() == NameInfo.getName()); + } + + // NOTE: this constructor should be used only when it is known that + // the member name can not provide additional syntactic info + // (i.e., source locations for C++ operator names or type source info + // for constructors, destructors and conversion oeprators). MemberExpr(Expr *base, bool isarrow, ValueDecl *memberdecl, SourceLocation l, QualType ty) : Expr(MemberExprClass, ty, base->isTypeDependent(), base->isValueDependent()), - Base(base), MemberDecl(memberdecl), MemberLoc(l), IsArrow(isarrow), + Base(base), MemberDecl(memberdecl), MemberLoc(l), MemberDNLoc(), + IsArrow(isarrow), HasQualifierOrFoundDecl(false), HasExplicitTemplateArgumentList(false) {} static MemberExpr *Create(ASTContext &C, Expr *base, bool isarrow, NestedNameSpecifier *qual, SourceRange qualrange, ValueDecl *memberdecl, DeclAccessPair founddecl, - SourceLocation l, + DeclarationNameInfo MemberNameInfo, const TemplateArgumentListInfo *targs, QualType ty); @@ -1700,15 +1778,42 @@ public: /// \brief Determines whether this member expression actually had a C++ /// template argument list explicitly specified, e.g., x.f. - bool hasExplicitTemplateArgumentList() const { + bool hasExplicitTemplateArgs() const { return HasExplicitTemplateArgumentList; } /// \brief Copies the template arguments (if present) into the given /// structure. void copyTemplateArgumentsInto(TemplateArgumentListInfo &List) const { - if (hasExplicitTemplateArgumentList()) - getExplicitTemplateArgumentList()->copyInto(List); + if (hasExplicitTemplateArgs()) + getExplicitTemplateArgs().copyInto(List); + } + + /// \brief Retrieve the explicit template argument list that + /// follow the member template name. This must only be called on an + /// expression with explicit template arguments. + ExplicitTemplateArgumentList &getExplicitTemplateArgs() { + assert(HasExplicitTemplateArgumentList); + if (!HasQualifierOrFoundDecl) + return *reinterpret_cast(this + 1); + + return *reinterpret_cast( + getMemberQualifier() + 1); + } + + /// \brief Retrieve the explicit template argument list that + /// followed the member template name. This must only be called on + /// an expression with explicit template arguments. + const ExplicitTemplateArgumentList &getExplicitTemplateArgs() const { + return const_cast(this)->getExplicitTemplateArgs(); + } + + /// \brief Retrieves the optional explicit template arguments. + /// This points to the same data as getExplicitTemplateArgs(), but + /// returns null if there are no explicit template arguments. + const ExplicitTemplateArgumentList *getOptionalExplicitTemplateArgs() const { + if (!hasExplicitTemplateArgs()) return 0; + return &getExplicitTemplateArgs(); } /// \brief Retrieve the location of the left angle bracket following the @@ -1717,7 +1822,7 @@ public: if (!HasExplicitTemplateArgumentList) return SourceLocation(); - return getExplicitTemplateArgumentList()->LAngleLoc; + return getExplicitTemplateArgs().LAngleLoc; } /// \brief Retrieve the template arguments provided as part of this @@ -1726,7 +1831,7 @@ public: if (!HasExplicitTemplateArgumentList) return 0; - return getExplicitTemplateArgumentList()->getTemplateArgs(); + return getExplicitTemplateArgs().getTemplateArgs(); } /// \brief Retrieve the number of template arguments provided as part of this @@ -1735,7 +1840,7 @@ public: if (!HasExplicitTemplateArgumentList) return 0; - return getExplicitTemplateArgumentList()->NumTemplateArgs; + return getExplicitTemplateArgs().NumTemplateArgs; } /// \brief Retrieve the location of the right angle bracket following the @@ -1744,7 +1849,13 @@ public: if (!HasExplicitTemplateArgumentList) return SourceLocation(); - return getExplicitTemplateArgumentList()->RAngleLoc; + return getExplicitTemplateArgs().RAngleLoc; + } + + /// \brief Retrieve the member declaration name info. + DeclarationNameInfo getMemberNameInfo() const { + return DeclarationNameInfo(MemberDecl->getDeclName(), + MemberLoc, MemberDNLoc); } bool isArrow() const { return IsArrow; } @@ -1758,9 +1869,8 @@ public: virtual SourceRange getSourceRange() const { // If we have an implicit base (like a C++ implicit this), // make sure not to return its location - SourceLocation EndLoc = MemberLoc; - if (HasExplicitTemplateArgumentList) - EndLoc = getRAngleLoc(); + SourceLocation EndLoc = (HasExplicitTemplateArgumentList) + ? getRAngleLoc() : getMemberNameInfo().getEndLoc(); SourceLocation BaseLoc = getBase()->getLocStart(); if (BaseLoc.isInvalid()) @@ -1843,110 +1953,13 @@ public: /// classes). class CastExpr : public Expr { public: - /// CastKind - the kind of cast this represents. - enum CastKind { - /// CK_Unknown - Unknown cast kind. - /// FIXME: The goal is to get rid of this and make all casts have a - /// kind so that the AST client doesn't have to try to figure out what's - /// going on. - CK_Unknown, - - /// CK_BitCast - Used for reinterpret_cast. - CK_BitCast, - - /// CK_LValueBitCast - Used for reinterpret_cast of expressions to - /// a reference type. - CK_LValueBitCast, - - /// CK_NoOp - Used for const_cast. - CK_NoOp, - - /// CK_BaseToDerived - Base to derived class casts. - CK_BaseToDerived, - - /// CK_DerivedToBase - Derived to base class casts. - CK_DerivedToBase, - - /// CK_UncheckedDerivedToBase - Derived to base class casts that - /// assume that the derived pointer is not null. - CK_UncheckedDerivedToBase, - - /// CK_Dynamic - Dynamic cast. - CK_Dynamic, - - /// CK_ToUnion - Cast to union (GCC extension). - CK_ToUnion, - - /// CK_ArrayToPointerDecay - Array to pointer decay. - CK_ArrayToPointerDecay, - - // CK_FunctionToPointerDecay - Function to pointer decay. - CK_FunctionToPointerDecay, - - /// CK_NullToMemberPointer - Null pointer to member pointer. - CK_NullToMemberPointer, - - /// CK_BaseToDerivedMemberPointer - Member pointer in base class to - /// member pointer in derived class. - CK_BaseToDerivedMemberPointer, - - /// CK_DerivedToBaseMemberPointer - Member pointer in derived class to - /// member pointer in base class. - CK_DerivedToBaseMemberPointer, - - /// CK_UserDefinedConversion - Conversion using a user defined type - /// conversion function. - CK_UserDefinedConversion, - - /// CK_ConstructorConversion - Conversion by constructor - CK_ConstructorConversion, - - /// CK_IntegralToPointer - Integral to pointer - CK_IntegralToPointer, - - /// CK_PointerToIntegral - Pointer to integral - CK_PointerToIntegral, - - /// CK_ToVoid - Cast to void. - CK_ToVoid, - - /// CK_VectorSplat - Casting from an integer/floating type to an extended - /// vector type with the same element type as the src type. Splats the - /// src expression into the destination expression. - CK_VectorSplat, - - /// CK_IntegralCast - Casting between integral types of different size. - CK_IntegralCast, - - /// CK_IntegralToFloating - Integral to floating point. - CK_IntegralToFloating, - - /// CK_FloatingToIntegral - Floating point to integral. - CK_FloatingToIntegral, - - /// CK_FloatingCast - Casting between floating types of different size. - CK_FloatingCast, - - /// CK_MemberPointerToBoolean - Member pointer to boolean - CK_MemberPointerToBoolean, - - /// CK_AnyPointerToObjCPointerCast - Casting any pointer to objective-c - /// pointer - CK_AnyPointerToObjCPointerCast, - /// CK_AnyPointerToBlockPointerCast - Casting any pointer to block - /// pointer - CK_AnyPointerToBlockPointerCast - - }; + typedef clang::CastKind CastKind; private: - CastKind Kind; + unsigned Kind : 5; + unsigned BasePathSize : BitsRemaining - 5; Stmt *Op; - /// BasePath - For derived-to-base and base-to-derived casts, the base array - /// contains the inheritance path. - CXXBaseSpecifierArray BasePath; - void CheckBasePath() const { #ifndef NDEBUG switch (getCastKind()) { @@ -1955,7 +1968,7 @@ private: case CK_DerivedToBaseMemberPointer: case CK_BaseToDerived: case CK_BaseToDerivedMemberPointer: - assert(!BasePath.empty() && "Cast kind should have a base path!"); + assert(!path_empty() && "Cast kind should have a base path!"); break; // These should not have an inheritance path. @@ -1981,15 +1994,21 @@ private: case CK_MemberPointerToBoolean: case CK_AnyPointerToObjCPointerCast: case CK_AnyPointerToBlockPointerCast: - assert(BasePath.empty() && "Cast kind should not have a base path!"); + case CK_ObjCObjectLValueCast: + assert(path_empty() && "Cast kind should not have a base path!"); break; } #endif } + const CXXBaseSpecifier * const *path_buffer() const { + return const_cast(this)->path_buffer(); + } + CXXBaseSpecifier **path_buffer(); + protected: CastExpr(StmtClass SC, QualType ty, const CastKind kind, Expr *op, - CXXBaseSpecifierArray BasePath) : + unsigned BasePathSize) : Expr(SC, ty, // Cast expressions are type-dependent if the type is // dependent (C++ [temp.dep.expr]p3). @@ -1997,18 +2016,16 @@ protected: // Cast expressions are value-dependent if the type is // dependent or if the subexpression is value-dependent. ty->isDependentType() || (op && op->isValueDependent())), - Kind(kind), Op(op), BasePath(BasePath) { - CheckBasePath(); - } + Kind(kind), BasePathSize(BasePathSize), Op(op) { + CheckBasePath(); + } /// \brief Construct an empty cast. - CastExpr(StmtClass SC, EmptyShell Empty) - : Expr(SC, Empty) { } - - virtual void DoDestroy(ASTContext &C); + CastExpr(StmtClass SC, EmptyShell Empty, unsigned BasePathSize) + : Expr(SC, Empty), BasePathSize(BasePathSize) { } public: - CastKind getCastKind() const { return Kind; } + CastKind getCastKind() const { return static_cast(Kind); } void setCastKind(CastKind K) { Kind = K; } const char *getCastKindName() const; @@ -2024,8 +2041,16 @@ public: return const_cast(this)->getSubExprAsWritten(); } - const CXXBaseSpecifierArray& getBasePath() const { return BasePath; } - CXXBaseSpecifierArray& getBasePath() { return BasePath; } + typedef CXXBaseSpecifier **path_iterator; + typedef const CXXBaseSpecifier * const *path_const_iterator; + bool path_empty() const { return BasePathSize == 0; } + unsigned path_size() const { return BasePathSize; } + path_iterator path_begin() { return path_buffer(); } + path_iterator path_end() { return path_buffer() + path_size(); } + path_const_iterator path_begin() const { return path_buffer(); } + path_const_iterator path_end() const { return path_buffer() + path_size(); } + + void setCastPath(const CXXCastPath &Path); static bool classof(const Stmt *T) { return T->getStmtClass() >= firstCastExprConstant && @@ -2045,38 +2070,57 @@ public: /// /// In C, implicit casts always produce rvalues. However, in C++, an /// implicit cast whose result is being bound to a reference will be -/// an lvalue. For example: +/// an lvalue or xvalue. For example: /// /// @code /// class Base { }; /// class Derived : public Base { }; +/// Derived &&ref(); /// void f(Derived d) { -/// Base& b = d; // initializer is an ImplicitCastExpr to an lvalue of type Base +/// Base& b = d; // initializer is an ImplicitCastExpr +/// // to an lvalue of type Base +/// Base&& r = ref(); // initializer is an ImplicitCastExpr +/// // to an xvalue of type Base /// } /// @endcode class ImplicitCastExpr : public CastExpr { - /// LvalueCast - Whether this cast produces an lvalue. - bool LvalueCast; - -public: - ImplicitCastExpr(QualType ty, CastKind kind, Expr *op, - CXXBaseSpecifierArray BasePath, bool Lvalue) - : CastExpr(ImplicitCastExprClass, ty, kind, op, BasePath), - LvalueCast(Lvalue) { } +private: + ImplicitCastExpr(QualType ty, CastKind kind, Expr *op, + unsigned BasePathLength, ExprValueKind VK) + : CastExpr(ImplicitCastExprClass, ty, kind, op, BasePathLength) { + ValueKind = VK; + } /// \brief Construct an empty implicit cast. - explicit ImplicitCastExpr(EmptyShell Shell) - : CastExpr(ImplicitCastExprClass, Shell) { } + explicit ImplicitCastExpr(EmptyShell Shell, unsigned PathSize) + : CastExpr(ImplicitCastExprClass, Shell, PathSize) { } + +public: + enum OnStack_t { OnStack }; + ImplicitCastExpr(OnStack_t _, QualType ty, CastKind kind, Expr *op, + ExprValueKind VK) + : CastExpr(ImplicitCastExprClass, ty, kind, op, 0) { + ValueKind = VK; + } + + static ImplicitCastExpr *Create(ASTContext &Context, QualType T, + CastKind Kind, Expr *Operand, + const CXXCastPath *BasePath, + ExprValueKind Cat); + + static ImplicitCastExpr *CreateEmpty(ASTContext &Context, unsigned PathSize); virtual SourceRange getSourceRange() const { return getSubExpr()->getSourceRange(); } - /// isLvalueCast - Whether this cast produces an lvalue. - bool isLvalueCast() const { return LvalueCast; } + /// getValueKind - The value kind that this cast produces. + ExprValueKind getValueKind() const { + return static_cast(ValueKind); + } - /// setLvalueCast - Set whether this cast produces an lvalue. - void setLvalueCast(bool Lvalue) { LvalueCast = Lvalue; } + /// setValueKind - Set the value kind this cast produces. + void setValueKind(ExprValueKind Cat) { ValueKind = Cat; } static bool classof(const Stmt *T) { return T->getStmtClass() == ImplicitCastExprClass; @@ -2098,8 +2142,8 @@ public: /// actual type of the expression as determined by semantic /// analysis. These types may differ slightly. For example, in C++ one /// can cast to a reference type, which indicates that the resulting -/// expression will be an lvalue. The reference type, however, will -/// not be used as the type of the expression. +/// expression will be an lvalue or xvalue. The reference type, however, +/// will not be used as the type of the expression. class ExplicitCastExpr : public CastExpr { /// TInfo - Source type info for the (written) type /// this expression is casting to. @@ -2107,13 +2151,12 @@ class ExplicitCastExpr : public CastExpr { protected: ExplicitCastExpr(StmtClass SC, QualType exprTy, CastKind kind, - Expr *op, CXXBaseSpecifierArray BasePath, - TypeSourceInfo *writtenTy) - : CastExpr(SC, exprTy, kind, op, BasePath), TInfo(writtenTy) {} + Expr *op, unsigned PathSize, TypeSourceInfo *writtenTy) + : CastExpr(SC, exprTy, kind, op, PathSize), TInfo(writtenTy) {} /// \brief Construct an empty explicit cast. - ExplicitCastExpr(StmtClass SC, EmptyShell Shell) - : CastExpr(SC, Shell) { } + ExplicitCastExpr(StmtClass SC, EmptyShell Shell, unsigned PathSize) + : CastExpr(SC, Shell, PathSize) { } public: /// getTypeInfoAsWritten - Returns the type source info for the type @@ -2138,16 +2181,24 @@ public: class CStyleCastExpr : public ExplicitCastExpr { SourceLocation LPLoc; // the location of the left paren SourceLocation RPLoc; // the location of the right paren -public: + CStyleCastExpr(QualType exprTy, CastKind kind, Expr *op, - CXXBaseSpecifierArray BasePath, TypeSourceInfo *writtenTy, + unsigned PathSize, TypeSourceInfo *writtenTy, SourceLocation l, SourceLocation r) - : ExplicitCastExpr(CStyleCastExprClass, exprTy, kind, op, BasePath, + : ExplicitCastExpr(CStyleCastExprClass, exprTy, kind, op, PathSize, writtenTy), LPLoc(l), RPLoc(r) {} /// \brief Construct an empty C-style explicit cast. - explicit CStyleCastExpr(EmptyShell Shell) - : ExplicitCastExpr(CStyleCastExprClass, Shell) { } + explicit CStyleCastExpr(EmptyShell Shell, unsigned PathSize) + : ExplicitCastExpr(CStyleCastExprClass, Shell, PathSize) { } + +public: + static CStyleCastExpr *Create(ASTContext &Context, QualType T, CastKind K, + Expr *Op, const CXXCastPath *BasePath, + TypeSourceInfo *WrittenTy, SourceLocation L, + SourceLocation R); + + static CStyleCastExpr *CreateEmpty(ASTContext &Context, unsigned PathSize); SourceLocation getLParenLoc() const { return LPLoc; } void setLParenLoc(SourceLocation L) { LPLoc = L; } @@ -2184,33 +2235,14 @@ public: /// be used to express the computation. class BinaryOperator : public Expr { public: - enum Opcode { - // Operators listed in order of precedence. - // Note that additions to this should also update the StmtVisitor class. - PtrMemD, PtrMemI, // [C++ 5.5] Pointer-to-member operators. - Mul, Div, Rem, // [C99 6.5.5] Multiplicative operators. - Add, Sub, // [C99 6.5.6] Additive operators. - Shl, Shr, // [C99 6.5.7] Bitwise shift operators. - LT, GT, LE, GE, // [C99 6.5.8] Relational operators. - EQ, NE, // [C99 6.5.9] Equality operators. - And, // [C99 6.5.10] Bitwise AND operator. - Xor, // [C99 6.5.11] Bitwise XOR operator. - Or, // [C99 6.5.12] Bitwise OR operator. - LAnd, // [C99 6.5.13] Logical AND operator. - LOr, // [C99 6.5.14] Logical OR operator. - Assign, MulAssign,// [C99 6.5.16] Assignment operators. - DivAssign, RemAssign, - AddAssign, SubAssign, - ShlAssign, ShrAssign, - AndAssign, XorAssign, - OrAssign, - Comma // [C99 6.5.17] Comma operator. - }; + typedef BinaryOperatorKind Opcode; + private: + unsigned Opc : 6; + SourceLocation OpLoc; + enum { LHS, RHS, END_EXPR }; Stmt* SubExprs[END_EXPR]; - Opcode Opc; - SourceLocation OpLoc; public: BinaryOperator(Expr *lhs, Expr *rhs, Opcode opc, QualType ResTy, @@ -2227,12 +2259,12 @@ public: /// \brief Construct an empty binary operator. explicit BinaryOperator(EmptyShell Empty) - : Expr(BinaryOperatorClass, Empty), Opc(Comma) { } + : Expr(BinaryOperatorClass, Empty), Opc(BO_Comma) { } SourceLocation getOperatorLoc() const { return OpLoc; } void setOperatorLoc(SourceLocation L) { OpLoc = L; } - Opcode getOpcode() const { return Opc; } + Opcode getOpcode() const { return static_cast(Opc); } void setOpcode(Opcode O) { Opc = O; } Expr *getLHS() const { return cast(SubExprs[LHS]); } @@ -2248,6 +2280,8 @@ public: /// corresponds to, e.g. "<<=". static const char *getOpcodeStr(Opcode Op); + const char *getOpcodeStr() const { return getOpcodeStr(getOpcode()); } + /// \brief Retrieve the binary opcode that corresponds to the given /// overloaded operator. static Opcode getOverloadedOpcode(OverloadedOperatorKind OO); @@ -2257,30 +2291,34 @@ public: static OverloadedOperatorKind getOverloadedOperator(Opcode Opc); /// predicates to categorize the respective opcodes. - bool isMultiplicativeOp() const { return Opc >= Mul && Opc <= Rem; } - static bool isAdditiveOp(Opcode Opc) { return Opc == Add || Opc == Sub; } - bool isAdditiveOp() const { return isAdditiveOp(Opc); } - static bool isShiftOp(Opcode Opc) { return Opc == Shl || Opc == Shr; } - bool isShiftOp() const { return isShiftOp(Opc); } + bool isMultiplicativeOp() const { return Opc >= BO_Mul && Opc <= BO_Rem; } + static bool isAdditiveOp(Opcode Opc) { return Opc == BO_Add || Opc==BO_Sub; } + bool isAdditiveOp() const { return isAdditiveOp(getOpcode()); } + static bool isShiftOp(Opcode Opc) { return Opc == BO_Shl || Opc == BO_Shr; } + bool isShiftOp() const { return isShiftOp(getOpcode()); } - static bool isBitwiseOp(Opcode Opc) { return Opc >= And && Opc <= Or; } - bool isBitwiseOp() const { return isBitwiseOp(Opc); } + static bool isBitwiseOp(Opcode Opc) { return Opc >= BO_And && Opc <= BO_Or; } + bool isBitwiseOp() const { return isBitwiseOp(getOpcode()); } - static bool isRelationalOp(Opcode Opc) { return Opc >= LT && Opc <= GE; } - bool isRelationalOp() const { return isRelationalOp(Opc); } + static bool isRelationalOp(Opcode Opc) { return Opc >= BO_LT && Opc<=BO_GE; } + bool isRelationalOp() const { return isRelationalOp(getOpcode()); } - static bool isEqualityOp(Opcode Opc) { return Opc == EQ || Opc == NE; } - bool isEqualityOp() const { return isEqualityOp(Opc); } + static bool isEqualityOp(Opcode Opc) { return Opc == BO_EQ || Opc == BO_NE; } + bool isEqualityOp() const { return isEqualityOp(getOpcode()); } - static bool isComparisonOp(Opcode Opc) { return Opc >= LT && Opc <= NE; } - bool isComparisonOp() const { return isComparisonOp(Opc); } + static bool isComparisonOp(Opcode Opc) { return Opc >= BO_LT && Opc<=BO_NE; } + bool isComparisonOp() const { return isComparisonOp(getOpcode()); } - static bool isLogicalOp(Opcode Opc) { return Opc == LAnd || Opc == LOr; } - bool isLogicalOp() const { return isLogicalOp(Opc); } + static bool isLogicalOp(Opcode Opc) { return Opc == BO_LAnd || Opc==BO_LOr; } + bool isLogicalOp() const { return isLogicalOp(getOpcode()); } - bool isAssignmentOp() const { return Opc >= Assign && Opc <= OrAssign; } - bool isCompoundAssignmentOp() const { return Opc > Assign && Opc <= OrAssign;} - bool isShiftAssignOp() const { return Opc == ShlAssign || Opc == ShrAssign; } + bool isAssignmentOp() const { return Opc >= BO_Assign && Opc <= BO_OrAssign; } + bool isCompoundAssignmentOp() const { + return Opc > BO_Assign && Opc <= BO_OrAssign; + } + bool isShiftAssignOp() const { + return Opc == BO_ShlAssign || Opc == BO_ShrAssign; + } static bool classof(const Stmt *S) { return S->getStmtClass() >= firstBinaryOperatorConstant && @@ -2304,7 +2342,7 @@ protected: } BinaryOperator(StmtClass SC, EmptyShell Empty) - : Expr(SC, Empty), Opc(MulAssign) { } + : Expr(SC, Empty), Opc(BO_MulAssign) { } }; /// CompoundAssignOperator - For compound assignments (e.g. +=), we keep @@ -2353,10 +2391,11 @@ public: class ConditionalOperator : public Expr { enum { COND, LHS, RHS, END_EXPR }; Stmt* SubExprs[END_EXPR]; // Left/Middle/Right hand sides. + Stmt* Save; SourceLocation QuestionLoc, ColonLoc; public: ConditionalOperator(Expr *cond, SourceLocation QLoc, Expr *lhs, - SourceLocation CLoc, Expr *rhs, QualType t) + SourceLocation CLoc, Expr *rhs, Expr *save, QualType t) : Expr(ConditionalOperatorClass, t, // FIXME: the type of the conditional operator doesn't // depend on the type of the conditional, but the standard @@ -2370,6 +2409,7 @@ public: SubExprs[COND] = cond; SubExprs[LHS] = lhs; SubExprs[RHS] = rhs; + Save = save; } /// \brief Build an empty conditional operator. @@ -2382,25 +2422,31 @@ public: void setCond(Expr *E) { SubExprs[COND] = E; } // getTrueExpr - Return the subexpression representing the value of the ?: - // expression if the condition evaluates to true. In most cases this value - // will be the same as getLHS() except a GCC extension allows the left - // subexpression to be omitted, and instead of the condition be returned. - // e.g: x ?: y is shorthand for x ? x : y, except that the expression "x" - // is only evaluated once. + // expression if the condition evaluates to true. Expr *getTrueExpr() const { - return cast(SubExprs[LHS] ? SubExprs[LHS] : SubExprs[COND]); + return cast(!Save ? SubExprs[LHS] : SubExprs[COND]); } - // getTrueExpr - Return the subexpression representing the value of the ?: + // getFalseExpr - Return the subexpression representing the value of the ?: // expression if the condition evaluates to false. This is the same as getRHS. Expr *getFalseExpr() const { return cast(SubExprs[RHS]); } + + // getSaveExpr - In most cases this value will be null. Except a GCC extension + // allows the left subexpression to be omitted, and instead of that condition + // be returned. e.g: x ?: y is shorthand for x ? x : y, except that the + // expression "x" is only evaluated once. Under this senario, this function + // returns the original, non-converted condition expression for the ?:operator + Expr *getSaveExpr() const { return Save? cast(Save) : (Expr*)0; } - Expr *getLHS() const { return cast_or_null(SubExprs[LHS]); } + Expr *getLHS() const { return Save ? 0 : cast(SubExprs[LHS]); } void setLHS(Expr *E) { SubExprs[LHS] = E; } Expr *getRHS() const { return cast(SubExprs[RHS]); } void setRHS(Expr *E) { SubExprs[RHS] = E; } + Expr *getSAVE() const { return Save? cast(Save) : (Expr*)0; } + void setSAVE(Expr *E) { Save = E; } + SourceLocation getQuestionLoc() const { return QuestionLoc; } void setQuestionLoc(SourceLocation L) { QuestionLoc = L; } @@ -2500,23 +2546,27 @@ public: /// expressions) are compatible. The result of this built-in function can be /// used in integer constant expressions. class TypesCompatibleExpr : public Expr { - QualType Type1; - QualType Type2; + TypeSourceInfo *TInfo1; + TypeSourceInfo *TInfo2; SourceLocation BuiltinLoc, RParenLoc; public: TypesCompatibleExpr(QualType ReturnType, SourceLocation BLoc, - QualType t1, QualType t2, SourceLocation RP) : + TypeSourceInfo *tinfo1, TypeSourceInfo *tinfo2, + SourceLocation RP) : Expr(TypesCompatibleExprClass, ReturnType, false, false), - Type1(t1), Type2(t2), BuiltinLoc(BLoc), RParenLoc(RP) {} + TInfo1(tinfo1), TInfo2(tinfo2), BuiltinLoc(BLoc), RParenLoc(RP) {} /// \brief Build an empty __builtin_type_compatible_p expression. explicit TypesCompatibleExpr(EmptyShell Empty) : Expr(TypesCompatibleExprClass, Empty) { } - QualType getArgType1() const { return Type1; } - void setArgType1(QualType T) { Type1 = T; } - QualType getArgType2() const { return Type2; } - void setArgType2(QualType T) { Type2 = T; } + TypeSourceInfo *getArgTInfo1() const { return TInfo1; } + void setArgTInfo1(TypeSourceInfo *TInfo) { TInfo1 = TInfo; } + TypeSourceInfo *getArgTInfo2() const { return TInfo2; } + void setArgTInfo2(TypeSourceInfo *TInfo) { TInfo2 = TInfo; } + + QualType getArgType1() const { return TInfo1->getType(); } + QualType getArgType2() const { return TInfo2->getType(); } SourceLocation getBuiltinLoc() const { return BuiltinLoc; } void setBuiltinLoc(SourceLocation L) { BuiltinLoc = L; } @@ -2553,9 +2603,6 @@ class ShuffleVectorExpr : public Expr { Stmt **SubExprs; unsigned NumExprs; -protected: - virtual void DoDestroy(ASTContext &C); - public: // FIXME: Can a shufflevector be value-dependent? Does type-dependence need // to be computed differently? @@ -2588,8 +2635,6 @@ public: } static bool classof(const ShuffleVectorExpr *) { return true; } - ~ShuffleVectorExpr() {} - /// getNumSubExprs - Return the size of the SubExprs array. This includes the /// constant expression, the actual arguments passed in, and the function /// pointers. @@ -2716,11 +2761,13 @@ public: /// VAArgExpr, used for the builtin function __builtin_va_arg. class VAArgExpr : public Expr { Stmt *Val; + TypeSourceInfo *TInfo; SourceLocation BuiltinLoc, RParenLoc; public: - VAArgExpr(SourceLocation BLoc, Expr* e, QualType t, SourceLocation RPLoc) + VAArgExpr(SourceLocation BLoc, Expr* e, TypeSourceInfo *TInfo, + SourceLocation RPLoc, QualType t) : Expr(VAArgExprClass, t, t->isDependentType(), false), - Val(e), + Val(e), TInfo(TInfo), BuiltinLoc(BLoc), RParenLoc(RPLoc) { } @@ -2731,6 +2778,9 @@ public: Expr *getSubExpr() { return cast(Val); } void setSubExpr(Expr *E) { Val = E; } + TypeSourceInfo *getWrittenTypeInfo() const { return TInfo; } + void setWrittenTypeInfo(TypeSourceInfo *TI) { TInfo = TI; } + SourceLocation getBuiltinLoc() const { return BuiltinLoc; } void setBuiltinLoc(SourceLocation L) { BuiltinLoc = L; } @@ -2896,12 +2946,18 @@ public: virtual child_iterator child_end(); typedef InitExprsTy::iterator iterator; + typedef InitExprsTy::const_iterator const_iterator; typedef InitExprsTy::reverse_iterator reverse_iterator; + typedef InitExprsTy::const_reverse_iterator const_reverse_iterator; iterator begin() { return InitExprs.begin(); } + const_iterator begin() const { return InitExprs.begin(); } iterator end() { return InitExprs.end(); } + const_iterator end() const { return InitExprs.end(); } reverse_iterator rbegin() { return InitExprs.rbegin(); } + const_reverse_iterator rbegin() const { return InitExprs.rbegin(); } reverse_iterator rend() { return InitExprs.rend(); } + const_reverse_iterator rend() const { return InitExprs.rend(); } }; /// @brief Represents a C99 designated initializer expression. @@ -2961,11 +3017,6 @@ private: : Expr(DesignatedInitExprClass, EmptyShell()), NumDesignators(0), Designators(0), NumSubExprs(NumSubExprs) { } -protected: - virtual void DoDestroy(ASTContext &C); - - void DestroyDesignators(ASTContext &C); - public: /// A field designator, e.g., ".x". struct FieldDesignator { @@ -3233,15 +3284,10 @@ class ParenListExpr : public Expr { unsigned NumExprs; SourceLocation LParenLoc, RParenLoc; -protected: - virtual void DoDestroy(ASTContext& C); - public: ParenListExpr(ASTContext& C, SourceLocation lparenloc, Expr **exprs, unsigned numexprs, SourceLocation rparenloc); - ~ParenListExpr() {} - /// \brief Build an empty paren list. explicit ParenListExpr(EmptyShell Empty) : Expr(ParenListExprClass, Empty) { } @@ -3274,8 +3320,8 @@ public: virtual child_iterator child_begin(); virtual child_iterator child_end(); - friend class PCHStmtReader; - friend class PCHStmtWriter; + friend class ASTStmtReader; + friend class ASTStmtWriter; }; diff --git a/include/clang/AST/ExprCXX.h b/include/clang/AST/ExprCXX.h index b9553815d8e..0a9435479d9 100644 --- a/include/clang/AST/ExprCXX.h +++ b/include/clang/AST/ExprCXX.h @@ -121,12 +121,12 @@ private: protected: CXXNamedCastExpr(StmtClass SC, QualType ty, CastKind kind, Expr *op, - CXXBaseSpecifierArray BasePath, TypeSourceInfo *writtenTy, + unsigned PathSize, TypeSourceInfo *writtenTy, SourceLocation l) - : ExplicitCastExpr(SC, ty, kind, op, BasePath, writtenTy), Loc(l) {} + : ExplicitCastExpr(SC, ty, kind, op, PathSize, writtenTy), Loc(l) {} - explicit CXXNamedCastExpr(StmtClass SC, EmptyShell Shell) - : ExplicitCastExpr(SC, Shell) { } + explicit CXXNamedCastExpr(StmtClass SC, EmptyShell Shell, unsigned PathSize) + : ExplicitCastExpr(SC, Shell, PathSize) { } public: const char *getCastName() const; @@ -158,14 +158,22 @@ public: /// This expression node represents a C++ static cast, e.g., /// @c static_cast(1.0). class CXXStaticCastExpr : public CXXNamedCastExpr { -public: CXXStaticCastExpr(QualType ty, CastKind kind, Expr *op, - CXXBaseSpecifierArray BasePath, TypeSourceInfo *writtenTy, + unsigned pathSize, TypeSourceInfo *writtenTy, SourceLocation l) - : CXXNamedCastExpr(CXXStaticCastExprClass, ty, kind, op, BasePath, writtenTy, l) {} + : CXXNamedCastExpr(CXXStaticCastExprClass, ty, kind, op, pathSize, + writtenTy, l) {} - explicit CXXStaticCastExpr(EmptyShell Empty) - : CXXNamedCastExpr(CXXStaticCastExprClass, Empty) { } + explicit CXXStaticCastExpr(EmptyShell Empty, unsigned PathSize) + : CXXNamedCastExpr(CXXStaticCastExprClass, Empty, PathSize) { } + +public: + static CXXStaticCastExpr *Create(ASTContext &Context, QualType T, + CastKind K, Expr *Op, + const CXXCastPath *Path, + TypeSourceInfo *Written, SourceLocation L); + static CXXStaticCastExpr *CreateEmpty(ASTContext &Context, + unsigned PathSize); static bool classof(const Stmt *T) { return T->getStmtClass() == CXXStaticCastExprClass; @@ -180,15 +188,23 @@ public: /// This expression node represents a dynamic cast, e.g., /// @c dynamic_cast(BasePtr). class CXXDynamicCastExpr : public CXXNamedCastExpr { -public: CXXDynamicCastExpr(QualType ty, CastKind kind, Expr *op, - CXXBaseSpecifierArray BasePath, TypeSourceInfo *writtenTy, + unsigned pathSize, TypeSourceInfo *writtenTy, SourceLocation l) - : CXXNamedCastExpr(CXXDynamicCastExprClass, ty, kind, op, BasePath, + : CXXNamedCastExpr(CXXDynamicCastExprClass, ty, kind, op, pathSize, writtenTy, l) {} - explicit CXXDynamicCastExpr(EmptyShell Empty) - : CXXNamedCastExpr(CXXDynamicCastExprClass, Empty) { } + explicit CXXDynamicCastExpr(EmptyShell Empty, unsigned pathSize) + : CXXNamedCastExpr(CXXDynamicCastExprClass, Empty, pathSize) { } + +public: + static CXXDynamicCastExpr *Create(ASTContext &Context, QualType T, + CastKind Kind, Expr *Op, + const CXXCastPath *Path, + TypeSourceInfo *Written, SourceLocation L); + + static CXXDynamicCastExpr *CreateEmpty(ASTContext &Context, + unsigned pathSize); static bool classof(const Stmt *T) { return T->getStmtClass() == CXXDynamicCastExprClass; @@ -203,15 +219,22 @@ public: /// This expression node represents a reinterpret cast, e.g., /// @c reinterpret_cast(VoidPtr). class CXXReinterpretCastExpr : public CXXNamedCastExpr { -public: CXXReinterpretCastExpr(QualType ty, CastKind kind, Expr *op, - CXXBaseSpecifierArray BasePath, + unsigned pathSize, TypeSourceInfo *writtenTy, SourceLocation l) - : CXXNamedCastExpr(CXXReinterpretCastExprClass, ty, kind, op, BasePath, + : CXXNamedCastExpr(CXXReinterpretCastExprClass, ty, kind, op, pathSize, writtenTy, l) {} - explicit CXXReinterpretCastExpr(EmptyShell Empty) - : CXXNamedCastExpr(CXXReinterpretCastExprClass, Empty) { } + CXXReinterpretCastExpr(EmptyShell Empty, unsigned pathSize) + : CXXNamedCastExpr(CXXReinterpretCastExprClass, Empty, pathSize) { } + +public: + static CXXReinterpretCastExpr *Create(ASTContext &Context, QualType T, + CastKind Kind, Expr *Op, + const CXXCastPath *Path, + TypeSourceInfo *WrittenTy, SourceLocation L); + static CXXReinterpretCastExpr *CreateEmpty(ASTContext &Context, + unsigned pathSize); static bool classof(const Stmt *T) { return T->getStmtClass() == CXXReinterpretCastExprClass; @@ -225,14 +248,18 @@ public: /// This expression node represents a const cast, e.g., /// @c const_cast(PtrToConstChar). class CXXConstCastExpr : public CXXNamedCastExpr { -public: CXXConstCastExpr(QualType ty, Expr *op, TypeSourceInfo *writtenTy, SourceLocation l) : CXXNamedCastExpr(CXXConstCastExprClass, ty, CK_NoOp, op, - CXXBaseSpecifierArray(), writtenTy, l) {} + 0, writtenTy, l) {} explicit CXXConstCastExpr(EmptyShell Empty) - : CXXNamedCastExpr(CXXConstCastExprClass, Empty) { } + : CXXNamedCastExpr(CXXConstCastExprClass, Empty, 0) { } + +public: + static CXXConstCastExpr *Create(ASTContext &Context, QualType T, Expr *Op, + TypeSourceInfo *WrittenTy, SourceLocation L); + static CXXConstCastExpr *CreateEmpty(ASTContext &Context); static bool classof(const Stmt *T) { return T->getStmtClass() == CXXConstCastExprClass; @@ -479,9 +506,6 @@ class CXXDefaultArgExpr : public Expr { *reinterpret_cast(this + 1) = SubExpr; } -protected: - virtual void DoDestroy(ASTContext &C); - public: CXXDefaultArgExpr(EmptyShell Empty) : Expr(CXXDefaultArgExprClass, Empty) {} @@ -535,8 +559,8 @@ public: virtual child_iterator child_begin(); virtual child_iterator child_end(); - friend class PCHStmtReader; - friend class PCHStmtWriter; + friend class ASTStmtReader; + friend class ASTStmtWriter; }; /// CXXTemporary - Represents a C++ temporary. @@ -546,14 +570,11 @@ class CXXTemporary { CXXTemporary(const CXXDestructorDecl *destructor) : Destructor(destructor) { } - ~CXXTemporary() { } public: static CXXTemporary *Create(ASTContext &C, const CXXDestructorDecl *Destructor); - void Destroy(ASTContext &Ctx); - const CXXDestructorDecl *getDestructor() const { return Destructor; } }; @@ -579,10 +600,6 @@ class CXXBindTemporaryExpr : public Expr { CXXBindTemporaryExpr(CXXTemporary *temp, Expr* subexpr) : Expr(CXXBindTemporaryExprClass, subexpr->getType(), false, false), Temp(temp), SubExpr(subexpr) { } - ~CXXBindTemporaryExpr() { } - -protected: - virtual void DoDestroy(ASTContext &C); public: CXXBindTemporaryExpr(EmptyShell Empty) @@ -614,73 +631,6 @@ public: virtual child_iterator child_end(); }; -/// CXXBindReferenceExpr - Represents binding an expression to a reference. -/// In the example: -/// -/// const int &i = 10; -/// -/// a bind reference expression is inserted to indicate that 10 is bound to -/// a reference, and that a temporary needs to be created to hold the -/// value. -class CXXBindReferenceExpr : public Expr { - // SubExpr - The expression being bound. - Stmt *SubExpr; - - // ExtendsLifetime - Whether binding this reference extends the lifetime of - // the expression being bound. FIXME: Add C++ reference. - bool ExtendsLifetime; - - /// RequiresTemporaryCopy - Whether binding the subexpression requires a - /// temporary copy. - bool RequiresTemporaryCopy; - - CXXBindReferenceExpr(Expr *subexpr, bool ExtendsLifetime, - bool RequiresTemporaryCopy) - : Expr(CXXBindReferenceExprClass, subexpr->getType(), false, false), - SubExpr(subexpr), ExtendsLifetime(ExtendsLifetime), - RequiresTemporaryCopy(RequiresTemporaryCopy) { } - ~CXXBindReferenceExpr() { } - -protected: - virtual void DoDestroy(ASTContext &C); - -public: - static CXXBindReferenceExpr *Create(ASTContext &C, Expr *SubExpr, - bool ExtendsLifetime, - bool RequiresTemporaryCopy); - - explicit CXXBindReferenceExpr(EmptyShell Empty) - : Expr(CXXBindReferenceExprClass, Empty) { } - - const Expr *getSubExpr() const { return cast(SubExpr); } - Expr *getSubExpr() { return cast(SubExpr); } - void setSubExpr(Expr *E) { SubExpr = E; } - - virtual SourceRange getSourceRange() const { - return SubExpr->getSourceRange(); - } - - /// requiresTemporaryCopy - Whether binding the subexpression requires a - /// temporary copy. - bool requiresTemporaryCopy() const { return RequiresTemporaryCopy; } - - // extendsLifetime - Whether binding this reference extends the lifetime of - // the expression being bound. FIXME: Add C++ reference. - bool extendsLifetime() const { return ExtendsLifetime; } - - // Implement isa/cast/dyncast/etc. - static bool classof(const Stmt *T) { - return T->getStmtClass() == CXXBindReferenceExprClass; - } - static bool classof(const CXXBindReferenceExpr *) { return true; } - - // Iterators - virtual child_iterator child_begin(); - virtual child_iterator child_end(); - - friend class PCHStmtReader; -}; - /// CXXConstructExpr - Represents a call to a C++ constructor. class CXXConstructExpr : public Expr { public: @@ -707,15 +657,12 @@ protected: Expr **args, unsigned numargs, bool ZeroInitialization = false, ConstructionKind ConstructKind = CK_Complete); - ~CXXConstructExpr() { } /// \brief Construct an empty C++ construction expression. CXXConstructExpr(StmtClass SC, EmptyShell Empty) : Expr(SC, Empty), Constructor(0), Elidable(0), ZeroInitialization(0), ConstructKind(0), Args(0), NumArgs(0) { } - virtual void DoDestroy(ASTContext &C); - public: /// \brief Construct an empty C++ construction expression. explicit CXXConstructExpr(EmptyShell Empty) @@ -796,7 +743,7 @@ public: virtual child_iterator child_begin(); virtual child_iterator child_end(); - friend class PCHStmtReader; + friend class ASTStmtReader; }; /// CXXFunctionalCastExpr - Represents an explicit C++ type conversion @@ -805,17 +752,27 @@ public: class CXXFunctionalCastExpr : public ExplicitCastExpr { SourceLocation TyBeginLoc; SourceLocation RParenLoc; -public: + CXXFunctionalCastExpr(QualType ty, TypeSourceInfo *writtenTy, SourceLocation tyBeginLoc, CastKind kind, - Expr *castExpr, CXXBaseSpecifierArray BasePath, + Expr *castExpr, unsigned pathSize, SourceLocation rParenLoc) : ExplicitCastExpr(CXXFunctionalCastExprClass, ty, kind, castExpr, - BasePath, writtenTy), + pathSize, writtenTy), TyBeginLoc(tyBeginLoc), RParenLoc(rParenLoc) {} - explicit CXXFunctionalCastExpr(EmptyShell Shell) - : ExplicitCastExpr(CXXFunctionalCastExprClass, Shell) { } + explicit CXXFunctionalCastExpr(EmptyShell Shell, unsigned PathSize) + : ExplicitCastExpr(CXXFunctionalCastExprClass, Shell, PathSize) { } + +public: + static CXXFunctionalCastExpr *Create(ASTContext &Context, QualType T, + TypeSourceInfo *Written, + SourceLocation TyBeginLoc, + CastKind Kind, Expr *Op, + const CXXCastPath *Path, + SourceLocation RPLoc); + static CXXFunctionalCastExpr *CreateEmpty(ASTContext &Context, + unsigned PathSize); SourceLocation getTypeBeginLoc() const { return TyBeginLoc; } void setTypeBeginLoc(SourceLocation L) { TyBeginLoc = L; } @@ -859,8 +816,6 @@ public: explicit CXXTemporaryObjectExpr(EmptyShell Empty) : CXXConstructExpr(CXXTemporaryObjectExprClass, Empty) { } - ~CXXTemporaryObjectExpr() { } - SourceLocation getTypeBeginLoc() const { return TyBeginLoc; } SourceLocation getRParenLoc() const { return RParenLoc; } @@ -872,7 +827,7 @@ public: } static bool classof(const CXXTemporaryObjectExpr *) { return true; } - friend class PCHStmtReader; + friend class ASTStmtReader; }; /// CXXScalarValueInitExpr - [C++ 5.2.3p2] @@ -952,7 +907,7 @@ class CXXNewExpr : public Expr { SourceLocation StartLoc; SourceLocation EndLoc; - friend class PCHStmtReader; + friend class ASTStmtReader; public: CXXNewExpr(ASTContext &C, bool globalNew, FunctionDecl *operatorNew, Expr **placementArgs, unsigned numPlaceArgs, @@ -967,8 +922,6 @@ public: void AllocateArgsArray(ASTContext &C, bool isArray, unsigned numPlaceArgs, unsigned numConsArgs); - virtual void DoDestroy(ASTContext &C); - QualType getAllocatedType() const { assert(getType()->isPointerType()); return getType()->getAs()->getPointeeType(); @@ -1381,7 +1334,7 @@ public: virtual child_iterator child_begin(); virtual child_iterator child_end(); - friend class PCHStmtReader; + friend class ASTStmtReader; }; /// \brief A reference to an overloaded function set, either an @@ -1395,7 +1348,7 @@ class OverloadExpr : public Expr { unsigned NumResults; /// The common name of these declarations. - DeclarationName Name; + DeclarationNameInfo NameInfo; /// The scope specifier, if any. NestedNameSpecifier *Qualifier; @@ -1403,16 +1356,13 @@ class OverloadExpr : public Expr { /// The source range of the scope specifier. SourceRange QualifierRange; - /// The location of the name. - SourceLocation NameLoc; - protected: /// True if the name was a template-id. bool HasExplicitTemplateArgs; OverloadExpr(StmtClass K, ASTContext &C, QualType T, bool Dependent, NestedNameSpecifier *Qualifier, SourceRange QRange, - DeclarationName Name, SourceLocation NameLoc, + const DeclarationNameInfo &NameInfo, bool HasTemplateArgs, UnresolvedSetIterator Begin, UnresolvedSetIterator End); @@ -1427,19 +1377,38 @@ public: UnresolvedSetIterator End, const TemplateArgumentListInfo *Args); + struct FindResult { + OverloadExpr *Expression; + bool IsAddressOfOperand; + bool HasFormOfMemberPointer; + }; + /// Finds the overloaded expression in the given expression of /// OverloadTy. /// - /// \return the expression (which must be there) and true if it is - /// within an address-of operator. - static llvm::PointerIntPair find(Expr *E) { + /// \return the expression (which must be there) and true if it has + /// the particular form of a member pointer expression + static FindResult find(Expr *E) { assert(E->getType()->isSpecificBuiltinType(BuiltinType::Overload)); - bool op = false; + FindResult Result; + E = E->IgnoreParens(); - if (isa(E)) - op = true, E = cast(E)->getSubExpr()->IgnoreParens(); - return llvm::PointerIntPair(cast(E), op); + if (isa(E)) { + assert(cast(E)->getOpcode() == UO_AddrOf); + E = cast(E)->getSubExpr(); + OverloadExpr *Ovl = cast(E->IgnoreParens()); + + Result.HasFormOfMemberPointer = (E == Ovl && Ovl->getQualifier()); + Result.IsAddressOfOperand = true; + Result.Expression = Ovl; + } else { + Result.HasFormOfMemberPointer = false; + Result.IsAddressOfOperand = false; + Result.Expression = cast(E); + } + + return Result; } /// Gets the naming class of this lookup, if any. @@ -1457,13 +1426,17 @@ public: /// Gets the number of declarations in the unresolved set. unsigned getNumDecls() const { return NumResults; } + /// Gets the full name info. + const DeclarationNameInfo &getNameInfo() const { return NameInfo; } + void setNameInfo(const DeclarationNameInfo &N) { NameInfo = N; } + /// Gets the name looked up. - DeclarationName getName() const { return Name; } - void setName(DeclarationName N) { Name = N; } + DeclarationName getName() const { return NameInfo.getName(); } + void setName(DeclarationName N) { NameInfo.setName(N); } /// Gets the location of the name. - SourceLocation getNameLoc() const { return NameLoc; } - void setNameLoc(SourceLocation Loc) { NameLoc = Loc; } + SourceLocation getNameLoc() const { return NameInfo.getLoc(); } + void setNameLoc(SourceLocation Loc) { NameInfo.setLoc(Loc); } /// Fetches the nested-name qualifier, if one was given. NestedNameSpecifier *getQualifier() const { return Qualifier; } @@ -1483,10 +1456,12 @@ public: return const_cast(this)->getExplicitTemplateArgs(); } - ExplicitTemplateArgumentList *getOptionalExplicitTemplateArgs() { - if (hasExplicitTemplateArgs()) - return &getExplicitTemplateArgs(); - return 0; + /// \brief Retrieves the optional explicit template arguments. + /// This points to the same data as getExplicitTemplateArgs(), but + /// returns null if there are no explicit template arguments. + const ExplicitTemplateArgumentList *getOptionalExplicitTemplateArgs() { + if (!hasExplicitTemplateArgs()) return 0; + return &getExplicitTemplateArgs(); } static bool classof(const Stmt *T) { @@ -1526,11 +1501,11 @@ class UnresolvedLookupExpr : public OverloadExpr { UnresolvedLookupExpr(ASTContext &C, QualType T, bool Dependent, CXXRecordDecl *NamingClass, NestedNameSpecifier *Qualifier, SourceRange QRange, - DeclarationName Name, SourceLocation NameLoc, + const DeclarationNameInfo &NameInfo, bool RequiresADL, bool Overloaded, bool HasTemplateArgs, UnresolvedSetIterator Begin, UnresolvedSetIterator End) : OverloadExpr(UnresolvedLookupExprClass, C, T, Dependent, Qualifier, - QRange, Name, NameLoc, HasTemplateArgs, Begin, End), + QRange, NameInfo, HasTemplateArgs, Begin, End), RequiresADL(RequiresADL), Overloaded(Overloaded), NamingClass(NamingClass) {} @@ -1545,16 +1520,15 @@ public: CXXRecordDecl *NamingClass, NestedNameSpecifier *Qualifier, SourceRange QualifierRange, - DeclarationName Name, - SourceLocation NameLoc, + const DeclarationNameInfo &NameInfo, bool ADL, bool Overloaded, UnresolvedSetIterator Begin, UnresolvedSetIterator End) { return new(C) UnresolvedLookupExpr(C, Dependent ? C.DependentTy : C.OverloadTy, Dependent, NamingClass, - Qualifier, QualifierRange, - Name, NameLoc, ADL, Overloaded, false, + Qualifier, QualifierRange, NameInfo, + ADL, Overloaded, false, Begin, End); } @@ -1563,8 +1537,7 @@ public: CXXRecordDecl *NamingClass, NestedNameSpecifier *Qualifier, SourceRange QualifierRange, - DeclarationName Name, - SourceLocation NameLoc, + const DeclarationNameInfo &NameInfo, bool ADL, const TemplateArgumentListInfo &Args, UnresolvedSetIterator Begin, @@ -1603,6 +1576,14 @@ public: return *reinterpret_cast(this + 1); } + /// \brief Retrieves the optional explicit template arguments. + /// This points to the same data as getExplicitTemplateArgs(), but + /// returns null if there are no explicit template arguments. + const ExplicitTemplateArgumentList *getOptionalExplicitTemplateArgs() { + if (!hasExplicitTemplateArgs()) return 0; + return &getExplicitTemplateArgs(); + } + /// \brief Copies the template arguments (if present) into the given /// structure. void copyTemplateArgumentsInto(TemplateArgumentListInfo &List) const { @@ -1626,7 +1607,7 @@ public: } virtual SourceRange getSourceRange() const { - SourceRange Range(getNameLoc()); + SourceRange Range(getNameInfo().getSourceRange()); if (getQualifier()) Range.setBegin(getQualifierRange().getBegin()); if (hasExplicitTemplateArgs()) Range.setEnd(getRAngleLoc()); return Range; @@ -1657,10 +1638,7 @@ public: /// declaration can be found. class DependentScopeDeclRefExpr : public Expr { /// The name of the entity we will be referencing. - DeclarationName Name; - - /// Location of the name of the declaration we're referencing. - SourceLocation Loc; + DeclarationNameInfo NameInfo; /// QualifierRange - The source range that covers the /// nested-name-specifier. @@ -1676,12 +1654,10 @@ class DependentScopeDeclRefExpr : public Expr { DependentScopeDeclRefExpr(QualType T, NestedNameSpecifier *Qualifier, SourceRange QualifierRange, - DeclarationName Name, - SourceLocation NameLoc, + const DeclarationNameInfo &NameInfo, bool HasExplicitTemplateArgs) : Expr(DependentScopeDeclRefExprClass, T, true, true), - Name(Name), Loc(NameLoc), - QualifierRange(QualifierRange), Qualifier(Qualifier), + NameInfo(NameInfo), QualifierRange(QualifierRange), Qualifier(Qualifier), HasExplicitTemplateArgs(HasExplicitTemplateArgs) {} @@ -1689,20 +1665,23 @@ public: static DependentScopeDeclRefExpr *Create(ASTContext &C, NestedNameSpecifier *Qualifier, SourceRange QualifierRange, - DeclarationName Name, - SourceLocation NameLoc, + const DeclarationNameInfo &NameInfo, const TemplateArgumentListInfo *TemplateArgs = 0); static DependentScopeDeclRefExpr *CreateEmpty(ASTContext &C, unsigned NumTemplateArgs); /// \brief Retrieve the name that this expression refers to. - DeclarationName getDeclName() const { return Name; } - void setDeclName(DeclarationName N) { Name = N; } + const DeclarationNameInfo &getNameInfo() const { return NameInfo; } + void setNameInfo(const DeclarationNameInfo &N) { NameInfo = N; } + + /// \brief Retrieve the name that this expression refers to. + DeclarationName getDeclName() const { return NameInfo.getName(); } + void setDeclName(DeclarationName N) { NameInfo.setName(N); } /// \brief Retrieve the location of the name within the expression. - SourceLocation getLocation() const { return Loc; } - void setLocation(SourceLocation L) { Loc = L; } + SourceLocation getLocation() const { return NameInfo.getLoc(); } + void setLocation(SourceLocation L) { NameInfo.setLoc(L); } /// \brief Retrieve the source range of the nested-name-specifier. SourceRange getQualifierRange() const { return QualifierRange; } @@ -1731,6 +1710,14 @@ public: return *reinterpret_cast(this + 1); } + /// \brief Retrieves the optional explicit template arguments. + /// This points to the same data as getExplicitTemplateArgs(), but + /// returns null if there are no explicit template arguments. + const ExplicitTemplateArgumentList *getOptionalExplicitTemplateArgs() { + if (!hasExplicitTemplateArgs()) return 0; + return &getExplicitTemplateArgs(); + } + /// \brief Copies the template arguments (if present) into the given /// structure. void copyTemplateArgumentsInto(TemplateArgumentListInfo &List) const { @@ -1777,10 +1764,6 @@ class CXXExprWithTemporaries : public Expr { CXXExprWithTemporaries(ASTContext &C, Expr *SubExpr, CXXTemporary **Temps, unsigned NumTemps); - ~CXXExprWithTemporaries(); - -protected: - virtual void DoDestroy(ASTContext &C); public: CXXExprWithTemporaries(EmptyShell Empty) @@ -1991,10 +1974,7 @@ class CXXDependentScopeMemberExpr : public Expr { /// \brief The member to which this member expression refers, which /// can be name, overloaded operator, or destructor. /// FIXME: could also be a template-id - DeclarationName Member; - - /// \brief The location of the member name. - SourceLocation MemberLoc; + DeclarationNameInfo MemberNameInfo; CXXDependentScopeMemberExpr(ASTContext &C, Expr *Base, QualType BaseType, bool IsArrow, @@ -2002,8 +1982,7 @@ class CXXDependentScopeMemberExpr : public Expr { NestedNameSpecifier *Qualifier, SourceRange QualifierRange, NamedDecl *FirstQualifierFoundInScope, - DeclarationName Member, - SourceLocation MemberLoc, + DeclarationNameInfo MemberNameInfo, const TemplateArgumentListInfo *TemplateArgs); public: @@ -2014,14 +1993,13 @@ public: NestedNameSpecifier *Qualifier, SourceRange QualifierRange, NamedDecl *FirstQualifierFoundInScope, - DeclarationName Member, - SourceLocation MemberLoc) + DeclarationNameInfo MemberNameInfo) : Expr(CXXDependentScopeMemberExprClass, C.DependentTy, true, true), Base(Base), BaseType(BaseType), IsArrow(IsArrow), HasExplicitTemplateArgs(false), OperatorLoc(OperatorLoc), Qualifier(Qualifier), QualifierRange(QualifierRange), FirstQualifierFoundInScope(FirstQualifierFoundInScope), - Member(Member), MemberLoc(MemberLoc) { } + MemberNameInfo(MemberNameInfo) { } static CXXDependentScopeMemberExpr * Create(ASTContext &C, @@ -2030,8 +2008,7 @@ public: NestedNameSpecifier *Qualifier, SourceRange QualifierRange, NamedDecl *FirstQualifierFoundInScope, - DeclarationName Member, - SourceLocation MemberLoc, + DeclarationNameInfo MemberNameInfo, const TemplateArgumentListInfo *TemplateArgs); static CXXDependentScopeMemberExpr * @@ -2092,13 +2069,20 @@ public: /// \brief Retrieve the name of the member that this expression /// refers to. - DeclarationName getMember() const { return Member; } - void setMember(DeclarationName N) { Member = N; } + const DeclarationNameInfo &getMemberNameInfo() const { + return MemberNameInfo; + } + void setMemberNameInfo(const DeclarationNameInfo &N) { MemberNameInfo = N; } + + /// \brief Retrieve the name of the member that this expression + /// refers to. + DeclarationName getMember() const { return MemberNameInfo.getName(); } + void setMember(DeclarationName N) { MemberNameInfo.setName(N); } // \brief Retrieve the location of the name of the member that this // expression refers to. - SourceLocation getMemberLoc() const { return MemberLoc; } - void setMemberLoc(SourceLocation L) { MemberLoc = L; } + SourceLocation getMemberLoc() const { return MemberNameInfo.getLoc(); } + void setMemberLoc(SourceLocation L) { MemberNameInfo.setLoc(L); } /// \brief Determines whether this member expression actually had a C++ /// template argument list explicitly specified, e.g., x.f. @@ -2108,57 +2092,59 @@ public: /// \brief Retrieve the explicit template argument list that followed the /// member template name, if any. - ExplicitTemplateArgumentList *getExplicitTemplateArgumentList() { + ExplicitTemplateArgumentList &getExplicitTemplateArgs() { assert(HasExplicitTemplateArgs); - return reinterpret_cast(this + 1); + return *reinterpret_cast(this + 1); } /// \brief Retrieve the explicit template argument list that followed the /// member template name, if any. - const ExplicitTemplateArgumentList *getExplicitTemplateArgumentList() const { + const ExplicitTemplateArgumentList &getExplicitTemplateArgs() const { return const_cast(this) - ->getExplicitTemplateArgumentList(); + ->getExplicitTemplateArgs(); + } + + /// \brief Retrieves the optional explicit template arguments. + /// This points to the same data as getExplicitTemplateArgs(), but + /// returns null if there are no explicit template arguments. + const ExplicitTemplateArgumentList *getOptionalExplicitTemplateArgs() { + if (!hasExplicitTemplateArgs()) return 0; + return &getExplicitTemplateArgs(); } /// \brief Copies the template arguments (if present) into the given /// structure. void copyTemplateArgumentsInto(TemplateArgumentListInfo &List) const { - assert(HasExplicitTemplateArgs); - getExplicitTemplateArgumentList()->copyInto(List); + getExplicitTemplateArgs().copyInto(List); } /// \brief Initializes the template arguments using the given structure. void initializeTemplateArgumentsFrom(const TemplateArgumentListInfo &List) { - assert(HasExplicitTemplateArgs); - getExplicitTemplateArgumentList()->initializeFrom(List); + getExplicitTemplateArgs().initializeFrom(List); } /// \brief Retrieve the location of the left angle bracket following the /// member name ('<'), if any. SourceLocation getLAngleLoc() const { - assert(HasExplicitTemplateArgs); - return getExplicitTemplateArgumentList()->LAngleLoc; + return getExplicitTemplateArgs().LAngleLoc; } /// \brief Retrieve the template arguments provided as part of this /// template-id. const TemplateArgumentLoc *getTemplateArgs() const { - assert(HasExplicitTemplateArgs); - return getExplicitTemplateArgumentList()->getTemplateArgs(); + return getExplicitTemplateArgs().getTemplateArgs(); } /// \brief Retrieve the number of template arguments provided as part of this /// template-id. unsigned getNumTemplateArgs() const { - assert(HasExplicitTemplateArgs); - return getExplicitTemplateArgumentList()->NumTemplateArgs; + return getExplicitTemplateArgs().NumTemplateArgs; } /// \brief Retrieve the location of the right angle bracket following the /// template arguments ('>'). SourceLocation getRAngleLoc() const { - assert(HasExplicitTemplateArgs); - return getExplicitTemplateArgumentList()->RAngleLoc; + return getExplicitTemplateArgs().RAngleLoc; } virtual SourceRange getSourceRange() const { @@ -2168,12 +2154,12 @@ public: else if (getQualifier()) Range.setBegin(getQualifierRange().getBegin()); else - Range.setBegin(MemberLoc); + Range.setBegin(MemberNameInfo.getBeginLoc()); if (hasExplicitTemplateArgs()) Range.setEnd(getRAngleLoc()); else - Range.setEnd(MemberLoc); + Range.setEnd(MemberNameInfo.getEndLoc()); return Range; } @@ -2226,8 +2212,7 @@ class UnresolvedMemberExpr : public OverloadExpr { SourceLocation OperatorLoc, NestedNameSpecifier *Qualifier, SourceRange QualifierRange, - DeclarationName Member, - SourceLocation MemberLoc, + const DeclarationNameInfo &MemberNameInfo, const TemplateArgumentListInfo *TemplateArgs, UnresolvedSetIterator Begin, UnresolvedSetIterator End); @@ -2242,8 +2227,7 @@ public: SourceLocation OperatorLoc, NestedNameSpecifier *Qualifier, SourceRange QualifierRange, - DeclarationName Member, - SourceLocation MemberLoc, + const DeclarationNameInfo &MemberNameInfo, const TemplateArgumentListInfo *TemplateArgs, UnresolvedSetIterator Begin, UnresolvedSetIterator End); @@ -2287,6 +2271,11 @@ public: /// \brief Retrieves the naming class of this lookup. CXXRecordDecl *getNamingClass() const; + /// \brief Retrieve the full name info for the member that this expression + /// refers to. + const DeclarationNameInfo &getMemberNameInfo() const { return getNameInfo(); } + void setMemberNameInfo(const DeclarationNameInfo &N) { setNameInfo(N); } + /// \brief Retrieve the name of the member that this expression /// refers to. DeclarationName getMemberName() const { return getName(); } @@ -2311,6 +2300,14 @@ public: return *reinterpret_cast(this + 1); } + /// \brief Retrieves the optional explicit template arguments. + /// This points to the same data as getExplicitTemplateArgs(), but + /// returns null if there are no explicit template arguments. + const ExplicitTemplateArgumentList *getOptionalExplicitTemplateArgs() { + if (!hasExplicitTemplateArgs()) return 0; + return &getExplicitTemplateArgs(); + } + /// \brief Copies the template arguments into the given structure. void copyTemplateArgumentsInto(TemplateArgumentListInfo &List) const { getExplicitTemplateArgs().copyInto(List); @@ -2341,18 +2338,14 @@ public: } virtual SourceRange getSourceRange() const { - SourceRange Range; + SourceRange Range = getMemberNameInfo().getSourceRange(); if (!isImplicitAccess()) Range.setBegin(Base->getSourceRange().getBegin()); else if (getQualifier()) Range.setBegin(getQualifierRange().getBegin()); - else - Range.setBegin(getMemberLoc()); if (hasExplicitTemplateArgs()) Range.setEnd(getRAngleLoc()); - else - Range.setEnd(getMemberLoc()); return Range; } diff --git a/include/clang/AST/ExternalASTSource.h b/include/clang/AST/ExternalASTSource.h index def9ced94c2..a8ef0053a44 100644 --- a/include/clang/AST/ExternalASTSource.h +++ b/include/clang/AST/ExternalASTSource.h @@ -14,31 +14,25 @@ #ifndef LLVM_CLANG_AST_EXTERNAL_AST_SOURCE_H #define LLVM_CLANG_AST_EXTERNAL_AST_SOURCE_H -#include "clang/AST/DeclarationName.h" -#include "clang/AST/Type.h" -#include "llvm/ADT/SmallVector.h" #include #include + +namespace llvm { +template class SmallVectorImpl; +} + namespace clang { class ASTConsumer; class Decl; class DeclContext; +class DeclContextLookupResult; +class DeclarationName; class ExternalSemaSource; // layering violation required for downcasting +class NamedDecl; +class Selector; class Stmt; -/// \brief The deserialized representation of a set of declarations -/// with the same name that are visible in a given context. -struct VisibleDeclaration { - /// \brief The name of the declarations. - DeclarationName Name; - - /// \brief The ID numbers of all of the declarations with this name. - /// - /// These declarations have not necessarily been de-serialized. - llvm::SmallVector Declarations; -}; - /// \brief Abstract interface for external sources of AST nodes. /// /// External AST sources provide AST nodes constructed from some @@ -58,6 +52,20 @@ public: virtual ~ExternalASTSource(); + /// \brief RAII class for safely pairing a StartedDeserializing call + /// with FinishedDeserializing. + class Deserializing { + ExternalASTSource *Source; + public: + explicit Deserializing(ExternalASTSource *source) : Source(source) { + assert(Source); + Source->StartedDeserializing(); + } + ~Deserializing() { + Source->FinishedDeserializing(); + } + }; + /// \brief Resolve a declaration ID into a declaration, potentially /// building a new declaration. /// @@ -89,10 +97,18 @@ public: /// Generally the final step of this method is either to call /// SetExternalVisibleDeclsForName or to recursively call lookup on /// the DeclContext after calling SetExternalVisibleDecls. - virtual DeclContext::lookup_result + virtual DeclContextLookupResult FindExternalVisibleDeclsByName(const DeclContext *DC, DeclarationName Name) = 0; + /// \brief Deserialize all the visible declarations from external storage. + /// + /// Name lookup deserializes visible declarations lazily, thus a DeclContext + /// may not have a complete name lookup table. This function deserializes + /// the rest of visible declarations from the external storage and completes + /// the name lookup table of the DeclContext. + virtual void MaterializeVisibleDecls(const DeclContext *DC) = 0; + /// \brief Finds all declarations lexically contained within the given /// DeclContext. /// @@ -100,6 +116,19 @@ public: virtual bool FindExternalLexicalDecls(const DeclContext *DC, llvm::SmallVectorImpl &Result) = 0; + /// \brief Notify ExternalASTSource that we started deserialization of + /// a decl or type so until FinishedDeserializing is called there may be + /// decls that are initializing. Must be paired with FinishedDeserializing. + /// + /// The default implementation of this method is a no-op. + virtual void StartedDeserializing() { } + + /// \brief Notify ExternalASTSource that we finished the deserialization of + /// a decl or type. Must be paired with StartedDeserializing. + /// + /// The default implementation of this method is a no-op. + virtual void FinishedDeserializing() { } + /// \brief Function that will be invoked when we begin parsing a new /// translation unit involving this external AST source. /// @@ -113,30 +142,18 @@ public: virtual void PrintStats(); protected: - /// \brief Initialize the context's lookup map with the given decls. - /// It is assumed that none of the declarations are redeclarations of - /// each other. - static void SetExternalVisibleDecls(const DeclContext *DC, - const llvm::SmallVectorImpl &Decls); - - /// \brief Initialize the context's lookup map with the given decls. - /// It is assumed that none of the declarations are redeclarations of - /// each other. - static void SetExternalVisibleDecls(const DeclContext *DC, - const llvm::SmallVectorImpl &Decls); - - static DeclContext::lookup_result - SetExternalVisibleDeclsForName(const DeclContext *DC, - const VisibleDeclaration &VD); - - static DeclContext::lookup_result + static DeclContextLookupResult SetExternalVisibleDeclsForName(const DeclContext *DC, DeclarationName Name, llvm::SmallVectorImpl &Decls); - static DeclContext::lookup_result + static DeclContextLookupResult SetNoExternalVisibleDeclsForName(const DeclContext *DC, DeclarationName Name); + + void MaterializeVisibleDeclsForName(const DeclContext *DC, + DeclarationName Name, + llvm::SmallVectorImpl &Decls); }; /// \brief A lazy pointer to an AST node (of base type T) that resides @@ -145,7 +162,7 @@ protected: /// The AST node is identified within the external AST source by a /// 63-bit offset, and can be retrieved via an operation on the /// external AST source itself. -template +template struct LazyOffsetPtr { /// \brief Either a pointer to an AST node or the offset within the /// external AST source where the AST node can be found. @@ -203,9 +220,13 @@ public: }; /// \brief A lazy pointer to a statement. -typedef LazyOffsetPtr +typedef LazyOffsetPtr LazyDeclStmtPtr; +/// \brief A lazy pointer to a declaration. +typedef LazyOffsetPtr + LazyDeclPtr; + } // end namespace clang #endif // LLVM_CLANG_AST_EXTERNAL_AST_SOURCE_H diff --git a/include/clang/AST/FullExpr.h b/include/clang/AST/FullExpr.h index bb81bf0fe7c..6ceefed8a63 100644 --- a/include/clang/AST/FullExpr.h +++ b/include/clang/AST/FullExpr.h @@ -47,7 +47,6 @@ class FullExpr { public: static FullExpr Create(ASTContext &Context, Expr *SubExpr, CXXTemporary **Temps, unsigned NumTemps); - void Destroy(ASTContext &Context); Expr *getExpr() { if (Expr *E = SubExpr.dyn_cast()) diff --git a/include/clang/AST/Makefile b/include/clang/AST/Makefile index 00a1e1bf797..6ba6e897d18 100644 --- a/include/clang/AST/Makefile +++ b/include/clang/AST/Makefile @@ -1,6 +1,6 @@ CLANG_LEVEL := ../../.. TD_SRC_DIR = $(PROJ_SRC_DIR)/../Basic -BUILT_SOURCES = Attrs.inc StmtNodes.inc DeclNodes.inc +BUILT_SOURCES = Attrs.inc AttrImpl.inc StmtNodes.inc DeclNodes.inc TABLEGEN_INC_FILES_COMMON = 1 @@ -12,6 +12,12 @@ $(ObjDir)/Attrs.inc.tmp : $(TD_SRC_DIR)/Attr.td $(TBLGEN) \ $(Verb) $(TableGen) -gen-clang-attr-classes -o $(call SYSPATH, $@) \ -I $(PROJ_SRC_DIR)/../../ $< +$(ObjDir)/AttrImpl.inc.tmp : $(TD_SRC_DIR)/Attr.td $(TBLGEN) \ + $(ObjDir)/.dir + $(Echo) "Building Clang attribute implementations with tblgen" + $(Verb) $(TableGen) -gen-clang-attr-impl -o $(call SYSPATH, $@) \ + -I $(PROJ_SRC_DIR)/../../ $< + $(ObjDir)/StmtNodes.inc.tmp : $(TD_SRC_DIR)/StmtNodes.td $(TBLGEN) \ $(ObjDir)/.dir $(Echo) "Building Clang statement node tables with tblgen" diff --git a/include/clang/AST/NestedNameSpecifier.h b/include/clang/AST/NestedNameSpecifier.h index 1594b090fea..3b25f3bb403 100644 --- a/include/clang/AST/NestedNameSpecifier.h +++ b/include/clang/AST/NestedNameSpecifier.h @@ -181,8 +181,6 @@ public: ID.AddPointer(Specifier); } - void Destroy(ASTContext &Context); - /// \brief Dump the nested name specifier to standard output to aid /// in debugging. void dump(const LangOptions &LO); diff --git a/include/clang/AST/OperationKinds.h b/include/clang/AST/OperationKinds.h new file mode 100644 index 00000000000..80453119297 --- /dev/null +++ b/include/clang/AST/OperationKinds.h @@ -0,0 +1,158 @@ +//===- OperationKinds.h - Operation enums -----------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// This file enumerates the different kinds of operations that can be +// performed by various expressions. +// +//===----------------------------------------------------------------------===// + +#ifndef LLVM_CLANG_AST_OPERATION_KINDS_H +#define LLVM_CLANG_AST_OPERATION_KINDS_H + +namespace clang { + +/// CastKind - the kind of cast this represents. +enum CastKind { + /// CK_Unknown - Unknown cast kind. + /// FIXME: The goal is to get rid of this and make all casts have a + /// kind so that the AST client doesn't have to try to figure out what's + /// going on. + CK_Unknown, + + /// CK_BitCast - Used for reinterpret_cast. + CK_BitCast, + + /// CK_LValueBitCast - Used for reinterpret_cast of expressions to + /// a reference type. + CK_LValueBitCast, + + /// CK_NoOp - Used for const_cast. + CK_NoOp, + + /// CK_BaseToDerived - Base to derived class casts. + CK_BaseToDerived, + + /// CK_DerivedToBase - Derived to base class casts. + CK_DerivedToBase, + + /// CK_UncheckedDerivedToBase - Derived to base class casts that + /// assume that the derived pointer is not null. + CK_UncheckedDerivedToBase, + + /// CK_Dynamic - Dynamic cast. + CK_Dynamic, + + /// CK_ToUnion - Cast to union (GCC extension). + CK_ToUnion, + + /// CK_ArrayToPointerDecay - Array to pointer decay. + CK_ArrayToPointerDecay, + + // CK_FunctionToPointerDecay - Function to pointer decay. + CK_FunctionToPointerDecay, + + /// CK_NullToMemberPointer - Null pointer to member pointer. + CK_NullToMemberPointer, + + /// CK_BaseToDerivedMemberPointer - Member pointer in base class to + /// member pointer in derived class. + CK_BaseToDerivedMemberPointer, + + /// CK_DerivedToBaseMemberPointer - Member pointer in derived class to + /// member pointer in base class. + CK_DerivedToBaseMemberPointer, + + /// CK_UserDefinedConversion - Conversion using a user defined type + /// conversion function. + CK_UserDefinedConversion, + + /// CK_ConstructorConversion - Conversion by constructor + CK_ConstructorConversion, + + /// CK_IntegralToPointer - Integral to pointer + CK_IntegralToPointer, + + /// CK_PointerToIntegral - Pointer to integral + CK_PointerToIntegral, + + /// CK_ToVoid - Cast to void. + CK_ToVoid, + + /// CK_VectorSplat - Casting from an integer/floating type to an extended + /// vector type with the same element type as the src type. Splats the + /// src expression into the destination expression. + CK_VectorSplat, + + /// CK_IntegralCast - Casting between integral types of different size. + CK_IntegralCast, + + /// CK_IntegralToFloating - Integral to floating point. + CK_IntegralToFloating, + + /// CK_FloatingToIntegral - Floating point to integral. + CK_FloatingToIntegral, + + /// CK_FloatingCast - Casting between floating types of different size. + CK_FloatingCast, + + /// CK_MemberPointerToBoolean - Member pointer to boolean + CK_MemberPointerToBoolean, + + /// CK_AnyPointerToObjCPointerCast - Casting any pointer to objective-c + /// pointer + CK_AnyPointerToObjCPointerCast, + + /// CK_AnyPointerToBlockPointerCast - Casting any pointer to block + /// pointer + CK_AnyPointerToBlockPointerCast, + + /// \brief Converting between two Objective-C object types, which + /// can occur when performing reference binding to an Objective-C + /// object. + CK_ObjCObjectLValueCast +}; + + +enum BinaryOperatorKind { + // Operators listed in order of precedence. + // Note that additions to this should also update the StmtVisitor class. + BO_PtrMemD, BO_PtrMemI, // [C++ 5.5] Pointer-to-member operators. + BO_Mul, BO_Div, BO_Rem, // [C99 6.5.5] Multiplicative operators. + BO_Add, BO_Sub, // [C99 6.5.6] Additive operators. + BO_Shl, BO_Shr, // [C99 6.5.7] Bitwise shift operators. + BO_LT, BO_GT, BO_LE, BO_GE, // [C99 6.5.8] Relational operators. + BO_EQ, BO_NE, // [C99 6.5.9] Equality operators. + BO_And, // [C99 6.5.10] Bitwise AND operator. + BO_Xor, // [C99 6.5.11] Bitwise XOR operator. + BO_Or, // [C99 6.5.12] Bitwise OR operator. + BO_LAnd, // [C99 6.5.13] Logical AND operator. + BO_LOr, // [C99 6.5.14] Logical OR operator. + BO_Assign, BO_MulAssign, // [C99 6.5.16] Assignment operators. + BO_DivAssign, BO_RemAssign, + BO_AddAssign, BO_SubAssign, + BO_ShlAssign, BO_ShrAssign, + BO_AndAssign, BO_XorAssign, + BO_OrAssign, + BO_Comma // [C99 6.5.17] Comma operator. +}; + +enum UnaryOperatorKind { + // Note that additions to this should also update the StmtVisitor class. + UO_PostInc, UO_PostDec, // [C99 6.5.2.4] Postfix increment and decrement + UO_PreInc, UO_PreDec, // [C99 6.5.3.1] Prefix increment and decrement + UO_AddrOf, UO_Deref, // [C99 6.5.3.2] Address and indirection + UO_Plus, UO_Minus, // [C99 6.5.3.3] Unary arithmetic + UO_Not, UO_LNot, // [C99 6.5.3.3] Unary arithmetic + UO_Real, UO_Imag, // "__real expr"/"__imag expr" Extension. + UO_Extension // __extension__ marker. +}; + +} + +#endif diff --git a/include/clang/AST/RecursiveASTVisitor.h b/include/clang/AST/RecursiveASTVisitor.h index 0853dddbe9e..232e47b03ae 100644 --- a/include/clang/AST/RecursiveASTVisitor.h +++ b/include/clang/AST/RecursiveASTVisitor.h @@ -42,7 +42,7 @@ OPERATOR(Plus) OPERATOR(Minus) \ OPERATOR(Not) OPERATOR(LNot) \ OPERATOR(Real) OPERATOR(Imag) \ - OPERATOR(Extension) OPERATOR(OffsetOf) + OPERATOR(Extension) // All binary operators (excluding compound assign operators). #define BINOP_LIST() \ @@ -123,12 +123,27 @@ namespace clang { /// users may override Traverse* and WalkUpFrom* to implement custom /// traversal strategies. Returning false from one of these overridden /// functions will abort the entire traversal. +/// +/// By default, this visitor tries to visit every part of the explicit +/// source code exactly once. The default policy towards templates +/// is to descend into the 'pattern' class or function body, not any +/// explicit or implicit instantiations. Explicit specializations +/// are still visited, and the patterns of partial specializations +/// are visited separately. This behavior can be changed by +/// overriding shouldVisitTemplateInstantiations() in the derived class +/// to return true, in which case all known implicit and explicit +/// instantiations will be visited at the same time as the pattern +/// from which they were produced. template class RecursiveASTVisitor { public: /// \brief Return a reference to the derived class. Derived &getDerived() { return *static_cast(this); } + /// \brief Return whether this visitor should recurse into + /// template instantiations. + bool shouldVisitTemplateInstantiations() const { return false; } + /// \brief Recursively visit a statement or expression, by /// dispatching to Traverse*() based on the argument's dynamic type. /// @@ -351,8 +366,11 @@ public: private: // These are helper methods used by more than one Traverse* method. bool TraverseTemplateParameterListHelper(TemplateParameterList *TPL); - bool TraverseTemplateArgumentLocsHelper(const TemplateArgumentLoc *TAL, + bool TraverseClassInstantiations(ClassTemplateDecl* D, Decl *Pattern); + bool TraverseFunctionInstantiations(FunctionTemplateDecl* D) ; + bool TraverseTemplateArgumentLocsHelper(const TemplateArgumentLoc *TAL, unsigned Count); + bool TraverseArrayTypeLocHelper(ArrayTypeLoc TL); bool TraverseRecordHelper(RecordDecl *D); bool TraverseCXXRecordHelper(CXXRecordDecl *D); bool TraverseDeclaratorHelper(DeclaratorDecl *D); @@ -375,14 +393,14 @@ bool RecursiveASTVisitor::TraverseStmt(Stmt *S) { if (BinaryOperator *BinOp = dyn_cast(S)) { switch (BinOp->getOpcode()) { #define OPERATOR(NAME) \ - case BinaryOperator::NAME: DISPATCH(Bin##PtrMemD, BinaryOperator, S); + case BO_##NAME: DISPATCH(Bin##PtrMemD, BinaryOperator, S); BINOP_LIST() #undef OPERATOR #undef BINOP_LIST #define OPERATOR(NAME) \ - case BinaryOperator::NAME##Assign: \ + case BO_##NAME##Assign: \ DISPATCH(Bin##NAME##Assign, CompoundAssignOperator, S); CAO_LIST() @@ -392,7 +410,7 @@ bool RecursiveASTVisitor::TraverseStmt(Stmt *S) { } else if (UnaryOperator *UnOp = dyn_cast(S)) { switch (UnOp->getOpcode()) { #define OPERATOR(NAME) \ - case UnaryOperator::NAME: DISPATCH(Unary##NAME, UnaryOperator, S); + case UO_##NAME: DISPATCH(Unary##NAME, UnaryOperator, S); UNARYOP_LIST() #undef OPERATOR @@ -540,8 +558,11 @@ bool RecursiveASTVisitor::TraverseTemplateArgumentLoc( return true; case TemplateArgument::Type: { - TypeSourceInfo *TSI = ArgLoc.getTypeSourceInfo(); - return getDerived().TraverseTypeLoc(TSI->getTypeLoc()); + // FIXME: how can TSI ever be NULL? + if (TypeSourceInfo *TSI = ArgLoc.getTypeSourceInfo()) + return getDerived().TraverseTypeLoc(TSI->getTypeLoc()); + else + return true; } case TemplateArgument::Template: @@ -796,23 +817,31 @@ DEF_TRAVERSE_TYPELOC(MemberPointerType, { TRY_TO(TraverseTypeLoc(TL.getPointeeLoc())); }) +template +bool RecursiveASTVisitor::TraverseArrayTypeLocHelper(ArrayTypeLoc TL) { + // This isn't available for ArrayType, but is for the ArrayTypeLoc. + TRY_TO(TraverseStmt(TL.getSizeExpr())); + return true; +} + DEF_TRAVERSE_TYPELOC(ConstantArrayType, { TRY_TO(TraverseTypeLoc(TL.getElementLoc())); + return TraverseArrayTypeLocHelper(TL); }) DEF_TRAVERSE_TYPELOC(IncompleteArrayType, { TRY_TO(TraverseTypeLoc(TL.getElementLoc())); + return TraverseArrayTypeLocHelper(TL); }) DEF_TRAVERSE_TYPELOC(VariableArrayType, { TRY_TO(TraverseTypeLoc(TL.getElementLoc())); - TRY_TO(TraverseStmt(TL.getTypePtr()->getSizeExpr())); + return TraverseArrayTypeLocHelper(TL); }) DEF_TRAVERSE_TYPELOC(DependentSizedArrayType, { TRY_TO(TraverseTypeLoc(TL.getElementLoc())); - if (TL.getTypePtr()->getSizeExpr()) - TRY_TO(TraverseStmt(TL.getTypePtr()->getSizeExpr())); + return TraverseArrayTypeLocHelper(TL); }) // FIXME: order? why not size expr first? @@ -1083,19 +1112,124 @@ bool RecursiveASTVisitor::TraverseTemplateParameterListHelper( return true; } +// A helper method for traversing the implicit instantiations of a +// class. +template +bool RecursiveASTVisitor::TraverseClassInstantiations( + ClassTemplateDecl* D, Decl *Pattern) { + assert(isa(Pattern) || + isa(Pattern)); + + ClassTemplateDecl::spec_iterator end = D->spec_end(); + for (ClassTemplateDecl::spec_iterator it = D->spec_begin(); it != end; ++it) { + ClassTemplateSpecializationDecl* SD = *it; + + switch (SD->getSpecializationKind()) { + // Visit the implicit instantiations with the requested pattern. + case TSK_ImplicitInstantiation: { + llvm::PointerUnion U + = SD->getInstantiatedFrom(); + + bool ShouldVisit; + if (U.is()) + ShouldVisit = (U.get() == Pattern); + else + ShouldVisit + = (U.get() == Pattern); + + if (ShouldVisit) + TRY_TO(TraverseClassTemplateSpecializationDecl(SD)); + break; + } + + // We don't need to do anything on an explicit instantiation + // or explicit specialization because there will be an explicit + // node for it elsewhere. + case TSK_ExplicitInstantiationDeclaration: + case TSK_ExplicitInstantiationDefinition: + case TSK_ExplicitSpecialization: + break; + + // We don't need to do anything for an uninstantiated + // specialization. + case TSK_Undeclared: + break; + } + } + + return true; +} + DEF_TRAVERSE_DECL(ClassTemplateDecl, { - TRY_TO(TraverseDecl(D->getTemplatedDecl())); + CXXRecordDecl* TempDecl = D->getTemplatedDecl(); + TRY_TO(TraverseDecl(TempDecl)); TRY_TO(TraverseTemplateParameterListHelper(D->getTemplateParameters())); - // We should not traverse the specializations/partial - // specializations. Those will show up in other contexts. - // getInstantiatedFromMemberTemplate() is just a link from a - // template instantiation back to the template from which it was - // instantiated, and thus should not be traversed either. + + // By default, we do not traverse the instantiations of + // class templates since they do not apprear in the user code. The + // following code optionally traverses them. + if (getDerived().shouldVisitTemplateInstantiations()) { + // If this is the definition of the primary template, visit + // instantiations which were formed from this pattern. + if (D->isThisDeclarationADefinition()) + TRY_TO(TraverseClassInstantiations(D, D)); + } + + // Note that getInstantiatedFromMemberTemplate() is just a link + // from a template instantiation back to the template from which + // it was instantiated, and thus should not be traversed. }) +// A helper method for traversing the instantiations of a +// function while skipping its specializations. +template +bool RecursiveASTVisitor::TraverseFunctionInstantiations( + FunctionTemplateDecl* D) { + FunctionTemplateDecl::spec_iterator end = D->spec_end(); + for (FunctionTemplateDecl::spec_iterator it = D->spec_begin(); it != end; ++it) { + FunctionDecl* FD = *it; + switch (FD->getTemplateSpecializationKind()) { + case TSK_ImplicitInstantiation: + // We don't know what kind of FunctionDecl this is. + TRY_TO(TraverseDecl(FD)); + break; + + // No need to visit explicit instantiations, we'll find the node + // eventually. + case TSK_ExplicitInstantiationDeclaration: + case TSK_ExplicitInstantiationDefinition: + break; + + case TSK_Undeclared: // Declaration of the template definition. + case TSK_ExplicitSpecialization: + break; + default: + assert(false && "Unknown specialization kind."); + } + } + + return true; +} + DEF_TRAVERSE_DECL(FunctionTemplateDecl, { TRY_TO(TraverseDecl(D->getTemplatedDecl())); TRY_TO(TraverseTemplateParameterListHelper(D->getTemplateParameters())); + + // By default, we do not traverse the instantiations of + // function templates since they do not apprear in the user code. The + // following code optionally traverses them. + if (getDerived().shouldVisitTemplateInstantiations()) { + // Explicit function specializations will be traversed from the + // context of their declaration. There is therefore no need to + // traverse them for here. + // + // In addition, we only traverse the function instantiations when + // the function template is a function template definition. + if (D->isThisDeclarationADefinition()) { + TRY_TO(TraverseFunctionInstantiations(D)); + } + } }) DEF_TRAVERSE_DECL(TemplateTemplateParmDecl, { @@ -1110,10 +1244,10 @@ DEF_TRAVERSE_DECL(TemplateTemplateParmDecl, { DEF_TRAVERSE_DECL(TemplateTypeParmDecl, { // D is the "T" in something like "template class vector;" - if (D->hasDefaultArgument()) - TRY_TO(TraverseTypeLoc(D->getDefaultArgumentInfo()->getTypeLoc())); if (D->getTypeForDecl()) TRY_TO(TraverseType(QualType(D->getTypeForDecl(), 0))); + if (D->hasDefaultArgument()) + TRY_TO(TraverseTypeLoc(D->getDefaultArgumentInfo()->getTypeLoc())); }) DEF_TRAVERSE_DECL(TypedefDecl, { @@ -1166,7 +1300,7 @@ bool RecursiveASTVisitor::TraverseCXXRecordHelper( for (CXXRecordDecl::base_class_iterator I = D->bases_begin(), E = D->bases_end(); I != E; ++I) { - TRY_TO(TraverseType(I->getType())); + TRY_TO(TraverseTypeLoc(I->getTypeSourceInfo()->getTypeLoc())); } // We don't traverse the friends or the conversions, as they are // already in decls_begin()/decls_end(). @@ -1191,10 +1325,16 @@ DEF_TRAVERSE_DECL(ClassTemplateSpecializationDecl, { // ("template set;"), we do need a callback, since this // is the only callback that's made for this instantiation. // We use getTypeAsWritten() to distinguish. - // FIXME: see how we want to handle template specializations. if (TypeSourceInfo *TSI = D->getTypeAsWritten()) TRY_TO(TraverseTypeLoc(TSI->getTypeLoc())); - return true; + + if (!getDerived().shouldVisitTemplateInstantiations() && + D->getTemplateSpecializationKind() != TSK_ExplicitSpecialization) + // Returning from here skips traversing the + // declaration context of the ClassTemplateSpecializationDecl + // (embedded in the DEF_TRAVERSE_DECL() macro) + // which contains the instantiated members of the class. + return true; }) template @@ -1222,6 +1362,12 @@ DEF_TRAVERSE_DECL(ClassTemplatePartialSpecializationDecl, { // though that's our parent class -- we already visit all the // template args here. TRY_TO(TraverseCXXRecordHelper(D)); + + // If we're visiting instantiations, visit the instantiations of + // this template now. + if (getDerived().shouldVisitTemplateInstantiations() && + D->isThisDeclarationADefinition()) + TRY_TO(TraverseClassInstantiations(D->getSpecializedTemplate(), D)); }) DEF_TRAVERSE_DECL(EnumConstantDecl, { @@ -1304,7 +1450,45 @@ bool RecursiveASTVisitor::TraverseFunctionHelper(FunctionDecl *D) { } TRY_TO(TraverseType(D->getResultType())); - TRY_TO(TraverseDeclContextHelper(D)); // Parameters. + + // If we're an explicit template specialization, iterate over the + // template args that were explicitly specified. + if (const FunctionTemplateSpecializationInfo *FTSI = + D->getTemplateSpecializationInfo()) { + if (FTSI->getTemplateSpecializationKind() != TSK_Undeclared && + FTSI->getTemplateSpecializationKind() != TSK_ImplicitInstantiation) { + // A specialization might not have explicit template arguments if it has + // a templated return type and concrete arguments. + if (const TemplateArgumentListInfo *TALI = + FTSI->TemplateArgumentsAsWritten) { + TRY_TO(TraverseTemplateArgumentLocsHelper(TALI->getArgumentArray(), + TALI->size())); + } + } + } + + for (FunctionDecl::param_iterator I = D->param_begin(), E = D->param_end(); + I != E; ++I) { + TRY_TO(TraverseDecl(*I)); + } + + if (FunctionProtoType *FuncProto = dyn_cast(FuncType)) { + if (D->isThisDeclarationADefinition()) { + // This would be visited if we called TraverseType(D->getType()) + // above, but we don't (at least, not in the + // declaration-is-a-definition case), in order to avoid duplicate + // visiting for parameters. (We need to check parameters here, + // rather than letting D->getType() do it, so we visit default + // parameter values). So we need to re-do some of the work the + // type would do. + for (FunctionProtoType::exception_iterator + E = FuncProto->exception_begin(), + EEnd = FuncProto->exception_end(); + E != EEnd; ++E) { + TRY_TO(TraverseType(*E)); + } + } + } if (CXXConstructorDecl *Ctor = dyn_cast(D)) { // Constructor initializers. @@ -1356,9 +1540,6 @@ DEF_TRAVERSE_DECL(CXXDestructorDecl, { template bool RecursiveASTVisitor::TraverseVarHelper(VarDecl *D) { TRY_TO(TraverseDeclaratorHelper(D)); - // FIXME: This often double-counts -- for instance, for all local - // vars, though not for global vars -- because the initializer is - // also captured when the var-decl is in a DeclStmt. TRY_TO(TraverseStmt(D->getInit())); return true; } @@ -1373,11 +1554,13 @@ DEF_TRAVERSE_DECL(ImplicitParamDecl, { DEF_TRAVERSE_DECL(NonTypeTemplateParmDecl, { // A non-type template parameter, e.g. "S" in template class Foo ... - TRY_TO(TraverseStmt(D->getDefaultArgument())); TRY_TO(TraverseVarHelper(D)); + TRY_TO(TraverseStmt(D->getDefaultArgument())); }) DEF_TRAVERSE_DECL(ParmVarDecl, { + TRY_TO(TraverseVarHelper(D)); + if (D->hasDefaultArg() && D->hasUninstantiatedDefaultArg() && !D->hasUnparsedDefaultArg()) @@ -1387,8 +1570,6 @@ DEF_TRAVERSE_DECL(ParmVarDecl, { !D->hasUninstantiatedDefaultArg() && !D->hasUnparsedDefaultArg()) TRY_TO(TraverseStmt(D->getDefaultArg())); - - TRY_TO(TraverseVarHelper(D)); }) #undef DEF_TRAVERSE_DECL @@ -1431,35 +1612,36 @@ DEF_TRAVERSE_STMT(AsmStmt, { }) DEF_TRAVERSE_STMT(CXXCatchStmt, { - // We don't traverse S->getCaughtType(), as we are already - // traversing the exception object, which has this type. + TRY_TO(TraverseDecl(S->getExceptionDecl())); // child_begin()/end() iterates over the handler block. }) -DEF_TRAVERSE_STMT(ForStmt, { - TRY_TO(TraverseDecl(S->getConditionVariable())); - // child_begin()/end() iterates over init, cond, inc, and body stmts. +DEF_TRAVERSE_STMT(DeclStmt, { + for (DeclStmt::decl_iterator I = S->decl_begin(), E = S->decl_end(); + I != E; ++I) { + TRY_TO(TraverseDecl(*I)); + } + // Suppress the default iteration over child_begin/end by + // returning. Here's why: A DeclStmt looks like 'type var [= + // initializer]'. The decls above already traverse over the + // initializers, so we don't have to do it again (which + // child_begin/end would do). + return true; }) -DEF_TRAVERSE_STMT(IfStmt, { - TRY_TO(TraverseDecl(S->getConditionVariable())); - // child_begin()/end() iterates over cond, then, and else stmts. - }) - -DEF_TRAVERSE_STMT(WhileStmt, { - TRY_TO(TraverseDecl(S->getConditionVariable())); - // child_begin()/end() iterates over cond, then, and else stmts. - }) // These non-expr stmts (most of them), do not need any action except // iterating over the children. DEF_TRAVERSE_STMT(BreakStmt, { }) +DEF_TRAVERSE_STMT(CXXTryStmt, { }) +DEF_TRAVERSE_STMT(CaseStmt, { }) DEF_TRAVERSE_STMT(CompoundStmt, { }) DEF_TRAVERSE_STMT(ContinueStmt, { }) -DEF_TRAVERSE_STMT(CXXTryStmt, { }) -DEF_TRAVERSE_STMT(DeclStmt, { }) +DEF_TRAVERSE_STMT(DefaultStmt, { }) DEF_TRAVERSE_STMT(DoStmt, { }) +DEF_TRAVERSE_STMT(ForStmt, { }) DEF_TRAVERSE_STMT(GotoStmt, { }) +DEF_TRAVERSE_STMT(IfStmt, { }) DEF_TRAVERSE_STMT(IndirectGotoStmt, { }) DEF_TRAVERSE_STMT(LabelStmt, { }) DEF_TRAVERSE_STMT(NullStmt, { }) @@ -1470,10 +1652,10 @@ DEF_TRAVERSE_STMT(ObjCAtThrowStmt, { }) DEF_TRAVERSE_STMT(ObjCAtTryStmt, { }) DEF_TRAVERSE_STMT(ObjCForCollectionStmt, { }) DEF_TRAVERSE_STMT(ReturnStmt, { }) -DEF_TRAVERSE_STMT(SwitchStmt, { }) DEF_TRAVERSE_STMT(SwitchCase, { }) -DEF_TRAVERSE_STMT(CaseStmt, { }) -DEF_TRAVERSE_STMT(DefaultStmt, { }) +DEF_TRAVERSE_STMT(SwitchStmt, { }) +DEF_TRAVERSE_STMT(WhileStmt, { }) + DEF_TRAVERSE_STMT(CXXDependentScopeMemberExpr, { if (S->hasExplicitTemplateArgs()) { @@ -1565,6 +1747,37 @@ DEF_TRAVERSE_STMT(CXXNewExpr, { TRY_TO(TraverseType(S->getAllocatedType())); }) +DEF_TRAVERSE_STMT(OffsetOfExpr, { + // The child-iterator will pick up the expression representing + // the field. + // FIMXE: for code like offsetof(Foo, a.b.c), should we get + // making a MemberExpr callbacks for Foo.a, Foo.a.b, and Foo.a.b.c? + TRY_TO(TraverseTypeLoc(S->getTypeSourceInfo()->getTypeLoc())); + }) + +DEF_TRAVERSE_STMT(SizeOfAlignOfExpr, { + // The child-iterator will pick up the arg if it's an expression, + // but not if it's a type. + if (S->isArgumentType()) + TRY_TO(TraverseTypeLoc(S->getArgumentTypeInfo()->getTypeLoc())); + }) + +DEF_TRAVERSE_STMT(CXXTypeidExpr, { + // The child-iterator will pick up the arg if it's an expression, + // but not if it's a type. + if (S->isTypeOperand()) + TRY_TO(TraverseTypeLoc(S->getTypeOperandSourceInfo()->getTypeLoc())); + }) + +DEF_TRAVERSE_STMT(TypesCompatibleExpr, { + TRY_TO(TraverseTypeLoc(S->getArgTInfo1()->getTypeLoc())); + TRY_TO(TraverseTypeLoc(S->getArgTInfo2()->getTypeLoc())); + }) + +DEF_TRAVERSE_STMT(UnaryTypeTraitExpr, { + TRY_TO(TraverseType(S->getQueriedType())); + }) + // These exprs (most of them), do not need any action except iterating // over the children. DEF_TRAVERSE_STMT(AddrLabelExpr, { }) @@ -1573,7 +1786,6 @@ DEF_TRAVERSE_STMT(BlockDeclRefExpr, { }) DEF_TRAVERSE_STMT(BlockExpr, { }) DEF_TRAVERSE_STMT(ChooseExpr, { }) DEF_TRAVERSE_STMT(CompoundLiteralExpr, { }) -DEF_TRAVERSE_STMT(CXXBindReferenceExpr, { }) DEF_TRAVERSE_STMT(CXXBindTemporaryExpr, { }) DEF_TRAVERSE_STMT(CXXBoolLiteralExpr, { }) DEF_TRAVERSE_STMT(CXXDefaultArgExpr, { }) @@ -1583,7 +1795,6 @@ DEF_TRAVERSE_STMT(CXXNullPtrLiteralExpr, { }) DEF_TRAVERSE_STMT(CXXPseudoDestructorExpr, { }) DEF_TRAVERSE_STMT(CXXThisExpr, { }) DEF_TRAVERSE_STMT(CXXThrowExpr, { }) -DEF_TRAVERSE_STMT(CXXTypeidExpr, { }) DEF_TRAVERSE_STMT(CXXUnresolvedConstructExpr, { }) DEF_TRAVERSE_STMT(DesignatedInitExpr, { }) DEF_TRAVERSE_STMT(ExtVectorElementExpr, { }) @@ -1598,18 +1809,17 @@ DEF_TRAVERSE_STMT(ObjCPropertyRefExpr, { }) DEF_TRAVERSE_STMT(ObjCProtocolExpr, { }) DEF_TRAVERSE_STMT(ObjCSelectorExpr, { }) DEF_TRAVERSE_STMT(ObjCSuperExpr, { }) -DEF_TRAVERSE_STMT(OffsetOfExpr, { }) DEF_TRAVERSE_STMT(ParenExpr, { }) DEF_TRAVERSE_STMT(ParenListExpr, { }) DEF_TRAVERSE_STMT(PredefinedExpr, { }) DEF_TRAVERSE_STMT(ShuffleVectorExpr, { }) -DEF_TRAVERSE_STMT(SizeOfAlignOfExpr, { }) DEF_TRAVERSE_STMT(StmtExpr, { }) -DEF_TRAVERSE_STMT(TypesCompatibleExpr, { }) -DEF_TRAVERSE_STMT(UnaryTypeTraitExpr, { }) DEF_TRAVERSE_STMT(UnresolvedLookupExpr, { }) DEF_TRAVERSE_STMT(UnresolvedMemberExpr, { }) -DEF_TRAVERSE_STMT(VAArgExpr, { }) +DEF_TRAVERSE_STMT(VAArgExpr, { + // The child-iterator will pick up the expression argument. + TRY_TO(TraverseTypeLoc(S->getWrittenTypeInfo()->getTypeLoc())); + }) DEF_TRAVERSE_STMT(CXXConstructExpr, { }) DEF_TRAVERSE_STMT(CXXTemporaryObjectExpr, { diff --git a/include/clang/AST/Redeclarable.h b/include/clang/AST/Redeclarable.h index 55e1f847799..ba778293ba2 100644 --- a/include/clang/AST/Redeclarable.h +++ b/include/clang/AST/Redeclarable.h @@ -177,6 +177,9 @@ public: static_cast(this))); } redecl_iterator redecls_end() const { return redecl_iterator(); } + + friend class ASTDeclReader; + friend class ASTDeclWriter; }; } diff --git a/include/clang/AST/Stmt.h b/include/clang/AST/Stmt.h index a0c95b1fce8..62a6b6463df 100644 --- a/include/clang/AST/Stmt.h +++ b/include/clang/AST/Stmt.h @@ -151,22 +151,11 @@ public: struct EmptyShell { }; protected: - /// DestroyChildren - Invoked by destructors of subclasses of Stmt to - /// recursively release child AST nodes. - void DestroyChildren(ASTContext& Ctx); - /// \brief Construct an empty statement. explicit Stmt(StmtClass SC, EmptyShell) : sClass(SC), RefCount(1) { if (Stmt::CollectingStats()) Stmt::addStmtClass(SC); } - /// \brief Virtual method that performs the actual destruction of - /// this statement. - /// - /// Subclasses should override this method (not Destroy()) to - /// provide class-specific destruction. - virtual void DoDestroy(ASTContext &Ctx); - public: Stmt(StmtClass SC) : sClass(SC), RefCount(1) { if (Stmt::CollectingStats()) Stmt::addStmtClass(SC); @@ -181,13 +170,6 @@ public: } #endif - /// \brief Destroy the current statement and its children. - void Destroy(ASTContext &Ctx) { - assert(RefCount >= 1); - if (--RefCount == 0) - DoDestroy(Ctx); - } - /// \brief Increases the reference count for this statement. /// /// Invoke the Retain() operation when this statement or expression @@ -221,6 +203,7 @@ public: /// This is useful in a debugger. void dump() const; void dump(SourceManager &SM) const; + void dump(llvm::raw_ostream &OS, SourceManager &SM) const; /// dumpAll - This does a dump of the specified AST fragment and all subtrees. void dumpAll() const; @@ -295,9 +278,6 @@ class DeclStmt : public Stmt { DeclGroupRef DG; SourceLocation StartLoc, EndLoc; -protected: - virtual void DoDestroy(ASTContext &Ctx); - public: DeclStmt(DeclGroupRef dg, SourceLocation startLoc, SourceLocation endLoc) : Stmt(DeclStmtClass), DG(dg), @@ -671,9 +651,6 @@ public: // over the initialization expression referenced by the condition variable. virtual child_iterator child_begin(); virtual child_iterator child_end(); - -protected: - virtual void DoDestroy(ASTContext &Ctx); }; /// SwitchStmt - This represents a 'switch' stmt. @@ -685,9 +662,6 @@ class SwitchStmt : public Stmt { SwitchCase *FirstCase; SourceLocation SwitchLoc; -protected: - virtual void DoDestroy(ASTContext &Ctx); - public: SwitchStmt(ASTContext &C, VarDecl *Var, Expr *cond); @@ -794,9 +768,6 @@ public: // Iterators virtual child_iterator child_begin(); virtual child_iterator child_end(); - -protected: - virtual void DoDestroy(ASTContext &Ctx); }; /// DoStmt - This represents a 'do/while' stmt. @@ -910,9 +881,6 @@ public: // Iterators virtual child_iterator child_begin(); virtual child_iterator child_end(); - -protected: - virtual void DoDestroy(ASTContext &Ctx); }; /// GotoStmt - This represents a direct goto. @@ -1113,9 +1081,6 @@ class AsmStmt : public Stmt { StringLiteral **Constraints; Stmt **Exprs; StringLiteral **Clobbers; - -protected: - virtual void DoDestroy(ASTContext &Ctx); public: AsmStmt(ASTContext &C, SourceLocation asmloc, bool issimple, bool isvolatile, diff --git a/include/clang/AST/StmtCXX.h b/include/clang/AST/StmtCXX.h index 4e87c2701c2..0508f35e48e 100644 --- a/include/clang/AST/StmtCXX.h +++ b/include/clang/AST/StmtCXX.h @@ -29,14 +29,14 @@ class CXXCatchStmt : public Stmt { /// The handler block. Stmt *HandlerBlock; -protected: - virtual void DoDestroy(ASTContext& Ctx); - public: CXXCatchStmt(SourceLocation catchLoc, VarDecl *exDecl, Stmt *handlerBlock) : Stmt(CXXCatchStmtClass), CatchLoc(catchLoc), ExceptionDecl(exDecl), HandlerBlock(handlerBlock) {} + CXXCatchStmt(EmptyShell Empty) + : Stmt(CXXCatchStmtClass), ExceptionDecl(0), HandlerBlock(0) {} + virtual SourceRange getSourceRange() const { return SourceRange(CatchLoc, HandlerBlock->getLocEnd()); } @@ -53,6 +53,8 @@ public: virtual child_iterator child_begin(); virtual child_iterator child_end(); + + friend class ASTStmtReader; }; /// CXXTryStmt - A C++ try block, including all handlers. @@ -64,38 +66,46 @@ class CXXTryStmt : public Stmt { CXXTryStmt(SourceLocation tryLoc, Stmt *tryBlock, Stmt **handlers, unsigned numHandlers); + CXXTryStmt(EmptyShell Empty, unsigned numHandlers) + : Stmt(CXXTryStmtClass), NumHandlers(numHandlers) { } + + Stmt const * const *getStmts() const { + return reinterpret_cast(this + 1); + } + Stmt **getStmts() { + return reinterpret_cast(this + 1); + } + public: static CXXTryStmt *Create(ASTContext &C, SourceLocation tryLoc, Stmt *tryBlock, Stmt **handlers, unsigned numHandlers); + static CXXTryStmt *Create(ASTContext &C, EmptyShell Empty, + unsigned numHandlers); + virtual SourceRange getSourceRange() const { return SourceRange(getTryLoc(), getEndLoc()); } SourceLocation getTryLoc() const { return TryLoc; } SourceLocation getEndLoc() const { - Stmt const * const*Stmts = reinterpret_cast(this + 1); - return Stmts[NumHandlers]->getLocEnd(); + return getStmts()[NumHandlers]->getLocEnd(); } CompoundStmt *getTryBlock() { - Stmt **Stmts = reinterpret_cast(this + 1); - return llvm::cast(Stmts[0]); + return llvm::cast(getStmts()[0]); } const CompoundStmt *getTryBlock() const { - Stmt const * const*Stmts = reinterpret_cast(this + 1); - return llvm::cast(Stmts[0]); + return llvm::cast(getStmts()[0]); } unsigned getNumHandlers() const { return NumHandlers; } CXXCatchStmt *getHandler(unsigned i) { - Stmt **Stmts = reinterpret_cast(this + 1); - return llvm::cast(Stmts[i + 1]); + return llvm::cast(getStmts()[i + 1]); } const CXXCatchStmt *getHandler(unsigned i) const { - Stmt const * const*Stmts = reinterpret_cast(this + 1); - return llvm::cast(Stmts[i + 1]); + return llvm::cast(getStmts()[i + 1]); } static bool classof(const Stmt *T) { @@ -105,6 +115,8 @@ public: virtual child_iterator child_begin(); virtual child_iterator child_end(); + + friend class ASTStmtReader; }; diff --git a/include/clang/AST/StmtVisitor.h b/include/clang/AST/StmtVisitor.h index 8078451fa31..b8c141d7ef8 100644 --- a/include/clang/AST/StmtVisitor.h +++ b/include/clang/AST/StmtVisitor.h @@ -37,68 +37,57 @@ public: if (BinaryOperator *BinOp = dyn_cast(S)) { switch (BinOp->getOpcode()) { default: assert(0 && "Unknown binary operator!"); - case BinaryOperator::PtrMemD: DISPATCH(BinPtrMemD, BinaryOperator); - case BinaryOperator::PtrMemI: DISPATCH(BinPtrMemI, BinaryOperator); - case BinaryOperator::Mul: DISPATCH(BinMul, BinaryOperator); - case BinaryOperator::Div: DISPATCH(BinDiv, BinaryOperator); - case BinaryOperator::Rem: DISPATCH(BinRem, BinaryOperator); - case BinaryOperator::Add: DISPATCH(BinAdd, BinaryOperator); - case BinaryOperator::Sub: DISPATCH(BinSub, BinaryOperator); - case BinaryOperator::Shl: DISPATCH(BinShl, BinaryOperator); - case BinaryOperator::Shr: DISPATCH(BinShr, BinaryOperator); + case BO_PtrMemD: DISPATCH(BinPtrMemD, BinaryOperator); + case BO_PtrMemI: DISPATCH(BinPtrMemI, BinaryOperator); + case BO_Mul: DISPATCH(BinMul, BinaryOperator); + case BO_Div: DISPATCH(BinDiv, BinaryOperator); + case BO_Rem: DISPATCH(BinRem, BinaryOperator); + case BO_Add: DISPATCH(BinAdd, BinaryOperator); + case BO_Sub: DISPATCH(BinSub, BinaryOperator); + case BO_Shl: DISPATCH(BinShl, BinaryOperator); + case BO_Shr: DISPATCH(BinShr, BinaryOperator); - case BinaryOperator::LT: DISPATCH(BinLT, BinaryOperator); - case BinaryOperator::GT: DISPATCH(BinGT, BinaryOperator); - case BinaryOperator::LE: DISPATCH(BinLE, BinaryOperator); - case BinaryOperator::GE: DISPATCH(BinGE, BinaryOperator); - case BinaryOperator::EQ: DISPATCH(BinEQ, BinaryOperator); - case BinaryOperator::NE: DISPATCH(BinNE, BinaryOperator); + case BO_LT: DISPATCH(BinLT, BinaryOperator); + case BO_GT: DISPATCH(BinGT, BinaryOperator); + case BO_LE: DISPATCH(BinLE, BinaryOperator); + case BO_GE: DISPATCH(BinGE, BinaryOperator); + case BO_EQ: DISPATCH(BinEQ, BinaryOperator); + case BO_NE: DISPATCH(BinNE, BinaryOperator); - case BinaryOperator::And: DISPATCH(BinAnd, BinaryOperator); - case BinaryOperator::Xor: DISPATCH(BinXor, BinaryOperator); - case BinaryOperator::Or : DISPATCH(BinOr, BinaryOperator); - case BinaryOperator::LAnd: DISPATCH(BinLAnd, BinaryOperator); - case BinaryOperator::LOr : DISPATCH(BinLOr, BinaryOperator); - case BinaryOperator::Assign: DISPATCH(BinAssign, BinaryOperator); - case BinaryOperator::MulAssign: - DISPATCH(BinMulAssign, CompoundAssignOperator); - case BinaryOperator::DivAssign: - DISPATCH(BinDivAssign, CompoundAssignOperator); - case BinaryOperator::RemAssign: - DISPATCH(BinRemAssign, CompoundAssignOperator); - case BinaryOperator::AddAssign: - DISPATCH(BinAddAssign, CompoundAssignOperator); - case BinaryOperator::SubAssign: - DISPATCH(BinSubAssign, CompoundAssignOperator); - case BinaryOperator::ShlAssign: - DISPATCH(BinShlAssign, CompoundAssignOperator); - case BinaryOperator::ShrAssign: - DISPATCH(BinShrAssign, CompoundAssignOperator); - case BinaryOperator::AndAssign: - DISPATCH(BinAndAssign, CompoundAssignOperator); - case BinaryOperator::OrAssign: - DISPATCH(BinOrAssign, CompoundAssignOperator); - case BinaryOperator::XorAssign: - DISPATCH(BinXorAssign, CompoundAssignOperator); - case BinaryOperator::Comma: DISPATCH(BinComma, BinaryOperator); + case BO_And: DISPATCH(BinAnd, BinaryOperator); + case BO_Xor: DISPATCH(BinXor, BinaryOperator); + case BO_Or : DISPATCH(BinOr, BinaryOperator); + case BO_LAnd: DISPATCH(BinLAnd, BinaryOperator); + case BO_LOr : DISPATCH(BinLOr, BinaryOperator); + case BO_Assign: DISPATCH(BinAssign, BinaryOperator); + case BO_MulAssign: DISPATCH(BinMulAssign, CompoundAssignOperator); + case BO_DivAssign: DISPATCH(BinDivAssign, CompoundAssignOperator); + case BO_RemAssign: DISPATCH(BinRemAssign, CompoundAssignOperator); + case BO_AddAssign: DISPATCH(BinAddAssign, CompoundAssignOperator); + case BO_SubAssign: DISPATCH(BinSubAssign, CompoundAssignOperator); + case BO_ShlAssign: DISPATCH(BinShlAssign, CompoundAssignOperator); + case BO_ShrAssign: DISPATCH(BinShrAssign, CompoundAssignOperator); + case BO_AndAssign: DISPATCH(BinAndAssign, CompoundAssignOperator); + case BO_OrAssign: DISPATCH(BinOrAssign, CompoundAssignOperator); + case BO_XorAssign: DISPATCH(BinXorAssign, CompoundAssignOperator); + case BO_Comma: DISPATCH(BinComma, BinaryOperator); } } else if (UnaryOperator *UnOp = dyn_cast(S)) { switch (UnOp->getOpcode()) { default: assert(0 && "Unknown unary operator!"); - case UnaryOperator::PostInc: DISPATCH(UnaryPostInc, UnaryOperator); - case UnaryOperator::PostDec: DISPATCH(UnaryPostDec, UnaryOperator); - case UnaryOperator::PreInc: DISPATCH(UnaryPreInc, UnaryOperator); - case UnaryOperator::PreDec: DISPATCH(UnaryPreDec, UnaryOperator); - case UnaryOperator::AddrOf: DISPATCH(UnaryAddrOf, UnaryOperator); - case UnaryOperator::Deref: DISPATCH(UnaryDeref, UnaryOperator); - case UnaryOperator::Plus: DISPATCH(UnaryPlus, UnaryOperator); - case UnaryOperator::Minus: DISPATCH(UnaryMinus, UnaryOperator); - case UnaryOperator::Not: DISPATCH(UnaryNot, UnaryOperator); - case UnaryOperator::LNot: DISPATCH(UnaryLNot, UnaryOperator); - case UnaryOperator::Real: DISPATCH(UnaryReal, UnaryOperator); - case UnaryOperator::Imag: DISPATCH(UnaryImag, UnaryOperator); - case UnaryOperator::Extension: DISPATCH(UnaryExtension, UnaryOperator); - case UnaryOperator::OffsetOf: DISPATCH(UnaryOffsetOf, UnaryOperator); + case UO_PostInc: DISPATCH(UnaryPostInc, UnaryOperator); + case UO_PostDec: DISPATCH(UnaryPostDec, UnaryOperator); + case UO_PreInc: DISPATCH(UnaryPreInc, UnaryOperator); + case UO_PreDec: DISPATCH(UnaryPreDec, UnaryOperator); + case UO_AddrOf: DISPATCH(UnaryAddrOf, UnaryOperator); + case UO_Deref: DISPATCH(UnaryDeref, UnaryOperator); + case UO_Plus: DISPATCH(UnaryPlus, UnaryOperator); + case UO_Minus: DISPATCH(UnaryMinus, UnaryOperator); + case UO_Not: DISPATCH(UnaryNot, UnaryOperator); + case UO_LNot: DISPATCH(UnaryLNot, UnaryOperator); + case UO_Real: DISPATCH(UnaryReal, UnaryOperator); + case UO_Imag: DISPATCH(UnaryImag, UnaryOperator); + case UO_Extension: DISPATCH(UnaryExtension, UnaryOperator); } } @@ -163,7 +152,7 @@ public: UNARYOP_FALLBACK(Plus) UNARYOP_FALLBACK(Minus) UNARYOP_FALLBACK(Not) UNARYOP_FALLBACK(LNot) UNARYOP_FALLBACK(Real) UNARYOP_FALLBACK(Imag) - UNARYOP_FALLBACK(Extension) UNARYOP_FALLBACK(OffsetOf) + UNARYOP_FALLBACK(Extension) #undef UNARYOP_FALLBACK // Base case, ignore it. :) diff --git a/include/clang/AST/Type.h b/include/clang/AST/Type.h index 4c148e8fa22..92e62a58d42 100644 --- a/include/clang/AST/Type.h +++ b/include/clang/AST/Type.h @@ -289,7 +289,18 @@ public: L += R; return L; } + + Qualifiers &operator-=(Qualifiers R) { + Mask = Mask & ~(R.Mask); + return *this; + } + /// \brief Compute the difference between two qualifier sets. + friend Qualifiers operator-(Qualifiers L, Qualifiers R) { + L -= R; + return L; + } + std::string getAsString() const; std::string getAsString(const PrintingPolicy &Policy) const { std::string Buffer; @@ -399,7 +410,8 @@ enum CallingConv { CC_C, // __attribute__((cdecl)) CC_X86StdCall, // __attribute__((stdcall)) CC_X86FastCall, // __attribute__((fastcall)) - CC_X86ThisCall // __attribute__((thiscall)) + CC_X86ThisCall, // __attribute__((thiscall)) + CC_X86Pascal // __attribute__((pascal)) }; @@ -787,12 +799,12 @@ private: /// \brief Linkage of this type. mutable unsigned CachedLinkage : 2; - /// \brief FromPCH - Whether this type comes from a PCH file. - mutable bool FromPCH : 1; + /// \brief FromAST - Whether this type comes from an AST file. + mutable bool FromAST : 1; - /// \brief Set whether this type comes from a PCH file. - void setFromPCH(bool V = true) const { - FromPCH = V; + /// \brief Set whether this type comes from an AST file. + void setFromAST(bool V = true) const { + FromAST = V; } protected: @@ -806,16 +818,15 @@ protected: Type(TypeClass tc, QualType Canonical, bool dependent) : CanonicalType(Canonical.isNull() ? QualType(this_(), 0) : Canonical), TC(tc), Dependent(dependent), LinkageKnown(false), - CachedLinkage(NoLinkage), FromPCH(false) {} - virtual ~Type() {} - virtual void Destroy(ASTContext& C); + CachedLinkage(NoLinkage), FromAST(false) {} + virtual ~Type(); friend class ASTContext; public: TypeClass getTypeClass() const { return static_cast(TC); } - /// \brief Whether this type comes from a PCH file. - bool isFromPCH() const { return FromPCH; } + /// \brief Whether this type comes from an AST file. + bool isFromAST() const { return FromAST; } bool isCanonicalUnqualified() const { return CanonicalType.getTypePtr() == this; @@ -824,14 +835,6 @@ public: /// Types are partitioned into 3 broad categories (C99 6.2.5p1): /// object types, function types, and incomplete types. - /// \brief Determines whether the type describes an object in memory. - /// - /// Note that this definition of object type corresponds to the C++ - /// definition of object type, which includes incomplete types, as - /// opposed to the C definition (which does not include incomplete - /// types). - bool isObjectType() const; - /// isIncompleteType - Return true if this is an incomplete type. /// A type that can describe objects, but which lacks information needed to /// determine its size (e.g. void, or a fwd declared struct). Clients of this @@ -906,6 +909,7 @@ public: bool isFunctionPointerType() const; bool isMemberPointerType() const; bool isMemberFunctionPointerType() const; + bool isMemberDataPointerType() const; bool isArrayType() const; bool isConstantArrayType() const; bool isIncompleteArrayType() const; @@ -926,6 +930,7 @@ public: bool isObjCQualifiedInterfaceType() const; // NSString bool isObjCQualifiedIdType() const; // id bool isObjCQualifiedClassType() const; // Class + bool isObjCObjectOrInterfaceType() const; bool isObjCIdType() const; // id bool isObjCClassType() const; // Class bool isObjCSelType() const; // Class @@ -952,10 +957,22 @@ public: /// an objective pointer type for the purpose of GC'ability bool hasObjCPointerRepresentation() const; + /// \brief Determine whether this type has an integer representation + /// of some sort, e.g., it is an integer type or a vector. + bool hasIntegerRepresentation() const; + + /// \brief Determine whether this type has an signed integer representation + /// of some sort, e.g., it is an signed integer type or a vector. + bool hasSignedIntegerRepresentation() const; + + /// \brief Determine whether this type has an unsigned integer representation + /// of some sort, e.g., it is an unsigned integer type or a vector. + bool hasUnsignedIntegerRepresentation() const; + /// \brief Determine whether this type has a floating-point representation /// of some sort, e.g., it is a floating-point type or a vector thereof. bool hasFloatingRepresentation() const; - + // Type Checking Functions: Check to see if this type is structurally the // specified type, ignoring typedefs and qualifiers, and return a pointer to // the best type we can. @@ -975,7 +992,8 @@ public: /// type of a class template or class template partial specialization. CXXRecordDecl *getAsCXXRecordDecl() const; - // Member-template getAs'. This scheme will eventually + // Member-template getAs'. Look through sugar for + // an instance of . This scheme will eventually // replace the specific getAsXXXX methods above. // // There are some specializations of this member template listed @@ -1035,8 +1053,8 @@ public: void dump() const; static bool classof(const Type *) { return true; } - friend class PCHReader; - friend class PCHWriter; + friend class ASTReader; + friend class ASTWriter; }; template <> inline const TypedefType *Type::getAs() const { @@ -1353,9 +1371,20 @@ protected: virtual Linkage getLinkageImpl() const; public: - QualType getPointeeType() const { return PointeeType; } + /// Returns true if the member type (i.e. the pointee type) is a + /// function type rather than a data-member type. + bool isMemberFunctionPointer() const { + return PointeeType->isFunctionProtoType(); + } + + /// Returns true if the member type (i.e. the pointee type) is a + /// data type rather than a function type. + bool isMemberDataPointer() const { + return !PointeeType->isFunctionProtoType(); + } + const Type *getClass() const { return Class; } bool isSugared() const { return false; } @@ -1454,6 +1483,17 @@ public: bool isSugared() const { return false; } QualType desugar() const { return QualType(this, 0); } + + /// \brief Determine the number of bits required to address a member of + // an array with the given element type and number of elements. + static unsigned getNumAddressingBits(ASTContext &Context, + QualType ElementType, + const llvm::APInt &NumElements); + + /// \brief Determine the maximum number of active bits that an array's size + /// can require, which limits the maximum size of the array. + static unsigned getMaxSizeBits(ASTContext &Context); + void Profile(llvm::FoldingSetNodeID &ID) { Profile(ID, getElementType(), getSize(), getSizeModifier(), getIndexTypeCVRQualifiers()); @@ -1533,7 +1573,6 @@ class VariableArrayType : public ArrayType { : ArrayType(VariableArray, et, can, sm, tq), SizeExpr((Stmt*) e), Brackets(brackets) {} friend class ASTContext; // ASTContext creates these. - virtual void Destroy(ASTContext& C); public: Expr *getSizeExpr() const { @@ -1592,7 +1631,6 @@ class DependentSizedArrayType : public ArrayType { : ArrayType(DependentSizedArray, et, can, sm, tq), Context(Context), SizeExpr((Stmt*) e), Brackets(brackets) {} friend class ASTContext; // ASTContext creates these. - virtual void Destroy(ASTContext& C); public: Expr *getSizeExpr() const { @@ -1646,7 +1684,6 @@ class DependentSizedExtVectorType : public Type, public llvm::FoldingSetNode { Context(Context), SizeExpr(SizeExpr), ElementType(ElementType), loc(loc) {} friend class ASTContext; - virtual void Destroy(ASTContext& C); public: Expr *getSizeExpr() const { return SizeExpr; } @@ -1844,13 +1881,13 @@ class FunctionType : public Type { // * FunctionNoProtoType::Profile // * FunctionProtoType::Profile // * TypePrinter::PrintFunctionProto - // * PCH read and write + // * AST read and write // * Codegen class ExtInfo { public: // Constructor with no defaults. Use this when you know that you - // have all the elements (when reading a PCH file for example). + // have all the elements (when reading an AST file for example). ExtInfo(bool noReturn, unsigned regParm, CallingConv cc) : NoReturn(noReturn), RegParm(regParm), CC(cc) {} @@ -1892,7 +1929,7 @@ class FunctionType : public Type { // The value passed to __attribute__((regparm(x))) unsigned RegParm; // The calling convention as specified via - // __attribute__((cdecl|stdcall|fastcall|thiscall)) + // __attribute__((cdecl|stdcall|fastcall|thiscall|pascal)) CallingConv CC; }; @@ -2259,14 +2296,9 @@ public: }; class TagType : public Type { - /// Stores the TagDecl associated with this type. The decl will - /// point to the TagDecl that actually defines the entity (or is a - /// definition in progress), if there is such a definition. The - /// single-bit value will be non-zero when this tag is in the - /// process of being defined. - mutable llvm::PointerIntPair decl; - friend class ASTContext; - friend class TagDecl; + /// Stores the TagDecl associated with this type. The decl may point to any + /// TagDecl that declares the entity. + TagDecl * decl; protected: TagType(TypeClass TC, const TagDecl *D, QualType can); @@ -2274,12 +2306,11 @@ protected: virtual Linkage getLinkageImpl() const; public: - TagDecl *getDecl() const { return decl.getPointer(); } + TagDecl *getDecl() const; /// @brief Determines whether this type is in the process of being /// defined. - bool isBeingDefined() const { return decl.getInt(); } - void setBeingDefined(bool Def) const { decl.setInt(Def? 1 : 0); } + bool isBeingDefined() const; static bool classof(const Type *T) { return T->getTypeClass() >= TagFirst && T->getTypeClass() <= TagLast; @@ -2468,8 +2499,6 @@ class TemplateSpecializationType const TemplateArgument *Args, unsigned NumArgs, QualType Canon); - virtual void Destroy(ASTContext& C); - friend class ASTContext; // ASTContext creates these public: @@ -2574,9 +2603,8 @@ class InjectedClassNameType : public Type { QualType InjectedType; friend class ASTContext; // ASTContext creates these. - friend class TagDecl; // TagDecl mutilates the Decl - friend class PCHReader; // FIXME: ASTContext::getInjectedClassNameType is not - // currently suitable for PCH reading, too much + friend class ASTReader; // FIXME: ASTContext::getInjectedClassNameType is not + // currently suitable for AST reading, too much // interdependencies. InjectedClassNameType(CXXRecordDecl *D, QualType TST) : Type(InjectedClassName, QualType(), true), @@ -2592,7 +2620,7 @@ public: return cast(InjectedType.getTypePtr()); } - CXXRecordDecl *getDecl() const { return Decl; } + CXXRecordDecl *getDecl() const; bool isSugared() const { return false; } QualType desugar() const { return QualType(this, 0); } @@ -2836,8 +2864,6 @@ class DependentTemplateSpecializationType : const TemplateArgument *Args, QualType Canon); - virtual void Destroy(ASTContext& C); - friend class ASTContext; // ASTContext creates these public: @@ -3014,8 +3040,6 @@ class ObjCObjectTypeImpl : public ObjCObjectType, public llvm::FoldingSetNode { : ObjCObjectType(Canonical, Base, Protocols, NumProtocols) {} public: - void Destroy(ASTContext& C); // key function - void Profile(llvm::FoldingSetNodeID &ID); static void Profile(llvm::FoldingSetNodeID &ID, QualType Base, @@ -3049,8 +3073,6 @@ class ObjCInterfaceType : public ObjCObjectType { Decl(const_cast(D)) {} friend class ASTContext; // ASTContext creates these. public: - void Destroy(ASTContext& C); // key function - /// getDecl - Get the declaration of this interface. ObjCInterfaceDecl *getDecl() const { return Decl; } @@ -3103,8 +3125,6 @@ protected: virtual Linkage getLinkageImpl() const; public: - void Destroy(ASTContext& C); - /// getPointeeType - Gets the type pointed to by this ObjC pointer. /// The result will always be an ObjCObjectType or sugar thereof. QualType getPointeeType() const { return PointeeType; } @@ -3486,7 +3506,13 @@ inline bool Type::isMemberPointerType() const { } inline bool Type::isMemberFunctionPointerType() const { if (const MemberPointerType* T = getAs()) - return T->getPointeeType()->isFunctionType(); + return T->isMemberFunctionPointer(); + else + return false; +} +inline bool Type::isMemberDataPointerType() const { + if (const MemberPointerType* T = getAs()) + return T->isMemberDataPointer(); else return false; } @@ -3523,6 +3549,11 @@ inline bool Type::isObjCObjectPointerType() const { inline bool Type::isObjCObjectType() const { return isa(CanonicalType); } +inline bool Type::isObjCObjectOrInterfaceType() const { + return isa(CanonicalType) || + isa(CanonicalType); +} + inline bool Type::isObjCQualifiedIdType() const { if (const ObjCObjectPointerType *OPT = getAs()) return OPT->isObjCQualifiedIdType(); diff --git a/include/clang/AST/TypeLoc.h b/include/clang/AST/TypeLoc.h index 842c0687845..f1c64bd9597 100644 --- a/include/clang/AST/TypeLoc.h +++ b/include/clang/AST/TypeLoc.h @@ -341,6 +341,10 @@ private: template class InheritingConcreteTypeLoc : public Base { public: + static bool classofType(const Type *Ty) { + return TypeClass::classof(Ty); + } + static bool classof(const TypeLoc *TL) { return Derived::classofType(TL->getTypePtr()); } diff --git a/include/clang/AST/TypeOrdering.h b/include/clang/AST/TypeOrdering.h index 1a050d29c86..7cf0d5e999b 100644 --- a/include/clang/AST/TypeOrdering.h +++ b/include/clang/AST/TypeOrdering.h @@ -17,6 +17,7 @@ #define LLVM_CLANG_TYPE_ORDERING_H #include "clang/AST/Type.h" +#include "clang/AST/CanonicalType.h" #include namespace clang { @@ -51,6 +52,26 @@ namespace llvm { return LHS == RHS; } }; + + template<> struct DenseMapInfo { + static inline clang::CanQualType getEmptyKey() { + return clang::CanQualType(); + } + + static inline clang::CanQualType getTombstoneKey() { + using clang::CanQualType; + return CanQualType::getFromOpaquePtr(reinterpret_cast(-1)); + } + + static unsigned getHashValue(clang::CanQualType Val) { + return (unsigned)((uintptr_t)Val.getAsOpaquePtr()) ^ + ((unsigned)((uintptr_t)Val.getAsOpaquePtr() >> 9)); + } + + static bool isEqual(clang::CanQualType LHS, clang::CanQualType RHS) { + return LHS == RHS; + } + }; } #endif diff --git a/include/clang/Analysis/Analyses/FormatString.h b/include/clang/Analysis/Analyses/FormatString.h new file mode 100644 index 00000000000..280b1260ac2 --- /dev/null +++ b/include/clang/Analysis/Analyses/FormatString.h @@ -0,0 +1,595 @@ +//= FormatString.h - Analysis of printf/fprintf format strings --*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// This file defines APIs for analyzing the format strings of printf, fscanf, +// and friends. +// +// The structure of format strings for fprintf are described in C99 7.19.6.1. +// +// The structure of format strings for fscanf are described in C99 7.19.6.2. +// +//===----------------------------------------------------------------------===// + +#ifndef LLVM_CLANG_FORMAT_H +#define LLVM_CLANG_FORMAT_H + +#include "clang/AST/CanonicalType.h" + +namespace clang { + +//===----------------------------------------------------------------------===// +/// Common components of both fprintf and fscanf format strings. +namespace analyze_format_string { + +/// Class representing optional flags with location and representation +/// information. +class OptionalFlag { +public: + OptionalFlag(const char *Representation) + : representation(Representation), flag(false) {} + bool isSet() { return flag; } + void set() { flag = true; } + void clear() { flag = false; } + void setPosition(const char *position) { + assert(position); + this->position = position; + } + const char *getPosition() const { + assert(position); + return position; + } + const char *toString() const { return representation; } + + // Overloaded operators for bool like qualities + operator bool() const { return flag; } + OptionalFlag& operator=(const bool &rhs) { + flag = rhs; + return *this; // Return a reference to myself. + } +private: + const char *representation; + const char *position; + bool flag; +}; + +/// Represents the length modifier in a format string in scanf/printf. +class LengthModifier { +public: + enum Kind { + None, + AsChar, // 'hh' + AsShort, // 'h' + AsLong, // 'l' + AsLongLong, // 'll', 'q' (BSD, deprecated) + AsIntMax, // 'j' + AsSizeT, // 'z' + AsPtrDiff, // 't' + AsLongDouble, // 'L' + AsWideChar = AsLong // for '%ls', only makes sense for printf + }; + + LengthModifier() + : Position(0), kind(None) {} + LengthModifier(const char *pos, Kind k) + : Position(pos), kind(k) {} + + const char *getStart() const { + return Position; + } + + unsigned getLength() const { + switch (kind) { + default: + return 1; + case AsLongLong: + case AsChar: + return 2; + case None: + return 0; + } + } + + Kind getKind() const { return kind; } + void setKind(Kind k) { kind = k; } + + const char *toString() const; + +private: + const char *Position; + Kind kind; +}; + +class ConversionSpecifier { +public: + enum Kind { + InvalidSpecifier = 0, + // C99 conversion specifiers. + cArg, + dArg, + iArg, + IntArgBeg = cArg, IntArgEnd = iArg, + + oArg, + uArg, + xArg, + XArg, + UIntArgBeg = oArg, UIntArgEnd = XArg, + + fArg, + FArg, + eArg, + EArg, + gArg, + GArg, + aArg, + AArg, + DoubleArgBeg = fArg, DoubleArgEnd = AArg, + + sArg, + pArg, + nArg, + PercentArg, + CArg, + SArg, + + // ** Printf-specific ** + + // Objective-C specific specifiers. + ObjCObjArg, // '@' + ObjCBeg = ObjCObjArg, ObjCEnd = ObjCObjArg, + + // GlibC specific specifiers. + PrintErrno, // 'm' + + PrintfConvBeg = ObjCObjArg, PrintfConvEnd = PrintErrno, + + // ** Scanf-specific ** + ScanListArg, // '[' + ScanfConvBeg = ScanListArg, ScanfConvEnd = ScanListArg + }; + + ConversionSpecifier(bool isPrintf) + : IsPrintf(isPrintf), Position(0), EndScanList(0), kind(InvalidSpecifier) {} + + ConversionSpecifier(bool isPrintf, const char *pos, Kind k) + : IsPrintf(isPrintf), Position(pos), EndScanList(0), kind(k) {} + + const char *getStart() const { + return Position; + } + + llvm::StringRef getCharacters() const { + return llvm::StringRef(getStart(), getLength()); + } + + bool consumesDataArgument() const { + switch (kind) { + case PrintErrno: + assert(IsPrintf); + case PercentArg: + return false; + default: + return true; + } + } + + Kind getKind() const { return kind; } + void setKind(Kind k) { kind = k; } + unsigned getLength() const { + return EndScanList ? EndScanList - Position : 1; + } + + const char *toString() const; + + bool isPrintfKind() const { return IsPrintf; } + +protected: + bool IsPrintf; + const char *Position; + const char *EndScanList; + Kind kind; +}; + +class ArgTypeResult { +public: + enum Kind { UnknownTy, InvalidTy, SpecificTy, ObjCPointerTy, CPointerTy, + CStrTy, WCStrTy, WIntTy }; +private: + const Kind K; + QualType T; + ArgTypeResult(bool) : K(InvalidTy) {} +public: + ArgTypeResult(Kind k = UnknownTy) : K(k) {} + ArgTypeResult(QualType t) : K(SpecificTy), T(t) {} + ArgTypeResult(CanQualType t) : K(SpecificTy), T(t) {} + + static ArgTypeResult Invalid() { return ArgTypeResult(true); } + + bool isValid() const { return K != InvalidTy; } + + const QualType *getSpecificType() const { + return K == SpecificTy ? &T : 0; + } + + bool matchesType(ASTContext &C, QualType argTy) const; + + bool matchesAnyObjCObjectRef() const { return K == ObjCPointerTy; } + + QualType getRepresentativeType(ASTContext &C) const; +}; + +class OptionalAmount { +public: + enum HowSpecified { NotSpecified, Constant, Arg, Invalid }; + + OptionalAmount(HowSpecified howSpecified, + unsigned amount, + const char *amountStart, + unsigned amountLength, + bool usesPositionalArg) + : start(amountStart), length(amountLength), hs(howSpecified), amt(amount), + UsesPositionalArg(usesPositionalArg), UsesDotPrefix(0) {} + + OptionalAmount(bool valid = true) + : start(0),length(0), hs(valid ? NotSpecified : Invalid), amt(0), + UsesPositionalArg(0), UsesDotPrefix(0) {} + + bool isInvalid() const { + return hs == Invalid; + } + + HowSpecified getHowSpecified() const { return hs; } + void setHowSpecified(HowSpecified h) { hs = h; } + + bool hasDataArgument() const { return hs == Arg; } + + unsigned getArgIndex() const { + assert(hasDataArgument()); + return amt; + } + + unsigned getConstantAmount() const { + assert(hs == Constant); + return amt; + } + + const char *getStart() const { + // We include the . character if it is given. + return start - UsesDotPrefix; + } + + unsigned getConstantLength() const { + assert(hs == Constant); + return length + UsesDotPrefix; + } + + ArgTypeResult getArgType(ASTContext &Ctx) const; + + void toString(llvm::raw_ostream &os) const; + + bool usesPositionalArg() const { return (bool) UsesPositionalArg; } + unsigned getPositionalArgIndex() const { + assert(hasDataArgument()); + return amt + 1; + } + + bool usesDotPrefix() const { return UsesDotPrefix; } + void setUsesDotPrefix() { UsesDotPrefix = true; } + +private: + const char *start; + unsigned length; + HowSpecified hs; + unsigned amt; + bool UsesPositionalArg : 1; + bool UsesDotPrefix; +}; + + +class FormatSpecifier { +protected: + LengthModifier LM; + OptionalAmount FieldWidth; + ConversionSpecifier CS; + /// Positional arguments, an IEEE extension: + /// IEEE Std 1003.1, 2004 Edition + /// http://www.opengroup.org/onlinepubs/009695399/functions/printf.html + bool UsesPositionalArg; + unsigned argIndex; +public: + FormatSpecifier(bool isPrintf) + : CS(isPrintf), UsesPositionalArg(false), argIndex(0) {} + + void setLengthModifier(LengthModifier lm) { + LM = lm; + } + + void setUsesPositionalArg() { UsesPositionalArg = true; } + + void setArgIndex(unsigned i) { + argIndex = i; + } + + unsigned getArgIndex() const { + return argIndex; + } + + unsigned getPositionalArgIndex() const { + return argIndex + 1; + } + + const LengthModifier &getLengthModifier() const { + return LM; + } + + const OptionalAmount &getFieldWidth() const { + return FieldWidth; + } + + void setFieldWidth(const OptionalAmount &Amt) { + FieldWidth = Amt; + } + + bool usesPositionalArg() const { return UsesPositionalArg; } + + bool hasValidLengthModifier() const; +}; + +} // end analyze_format_string namespace + +//===----------------------------------------------------------------------===// +/// Pieces specific to fprintf format strings. + +namespace analyze_printf { + +class PrintfConversionSpecifier : + public analyze_format_string::ConversionSpecifier { +public: + PrintfConversionSpecifier() + : ConversionSpecifier(true, 0, InvalidSpecifier) {} + + PrintfConversionSpecifier(const char *pos, Kind k) + : ConversionSpecifier(true, pos, k) {} + + bool isObjCArg() const { return kind >= ObjCBeg && kind <= ObjCEnd; } + bool isIntArg() const { return kind >= IntArgBeg && kind <= IntArgEnd; } + bool isUIntArg() const { return kind >= UIntArgBeg && kind <= UIntArgEnd; } + bool isDoubleArg() const { return kind >= DoubleArgBeg && + kind <= DoubleArgBeg; } + unsigned getLength() const { + // Conversion specifiers currently only are represented by + // single characters, but we be flexible. + return 1; + } + + static bool classof(const analyze_format_string::ConversionSpecifier *CS) { + return CS->isPrintfKind(); + } +}; + +using analyze_format_string::ArgTypeResult; +using analyze_format_string::LengthModifier; +using analyze_format_string::OptionalAmount; +using analyze_format_string::OptionalFlag; + +class PrintfSpecifier : public analyze_format_string::FormatSpecifier { + OptionalFlag IsLeftJustified; // '-' + OptionalFlag HasPlusPrefix; // '+' + OptionalFlag HasSpacePrefix; // ' ' + OptionalFlag HasAlternativeForm; // '#' + OptionalFlag HasLeadingZeroes; // '0' + OptionalAmount Precision; +public: + PrintfSpecifier() : + FormatSpecifier(/* isPrintf = */ true), + IsLeftJustified("-"), HasPlusPrefix("+"), HasSpacePrefix(" "), + HasAlternativeForm("#"), HasLeadingZeroes("0") {} + + static PrintfSpecifier Parse(const char *beg, const char *end); + + // Methods for incrementally constructing the PrintfSpecifier. + void setConversionSpecifier(const PrintfConversionSpecifier &cs) { + CS = cs; + } + void setIsLeftJustified(const char *position) { + IsLeftJustified = true; + IsLeftJustified.setPosition(position); + } + void setHasPlusPrefix(const char *position) { + HasPlusPrefix = true; + HasPlusPrefix.setPosition(position); + } + void setHasSpacePrefix(const char *position) { + HasSpacePrefix = true; + HasSpacePrefix.setPosition(position); + } + void setHasAlternativeForm(const char *position) { + HasAlternativeForm = true; + HasAlternativeForm.setPosition(position); + } + void setHasLeadingZeros(const char *position) { + HasLeadingZeroes = true; + HasLeadingZeroes.setPosition(position); + } + void setUsesPositionalArg() { UsesPositionalArg = true; } + + // Methods for querying the format specifier. + + const PrintfConversionSpecifier &getConversionSpecifier() const { + return cast(CS); + } + + void setPrecision(const OptionalAmount &Amt) { + Precision = Amt; + Precision.setUsesDotPrefix(); + } + + const OptionalAmount &getPrecision() const { + return Precision; + } + + bool consumesDataArgument() const { + return getConversionSpecifier().consumesDataArgument(); + } + + /// \brief Returns the builtin type that a data argument + /// paired with this format specifier should have. This method + /// will return null if the format specifier does not have + /// a matching data argument or the matching argument matches + /// more than one type. + ArgTypeResult getArgType(ASTContext &Ctx) const; + + const OptionalFlag &isLeftJustified() const { return IsLeftJustified; } + const OptionalFlag &hasPlusPrefix() const { return HasPlusPrefix; } + const OptionalFlag &hasAlternativeForm() const { return HasAlternativeForm; } + const OptionalFlag &hasLeadingZeros() const { return HasLeadingZeroes; } + const OptionalFlag &hasSpacePrefix() const { return HasSpacePrefix; } + bool usesPositionalArg() const { return UsesPositionalArg; } + + /// Changes the specifier and length according to a QualType, retaining any + /// flags or options. Returns true on success, or false when a conversion + /// was not successful. + bool fixType(QualType QT); + + void toString(llvm::raw_ostream &os) const; + + // Validation methods - to check if any element results in undefined behavior + bool hasValidPlusPrefix() const; + bool hasValidAlternativeForm() const; + bool hasValidLeadingZeros() const; + bool hasValidSpacePrefix() const; + bool hasValidLeftJustified() const; + + bool hasValidPrecision() const; + bool hasValidFieldWidth() const; +}; +} // end analyze_printf namespace + +//===----------------------------------------------------------------------===// +/// Pieces specific to fscanf format strings. + +namespace analyze_scanf { + +class ScanfConversionSpecifier : + public analyze_format_string::ConversionSpecifier { +public: + ScanfConversionSpecifier() + : ConversionSpecifier(false, 0, InvalidSpecifier) {} + + ScanfConversionSpecifier(const char *pos, Kind k) + : ConversionSpecifier(false, pos, k) {} + + void setEndScanList(const char *pos) { EndScanList = pos; } + + static bool classof(const analyze_format_string::ConversionSpecifier *CS) { + return !CS->isPrintfKind(); + } +}; + +using analyze_format_string::LengthModifier; +using analyze_format_string::OptionalAmount; +using analyze_format_string::OptionalFlag; + +class ScanfSpecifier : public analyze_format_string::FormatSpecifier { + OptionalFlag SuppressAssignment; // '*' +public: + ScanfSpecifier() : + FormatSpecifier(/* isPrintf = */ false), + SuppressAssignment("*") {} + + void setSuppressAssignment(const char *position) { + SuppressAssignment = true; + SuppressAssignment.setPosition(position); + } + + const OptionalFlag &getSuppressAssignment() const { + return SuppressAssignment; + } + + void setConversionSpecifier(const ScanfConversionSpecifier &cs) { + CS = cs; + } + + const ScanfConversionSpecifier &getConversionSpecifier() const { + return cast(CS); + } + + bool consumesDataArgument() const { + return CS.consumesDataArgument() && !SuppressAssignment; + } + + static ScanfSpecifier Parse(const char *beg, const char *end); +}; + +} // end analyze_scanf namespace + +//===----------------------------------------------------------------------===// +// Parsing and processing of format strings (both fprintf and fscanf). + +namespace analyze_format_string { + +enum PositionContext { FieldWidthPos = 0, PrecisionPos = 1 }; + +class FormatStringHandler { +public: + FormatStringHandler() {} + virtual ~FormatStringHandler(); + + virtual void HandleNullChar(const char *nullCharacter) {} + + virtual void HandleInvalidPosition(const char *startPos, unsigned posLen, + PositionContext p) {} + + virtual void HandleZeroPosition(const char *startPos, unsigned posLen) {} + + virtual void HandleIncompleteSpecifier(const char *startSpecifier, + unsigned specifierLen) {} + + // Printf-specific handlers. + + virtual bool HandleInvalidPrintfConversionSpecifier( + const analyze_printf::PrintfSpecifier &FS, + const char *startSpecifier, + unsigned specifierLen) { + return true; + } + + virtual bool HandlePrintfSpecifier(const analyze_printf::PrintfSpecifier &FS, + const char *startSpecifier, + unsigned specifierLen) { + return true; + } + + // Scanf-specific handlers. + + virtual bool HandleInvalidScanfConversionSpecifier( + const analyze_scanf::ScanfSpecifier &FS, + const char *startSpecifier, + unsigned specifierLen) { + return true; + } + + virtual bool HandleScanfSpecifier(const analyze_scanf::ScanfSpecifier &FS, + const char *startSpecifier, + unsigned specifierLen) { + return true; + } + + virtual void HandleIncompleteScanList(const char *start, const char *end) {} +}; + +bool ParsePrintfString(FormatStringHandler &H, + const char *beg, const char *end); + +bool ParseScanfString(FormatStringHandler &H, + const char *beg, const char *end); + +} // end analyze_format_string namespace +} // end clang namespace +#endif diff --git a/include/clang/Analysis/Analyses/LiveVariables.h b/include/clang/Analysis/Analyses/LiveVariables.h index 44ab080acbf..237fe14aed4 100644 --- a/include/clang/Analysis/Analyses/LiveVariables.h +++ b/include/clang/Analysis/Analyses/LiveVariables.h @@ -41,8 +41,9 @@ struct LiveVariables_ValueTypes { ObserverTy* Observer; ValTy AlwaysLive; AnalysisContext *AC; + bool killAtAssign; - AnalysisDataTy() : Observer(NULL), AC(NULL) {} + AnalysisDataTy() : Observer(NULL), AC(NULL), killAtAssign(true) {} }; //===-----------------------------------------------------===// @@ -68,7 +69,7 @@ class LiveVariables : public DataflowValues= ObjCBeg && kind <= ObjCEnd; } - bool isIntArg() const { return kind >= dArg && kind <= iArg; } - bool isUIntArg() const { return kind >= oArg && kind <= XArg; } - bool isDoubleArg() const { return kind >= fArg && kind <= AArg; } - Kind getKind() const { return kind; } - void setKind(Kind k) { kind = k; } - unsigned getLength() const { - // Conversion specifiers currently only are represented by - // single characters, but we be flexible. - return 1; - } - const char *toString() const; - -private: - const char *Position; - Kind kind; -}; - -class LengthModifier { -public: - enum Kind { - None, - AsChar, // 'hh' - AsShort, // 'h' - AsLong, // 'l' - AsLongLong, // 'll', 'q' (BSD, deprecated) - AsIntMax, // 'j' - AsSizeT, // 'z' - AsPtrDiff, // 't' - AsLongDouble, // 'L' - AsWideChar = AsLong // for '%ls' - }; - - LengthModifier() - : Position(0), kind(None) {} - LengthModifier(const char *pos, Kind k) - : Position(pos), kind(k) {} - - const char *getStart() const { - return Position; - } - - unsigned getLength() const { - switch (kind) { - default: - return 1; - case AsLongLong: - case AsChar: - return 2; - case None: - return 0; - } - } - - Kind getKind() const { return kind; } - void setKind(Kind k) { kind = k; } - - const char *toString() const; - -private: - const char *Position; - Kind kind; -}; - -class OptionalAmount { -public: - enum HowSpecified { NotSpecified, Constant, Arg, Invalid }; - - OptionalAmount(HowSpecified howSpecified, - unsigned amount, - const char *amountStart, - unsigned amountLength, - bool usesPositionalArg) - : start(amountStart), length(amountLength), hs(howSpecified), amt(amount), - UsesPositionalArg(usesPositionalArg), UsesDotPrefix(0) {} - - OptionalAmount(bool valid = true) - : start(0),length(0), hs(valid ? NotSpecified : Invalid), amt(0), - UsesPositionalArg(0), UsesDotPrefix(0) {} - - bool isInvalid() const { - return hs == Invalid; - } - - HowSpecified getHowSpecified() const { return hs; } - void setHowSpecified(HowSpecified h) { hs = h; } - - bool hasDataArgument() const { return hs == Arg; } - - unsigned getArgIndex() const { - assert(hasDataArgument()); - return amt; - } - - unsigned getConstantAmount() const { - assert(hs == Constant); - return amt; - } - - const char *getStart() const { - // We include the . character if it is given. - return start - UsesDotPrefix; - } - - unsigned getConstantLength() const { - assert(hs == Constant); - return length + UsesDotPrefix; - } - - ArgTypeResult getArgType(ASTContext &Ctx) const; - - void toString(llvm::raw_ostream &os) const; - - bool usesPositionalArg() const { return (bool) UsesPositionalArg; } - unsigned getPositionalArgIndex() const { - assert(hasDataArgument()); - return amt + 1; - } - - bool usesDotPrefix() const { return UsesDotPrefix; } - void setUsesDotPrefix() { UsesDotPrefix = true; } - -private: - const char *start; - unsigned length; - HowSpecified hs; - unsigned amt; - bool UsesPositionalArg : 1; - bool UsesDotPrefix; -}; - -// Class representing optional flags with location and representation -// information. -class OptionalFlag { -public: - OptionalFlag(const char *Representation) - : representation(Representation), flag(false) {} - bool isSet() { return flag; } - void set() { flag = true; } - void clear() { flag = false; } - void setPosition(const char *position) { - assert(position); - this->position = position; - } - const char *getPosition() const { - assert(position); - return position; - } - const char *toString() const { return representation; } - - // Overloaded operators for bool like qualities - operator bool() const { return flag; } - OptionalFlag& operator=(const bool &rhs) { - flag = rhs; - return *this; // Return a reference to myself. - } -private: - const char *representation; - const char *position; - bool flag; -}; - -class FormatSpecifier { - LengthModifier LM; - OptionalFlag IsLeftJustified; // '-' - OptionalFlag HasPlusPrefix; // '+' - OptionalFlag HasSpacePrefix; // ' ' - OptionalFlag HasAlternativeForm; // '#' - OptionalFlag HasLeadingZeroes; // '0' - /// Positional arguments, an IEEE extension: - /// IEEE Std 1003.1, 2004 Edition - /// http://www.opengroup.org/onlinepubs/009695399/functions/printf.html - bool UsesPositionalArg; - unsigned argIndex; - ConversionSpecifier CS; - OptionalAmount FieldWidth; - OptionalAmount Precision; -public: - FormatSpecifier() : - IsLeftJustified("-"), HasPlusPrefix("+"), HasSpacePrefix(" "), - HasAlternativeForm("#"), HasLeadingZeroes("0"), UsesPositionalArg(false), - argIndex(0) {} - - static FormatSpecifier Parse(const char *beg, const char *end); - - // Methods for incrementally constructing the FormatSpecifier. - void setConversionSpecifier(const ConversionSpecifier &cs) { - CS = cs; - } - void setLengthModifier(LengthModifier lm) { - LM = lm; - } - void setIsLeftJustified(const char *position) { - IsLeftJustified = true; - IsLeftJustified.setPosition(position); - } - void setHasPlusPrefix(const char *position) { - HasPlusPrefix = true; - HasPlusPrefix.setPosition(position); - } - void setHasSpacePrefix(const char *position) { - HasSpacePrefix = true; - HasSpacePrefix.setPosition(position); - } - void setHasAlternativeForm(const char *position) { - HasAlternativeForm = true; - HasAlternativeForm.setPosition(position); - } - void setHasLeadingZeros(const char *position) { - HasLeadingZeroes = true; - HasLeadingZeroes.setPosition(position); - } - void setUsesPositionalArg() { UsesPositionalArg = true; } - - void setArgIndex(unsigned i) { - assert(CS.consumesDataArgument()); - argIndex = i; - } - - unsigned getArgIndex() const { - assert(CS.consumesDataArgument()); - return argIndex; - } - - unsigned getPositionalArgIndex() const { - assert(CS.consumesDataArgument()); - return argIndex + 1; - } - - // Methods for querying the format specifier. - - const ConversionSpecifier &getConversionSpecifier() const { - return CS; - } - - const LengthModifier &getLengthModifier() const { - return LM; - } - - const OptionalAmount &getFieldWidth() const { - return FieldWidth; - } - - void setFieldWidth(const OptionalAmount &Amt) { - FieldWidth = Amt; - } - - void setPrecision(const OptionalAmount &Amt) { - Precision = Amt; - Precision.setUsesDotPrefix(); - } - - const OptionalAmount &getPrecision() const { - return Precision; - } - - /// \brief Returns the builtin type that a data argument - /// paired with this format specifier should have. This method - /// will return null if the format specifier does not have - /// a matching data argument or the matching argument matches - /// more than one type. - ArgTypeResult getArgType(ASTContext &Ctx) const; - - const OptionalFlag &isLeftJustified() const { return IsLeftJustified; } - const OptionalFlag &hasPlusPrefix() const { return HasPlusPrefix; } - const OptionalFlag &hasAlternativeForm() const { return HasAlternativeForm; } - const OptionalFlag &hasLeadingZeros() const { return HasLeadingZeroes; } - const OptionalFlag &hasSpacePrefix() const { return HasSpacePrefix; } - bool usesPositionalArg() const { return UsesPositionalArg; } - - /// Changes the specifier and length according to a QualType, retaining any - /// flags or options. Returns true on success, or false when a conversion - /// was not successful. - bool fixType(QualType QT); - - void toString(llvm::raw_ostream &os) const; - - // Validation methods - to check if any element results in undefined behavior - bool hasValidPlusPrefix() const; - bool hasValidAlternativeForm() const; - bool hasValidLeadingZeros() const; - bool hasValidSpacePrefix() const; - bool hasValidLeftJustified() const; - - bool hasValidLengthModifier() const; - bool hasValidPrecision() const; - bool hasValidFieldWidth() const; -}; - -enum PositionContext { FieldWidthPos = 0, PrecisionPos = 1 }; - -class FormatStringHandler { -public: - FormatStringHandler() {} - virtual ~FormatStringHandler(); - - virtual void HandleIncompleteFormatSpecifier(const char *startSpecifier, - unsigned specifierLen) {} - - virtual void HandleNullChar(const char *nullCharacter) {} - - virtual void HandleInvalidPosition(const char *startPos, unsigned posLen, - PositionContext p) {} - - virtual void HandleZeroPosition(const char *startPos, unsigned posLen) {} - - virtual bool - HandleInvalidConversionSpecifier(const analyze_printf::FormatSpecifier &FS, - const char *startSpecifier, - unsigned specifierLen) { return true; } - - virtual bool HandleFormatSpecifier(const analyze_printf::FormatSpecifier &FS, - const char *startSpecifier, - unsigned specifierLen) { - return true; - } -}; - -bool ParseFormatString(FormatStringHandler &H, - const char *beg, const char *end); - -} // end printf namespace -} // end clang namespace -#endif diff --git a/include/clang/Analysis/Analyses/PseudoConstantAnalysis.h b/include/clang/Analysis/Analyses/PseudoConstantAnalysis.h new file mode 100644 index 00000000000..cb73850b08c --- /dev/null +++ b/include/clang/Analysis/Analyses/PseudoConstantAnalysis.h @@ -0,0 +1,45 @@ +//== PseudoConstantAnalysis.h - Find Pseudo-constants in the AST -*- C++ -*-==// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// This file tracks the usage of variables in a Decl body to see if they are +// never written to, implying that they constant. This is useful in static +// analysis to see if a developer might have intended a variable to be const. +// +//===----------------------------------------------------------------------===// + +#ifndef LLVM_CLANG_ANALYSIS_PSEUDOCONSTANTANALYSIS +#define LLVM_CLANG_ANALYSIS_PSEUDOCONSTANTANALYSIS + +#include "clang/AST/Stmt.h" + +namespace clang { + +class PseudoConstantAnalysis { +public: + PseudoConstantAnalysis(const Stmt *DeclBody); + ~PseudoConstantAnalysis(); + + bool isPseudoConstant(const VarDecl *VD); + bool wasReferenced(const VarDecl *VD); + +private: + void RunAnalysis(); + inline static const Decl *getDecl(const Expr *E); + + // for storing the result of analyzed ValueDecls + void *NonConstantsImpl; + void *UsedVarsImpl; + + const Stmt *DeclBody; + bool Analyzed; +}; + +} + +#endif diff --git a/include/clang/Analysis/AnalysisContext.h b/include/clang/Analysis/AnalysisContext.h index 9ebd93b75b3..7d4d25f8b0d 100644 --- a/include/clang/Analysis/AnalysisContext.h +++ b/include/clang/Analysis/AnalysisContext.h @@ -30,41 +30,67 @@ class CFG; class CFGBlock; class LiveVariables; class ParentMap; +class PseudoConstantAnalysis; class ImplicitParamDecl; class LocationContextManager; class StackFrameContext; +namespace idx { class TranslationUnit; } + /// AnalysisContext contains the context data for the function or method under /// analysis. class AnalysisContext { const Decl *D; + // TranslationUnit is NULL if we don't have multiple translation units. + idx::TranslationUnit *TU; + // AnalysisContext owns the following data. - CFG *cfg; - bool builtCFG; + CFG *cfg, *completeCFG; + bool builtCFG, builtCompleteCFG; LiveVariables *liveness; + LiveVariables *relaxedLiveness; ParentMap *PM; + PseudoConstantAnalysis *PCA; llvm::DenseMap *ReferencedBlockVars; llvm::BumpPtrAllocator A; + bool UseUnoptimizedCFG; bool AddEHEdges; public: - AnalysisContext(const Decl *d, bool addehedges = false) - : D(d), cfg(0), builtCFG(false), liveness(0), PM(0), - ReferencedBlockVars(0), AddEHEdges(addehedges) {} + AnalysisContext(const Decl *d, idx::TranslationUnit *tu, + bool useUnoptimizedCFG = false, + bool addehedges = false) + : D(d), TU(tu), cfg(0), completeCFG(0), + builtCFG(false), builtCompleteCFG(false), + liveness(0), relaxedLiveness(0), PM(0), PCA(0), + ReferencedBlockVars(0), UseUnoptimizedCFG(useUnoptimizedCFG), + AddEHEdges(addehedges) {} ~AnalysisContext(); ASTContext &getASTContext() { return D->getASTContext(); } - const Decl *getDecl() { return D; } + const Decl *getDecl() const { return D; } + + idx::TranslationUnit *getTranslationUnit() const { return TU; } + /// getAddEHEdges - Return true iff we are adding exceptional edges from /// callExprs. If this is false, then try/catch statements and blocks /// reachable from them can appear to be dead in the CFG, analysis passes must /// cope with that. bool getAddEHEdges() const { return AddEHEdges; } + + bool getUseUnoptimizedCFG() const { return UseUnoptimizedCFG; } + Stmt *getBody(); CFG *getCFG(); + + /// Return a version of the CFG without any edges pruned. + CFG *getUnoptimizedCFG(); + ParentMap &getParentMap(); + PseudoConstantAnalysis *getPseudoConstantAnalysis(); LiveVariables *getLiveVariables(); + LiveVariables *getRelaxedLiveVariables(); typedef const VarDecl * const * referenced_decls_iterator; @@ -79,10 +105,16 @@ public: class AnalysisContextManager { typedef llvm::DenseMap ContextMap; ContextMap Contexts; + bool UseUnoptimizedCFG; public: + AnalysisContextManager(bool useUnoptimizedCFG = false) + : UseUnoptimizedCFG(useUnoptimizedCFG) {} + ~AnalysisContextManager(); - AnalysisContext *getContext(const Decl *D); + AnalysisContext *getContext(const Decl *D, idx::TranslationUnit *TU = 0); + + bool getUseUnoptimizedCFG() const { return UseUnoptimizedCFG; } // Discard all previously created AnalysisContexts. void clear(); @@ -94,7 +126,10 @@ public: private: ContextKind Kind; + + // AnalysisContext can't be const since some methods may modify its member. AnalysisContext *Ctx; + const LocationContext *Parent; protected: @@ -109,6 +144,10 @@ public: AnalysisContext *getAnalysisContext() const { return Ctx; } + idx::TranslationUnit *getTranslationUnit() const { + return Ctx->getTranslationUnit(); + } + const LocationContext *getParent() const { return Parent; } bool isParentOf(const LocationContext *LC) const; diff --git a/include/clang/Analysis/CFG.h b/include/clang/Analysis/CFG.h index b7256c9dc3d..b7a8e115969 100644 --- a/include/clang/Analysis/CFG.h +++ b/include/clang/Analysis/CFG.h @@ -35,22 +35,6 @@ namespace clang { class LangOptions; class ASTContext; -namespace { -// An element of the CFG for implicit descructor calls implied by the language -// rules. -class Dtor { - // Statement that introduces the variable. - Stmt *S; - // A token which ends the scope, return, goto, throw, }. - SourceLocation Loc; -public: - Dtor(Stmt *s, SourceLocation l) : S(s), Loc(l) { - } - SourceLocation getLoc() { return Loc; } - Stmt *getStmt() { return S; } -}; -} - /// CFGElement - Represents a top-level expression in a basic block. class CFGElement { llvm::PointerIntPair Data; @@ -59,7 +43,6 @@ public: explicit CFGElement() {} CFGElement(Stmt *S, bool lvalue) : Data(S, lvalue ? 1 : 0) {} CFGElement(Stmt *S, Type t) : Data(S, t == StartScope ? 2 : 3) {} - // CFGElement(Dtor *S, Type t) : Data(reinterpret_cast(S), 4) {} Stmt *getStmt() const { return Data.getPointer(); } bool asLValue() const { return Data.getInt() == 1; } bool asStartScope() const { return Data.getInt() == 2; } @@ -67,7 +50,6 @@ public: bool asDtor() const { return Data.getInt() == 4; } operator Stmt*() const { return getStmt(); } operator bool() const { return getStmt() != 0; } - operator Dtor*() const { return reinterpret_cast(getStmt()); } }; /// CFGBlock - Represents a single basic block in a source-level CFG. @@ -285,6 +267,7 @@ public: /// buildCFG - Builds a CFG from an AST. The responsibility to free the /// constructed CFG belongs to the caller. static CFG* buildCFG(const Decl *D, Stmt* AST, ASTContext *C, + bool pruneTriviallyFalseEdges = true, bool AddEHEdges = false, bool AddScopes = false /* NOT FULLY IMPLEMENTED. NOT READY FOR GENERAL USE. */); diff --git a/include/clang/Analysis/CFGStmtMap.h b/include/clang/Analysis/CFGStmtMap.h new file mode 100644 index 00000000000..6e8e140afb2 --- /dev/null +++ b/include/clang/Analysis/CFGStmtMap.h @@ -0,0 +1,52 @@ +//===--- CFGStmtMap.h - Map from Stmt* to CFGBlock* -----------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// This file defines the CFGStmtMap class, which defines a mapping from +// Stmt* to CFGBlock* +// +//===----------------------------------------------------------------------===// + +#ifndef LLVM_CLANG_CFGSTMTMAP_H +#define LLVM_CLANG_CFGSTMTMAP_H + +#include "clang/Analysis/CFG.h" + +namespace clang { + +class CFG; +class CFGBlock; +class ParentMap; +class Stmt; + +class CFGStmtMap { + ParentMap *PM; + void *M; + + CFGStmtMap(ParentMap *pm, void *m) : PM(pm), M(m) {} + +public: + ~CFGStmtMap(); + + /// Returns a new CFGMap for the given CFG. It is the caller's + /// responsibility to 'delete' this object when done using it. + static CFGStmtMap *Build(CFG* C, ParentMap *PM); + + /// Returns the CFGBlock the specified Stmt* appears in. For Stmt* that + /// are terminators, the CFGBlock is the block they appear as a terminator, + /// and not the block they appear as a block-level expression (e.g, '&&'). + /// CaseStmts and LabelStmts map to the CFGBlock they label. + CFGBlock *getBlock(Stmt * S); + + const CFGBlock *getBlock(const Stmt * S) const { + return const_cast(this)->getBlock(const_cast(S)); + } +}; + +} // end clang namespace +#endif diff --git a/include/clang/Analysis/FlowSensitive/DataflowSolver.h b/include/clang/Analysis/FlowSensitive/DataflowSolver.h index 3c762011a65..9375db06be7 100644 --- a/include/clang/Analysis/FlowSensitive/DataflowSolver.h +++ b/include/clang/Analysis/FlowSensitive/DataflowSolver.h @@ -231,7 +231,7 @@ private: EdgeDataMapTy& M = D.getEdgeDataMap(); bool firstMerge = true; - + bool noEdges = true; for (PrevBItr I=ItrTraits::PrevBegin(B),E=ItrTraits::PrevEnd(B); I!=E; ++I){ CFGBlock *PrevBlk = *I; @@ -243,6 +243,7 @@ private: M.find(ItrTraits::PrevEdge(B, PrevBlk)); if (EI != M.end()) { + noEdges = false; if (firstMerge) { firstMerge = false; V.copyValues(EI->second); @@ -252,8 +253,20 @@ private: } } + bool isInitialized = true; + typename BlockDataMapTy::iterator BI = D.getBlockDataMap().find(B); + if(BI == D.getBlockDataMap().end()) { + isInitialized = false; + BI = D.getBlockDataMap().insert( std::make_pair(B,ValTy()) ).first; + } + // If no edges have been found, it means this is the first time the solver + // has been called on block B, we copy the initialization values (if any) + // as current value for V (which will be used as edge data) + if(noEdges && isInitialized) + Merge(V, BI->second); + // Set the data for the block. - D.getBlockDataMap()[B].copyValues(V); + BI->second.copyValues(V); } /// ProcessBlock - Process the transfer functions for a given block. diff --git a/include/clang/Analysis/ProgramPoint.h b/include/clang/Analysis/ProgramPoint.h index 075838d45e5..ba303de7a8d 100644 --- a/include/clang/Analysis/ProgramPoint.h +++ b/include/clang/Analysis/ProgramPoint.h @@ -15,6 +15,7 @@ #ifndef LLVM_CLANG_ANALYSIS_PROGRAM_POINT #define LLVM_CLANG_ANALYSIS_PROGRAM_POINT +#include "clang/Analysis/AnalysisContext.h" #include "clang/Analysis/CFG.h" #include "llvm/System/DataTypes.h" #include "llvm/ADT/DenseMap.h" @@ -26,6 +27,7 @@ namespace clang { class LocationContext; +class AnalysisContext; class FunctionDecl; class ProgramPoint { @@ -45,7 +47,7 @@ public: CallEnterKind, CallExitKind, MinPostStmtKind = PostStmtKind, - MaxPostStmtKind = PostLValueKind }; + MaxPostStmtKind = CallExitKind }; private: std::pair Data; @@ -107,16 +109,16 @@ public: const void *tag = 0) : ProgramPoint(B, BlockEntranceKind, L, tag) {} - CFGBlock* getBlock() const { - return const_cast(reinterpret_cast(getData1())); + const CFGBlock* getBlock() const { + return reinterpret_cast(getData1()); } - CFGElement getFirstElement() const { + const CFGElement getFirstElement() const { const CFGBlock* B = getBlock(); return B->empty() ? CFGElement() : B->front(); } - Stmt *getFirstStmt() const { + const Stmt *getFirstStmt() const { return getFirstElement().getStmt(); } @@ -130,16 +132,16 @@ public: BlockExit(const CFGBlock* B, const LocationContext *L) : ProgramPoint(B, BlockExitKind, L) {} - CFGBlock* getBlock() const { - return const_cast(reinterpret_cast(getData1())); + const CFGBlock* getBlock() const { + return reinterpret_cast(getData1()); } - Stmt* getLastStmt() const { + const Stmt* getLastStmt() const { const CFGBlock* B = getBlock(); return B->empty() ? CFGElement() : B->back(); } - Stmt* getTerminator() const { + const Stmt* getTerminator() const { return getBlock()->getTerminator(); } @@ -298,12 +300,12 @@ public: BlockEdge(const CFGBlock* B1, const CFGBlock* B2, const LocationContext *L) : ProgramPoint(B1, B2, BlockEdgeKind, L) {} - CFGBlock* getSrc() const { - return const_cast(static_cast(getData1())); + const CFGBlock* getSrc() const { + return static_cast(getData1()); } - CFGBlock* getDst() const { - return const_cast(static_cast(getData2())); + const CFGBlock* getDst() const { + return static_cast(getData2()); } static bool classof(const ProgramPoint* Location) { @@ -313,16 +315,17 @@ public: class CallEnter : public StmtPoint { public: - // CallEnter uses the caller's location context. - CallEnter(const Stmt *S, const FunctionDecl *fd, const LocationContext *L) - : StmtPoint(S, fd, CallEnterKind, L, 0) {} + // L is caller's location context. AC is callee's AnalysisContext. + CallEnter(const Stmt *S, const AnalysisContext *AC, const LocationContext *L) + : StmtPoint(S, AC, CallEnterKind, L, 0) {} const Stmt *getCallExpr() const { return static_cast(getData1()); } - const FunctionDecl *getCallee() const { - return static_cast(getData2()); + AnalysisContext *getCalleeContext() const { + return const_cast( + static_cast(getData2())); } static bool classof(const ProgramPoint *Location) { diff --git a/include/clang/Analysis/Visitors/CFGStmtVisitor.h b/include/clang/Analysis/Visitors/CFGStmtVisitor.h index 8a85ec15cdc..6421f185ff7 100644 --- a/include/clang/Analysis/Visitors/CFGStmtVisitor.h +++ b/include/clang/Analysis/Visitors/CFGStmtVisitor.h @@ -86,7 +86,7 @@ public: BinaryOperator* B = cast(S); if (B->isLogicalOp()) return static_cast(this)->BlockStmt_VisitLogicalOp(B); - else if (B->getOpcode() == BinaryOperator::Comma) + else if (B->getOpcode() == BO_Comma) return static_cast(this)->BlockStmt_VisitComma(B); // Fall through. } @@ -149,7 +149,7 @@ public: case Stmt::BinaryOperatorClass: { BinaryOperator* B = cast(S); - if (B->getOpcode() != BinaryOperator::Comma) break; + if (B->getOpcode() != BO_Comma) break; static_cast(this)->Visit(B->getRHS()); return; } diff --git a/include/clang/Basic/Attr.td b/include/clang/Basic/Attr.td index 98871d26204..2f2267f7f79 100644 --- a/include/clang/Basic/Attr.td +++ b/include/clang/Basic/Attr.td @@ -33,8 +33,8 @@ class SubsetSubject // a possible subject. def NormalVar : SubsetSubjectgetStorageClass() != VarDecl::Register && - S->getKind() != Decl::ImplicitParam - S->getKind() != Decl::ParmVar + S->getKind() != Decl::ImplicitParam && + S->getKind() != Decl::ParmVar && S->getKind() != Decl::NonTypeTemplateParm}]>; def CXXVirtualMethod : SubsetSubjectisVirtual()}]>; @@ -51,18 +51,27 @@ class IntArgument : Argument; class StringArgument : Argument; class ExprArgument : Argument; class FunctionArgument : Argument; -class ObjCInterfaceArgument : Argument; -class UnsignedIntArgument : Argument; -class UnsignedIntOrTypeArgument : Argument; +class TypeArgument : Argument; +class UnsignedArgument : Argument; +class VariadicUnsignedArgument : Argument; + +// This one's a doozy, so it gets its own special type +// It can be an unsigned integer, or a type. Either can +// be dependent. +class AlignedArgument : Argument; // An integer argument with a default value class DefaultIntArgument : IntArgument { int Default = default; } -// Zero or more arguments of a type -class VariadicArgument : Argument { - Argument VariadicArg = arg; +// This argument is more complex, it includes the enumerator type name, +// a list of strings to accept, and a list of enumerators to map them to. +class EnumArgument values, + list enums> : Argument { + string Type = type; + list Values = values; + list Enums = enums; } class Attr { @@ -76,9 +85,8 @@ class Attr { // The attribute will not be permitted in C++0x attribute-specifiers if // this is empty; the empty string can be used as a namespace. list Namespaces = []; - // A temporary development bit to tell TableGen not to emit certain - // information about the attribute. - bit DoNotEmit = 1; + // Any additional text that should be included verbatim in the class. + code AdditionalMembers = [{}]; } // @@ -87,13 +95,13 @@ class Attr { def Alias : Attr { let Spellings = ["alias"]; - let Args = [StringArgument<"AliasName">]; + let Args = [StringArgument<"Aliasee">]; } def Aligned : Attr { let Spellings = ["align", "aligned"]; let Subjects = [NonBitField, NormalVar, Tag]; - let Args = [UnsignedIntOrTypeArgument<"Alignment">]; + let Args = [AlignedArgument<"Alignment">]; let Namespaces = ["", "std"]; } @@ -123,19 +131,17 @@ def BaseCheck : Attr { let Spellings = ["base_check"]; let Subjects = [CXXRecord]; let Namespaces = ["", "std"]; - let DoNotEmit = 0; } def Blocks : Attr { let Spellings = ["blocks"]; - let Args = [IdentifierArgument<"Type">]; + let Args = [EnumArgument<"Type", "BlockType", ["byref"], ["ByRef"]>]; } def CarriesDependency : Attr { let Spellings = ["carries_dependency"]; let Subjects = [ParmVar, Function]; let Namespaces = ["", "std"]; - let DoNotEmit = 0; } def CDecl : Attr { @@ -189,7 +195,6 @@ def Final : Attr { let Spellings = ["final"]; let Subjects = [CXXRecord, CXXVirtualMethod]; let Namespaces = ["", "std"]; - let DoNotEmit = 0; } def Format : Attr { @@ -211,7 +216,6 @@ def Hiding : Attr { let Spellings = ["hiding"]; let Subjects = [Field, CXXMethod]; let Namespaces = ["", "std"]; - let DoNotEmit = 0; } def IBAction : Attr { @@ -224,7 +228,7 @@ def IBOutlet : Attr { def IBOutletCollection : Attr { let Spellings = ["iboutletcollection"]; - let Args = [ObjCInterfaceArgument<"Class">]; + let Args = [TypeArgument<"Interface">]; } def Malloc : Attr { @@ -233,12 +237,12 @@ def Malloc : Attr { def MaxFieldAlignment : Attr { let Spellings = []; - let Args = [UnsignedIntArgument<"Alignment">]; + let Args = [UnsignedArgument<"Alignment">]; } def MSP430Interrupt : Attr { let Spellings = []; - let Args = [UnsignedIntArgument<"Number">]; + let Args = [UnsignedArgument<"Number">]; } def NoDebug : Attr { @@ -251,7 +255,15 @@ def NoInline : Attr { def NonNull : Attr { let Spellings = ["nonnull"]; - let Args = [VariadicArgument>]; + let Args = [VariadicUnsignedArgument<"Args">]; + let AdditionalMembers = +[{bool isNonNull(unsigned idx) const { + for (args_iterator i = args_begin(), e = args_end(); + i != e; ++i) + if (*i == idx) + return true; + return false; + } }]; } def NoReturn : Attr { @@ -290,13 +302,20 @@ def Override : Attr { let Spellings = ["override"]; let Subjects = [CXXVirtualMethod]; let Namespaces = ["", "std"]; - let DoNotEmit = 0; } def Overloadable : Attr { let Spellings = ["overloadable"]; } +def Ownership : Attr { + let Spellings = ["ownership_holds", "ownership_returns", "ownership_takes"]; + let Args = [EnumArgument<"OwnKind", "OwnershipKind", + ["ownership_holds", "ownership_returns", "ownership_takes"], + ["Holds", "Returns", "Takes"]>, + StringArgument<"Module">, VariadicUnsignedArgument<"Args">]; +} + def Packed : Attr { let Spellings = ["packed"]; } @@ -307,18 +326,18 @@ def Pure : Attr { def Regparm : Attr { let Spellings = ["regparm"]; - let Args = [UnsignedIntArgument<"NumParams">]; + let Args = [UnsignedArgument<"NumParams">]; } def ReqdWorkGroupSize : Attr { let Spellings = ["reqd_work_group_size"]; - let Args = [UnsignedIntArgument<"XDim">, UnsignedIntArgument<"YDim">, - UnsignedIntArgument<"ZDim">]; + let Args = [UnsignedArgument<"XDim">, UnsignedArgument<"YDim">, + UnsignedArgument<"ZDim">]; } def InitPriority : Attr { let Spellings = ["init_priority"]; - let Args = [UnsignedIntArgument<"Priority">]; + let Args = [UnsignedArgument<"Priority">]; } def Section : Attr { @@ -328,8 +347,8 @@ def Section : Attr { def Sentinel : Attr { let Spellings = ["sentinel"]; - let Args = [DefaultIntArgument<"NulPos", 0>, - DefaultIntArgument<"Sentinel", 0>]; + let Args = [DefaultIntArgument<"Sentinel", 0>, + DefaultIntArgument<"NullPos", 0>]; } def StdCall : Attr { @@ -340,6 +359,10 @@ def ThisCall : Attr { let Spellings = ["thiscall", "__thiscall"]; } +def Pascal : Attr { + let Spellings = ["pascal", "__pascal"]; +} + def TransparentUnion : Attr { let Spellings = ["transparent_union"]; } @@ -358,7 +381,14 @@ def Used : Attr { def Visibility : Attr { let Spellings = ["visibility"]; - let Args = [StringArgument<"Visibility">]; + let Args = [EnumArgument<"Visibility", "VisibilityType", + ["default", "hidden", "internal", "protected"], + ["Default", "Hidden", "Hidden", "Protected"]>]; +} + +def VecReturn : Attr { + let Spellings = ["vecreturn"]; + let Subjects = [CXXRecord]; } def WarnUnusedResult : Attr { diff --git a/include/clang/Basic/Builtins.def b/include/clang/Basic/Builtins.def index eff4f5e6727..0da893899b0 100644 --- a/include/clang/Basic/Builtins.def +++ b/include/clang/Basic/Builtins.def @@ -66,6 +66,11 @@ // P:N: -> similar to the p:N: attribute, but the function is like vprintf // in that it accepts its arguments as a va_list rather than // through an ellipsis +// s:N: -> this is a scanf-like function whose Nth argument is the format +// string. +// S:N: -> similar to the s:N: attribute, but the function is like vscanf +// in that it accepts its arguments as a va_list rather than +// through an ellipsis // e -> const, but only when -fmath-errno=0 // FIXME: gcc has nonnull @@ -193,9 +198,9 @@ BUILTIN(__builtin_cexpl, "XLdXLd", "Fnc") BUILTIN(__builtin_cimag, "dXd", "Fnc") BUILTIN(__builtin_cimagf, "fXf", "Fnc") BUILTIN(__builtin_cimagl, "LdXLd", "Fnc") -BUILTIN(__builtin_conj, "dXd", "Fnc") -BUILTIN(__builtin_conjf, "fXf", "Fnc") -BUILTIN(__builtin_conjl, "LdXLd", "Fnc") +BUILTIN(__builtin_conj, "XdXd", "Fnc") +BUILTIN(__builtin_conjf, "XfXf", "Fnc") +BUILTIN(__builtin_conjl, "XLdXLd", "Fnc") BUILTIN(__builtin_clog, "XdXd", "Fnc") BUILTIN(__builtin_clogf, "XfXf", "Fnc") BUILTIN(__builtin_clogl, "XLdXLd", "Fnc") @@ -281,12 +286,14 @@ BUILTIN(__builtin_stdarg_start, "vA.", "n") BUILTIN(__builtin_bcmp, "iv*v*z", "n") BUILTIN(__builtin_bcopy, "vv*v*z", "n") BUILTIN(__builtin_bzero, "vv*z", "nF") +BUILTIN(__builtin_fprintf, "iP*cC*.", "Fp:1:") BUILTIN(__builtin_memchr, "v*vC*iz", "nF") BUILTIN(__builtin_memcmp, "ivC*vC*z", "nF") BUILTIN(__builtin_memcpy, "v*v*vC*z", "nF") BUILTIN(__builtin_memmove, "v*v*vC*z", "nF") BUILTIN(__builtin_mempcpy, "v*v*vC*z", "nF") BUILTIN(__builtin_memset, "v*v*iz", "nF") +BUILTIN(__builtin_printf, "icC*.", "Fp:0:") BUILTIN(__builtin_stpcpy, "c*c*cC*", "nF") BUILTIN(__builtin_stpncpy, "c*c*cC*z", "nF") BUILTIN(__builtin_strcasecmp, "icC*cC*", "nF") @@ -319,7 +326,7 @@ BUILTIN(__builtin_vsprintf, "ic*cC*a", "nFP:1:") BUILTIN(__builtin_vsnprintf, "ic*zcC*a", "nFP:2:") // GCC exception builtins -BUILTIN(__builtin_eh_return, "vzv*", "") // FIXME: Takes intptr_t, not size_t! +BUILTIN(__builtin_eh_return, "vzv*", "r") // FIXME: Takes intptr_t, not size_t! BUILTIN(__builtin_frob_return_addr, "v*v*", "n") BUILTIN(__builtin_dwarf_cfa, "v*", "n") BUILTIN(__builtin_init_dwarf_reg_size_table, "vv*", "n") @@ -363,75 +370,75 @@ BUILTIN(__builtin_alloca, "v*z" , "n") // long long -> i64. BUILTIN(__sync_fetch_and_add, "v.", "") -BUILTIN(__sync_fetch_and_add_1, "cc*c.", "n") -BUILTIN(__sync_fetch_and_add_2, "ss*s.", "n") -BUILTIN(__sync_fetch_and_add_4, "ii*i.", "n") -BUILTIN(__sync_fetch_and_add_8, "LLiLLi*LLi.", "n") -BUILTIN(__sync_fetch_and_add_16, "LLLiLLLi*LLLi.", "n") +BUILTIN(__sync_fetch_and_add_1, "ccD*c.", "n") +BUILTIN(__sync_fetch_and_add_2, "ssD*s.", "n") +BUILTIN(__sync_fetch_and_add_4, "iiD*i.", "n") +BUILTIN(__sync_fetch_and_add_8, "LLiLLiD*LLi.", "n") +BUILTIN(__sync_fetch_and_add_16, "LLLiLLLiD*LLLi.", "n") BUILTIN(__sync_fetch_and_sub, "v.", "") -BUILTIN(__sync_fetch_and_sub_1, "cc*c.", "n") -BUILTIN(__sync_fetch_and_sub_2, "ss*s.", "n") -BUILTIN(__sync_fetch_and_sub_4, "ii*i.", "n") -BUILTIN(__sync_fetch_and_sub_8, "LLiLLi*LLi.", "n") -BUILTIN(__sync_fetch_and_sub_16, "LLLiLLLi*LLLi.", "n") +BUILTIN(__sync_fetch_and_sub_1, "ccD*c.", "n") +BUILTIN(__sync_fetch_and_sub_2, "ssD*s.", "n") +BUILTIN(__sync_fetch_and_sub_4, "iiD*i.", "n") +BUILTIN(__sync_fetch_and_sub_8, "LLiLLiD*LLi.", "n") +BUILTIN(__sync_fetch_and_sub_16, "LLLiLLLiD*LLLi.", "n") BUILTIN(__sync_fetch_and_or, "v.", "") -BUILTIN(__sync_fetch_and_or_1, "cc*c.", "n") -BUILTIN(__sync_fetch_and_or_2, "ss*s.", "n") -BUILTIN(__sync_fetch_and_or_4, "ii*i.", "n") -BUILTIN(__sync_fetch_and_or_8, "LLiLLi*LLi.", "n") -BUILTIN(__sync_fetch_and_or_16, "LLLiLLLi*LLLi.", "n") +BUILTIN(__sync_fetch_and_or_1, "ccD*c.", "n") +BUILTIN(__sync_fetch_and_or_2, "ssD*s.", "n") +BUILTIN(__sync_fetch_and_or_4, "iiD*i.", "n") +BUILTIN(__sync_fetch_and_or_8, "LLiLLiD*LLi.", "n") +BUILTIN(__sync_fetch_and_or_16, "LLLiLLLiD*LLLi.", "n") BUILTIN(__sync_fetch_and_and, "v.", "") -BUILTIN(__sync_fetch_and_and_1, "cc*c.", "n") -BUILTIN(__sync_fetch_and_and_2, "ss*s.", "n") -BUILTIN(__sync_fetch_and_and_4, "ii*i.", "n") -BUILTIN(__sync_fetch_and_and_8, "LLiLLi*LLi.", "n") -BUILTIN(__sync_fetch_and_and_16, "LLLiLLLi*LLLi.", "n") +BUILTIN(__sync_fetch_and_and_1, "ccD*c.", "n") +BUILTIN(__sync_fetch_and_and_2, "ssD*s.", "n") +BUILTIN(__sync_fetch_and_and_4, "iiD*i.", "n") +BUILTIN(__sync_fetch_and_and_8, "LLiLLiD*LLi.", "n") +BUILTIN(__sync_fetch_and_and_16, "LLLiLLLiD*LLLi.", "n") BUILTIN(__sync_fetch_and_xor, "v.", "") -BUILTIN(__sync_fetch_and_xor_1, "cc*c.", "n") -BUILTIN(__sync_fetch_and_xor_2, "ss*s.", "n") -BUILTIN(__sync_fetch_and_xor_4, "ii*i.", "n") -BUILTIN(__sync_fetch_and_xor_8, "LLiLLi*LLi.", "n") -BUILTIN(__sync_fetch_and_xor_16, "LLLiLLLi*LLLi.", "n") +BUILTIN(__sync_fetch_and_xor_1, "ccD*c.", "n") +BUILTIN(__sync_fetch_and_xor_2, "ssD*s.", "n") +BUILTIN(__sync_fetch_and_xor_4, "iiD*i.", "n") +BUILTIN(__sync_fetch_and_xor_8, "LLiLLiD*LLi.", "n") +BUILTIN(__sync_fetch_and_xor_16, "LLLiLLLiD*LLLi.", "n") BUILTIN(__sync_add_and_fetch, "v.", "") -BUILTIN(__sync_add_and_fetch_1, "cc*c.", "n") -BUILTIN(__sync_add_and_fetch_2, "ss*s.", "n") -BUILTIN(__sync_add_and_fetch_4, "ii*i.", "n") -BUILTIN(__sync_add_and_fetch_8, "LLiLLi*LLi.", "n") -BUILTIN(__sync_add_and_fetch_16, "LLLiLLLi*LLLi.", "n") +BUILTIN(__sync_add_and_fetch_1, "ccD*c.", "n") +BUILTIN(__sync_add_and_fetch_2, "ssD*s.", "n") +BUILTIN(__sync_add_and_fetch_4, "iiD*i.", "n") +BUILTIN(__sync_add_and_fetch_8, "LLiLLiD*LLi.", "n") +BUILTIN(__sync_add_and_fetch_16, "LLLiLLLiD*LLLi.", "n") BUILTIN(__sync_sub_and_fetch, "v.", "") -BUILTIN(__sync_sub_and_fetch_1, "cc*c.", "n") -BUILTIN(__sync_sub_and_fetch_2, "ss*s.", "n") -BUILTIN(__sync_sub_and_fetch_4, "ii*i.", "n") -BUILTIN(__sync_sub_and_fetch_8, "LLiLLi*LLi.", "n") -BUILTIN(__sync_sub_and_fetch_16, "LLLiLLLi*LLLi.", "n") +BUILTIN(__sync_sub_and_fetch_1, "ccD*c.", "n") +BUILTIN(__sync_sub_and_fetch_2, "ssD*s.", "n") +BUILTIN(__sync_sub_and_fetch_4, "iiD*i.", "n") +BUILTIN(__sync_sub_and_fetch_8, "LLiLLiD*LLi.", "n") +BUILTIN(__sync_sub_and_fetch_16, "LLLiLLLiD*LLLi.", "n") BUILTIN(__sync_or_and_fetch, "v.", "") -BUILTIN(__sync_or_and_fetch_1, "cc*c.", "n") -BUILTIN(__sync_or_and_fetch_2, "ss*s.", "n") -BUILTIN(__sync_or_and_fetch_4, "ii*i.", "n") -BUILTIN(__sync_or_and_fetch_8, "LLiLLi*LLi.", "n") -BUILTIN(__sync_or_and_fetch_16, "LLLiLLLi*LLLi.", "n") +BUILTIN(__sync_or_and_fetch_1, "ccD*c.", "n") +BUILTIN(__sync_or_and_fetch_2, "ssD*s.", "n") +BUILTIN(__sync_or_and_fetch_4, "iiD*i.", "n") +BUILTIN(__sync_or_and_fetch_8, "LLiLLiD*LLi.", "n") +BUILTIN(__sync_or_and_fetch_16, "LLLiLLLiD*LLLi.", "n") BUILTIN(__sync_and_and_fetch, "v.", "") -BUILTIN(__sync_and_and_fetch_1, "cc*c.", "n") -BUILTIN(__sync_and_and_fetch_2, "ss*s.", "n") -BUILTIN(__sync_and_and_fetch_4, "ii*i.", "n") -BUILTIN(__sync_and_and_fetch_8, "LLiLLi*LLi.", "n") -BUILTIN(__sync_and_and_fetch_16, "LLLiLLLi*LLLi.", "n") +BUILTIN(__sync_and_and_fetch_1, "ccD*c.", "n") +BUILTIN(__sync_and_and_fetch_2, "ssD*s.", "n") +BUILTIN(__sync_and_and_fetch_4, "iiD*i.", "n") +BUILTIN(__sync_and_and_fetch_8, "LLiLLiD*LLi.", "n") +BUILTIN(__sync_and_and_fetch_16, "LLLiLLLiD*LLLi.", "n") BUILTIN(__sync_xor_and_fetch, "v.", "") -BUILTIN(__sync_xor_and_fetch_1, "cc*c.", "n") -BUILTIN(__sync_xor_and_fetch_2, "ss*s.", "n") -BUILTIN(__sync_xor_and_fetch_4, "ii*i.", "n") -BUILTIN(__sync_xor_and_fetch_8, "LLiLLi*LLi.", "n") -BUILTIN(__sync_xor_and_fetch_16, "LLLiLLLi*LLLi.", "n") +BUILTIN(__sync_xor_and_fetch_1, "ccD*c.", "n") +BUILTIN(__sync_xor_and_fetch_2, "ssD*s.", "n") +BUILTIN(__sync_xor_and_fetch_4, "iiD*i.", "n") +BUILTIN(__sync_xor_and_fetch_8, "LLiLLiD*LLi.", "n") +BUILTIN(__sync_xor_and_fetch_16, "LLLiLLLiD*LLLi.", "n") BUILTIN(__sync_bool_compare_and_swap, "v.", "") BUILTIN(__sync_bool_compare_and_swap_1, "bcD*cc.", "n") @@ -448,18 +455,18 @@ BUILTIN(__sync_val_compare_and_swap_8, "LLiLLiD*LLiLLi.", "n") BUILTIN(__sync_val_compare_and_swap_16, "LLLiLLLiD*LLLiLLLi.", "n") BUILTIN(__sync_lock_test_and_set, "v.", "") -BUILTIN(__sync_lock_test_and_set_1, "cc*c.", "n") -BUILTIN(__sync_lock_test_and_set_2, "ss*s.", "n") -BUILTIN(__sync_lock_test_and_set_4, "ii*i.", "n") -BUILTIN(__sync_lock_test_and_set_8, "LLiLLi*LLi.", "n") -BUILTIN(__sync_lock_test_and_set_16, "LLLiLLLi*LLLi.", "n") +BUILTIN(__sync_lock_test_and_set_1, "ccD*c.", "n") +BUILTIN(__sync_lock_test_and_set_2, "ssD*s.", "n") +BUILTIN(__sync_lock_test_and_set_4, "iiD*i.", "n") +BUILTIN(__sync_lock_test_and_set_8, "LLiLLiD*LLi.", "n") +BUILTIN(__sync_lock_test_and_set_16, "LLLiLLLiD*LLLi.", "n") BUILTIN(__sync_lock_release, "v.", "") -BUILTIN(__sync_lock_release_1, "vc*.", "n") -BUILTIN(__sync_lock_release_2, "vs*.", "n") -BUILTIN(__sync_lock_release_4, "vi*.", "n") -BUILTIN(__sync_lock_release_8, "vLLi*.", "n") -BUILTIN(__sync_lock_release_16, "vLLLi*.", "n") +BUILTIN(__sync_lock_release_1, "vcD*.", "n") +BUILTIN(__sync_lock_release_2, "vsD*.", "n") +BUILTIN(__sync_lock_release_4, "viD*.", "n") +BUILTIN(__sync_lock_release_8, "vLLiD*.", "n") +BUILTIN(__sync_lock_release_16, "vLLLiD*.", "n") @@ -468,10 +475,10 @@ BUILTIN(__sync_synchronize, "v.", "n") // LLVM instruction builtin [Clang extension]. BUILTIN(__builtin_llvm_memory_barrier,"vbbbbb", "n") // GCC does not support these, they are a Clang extension. -BUILTIN(__sync_fetch_and_min, "ii*i", "n") -BUILTIN(__sync_fetch_and_max, "ii*i", "n") -BUILTIN(__sync_fetch_and_umin, "UiUi*Ui", "n") -BUILTIN(__sync_fetch_and_umax, "UiUi*Ui", "n") +BUILTIN(__sync_fetch_and_min, "iiD*i", "n") +BUILTIN(__sync_fetch_and_max, "iiD*i", "n") +BUILTIN(__sync_fetch_and_umin, "UiUiD*Ui", "n") +BUILTIN(__sync_fetch_and_umax, "UiUiD*Ui", "n") // Random libc builtins. BUILTIN(__builtin_abort, "v", "Fnr") @@ -516,6 +523,7 @@ LIBBUILTIN(vprintf, "icC*a", "fP:0:", "stdio.h") LIBBUILTIN(vfprintf, "i.", "fP:1:", "stdio.h") LIBBUILTIN(vsnprintf, "ic*zcC*a", "fP:2:", "stdio.h") LIBBUILTIN(vsprintf, "ic*cC*a", "fP:1:", "stdio.h") +LIBBUILTIN(scanf, "icC*.", "fs:0:", "stdio.h") // C99 LIBBUILTIN(longjmp, "vJi", "fr", "setjmp.h") @@ -560,5 +568,10 @@ LIBBUILTIN(cos, "dd", "fe", "math.h") LIBBUILTIN(cosl, "LdLd", "fe", "math.h") LIBBUILTIN(cosf, "ff", "fe", "math.h") +// Blocks runtime Builtin math library functions +LIBBUILTIN(_Block_object_assign, "vv*vC*iC", "f", "Blocks.h") +LIBBUILTIN(_Block_object_dispose, "vvC*iC", "f", "Blocks.h") +// FIXME: Also declare NSConcreteGlobalBlock and NSConcreteStackBlock. + #undef BUILTIN #undef LIBBUILTIN diff --git a/include/clang/Basic/Builtins.h b/include/clang/Basic/Builtins.h index 07f091a58a4..94d5e6955a2 100644 --- a/include/clang/Basic/Builtins.h +++ b/include/clang/Basic/Builtins.h @@ -119,6 +119,11 @@ public: /// argument and whether this function as a va_list argument. bool isPrintfLike(unsigned ID, unsigned &FormatIdx, bool &HasVAListArg); + /// \brief Determine whether this builtin is like scanf in its + /// formatting rules and, if so, set the index to the format string + /// argument and whether this function as a va_list argument. + bool isScanfLike(unsigned ID, unsigned &FormatIdx, bool &HasVAListArg); + /// hasVAListUse - Return true of the specified builtin uses __builtin_va_list /// as an operand or return type. bool hasVAListUse(unsigned ID) const { diff --git a/include/clang/Basic/BuiltinsARM.def b/include/clang/Basic/BuiltinsARM.def index 54e4c2b2083..080d17fa1e3 100644 --- a/include/clang/Basic/BuiltinsARM.def +++ b/include/clang/Basic/BuiltinsARM.def @@ -15,9 +15,21 @@ // The format of this database matches clang/Basic/Builtins.def. // In libgcc -BUILTIN(__clear_cache, "vc*c*", "") +BUILTIN(__clear_cache, "v.", "") BUILTIN(__builtin_thread_pointer, "v*", "") +// Saturating arithmetic +BUILTIN(__builtin_arm_qadd, "iii", "nc") +BUILTIN(__builtin_arm_qsub, "iii", "nc") +BUILTIN(__builtin_arm_ssat, "iiUi", "nc") +BUILTIN(__builtin_arm_usat, "UiUiUi", "nc") + +// VFP +BUILTIN(__builtin_arm_get_fpscr, "Ui", "nc") +BUILTIN(__builtin_arm_set_fpscr, "vUi", "nc") +BUILTIN(__builtin_arm_vcvtr_f, "ffi", "nc") +BUILTIN(__builtin_arm_vcvtr_d, "fdi", "nc") + // NEON #define GET_NEON_BUILTINS #include "clang/Basic/arm_neon.inc" diff --git a/include/clang/Basic/BuiltinsX86.def b/include/clang/Basic/BuiltinsX86.def index a878dd1bd1a..5ad64b9b49d 100644 --- a/include/clang/Basic/BuiltinsX86.def +++ b/include/clang/Basic/BuiltinsX86.def @@ -22,10 +22,81 @@ // definition anyway, since code generation will lower to the // intrinsic if one exists. -BUILTIN(__builtin_ia32_emms , "v", "") - // FIXME: Are these nothrow/const? +// MMX +BUILTIN(__builtin_ia32_emms, "v", "") +BUILTIN(__builtin_ia32_femms, "v", "") +BUILTIN(__builtin_ia32_paddb, "V8cV8cV8c", "") +BUILTIN(__builtin_ia32_paddw, "V4sV4sV4s", "") +BUILTIN(__builtin_ia32_paddd, "V2iV2iV2i", "") +BUILTIN(__builtin_ia32_paddsb, "V8cV8cV8c", "") +BUILTIN(__builtin_ia32_paddsw, "V4sV4sV4s", "") +BUILTIN(__builtin_ia32_paddusb, "V8cV8cV8c", "") +BUILTIN(__builtin_ia32_paddusw, "V4sV4sV4s", "") +BUILTIN(__builtin_ia32_psubb, "V8cV8cV8c", "") +BUILTIN(__builtin_ia32_psubw, "V4sV4sV4s", "") +BUILTIN(__builtin_ia32_psubd, "V2iV2iV2i", "") +BUILTIN(__builtin_ia32_psubsb, "V8cV8cV8c", "") +BUILTIN(__builtin_ia32_psubsw, "V4sV4sV4s", "") +BUILTIN(__builtin_ia32_psubusb, "V8cV8cV8c", "") +BUILTIN(__builtin_ia32_psubusw, "V4sV4sV4s", "") +BUILTIN(__builtin_ia32_pmulhw, "V4sV4sV4s", "") +BUILTIN(__builtin_ia32_pmullw, "V4sV4sV4s", "") +BUILTIN(__builtin_ia32_pmulhuw, "V4sV4sV4s", "") +BUILTIN(__builtin_ia32_pmuludq, "V1LLiV2iV2i", "") +BUILTIN(__builtin_ia32_pmaddwd, "V2iV4sV4s", "") +BUILTIN(__builtin_ia32_pand, "V1LLiV1LLiV1LLi", "") +BUILTIN(__builtin_ia32_pandn, "V1LLiV1LLiV1LLi", "") +BUILTIN(__builtin_ia32_por, "V1LLiV1LLiV1LLi", "") +BUILTIN(__builtin_ia32_pxor, "V1LLiV1LLiV1LLi", "") +BUILTIN(__builtin_ia32_pavgb, "V8cV8cV8c", "") +BUILTIN(__builtin_ia32_pavgw, "V4sV4sV4s", "") +BUILTIN(__builtin_ia32_pmaxub, "V8cV8cV8c", "") +BUILTIN(__builtin_ia32_pmaxsw, "V4sV4sV4s", "") +BUILTIN(__builtin_ia32_pminub, "V8cV8cV8c", "") +BUILTIN(__builtin_ia32_pminsw, "V4sV4sV4s", "") +BUILTIN(__builtin_ia32_psadbw, "V4sV8cV8c", "") +BUILTIN(__builtin_ia32_psllw, "V4sV4sV1LLi", "") +BUILTIN(__builtin_ia32_pslld, "V2iV2iV1LLi", "") +BUILTIN(__builtin_ia32_psllq, "V1LLiV1LLiV1LLi", "") +BUILTIN(__builtin_ia32_psrlw, "V4sV4sV1LLi", "") +BUILTIN(__builtin_ia32_psrld, "V2iV2iV1LLi", "") +BUILTIN(__builtin_ia32_psrlq, "V1LLiV1LLiV1LLi", "") +BUILTIN(__builtin_ia32_psraw, "V4sV4sV1LLi", "") +BUILTIN(__builtin_ia32_psrad, "V2iV2iV1LLi", "") +BUILTIN(__builtin_ia32_psllwi, "V4sV4si", "") +BUILTIN(__builtin_ia32_pslldi, "V2iV2ii", "") +BUILTIN(__builtin_ia32_psllqi, "V1LLiV1LLii", "") +BUILTIN(__builtin_ia32_psrlwi, "V4sV4si", "") +BUILTIN(__builtin_ia32_psrldi, "V2iV2ii", "") +BUILTIN(__builtin_ia32_psrlqi, "V1LLiV1LLii", "") +BUILTIN(__builtin_ia32_psrawi, "V4sV4si", "") +BUILTIN(__builtin_ia32_psradi, "V2iV2ii", "") +BUILTIN(__builtin_ia32_packsswb, "V8cV4sV4s", "") +BUILTIN(__builtin_ia32_packssdw, "V4sV2iV2i", "") +BUILTIN(__builtin_ia32_packuswb, "V8cV4sV4s", "") +BUILTIN(__builtin_ia32_punpckhbw, "V8cV8cV8c", "") +BUILTIN(__builtin_ia32_punpckhwd, "V4sV4sV4s", "") +BUILTIN(__builtin_ia32_punpckhdq, "V2iV2iV2i", "") +BUILTIN(__builtin_ia32_punpcklbw, "V8cV8cV8c", "") +BUILTIN(__builtin_ia32_punpcklwd, "V4sV4sV4s", "") +BUILTIN(__builtin_ia32_punpckldq, "V2iV2iV2i", "") +BUILTIN(__builtin_ia32_pcmpeqb, "V8cV8cV8c", "") +BUILTIN(__builtin_ia32_pcmpeqw, "V4sV4sV4s", "") +BUILTIN(__builtin_ia32_pcmpeqd, "V2iV2iV2i", "") +BUILTIN(__builtin_ia32_pcmpgtb, "V8cV8cV8c", "") +BUILTIN(__builtin_ia32_pcmpgtw, "V4sV4sV4s", "") +BUILTIN(__builtin_ia32_pcmpgtd, "V2iV2iV2i", "") +BUILTIN(__builtin_ia32_maskmovq, "vV8cV8cc*", "") +BUILTIN(__builtin_ia32_pmovmskb, "iV8c", "") +BUILTIN(__builtin_ia32_movntq, "vV1LLi*V1LLi", "") +BUILTIN(__builtin_ia32_palignr, "V8cV8cV8cc", "") // FIXME: Correct type? +BUILTIN(__builtin_ia32_vec_init_v2si, "V2iii", "") +BUILTIN(__builtin_ia32_vec_init_v4hi, "V4sssss", "") +BUILTIN(__builtin_ia32_vec_init_v8qi, "V8ccccccccc", "") +BUILTIN(__builtin_ia32_vec_ext_v2si, "iV2ii", "") + // SSE intrinsics. BUILTIN(__builtin_ia32_comieq, "iV4fV4f", "") BUILTIN(__builtin_ia32_comilt, "iV4fV4f", "") @@ -57,29 +128,6 @@ BUILTIN(__builtin_ia32_minps, "V4fV4fV4f", "") BUILTIN(__builtin_ia32_maxps, "V4fV4fV4f", "") BUILTIN(__builtin_ia32_minss, "V4fV4fV4f", "") BUILTIN(__builtin_ia32_maxss, "V4fV4fV4f", "") -BUILTIN(__builtin_ia32_paddsb, "V8cV8cV8c", "") -BUILTIN(__builtin_ia32_paddsw, "V4sV4sV4s", "") -BUILTIN(__builtin_ia32_psubsb, "V8cV8cV8c", "") -BUILTIN(__builtin_ia32_psubsw, "V4sV4sV4s", "") -BUILTIN(__builtin_ia32_paddusb, "V8cV8cV8c", "") -BUILTIN(__builtin_ia32_paddusw, "V4sV4sV4s", "") -BUILTIN(__builtin_ia32_psubusb, "V8cV8cV8c", "") -BUILTIN(__builtin_ia32_psubusw, "V4sV4sV4s", "") -BUILTIN(__builtin_ia32_pmulhw, "V4sV4sV4s", "") -BUILTIN(__builtin_ia32_pmulhuw, "V4sV4sV4s", "") -BUILTIN(__builtin_ia32_pavgb, "V8cV8cV8c", "") -BUILTIN(__builtin_ia32_pavgw, "V4sV4sV4s", "") -BUILTIN(__builtin_ia32_pcmpeqb, "V8cV8cV8c", "") -BUILTIN(__builtin_ia32_pcmpeqw, "V4sV4sV4s", "") -BUILTIN(__builtin_ia32_pcmpeqd, "V2iV2iV2i", "") -BUILTIN(__builtin_ia32_pcmpgtb, "V8cV8cV8c", "") -BUILTIN(__builtin_ia32_pcmpgtw, "V4sV4sV4s", "") -BUILTIN(__builtin_ia32_pcmpgtd, "V2iV2iV2i", "") -BUILTIN(__builtin_ia32_pmaxub, "V8cV8cV8c", "") -BUILTIN(__builtin_ia32_pmaxsw, "V4sV4sV4s", "") -BUILTIN(__builtin_ia32_pminub, "V8cV8cV8c", "") -BUILTIN(__builtin_ia32_pminsw, "V4sV4sV4s", "") -BUILTIN(__builtin_ia32_punpcklwd, "V4sV4sV4s", "") BUILTIN(__builtin_ia32_cmppd, "V2dV2dV2dc", "") BUILTIN(__builtin_ia32_cmpsd, "V2dV2dV2dc", "") BUILTIN(__builtin_ia32_minpd, "V2dV2dV2d", "") @@ -147,18 +195,6 @@ BUILTIN(__builtin_ia32_pabsw128, "V8sV8s", "") BUILTIN(__builtin_ia32_pabsw, "V4sV4s", "") BUILTIN(__builtin_ia32_pabsd128, "V4iV4i", "") BUILTIN(__builtin_ia32_pabsd, "V2iV2i", "") -BUILTIN(__builtin_ia32_psllw, "V4sV4sV1LLi", "") -BUILTIN(__builtin_ia32_pslld, "V2iV2iV1LLi", "") -BUILTIN(__builtin_ia32_psllq, "V1LLiV1LLiV1LLi", "") -BUILTIN(__builtin_ia32_psrlw, "V4sV4sV1LLi", "") -BUILTIN(__builtin_ia32_psrld, "V2iV2iV1LLi", "") -BUILTIN(__builtin_ia32_psrlq, "V1LLiV1LLiV1LLi", "") -BUILTIN(__builtin_ia32_psraw, "V4sV4sV1LLi", "") -BUILTIN(__builtin_ia32_psrad, "V2iV2iV1LLi", "") -BUILTIN(__builtin_ia32_pmaddwd, "V2iV4sV4s", "") -BUILTIN(__builtin_ia32_packsswb, "V8cV4sV4s", "") -BUILTIN(__builtin_ia32_packssdw, "V4sV2iV2i", "") -BUILTIN(__builtin_ia32_packuswb, "V8cV4sV4s", "") BUILTIN(__builtin_ia32_ldmxcsr, "vUi", "") BUILTIN(__builtin_ia32_stmxcsr, "Ui", "") BUILTIN(__builtin_ia32_cvtpi2ps, "V4fV4fV2i", "") @@ -166,17 +202,13 @@ BUILTIN(__builtin_ia32_cvtps2pi, "V2iV4f", "") BUILTIN(__builtin_ia32_cvtss2si, "iV4f", "") BUILTIN(__builtin_ia32_cvtss2si64, "LLiV4f", "") BUILTIN(__builtin_ia32_cvttps2pi, "V2iV4f", "") -BUILTIN(__builtin_ia32_maskmovq, "vV8cV8cc*", "") BUILTIN(__builtin_ia32_loadups, "V4ffC*", "") BUILTIN(__builtin_ia32_storeups, "vf*V4f", "") BUILTIN(__builtin_ia32_storehps, "vV2i*V4f", "") BUILTIN(__builtin_ia32_storelps, "vV2i*V4f", "") BUILTIN(__builtin_ia32_movmskps, "iV4f", "") -BUILTIN(__builtin_ia32_pmovmskb, "iV8c", "") BUILTIN(__builtin_ia32_movntps, "vf*V4f", "") -BUILTIN(__builtin_ia32_movntq, "vV1LLi*V1LLi", "") BUILTIN(__builtin_ia32_sfence, "v", "") -BUILTIN(__builtin_ia32_psadbw, "V4sV8cV8c", "") BUILTIN(__builtin_ia32_rcpps, "V4fV4f", "") BUILTIN(__builtin_ia32_rcpss, "V4fV4f", "") BUILTIN(__builtin_ia32_rsqrtps, "V4fV4f", "") @@ -212,15 +244,6 @@ BUILTIN(__builtin_ia32_lfence, "v", "") BUILTIN(__builtin_ia32_mfence, "v", "") BUILTIN(__builtin_ia32_loaddqu, "V16ccC*", "") BUILTIN(__builtin_ia32_storedqu, "vc*V16c", "") -BUILTIN(__builtin_ia32_psllwi, "V4sV4si", "") -BUILTIN(__builtin_ia32_pslldi, "V2iV2ii", "") -BUILTIN(__builtin_ia32_psllqi, "V1LLiV1LLii", "") -BUILTIN(__builtin_ia32_psrawi, "V4sV4si", "") -BUILTIN(__builtin_ia32_psradi, "V2iV2ii", "") -BUILTIN(__builtin_ia32_psrlwi, "V4sV4si", "") -BUILTIN(__builtin_ia32_psrldi, "V2iV2ii", "") -BUILTIN(__builtin_ia32_psrlqi, "V1LLiV1LLii", "") -BUILTIN(__builtin_ia32_pmuludq, "V1LLiV2iV2i", "") BUILTIN(__builtin_ia32_pmuludq128, "V2LLiV4iV4i", "") BUILTIN(__builtin_ia32_psraw128, "V8sV8sV8s", "") BUILTIN(__builtin_ia32_psrad128, "V4iV4iV4i", "") @@ -244,8 +267,7 @@ BUILTIN(__builtin_ia32_pmaddwd128, "V8sV8sV8s", "") BUILTIN(__builtin_ia32_monitor, "vv*UiUi", "") BUILTIN(__builtin_ia32_mwait, "vUiUi", "") BUILTIN(__builtin_ia32_lddqu, "V16ccC*", "") -BUILTIN(__builtin_ia32_palignr128, "V16cV16cV16cc", "") -BUILTIN(__builtin_ia32_palignr, "V8cV8cV8cc", "") +BUILTIN(__builtin_ia32_palignr128, "V16cV16cV16cc", "") // FIXME: Correct type? BUILTIN(__builtin_ia32_insertps128, "V4fV4fV4fi", "") BUILTIN(__builtin_ia32_storelv4si, "vV2i*V2LLi", "") @@ -324,5 +346,98 @@ BUILTIN(__builtin_ia32_aesenclast128, "V2LLiV2LLiV2LLi", "") BUILTIN(__builtin_ia32_aesdec128, "V2LLiV2LLiV2LLi", "") BUILTIN(__builtin_ia32_aesdeclast128, "V2LLiV2LLiV2LLi", "") BUILTIN(__builtin_ia32_aesimc128, "V2LLiV2LLi", "") -BUILTIN(__builtin_ia32_aeskeygenassist128, "V2LLiV2LLii", "") +BUILTIN(__builtin_ia32_aeskeygenassist128, "V2LLiV2LLic", "") + +// AVX +BUILTIN(__builtin_ia32_addsubpd256, "V4dV4dV4d", "") +BUILTIN(__builtin_ia32_addsubps256, "V8fV8fV8f", "") +BUILTIN(__builtin_ia32_haddpd256, "V4dV4dV4d", "") +BUILTIN(__builtin_ia32_hsubps256, "V8fV8fV8f", "") +BUILTIN(__builtin_ia32_hsubpd256, "V4dV4dV4d", "") +BUILTIN(__builtin_ia32_haddps256, "V8fV8fV8f", "") +BUILTIN(__builtin_ia32_maxpd256, "V4dV4dV4d", "") +BUILTIN(__builtin_ia32_maxps256, "V8fV8fV8f", "") +BUILTIN(__builtin_ia32_minpd256, "V4dV4dV4d", "") +BUILTIN(__builtin_ia32_minps256, "V8fV8fV8f", "") +BUILTIN(__builtin_ia32_vpermilvarpd, "V2dV2dV2LLi", "") +BUILTIN(__builtin_ia32_vpermilvarps, "V4fV4fV4i", "") +BUILTIN(__builtin_ia32_vpermilvarpd256, "V4dV4dV4LLi", "") +BUILTIN(__builtin_ia32_vpermilvarps256, "V8fV8fV8i", "") +BUILTIN(__builtin_ia32_blendpd256, "V4dV4dV4di", "") +BUILTIN(__builtin_ia32_blendps256, "V8fV8fV8fi", "") +BUILTIN(__builtin_ia32_blendvpd256, "V4dV4dV4dV4d", "") +BUILTIN(__builtin_ia32_blendvps256, "V8fV8fV8fV8f", "") +BUILTIN(__builtin_ia32_dpps256, "V8fV8fV8fi", "") +BUILTIN(__builtin_ia32_cmppd256, "V4dV4dV4dc", "") +BUILTIN(__builtin_ia32_cmpps256, "V8fV8fV8fc", "") +BUILTIN(__builtin_ia32_vextractf128_pd256, "V2dV4dc", "") +BUILTIN(__builtin_ia32_vextractf128_ps256, "V4fV8fc", "") +BUILTIN(__builtin_ia32_vextractf128_si256, "V4iV8ic", "") +BUILTIN(__builtin_ia32_cvtdq2pd256, "V4dV4i", "") +BUILTIN(__builtin_ia32_cvtdq2ps256, "V8fV8i", "") +BUILTIN(__builtin_ia32_cvtpd2ps256, "V4fV4d", "") +BUILTIN(__builtin_ia32_cvtps2dq256, "V8iV8f", "") +BUILTIN(__builtin_ia32_cvtps2pd256, "V4dV4f", "") +BUILTIN(__builtin_ia32_cvttpd2dq256, "V4iV4d", "") +BUILTIN(__builtin_ia32_cvtpd2dq256, "V4iV4d", "") +BUILTIN(__builtin_ia32_cvttps2dq256, "V8iV8f", "") +BUILTIN(__builtin_ia32_vperm2f128_pd256, "V4dV4dV4dc", "") +BUILTIN(__builtin_ia32_vperm2f128_ps256, "V8fV8fV8fc", "") +BUILTIN(__builtin_ia32_vperm2f128_si256, "V8iV8iV8ic", "") +BUILTIN(__builtin_ia32_vpermilpd, "V2dV2dc", "") +BUILTIN(__builtin_ia32_vpermilps, "V4fV4fc", "") +BUILTIN(__builtin_ia32_vpermilpd256, "V4dV4dc", "") +BUILTIN(__builtin_ia32_vpermilps256, "V8fV8fc", "") +BUILTIN(__builtin_ia32_vinsertf128_pd256, "V4dV4dV2dc", "") +BUILTIN(__builtin_ia32_vinsertf128_ps256, "V8fV8fV4fc", "") +BUILTIN(__builtin_ia32_vinsertf128_si256, "V8iV8iV4ic", "") +BUILTIN(__builtin_ia32_sqrtpd256, "V4dV4d", "") +BUILTIN(__builtin_ia32_sqrtps256, "V8fV8f", "") +BUILTIN(__builtin_ia32_rsqrtps256, "V8fV8f", "") +BUILTIN(__builtin_ia32_rcpps256, "V8fV8f", "") +BUILTIN(__builtin_ia32_roundpd256, "V4dV4di", "") +BUILTIN(__builtin_ia32_roundps256, "V8fV8fi", "") +BUILTIN(__builtin_ia32_vtestzpd, "iV2dV2d", "") +BUILTIN(__builtin_ia32_vtestcpd, "iV2dV2d", "") +BUILTIN(__builtin_ia32_vtestnzcpd, "iV2dV2d", "") +BUILTIN(__builtin_ia32_vtestzps, "iV4fV4f", "") +BUILTIN(__builtin_ia32_vtestcps, "iV4fV4f", "") +BUILTIN(__builtin_ia32_vtestnzcps, "iV4fV4f", "") +BUILTIN(__builtin_ia32_vtestzpd256, "iV4dV4d", "") +BUILTIN(__builtin_ia32_vtestcpd256, "iV4dV4d", "") +BUILTIN(__builtin_ia32_vtestnzcpd256, "iV4dV4d", "") +BUILTIN(__builtin_ia32_vtestzps256, "iV8fV8f", "") +BUILTIN(__builtin_ia32_vtestcps256, "iV8fV8f", "") +BUILTIN(__builtin_ia32_vtestnzcps256, "iV8fV8f", "") +BUILTIN(__builtin_ia32_ptestz256, "iV4LLiV4LLi", "") +BUILTIN(__builtin_ia32_ptestc256, "iV4LLiV4LLi", "") +BUILTIN(__builtin_ia32_ptestnzc256, "iV4LLiV4LLi", "") +BUILTIN(__builtin_ia32_movmskpd256, "iV4d", "") +BUILTIN(__builtin_ia32_movmskps256, "iV8f", "") +BUILTIN(__builtin_ia32_vzeroall, "v", "") +BUILTIN(__builtin_ia32_vzeroupper, "v", "") +BUILTIN(__builtin_ia32_vbroadcastss, "V4ffC*", "") +BUILTIN(__builtin_ia32_vbroadcastsd256, "V4ddC*", "") +BUILTIN(__builtin_ia32_vbroadcastss256, "V8ffC*", "") +BUILTIN(__builtin_ia32_vbroadcastf128_pd256, "V4dV2dC*", "") +BUILTIN(__builtin_ia32_vbroadcastf128_ps256, "V8fV4fC*", "") +BUILTIN(__builtin_ia32_loadupd256, "V4ddC*", "") +BUILTIN(__builtin_ia32_loadups256, "V8ffC*", "") +BUILTIN(__builtin_ia32_storeupd256, "vd*V4d", "") +BUILTIN(__builtin_ia32_storeups256, "vf*V8f", "") +BUILTIN(__builtin_ia32_loaddqu256, "V32ccC*", "") +BUILTIN(__builtin_ia32_storedqu256, "vc*V32c", "") +BUILTIN(__builtin_ia32_lddqu256, "V32ccC*", "") +BUILTIN(__builtin_ia32_movntdq256, "vV4LLi*V4LLi", "") +BUILTIN(__builtin_ia32_movntpd256, "vd*V4d", "") +BUILTIN(__builtin_ia32_movntps256, "vf*V8f", "") +BUILTIN(__builtin_ia32_maskloadpd, "V2dV2dC*V2d", "") +BUILTIN(__builtin_ia32_maskloadps, "V4fV4fC*V4f", "") +BUILTIN(__builtin_ia32_maskloadpd256, "V4dV4dC*V4d", "") +BUILTIN(__builtin_ia32_maskloadps256, "V8fV8fC*V8f", "") +BUILTIN(__builtin_ia32_maskstorepd, "vV2d*V2dV2d", "") +BUILTIN(__builtin_ia32_maskstoreps, "vV4f*V4fV4f", "") +BUILTIN(__builtin_ia32_maskstorepd256, "vV4d*V4dV4d", "") +BUILTIN(__builtin_ia32_maskstoreps256, "vV8f*V8fV8f", "") + #undef BUILTIN diff --git a/include/clang/Basic/DeclNodes.td b/include/clang/Basic/DeclNodes.td index 203fb451e38..e2f93e02c52 100644 --- a/include/clang/Basic/DeclNodes.td +++ b/include/clang/Basic/DeclNodes.td @@ -43,8 +43,9 @@ def Named : Decl<1>; def ParmVar : DDecl; def NonTypeTemplateParm : DDecl; def Template : DDecl; - def FunctionTemplate : DDecl