From owner-svn-src-vendor@FreeBSD.ORG Mon Apr 5 22:08:52 2010 Return-Path: Delivered-To: svn-src-vendor@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A1C6E1065670; Mon, 5 Apr 2010 22:08:52 +0000 (UTC) (envelope-from edwin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 907118FC17; Mon, 5 Apr 2010 22:08:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o35M8qDg058633; Mon, 5 Apr 2010 22:08:52 GMT (envelope-from edwin@svn.freebsd.org) Received: (from edwin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o35M8qv5058629; Mon, 5 Apr 2010 22:08:52 GMT (envelope-from edwin@svn.freebsd.org) Message-Id: <201004052208.o35M8qv5058629@svn.freebsd.org> From: Edwin Groothuis Date: Mon, 5 Apr 2010 22:08:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206216 - vendor/tzdata/dist X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Apr 2010 22:08:52 -0000 Author: edwin Date: Mon Apr 5 22:08:52 2010 New Revision: 206216 URL: http://svn.freebsd.org/changeset/base/206216 Log: Vendor import of tzdata2010h From tzdata2010h: - Tunis will not go into DST this year. - Pakistan will not go into DST this year. From tzdata2010g: - Bangladesh cancels DST. - Palestine goes into DST one day later than expected. - Russian timezones update: Europe/Samara goes to Moscow time. Asia/Kamchatka goes to Moscow+8 time. Asia/Anadyr goes to Moscow+8 time. Obtained from: ftp://elsie.nci.nih.gov/pub/ Modified: vendor/tzdata/dist/asia vendor/tzdata/dist/europe vendor/tzdata/dist/zone.tab Modified: vendor/tzdata/dist/asia ============================================================================== --- vendor/tzdata/dist/asia Mon Apr 5 21:43:22 2010 (r206215) +++ vendor/tzdata/dist/asia Mon Apr 5 22:08:52 2010 (r206216) @@ -1,4 +1,4 @@ -# @(#)asia 8.56 +# @(#)asia 8.58 # This file is in the public domain, so clarified as of # 2009-05-17 by Arthur David Olson. @@ -214,42 +214,20 @@ Zone Asia/Bahrain 3:22:20 - LMT 1920 # # 2010 midnight. The decision came at a cabinet meeting at the Prime # Minister's Office last night..." -# From Danvin Ruangchan (2009-12-24): -# ...the news mentions DST will be turned off again 7 months after March -# 31st on Oct 31, 2010. - -# From Arthur David Olson (2009-12-26): -# Indeed, "The government will advance again the Banglasdesh Standard -# Time by one one hour on March 31 next year by enforcing the Daylight -# Saving Time (DST) for seven months. It will continue till October 31 -# until further notice." I take that last sentence as the -# establishment of a rule. - -# From Nobutomo Nakano (2010-02-19): -# We received a report from Bangladesh saying that the start/end of -# Bangladesh DST is incorrect. Currently we have only the Bengali version -# of the official mail from BTRC which describes the following: -# -# "From 2010 each year when local standard time is about to reach -# March 31 at 10:59:00 PM clocks are turned forward 1 hour (11:59:00 PM) -# and when local daylight time is about to October 31 at 11:59:00 PM -# clocks are turned backward 1 hour (10:59:00 PM)." -# -# So, DST will start/end 1 minute earlier. - -# From Arthur David Olson (2010-03-03): -# The file -# -# http://www.cabinet.gov/bd/file_upload/news_events/en_169.pdf +# From Alexander Krivenyshev (2010-03-22): +# According to Bangladesh newspaper "The Daily Star," +# Cabinet cancels Daylight Saving Time +# +# http://www.thedailystar.net/newDesign/latest_news.php?nid=22817 +# +# or +# +# http://www.worldtimezone.com/dst_news/dst_news_bangladesh06.html # -# is in Bengali; it does contain two "31"s as well as two "11.59"s and a "10.59" -# which is consistent with the information provided by Nobutomo Nakano. # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S Rule Dhaka 2009 only - Jun 19 23:00 1:00 S Rule Dhaka 2009 only - Dec 31 23:59 0 - -Rule Dhaka 2010 max - Mar 31 22:59 1:00 S -Rule Dhaka 2010 max - Oct 31 23:59 0 - # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Asia/Dhaka 6:01:40 - LMT 1890 @@ -2129,6 +2107,32 @@ Zone Asia/Karachi 4:28:12 - LMT 1907 # http://www.worldtimezone.com/dst_news/dst_news_gazastrip02.html # +# From Alexander Krivenyshev (2010-03-19): +# According to Voice of Palestine DST will last for 191 days, from March +# 26, 2010 till "the last Sunday before the tenth day of Tishri +# (October), each year" (October 03, 2010?) +# +# +# http://palvoice.org/forums/showthread.php?t=245697 +# +# (in Arabic) +# or +# +# http://www.worldtimezone.com/dst_news/dst_news_westbank03.html +# + +# From Steffen Thorsen (2010-03-24): +# ...Ma'an News Agency reports that Hamas cabinet has decided it will +# start one day later, at 12:01am. Not sure if they really mean 12:01am or +# noon though: +# +# +# http://www.maannews.net/eng/ViewDetails.aspx?ID=271178 +# +# (Ma'an News Agency) +# "At 12:01am Friday, clocks in Israel and the West Bank will change to +# 1:01am, while Gaza clocks will change at 12:01am Saturday morning." + # The rules for Egypt are stolen from the `africa' file. # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S Rule EgyptAsia 1957 only - May 10 0:00 1:00 S @@ -2146,7 +2150,8 @@ Rule Palestine 2006 2008 - Apr 1 0:00 1 Rule Palestine 2006 only - Sep 22 0:00 0 - Rule Palestine 2007 only - Sep Thu>=8 2:00 0 - Rule Palestine 2008 only - Aug lastFri 2:00 0 - -Rule Palestine 2009 max - Mar lastFri 0:00 1:00 S +Rule Palestine 2009 only - Mar lastFri 0:00 1:00 S +Rule Palestine 2010 max - Mar lastSat 0:01 1:00 S Rule Palestine 2009 max - Sep Fri>=1 2:00 0 - # Zone NAME GMTOFF RULES FORMAT [UNTIL] Modified: vendor/tzdata/dist/europe ============================================================================== --- vendor/tzdata/dist/europe Mon Apr 5 21:43:22 2010 (r206215) +++ vendor/tzdata/dist/europe Mon Apr 5 22:08:52 2010 (r206216) @@ -1,5 +1,5 @@ #
-# @(#)europe	8.25
+# @(#)europe	8.26
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -2041,7 +2041,9 @@ Zone Europe/Samara	 3:20:36 -	LMT	1919 J
 			 3:00	Russia	KUY%sT	1991 Mar 31 2:00s
 			 2:00	Russia	KUY%sT	1991 Sep 29 2:00s
 			 3:00	-	KUYT	1991 Oct 20 3:00
-			 4:00	Russia	SAM%sT	# Samara Time
+			 4:00	Russia	SAM%sT	2010 Mar 28 2:00s # Samara Time
+			 3:00	Russia	SAM%sT
+
 #
 # From Oscar van Vlijmen (2001-08-25): [This region consists of]
 # Respublika Bashkortostan, Komi-Permyatskij avtonomnyj okrug,
@@ -2194,7 +2196,8 @@ Zone Asia/Kamchatka	10:34:36 -	LMT	1922 
 			11:00	-	PETT	1930 Jun 21 # P-K Time
 			12:00	Russia	PET%sT	1991 Mar 31 2:00s
 			11:00	Russia	PET%sT	1992 Jan 19 2:00s
-			12:00	Russia	PET%sT
+			12:00	Russia	PET%sT	2010 Mar 28 2:00s
+			11:00	Russia	PET%sT
 #
 # Chukotskij avtonomnyj okrug
 Zone Asia/Anadyr	11:49:56 -	LMT	1924 May  2
@@ -2202,7 +2205,8 @@ Zone Asia/Anadyr	11:49:56 -	LMT	1924 May
 			13:00	Russia	ANA%sT	1982 Apr  1 0:00s
 			12:00	Russia	ANA%sT	1991 Mar 31 2:00s
 			11:00	Russia	ANA%sT	1992 Jan 19 2:00s
-			12:00	Russia	ANA%sT
+			12:00	Russia	ANA%sT	2010 Mar 28 2:00s
+			11:00	Russia	ANA%sT
 
 # Serbia
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]

Modified: vendor/tzdata/dist/zone.tab
==============================================================================
--- vendor/tzdata/dist/zone.tab	Mon Apr  5 21:43:22 2010	(r206215)
+++ vendor/tzdata/dist/zone.tab	Mon Apr  5 22:08:52 2010	(r206216)
@@ -1,5 +1,5 @@
 # 
-# @(#)zone.tab	8.34
+# @(#)zone.tab	8.35
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 #
@@ -330,7 +330,7 @@ RS	+4450+02030	Europe/Belgrade
 RU	+5443+02030	Europe/Kaliningrad	Moscow-01 - Kaliningrad
 RU	+5545+03735	Europe/Moscow	Moscow+00 - west Russia
 RU	+4844+04425	Europe/Volgograd	Moscow+00 - Caspian Sea
-RU	+5312+05009	Europe/Samara	Moscow+01 - Samara, Udmurtia
+RU	+5312+05009	Europe/Samara	Moscow - Samara, Udmurtia
 RU	+5651+06036	Asia/Yekaterinburg	Moscow+02 - Urals
 RU	+5500+07324	Asia/Omsk	Moscow+03 - west Siberia
 RU	+5502+08255	Asia/Novosibirsk	Moscow+03 - Novosibirsk
@@ -341,8 +341,8 @@ RU	+6200+12940	Asia/Yakutsk	Moscow+06 - 
 RU	+4310+13156	Asia/Vladivostok	Moscow+07 - Amur River
 RU	+4658+14242	Asia/Sakhalin	Moscow+07 - Sakhalin Island
 RU	+5934+15048	Asia/Magadan	Moscow+08 - Magadan
-RU	+5301+15839	Asia/Kamchatka	Moscow+09 - Kamchatka
-RU	+6445+17729	Asia/Anadyr	Moscow+10 - Bering Sea
+RU	+5301+15839	Asia/Kamchatka	Moscow+08 - Kamchatka
+RU	+6445+17729	Asia/Anadyr	Moscow+08 - Bering Sea
 RW	-0157+03004	Africa/Kigali
 SA	+2438+04643	Asia/Riyadh
 SB	-0932+16012	Pacific/Guadalcanal

From owner-svn-src-vendor@FreeBSD.ORG  Mon Apr  5 22:10:26 2010
Return-Path: 
Delivered-To: svn-src-vendor@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 36420106568B;
	Mon,  5 Apr 2010 22:10:26 +0000 (UTC)
	(envelope-from edwin@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 0BD8D8FC1E;
	Mon,  5 Apr 2010 22:10:26 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o35MAP8f059071;
	Mon, 5 Apr 2010 22:10:25 GMT (envelope-from edwin@svn.freebsd.org)
Received: (from edwin@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o35MAPvY059070;
	Mon, 5 Apr 2010 22:10:25 GMT (envelope-from edwin@svn.freebsd.org)
Message-Id: <201004052210.o35MAPvY059070@svn.freebsd.org>
From: Edwin Groothuis 
Date: Mon, 5 Apr 2010 22:10:25 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-vendor@freebsd.org
X-SVN-Group: vendor
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r206218 - vendor/tzdata/tzdata2010h
X-BeenThere: svn-src-vendor@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the vendor work area tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Mon, 05 Apr 2010 22:10:26 -0000

Author: edwin
Date: Mon Apr  5 22:10:24 2010
New Revision: 206218
URL: http://svn.freebsd.org/changeset/base/206218

Log:
  Tag of tzdata2010h

Added:
  vendor/tzdata/tzdata2010h/
     - copied from r206217, vendor/tzdata/dist/

From owner-svn-src-vendor@FreeBSD.ORG  Tue Apr  6 15:52:59 2010
Return-Path: 
Delivered-To: svn-src-vendor@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 42B201065670;
	Tue,  6 Apr 2010 15:52:59 +0000 (UTC)
	(envelope-from rdivacky@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 2CC7F8FC08;
	Tue,  6 Apr 2010 15:52:59 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o36FqxvA009638;
	Tue, 6 Apr 2010 15:52:59 GMT (envelope-from rdivacky@svn.freebsd.org)
Received: (from rdivacky@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o36FqwOh009618;
	Tue, 6 Apr 2010 15:52:58 GMT (envelope-from rdivacky@svn.freebsd.org)
Message-Id: <201004061552.o36FqwOh009618@svn.freebsd.org>
From: Roman Divacky 
Date: Tue, 6 Apr 2010 15:52:58 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-vendor@freebsd.org
X-SVN-Group: vendor
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r206274 - in vendor/llvm/dist: docs include/llvm
	include/llvm/ADT include/llvm/CodeGen include/llvm/MC
	include/llvm/MC/MCParser include/llvm/Support
	include/llvm/Target include/llvm/Tra...
X-BeenThere: svn-src-vendor@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the vendor work area tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 06 Apr 2010 15:52:59 -0000

Author: rdivacky
Date: Tue Apr  6 15:52:58 2010
New Revision: 206274
URL: http://svn.freebsd.org/changeset/base/206274

Log:
  Update LLVM to r100520.

Added:
  vendor/llvm/dist/lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp
  vendor/llvm/dist/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp
  vendor/llvm/dist/test/CodeGen/X86/unreachable-loop-sinking.ll
Deleted:
  vendor/llvm/dist/include/llvm/CodeGen/DwarfWriter.h
  vendor/llvm/dist/lib/CodeGen/AsmPrinter/DwarfPrinter.cpp
  vendor/llvm/dist/lib/CodeGen/AsmPrinter/DwarfPrinter.h
  vendor/llvm/dist/lib/CodeGen/AsmPrinter/DwarfWriter.cpp
  vendor/llvm/dist/lib/Target/ARM/Disassembler/Makefile
Modified:
  vendor/llvm/dist/docs/HowToReleaseLLVM.html
  vendor/llvm/dist/docs/Lexicon.html
  vendor/llvm/dist/docs/SourceLevelDebugging.html
  vendor/llvm/dist/docs/WritingAnLLVMBackend.html
  vendor/llvm/dist/include/llvm/ADT/OwningPtr.h
  vendor/llvm/dist/include/llvm/CodeGen/AsmPrinter.h
  vendor/llvm/dist/include/llvm/CodeGen/FastISel.h
  vendor/llvm/dist/include/llvm/CodeGen/GCMetadataPrinter.h
  vendor/llvm/dist/include/llvm/CodeGen/MachineDominators.h
  vendor/llvm/dist/include/llvm/CodeGen/MachineFrameInfo.h
  vendor/llvm/dist/include/llvm/CodeGen/MachineFunction.h
  vendor/llvm/dist/include/llvm/CodeGen/MachineFunctionAnalysis.h
  vendor/llvm/dist/include/llvm/CodeGen/MachineModuleInfo.h
  vendor/llvm/dist/include/llvm/CodeGen/ScheduleDAG.h
  vendor/llvm/dist/include/llvm/CodeGen/SelectionDAG.h
  vendor/llvm/dist/include/llvm/CodeGen/SelectionDAGISel.h
  vendor/llvm/dist/include/llvm/IntrinsicInst.h
  vendor/llvm/dist/include/llvm/Intrinsics.td
  vendor/llvm/dist/include/llvm/LLVMContext.h
  vendor/llvm/dist/include/llvm/MC/MCAsmInfo.h
  vendor/llvm/dist/include/llvm/MC/MCInstPrinter.h
  vendor/llvm/dist/include/llvm/MC/MCParser/AsmParser.h
  vendor/llvm/dist/include/llvm/MC/MCSection.h
  vendor/llvm/dist/include/llvm/MC/MCSectionELF.h
  vendor/llvm/dist/include/llvm/MC/MCStreamer.h
  vendor/llvm/dist/include/llvm/Support/Allocator.h
  vendor/llvm/dist/include/llvm/Support/IRBuilder.h
  vendor/llvm/dist/include/llvm/Support/IRReader.h
  vendor/llvm/dist/include/llvm/Support/MathExtras.h
  vendor/llvm/dist/include/llvm/Support/MemoryBuffer.h
  vendor/llvm/dist/include/llvm/Support/SourceMgr.h
  vendor/llvm/dist/include/llvm/Target/Target.td
  vendor/llvm/dist/include/llvm/Target/TargetLowering.h
  vendor/llvm/dist/include/llvm/Target/TargetRegistry.h
  vendor/llvm/dist/include/llvm/Transforms/Utils/BuildLibCalls.h
  vendor/llvm/dist/lib/Analysis/IVUsers.cpp
  vendor/llvm/dist/lib/AsmParser/Parser.cpp
  vendor/llvm/dist/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
  vendor/llvm/dist/lib/CodeGen/AsmPrinter/CMakeLists.txt
  vendor/llvm/dist/lib/CodeGen/AsmPrinter/DIE.cpp
  vendor/llvm/dist/lib/CodeGen/AsmPrinter/DIE.h
  vendor/llvm/dist/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
  vendor/llvm/dist/lib/CodeGen/AsmPrinter/DwarfDebug.h
  vendor/llvm/dist/lib/CodeGen/AsmPrinter/DwarfException.cpp
  vendor/llvm/dist/lib/CodeGen/AsmPrinter/DwarfException.h
  vendor/llvm/dist/lib/CodeGen/AsmPrinter/OcamlGCPrinter.cpp
  vendor/llvm/dist/lib/CodeGen/GCMetadataPrinter.cpp
  vendor/llvm/dist/lib/CodeGen/LLVMTargetMachine.cpp
  vendor/llvm/dist/lib/CodeGen/MachineFunction.cpp
  vendor/llvm/dist/lib/CodeGen/MachineFunctionAnalysis.cpp
  vendor/llvm/dist/lib/CodeGen/MachineModuleInfo.cpp
  vendor/llvm/dist/lib/CodeGen/MachineSink.cpp
  vendor/llvm/dist/lib/CodeGen/PrologEpilogInserter.cpp
  vendor/llvm/dist/lib/CodeGen/SelectionDAG/FastISel.cpp
  vendor/llvm/dist/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
  vendor/llvm/dist/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
  vendor/llvm/dist/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
  vendor/llvm/dist/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h
  vendor/llvm/dist/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
  vendor/llvm/dist/lib/ExecutionEngine/JIT/JITEmitter.cpp
  vendor/llvm/dist/lib/ExecutionEngine/JIT/OProfileJITEventListener.cpp
  vendor/llvm/dist/lib/MC/MCAsmInfo.cpp
  vendor/llvm/dist/lib/MC/MCAsmInfoCOFF.cpp
  vendor/llvm/dist/lib/MC/MCAsmStreamer.cpp
  vendor/llvm/dist/lib/MC/MCParser/AsmParser.cpp
  vendor/llvm/dist/lib/MC/MCStreamer.cpp
  vendor/llvm/dist/lib/Support/MemoryBuffer.cpp
  vendor/llvm/dist/lib/Support/SourceMgr.cpp
  vendor/llvm/dist/lib/Support/regengine.inc
  vendor/llvm/dist/lib/Support/regexec.c
  vendor/llvm/dist/lib/Target/ARM/ARM.td
  vendor/llvm/dist/lib/Target/ARM/ARMISelLowering.cpp
  vendor/llvm/dist/lib/Target/ARM/ARMISelLowering.h
  vendor/llvm/dist/lib/Target/ARM/ARMInstrFormats.td
  vendor/llvm/dist/lib/Target/ARM/ARMMCAsmInfo.cpp
  vendor/llvm/dist/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp
  vendor/llvm/dist/lib/Target/ARM/AsmPrinter/ARMInstPrinter.cpp
  vendor/llvm/dist/lib/Target/ARM/AsmPrinter/ARMInstPrinter.h
  vendor/llvm/dist/lib/Target/ARM/Disassembler/ARMDisassembler.cpp
  vendor/llvm/dist/lib/Target/ARM/Makefile
  vendor/llvm/dist/lib/Target/Alpha/Alpha.td
  vendor/llvm/dist/lib/Target/Alpha/AsmPrinter/AlphaAsmPrinter.cpp
  vendor/llvm/dist/lib/Target/Blackfin/AsmPrinter/BlackfinAsmPrinter.cpp
  vendor/llvm/dist/lib/Target/CellSPU/AsmPrinter/SPUAsmPrinter.cpp
  vendor/llvm/dist/lib/Target/CellSPU/SPURegisterInfo.cpp
  vendor/llvm/dist/lib/Target/MBlaze/AsmPrinter/MBlazeAsmPrinter.cpp
  vendor/llvm/dist/lib/Target/MBlaze/MBlaze.td
  vendor/llvm/dist/lib/Target/MSP430/AsmPrinter/MSP430AsmPrinter.cpp
  vendor/llvm/dist/lib/Target/MSP430/AsmPrinter/MSP430InstPrinter.cpp
  vendor/llvm/dist/lib/Target/MSP430/AsmPrinter/MSP430InstPrinter.h
  vendor/llvm/dist/lib/Target/MSP430/MSP430.td
  vendor/llvm/dist/lib/Target/MSP430/MSP430InstrFormats.td
  vendor/llvm/dist/lib/Target/Mips/AsmPrinter/MipsAsmPrinter.cpp
  vendor/llvm/dist/lib/Target/Mips/Mips.td
  vendor/llvm/dist/lib/Target/PIC16/AsmPrinter/PIC16AsmPrinter.cpp
  vendor/llvm/dist/lib/Target/PIC16/AsmPrinter/PIC16AsmPrinter.h
  vendor/llvm/dist/lib/Target/PIC16/PIC16DebugInfo.cpp
  vendor/llvm/dist/lib/Target/PIC16/PIC16DebugInfo.h
  vendor/llvm/dist/lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp
  vendor/llvm/dist/lib/Target/PowerPC/PPC.td
  vendor/llvm/dist/lib/Target/PowerPC/PPCISelLowering.cpp
  vendor/llvm/dist/lib/Target/PowerPC/PPCInstrFormats.td
  vendor/llvm/dist/lib/Target/PowerPC/PPCMCAsmInfo.cpp
  vendor/llvm/dist/lib/Target/PowerPC/PPCRegisterInfo.cpp
  vendor/llvm/dist/lib/Target/Sparc/AsmPrinter/SparcAsmPrinter.cpp
  vendor/llvm/dist/lib/Target/Sparc/Sparc.td
  vendor/llvm/dist/lib/Target/Sparc/SparcMCAsmInfo.cpp
  vendor/llvm/dist/lib/Target/SystemZ/AsmPrinter/SystemZAsmPrinter.cpp
  vendor/llvm/dist/lib/Target/X86/AsmPrinter/X86ATTInstPrinter.cpp
  vendor/llvm/dist/lib/Target/X86/AsmPrinter/X86ATTInstPrinter.h
  vendor/llvm/dist/lib/Target/X86/AsmPrinter/X86AsmPrinter.cpp
  vendor/llvm/dist/lib/Target/X86/AsmPrinter/X86AsmPrinter.h
  vendor/llvm/dist/lib/Target/X86/AsmPrinter/X86IntelInstPrinter.cpp
  vendor/llvm/dist/lib/Target/X86/AsmPrinter/X86IntelInstPrinter.h
  vendor/llvm/dist/lib/Target/X86/AsmPrinter/X86MCInstLower.cpp
  vendor/llvm/dist/lib/Target/X86/SSEDomainFix.cpp
  vendor/llvm/dist/lib/Target/X86/X86.td
  vendor/llvm/dist/lib/Target/X86/X86FastISel.cpp
  vendor/llvm/dist/lib/Target/X86/X86ISelLowering.cpp
  vendor/llvm/dist/lib/Target/X86/X86ISelLowering.h
  vendor/llvm/dist/lib/Target/X86/X86InstrFormats.td
  vendor/llvm/dist/lib/Target/X86/X86InstrInfo.cpp
  vendor/llvm/dist/lib/Target/X86/X86InstrInfo.td
  vendor/llvm/dist/lib/Target/X86/X86MCAsmInfo.cpp
  vendor/llvm/dist/lib/Target/X86/X86RegisterInfo.cpp
  vendor/llvm/dist/lib/Target/XCore/AsmPrinter/XCoreAsmPrinter.cpp
  vendor/llvm/dist/lib/Target/XCore/XCore.td
  vendor/llvm/dist/lib/Target/XCore/XCoreISelLowering.cpp
  vendor/llvm/dist/lib/Target/XCore/XCoreInstrInfo.cpp
  vendor/llvm/dist/lib/Target/XCore/XCoreMCAsmInfo.cpp
  vendor/llvm/dist/lib/Target/XCore/XCoreRegisterInfo.cpp
  vendor/llvm/dist/lib/Transforms/InstCombine/InstCombineCalls.cpp
  vendor/llvm/dist/lib/Transforms/Scalar/LoopUnswitch.cpp
  vendor/llvm/dist/lib/Transforms/Scalar/MemCpyOptimizer.cpp
  vendor/llvm/dist/lib/Transforms/Scalar/SCCP.cpp
  vendor/llvm/dist/lib/Transforms/Scalar/ScalarReplAggregates.cpp
  vendor/llvm/dist/lib/Transforms/Scalar/SimplifyLibCalls.cpp
  vendor/llvm/dist/lib/Transforms/Utils/BasicBlockUtils.cpp
  vendor/llvm/dist/lib/Transforms/Utils/BuildLibCalls.cpp
  vendor/llvm/dist/lib/Transforms/Utils/InlineFunction.cpp
  vendor/llvm/dist/lib/VMCore/AutoUpgrade.cpp
  vendor/llvm/dist/lib/VMCore/LLVMContext.cpp
  vendor/llvm/dist/lib/VMCore/LLVMContextImpl.cpp
  vendor/llvm/dist/lib/VMCore/LLVMContextImpl.h
  vendor/llvm/dist/lib/VMCore/Pass.cpp
  vendor/llvm/dist/test/Analysis/BasicAA/modref.ll
  vendor/llvm/dist/test/Bitcode/memcpy.ll
  vendor/llvm/dist/test/CodeGen/X86/memcpy.ll
  vendor/llvm/dist/test/CodeGen/X86/personality.ll
  vendor/llvm/dist/test/MC/Disassembler/arm-tests.txt
  vendor/llvm/dist/test/MC/Disassembler/neon-tests.txt
  vendor/llvm/dist/test/MC/Disassembler/thumb-tests.txt
  vendor/llvm/dist/test/Transforms/InstCombine/memset_chk.ll
  vendor/llvm/dist/test/Transforms/InstCombine/objsize.ll
  vendor/llvm/dist/test/Transforms/MemCpyOpt/align.ll
  vendor/llvm/dist/test/Transforms/SimplifyLibCalls/StrCpy.ll
  vendor/llvm/dist/test/Verifier/2006-12-12-IntrinsicDefine.ll
  vendor/llvm/dist/tools/edis/EDDisassembler.cpp
  vendor/llvm/dist/tools/llc/llc.cpp
  vendor/llvm/dist/tools/llvm-mc/Disassembler.cpp
  vendor/llvm/dist/tools/llvm-mc/llvm-mc.cpp
  vendor/llvm/dist/tools/lto/LTOModule.cpp
  vendor/llvm/dist/unittests/ExecutionEngine/JIT/JITTest.cpp
  vendor/llvm/dist/utils/FileCheck/FileCheck.cpp
  vendor/llvm/dist/utils/TableGen/AsmWriterEmitter.cpp
  vendor/llvm/dist/utils/TableGen/AsmWriterInst.cpp
  vendor/llvm/dist/utils/TableGen/InstrInfoEmitter.cpp
  vendor/llvm/dist/utils/TableGen/InstrInfoEmitter.h
  vendor/llvm/dist/utils/TableGen/Record.cpp
  vendor/llvm/dist/utils/TableGen/Record.h

Modified: vendor/llvm/dist/docs/HowToReleaseLLVM.html
==============================================================================
--- vendor/llvm/dist/docs/HowToReleaseLLVM.html	Tue Apr  6 15:02:41 2010	(r206273)
+++ vendor/llvm/dist/docs/HowToReleaseLLVM.html	Tue Apr  6 15:52:58 2010	(r206274)
@@ -362,13 +362,12 @@ Qualification Details
   

- - - + + - - - + + +
ArchitectureOSllvm-gcc baselineclang baseline tests
x86-32Mac OS 10.5last releasenonellvm dejagnu, clang tests, test-suite (including spec)
x86-32Linuxlast releasenonellvm dejagnu, clang tests, test-suite (including spec)
x86-32FreeBSDnonenonellvm dejagnu, clang tests, test-suite
x86-32Linuxlast releaselast releasellvm dejagnu, clang tests, test-suite (including spec)
x86-32FreeBSDnonelast releasellvm dejagnu, clang tests, test-suite
x86-32mingwlast releasenoneQT
x86-64Mac OS 10.5last releasenonellvm dejagnu, clang tests, test-suite (including spec)
x86-64Linuxlast releasenonellvm dejagnu, clang tests, test-suite (including spec)
x86-64FreeBSDnonenonellvm dejagnu, clang tests, test-suite
x86-64Mac OS 10.Xlast releaselast releasellvm dejagnu, clang tests, test-suite (including spec)
x86-64Linuxlast releaselast releasellvm dejagnu, clang tests, test-suite (including spec)
x86-64FreeBSDnonelast releasellvm dejagnu, clang tests, test-suite

@@ -518,7 +517,7 @@ svn copy https://llvm.org/svn/llvm-proje src="http://www.w3.org/Icons/valid-html401-blue" alt="Valid HTML 4.01"> The LLVM Compiler Infrastructure
- Last modified: $Date: 2009-10-12 16:46:08 +0200 (Mon, 12 Oct 2009) $ + Last modified: $Date: 2010-04-05 20:35:37 +0200 (Mon, 05 Apr 2010) $ Modified: vendor/llvm/dist/docs/Lexicon.html ============================================================================== --- vendor/llvm/dist/docs/Lexicon.html Tue Apr 6 15:02:41 2010 (r206273) +++ vendor/llvm/dist/docs/Lexicon.html Tue Apr 6 15:52:58 2010 (r206274) @@ -50,6 +50,11 @@ LCSSA LICM Load-VN + LTO + + - M - + + MC - O - @@ -167,15 +172,24 @@ href="http://www.program-transformation.
-
LCSSA
-
Loop-Closed Static Single Assignment Form
+
LCSSA
+
Loop-Closed Static Single Assignment Form
LICM
Loop Invariant Code Motion
Load-VN
Load Value Numbering
+
LTO
+
Link-Time Optimization
+
+
+ + +
+
+
MC
+
Machine Code
-
@@ -255,7 +269,7 @@ href="http://www.program-transformation. src="http://www.w3.org/Icons/valid-html401-blue" alt="Valid HTML 4.01">The LLVM Team
The LLVM Compiler Infrastructure
-Last modified: $Date: 2008-12-14 09:01:51 +0100 (Sun, 14 Dec 2008) $ +Last modified: $Date: 2010-04-05 07:48:47 +0200 (Mon, 05 Apr 2010) $ Modified: vendor/llvm/dist/docs/SourceLevelDebugging.html ============================================================================== --- vendor/llvm/dist/docs/SourceLevelDebugging.html Tue Apr 6 15:02:41 2010 (r206273) +++ vendor/llvm/dist/docs/SourceLevelDebugging.html Tue Apr 6 15:52:58 2010 (r206274) @@ -144,7 +144,7 @@ height="369"> an LLVM user a relationship between generated code and the original program source code.

-

Currently, debug information is consumed by the DwarfWriter to produce dwarf +

Currently, debug information is consumed by DwarfDebug to produce dwarf information used by the gdb debugger. Other targets could use the same information to produce stabs or other debug forms.

@@ -1773,7 +1773,7 @@ enum Trees { Chris Lattner
LLVM Compiler Infrastructure
- Last modified: $Date: 2010-03-31 09:50:17 +0200 (Wed, 31 Mar 2010) $ + Last modified: $Date: 2010-04-05 06:11:11 +0200 (Mon, 05 Apr 2010) $ Modified: vendor/llvm/dist/docs/WritingAnLLVMBackend.html ============================================================================== --- vendor/llvm/dist/docs/WritingAnLLVMBackend.html Tue Apr 6 15:02:41 2010 (r206273) +++ vendor/llvm/dist/docs/WritingAnLLVMBackend.html Tue Apr 6 15:52:58 2010 (r206274) @@ -561,8 +561,7 @@ def AL : Register<"AL">, DwarfRegN

This defines the register AL and assigns it values (with DwarfRegNum) that are used by gcc, gdb, or a debug -information writer (such as DwarfWriter -in llvm/lib/CodeGen/AsmPrinter) to identify a register. For register +information writer to identify a register. For register AL, DwarfRegNum takes an array of 3 values representing 3 different modes: the first element is for X86-64, the second for exception handling (EH) on X86-32, and the third is generic. -1 is a special Dwarf number @@ -2555,7 +2554,7 @@ with assembler. Mason Woo and Misha Brukman
The LLVM Compiler Infrastructure
- Last modified: $Date: 2010-02-02 19:44:12 +0100 (Tue, 02 Feb 2010) $ + Last modified: $Date: 2010-04-05 06:11:11 +0200 (Mon, 05 Apr 2010) $ Modified: vendor/llvm/dist/include/llvm/ADT/OwningPtr.h ============================================================================== --- vendor/llvm/dist/include/llvm/ADT/OwningPtr.h Tue Apr 6 15:02:41 2010 (r206273) +++ vendor/llvm/dist/include/llvm/ADT/OwningPtr.h Tue Apr 6 15:52:58 2010 (r206274) @@ -128,7 +128,6 @@ inline void swap(OwningArrayPtr &a, O a.swap(b); } - } // end namespace llvm #endif Modified: vendor/llvm/dist/include/llvm/CodeGen/AsmPrinter.h ============================================================================== --- vendor/llvm/dist/include/llvm/CodeGen/AsmPrinter.h Tue Apr 6 15:02:41 2010 (r206273) +++ vendor/llvm/dist/include/llvm/CodeGen/AsmPrinter.h Tue Apr 6 15:52:58 2010 (r206274) @@ -18,8 +18,6 @@ #include "llvm/CodeGen/MachineFunctionPass.h" #include "llvm/Support/DebugLoc.h" -#include "llvm/Target/TargetMachine.h" -#include "llvm/ADT/DenseMap.h" namespace llvm { class BlockAddress; @@ -43,63 +41,33 @@ namespace llvm { class MachineConstantPoolValue; class MachineJumpTableInfo; class MachineModuleInfo; + class MachineMove; + class MCAsmInfo; class MCInst; class MCContext; class MCSection; class MCStreamer; class MCSymbol; - class DwarfWriter; + class DwarfDebug; + class DwarfException; class Mangler; - class MCAsmInfo; class TargetLoweringObjectFile; + class TargetData; class Twine; class Type; - class formatted_raw_ostream; /// AsmPrinter - This class is intended to be used as a driving class for all /// asm writers. class AsmPrinter : public MachineFunctionPass { - static char ID; - - // GCMetadataPrinters - The garbage collection metadata printer table. - typedef DenseMap gcp_map_type; - typedef gcp_map_type::iterator gcp_iterator; - gcp_map_type GCMetadataPrinters; - - /// If VerboseAsm is set, a pointer to the loop info for this - /// function. - /// - MachineLoopInfo *LI; - - public: - /// MMI - If available, this is a pointer to the current MachineModuleInfo. - MachineModuleInfo *MMI; - - protected: - /// DW - If available, this is a pointer to the current dwarf writer. - DwarfWriter *DW; - public: - - /// Output stream on which we're printing assembly code. - /// - formatted_raw_ostream &O; - /// Target machine description. /// TargetMachine &TM; - /// getObjFileLowering - Return information about object file lowering. - TargetLoweringObjectFile &getObjFileLowering() const; - /// Target Asm Printer information. /// const MCAsmInfo *MAI; - /// Target Register Information. - /// - const TargetRegisterInfo *TRI; - /// OutContext - This is the context for the output file that we are /// streaming. This owns all of the global MC-related objects for the /// generated translation unit. @@ -114,6 +82,9 @@ namespace llvm { /// The current machine function. const MachineFunction *MF; + /// MMI - This is a pointer to the current MachineModuleInfo. + MachineModuleInfo *MMI; + /// Name-mangler for global names. /// Mangler *Mang; @@ -123,24 +94,28 @@ namespace llvm { /// MCSymbol *CurrentFnSym; - /// getCurrentSection() - Return the current section we are emitting to. - const MCSection *getCurrentSection() const; + private: + // GCMetadataPrinters - The garbage collection metadata printer table. + void *GCMetadataPrinters; // Really a DenseMap. - /// VerboseAsm - Emit comments in assembly output if this is true. /// bool VerboseAsm; + static char ID; + + /// If VerboseAsm is set, a pointer to the loop info for this + /// function. + MachineLoopInfo *LI; - /// Private state for PrintSpecial() - // Assign a unique ID to this machine instruction. - mutable const MachineInstr *LastMI; - mutable const Function *LastFn; - mutable unsigned Counter; - mutable unsigned SetCounter; + /// DD - If the target supports dwarf debug info, this pointer is non-null. + DwarfDebug *DD; + + /// DE - If the target supports dwarf exception info, this pointer is + /// non-null. + DwarfException *DE; protected: - explicit AsmPrinter(formatted_raw_ostream &o, TargetMachine &TM, - MCStreamer &Streamer); + explicit AsmPrinter(TargetMachine &TM, MCStreamer &Streamer); public: virtual ~AsmPrinter(); @@ -153,7 +128,20 @@ namespace llvm { /// unsigned getFunctionNumber() const; - protected: + /// getObjFileLowering - Return information about object file lowering. + TargetLoweringObjectFile &getObjFileLowering() const; + + /// getTargetData - Return information about data layout. + const TargetData &getTargetData() const; + + /// getCurrentSection() - Return the current section we are emitting to. + const MCSection *getCurrentSection() const; + + + //===------------------------------------------------------------------===// + // MachineFunctionPass Implementation. + //===------------------------------------------------------------------===// + /// getAnalysisUsage - Record analysis usage. /// void getAnalysisUsage(AnalysisUsage &AU) const; @@ -163,41 +151,10 @@ namespace llvm { /// call this implementation. bool doInitialization(Module &M); - /// EmitStartOfAsmFile - This virtual method can be overridden by targets - /// that want to emit something at the start of their file. - virtual void EmitStartOfAsmFile(Module &) {} - - /// EmitEndOfAsmFile - This virtual method can be overridden by targets that - /// want to emit something at the end of their file. - virtual void EmitEndOfAsmFile(Module &) {} - /// doFinalization - Shut down the asmprinter. If you override this in your /// pass, you must make sure to call it explicitly. bool doFinalization(Module &M); - /// PrintSpecial - Print information related to the specified machine instr - /// that is independent of the operand, and may be independent of the instr - /// itself. This can be useful for portably encoding the comment character - /// or other bits of target-specific knowledge into the asmstrings. The - /// syntax used is ${:comment}. Targets can override this to add support - /// for their own strange codes. - virtual void PrintSpecial(const MachineInstr *MI, const char *Code) const; - - /// PrintAsmOperand - Print the specified operand of MI, an INLINEASM - /// instruction, using the specified assembler variant. Targets should - /// override this to format as appropriate. This method can return true if - /// the operand is erroneous. - virtual bool PrintAsmOperand(const MachineInstr *MI, unsigned OpNo, - unsigned AsmVariant, const char *ExtraCode); - - /// PrintAsmMemoryOperand - Print the specified operand of MI, an INLINEASM - /// instruction, using the specified assembler variant as an address. - /// Targets should override this to format as appropriate. This method can - /// return true if the operand is erroneous. - virtual bool PrintAsmMemoryOperand(const MachineInstr *MI, unsigned OpNo, - unsigned AsmVariant, - const char *ExtraCode); - /// runOnMachineFunction - Emit the specified function out to the /// OutStreamer. virtual bool runOnMachineFunction(MachineFunction &MF) { @@ -207,6 +164,10 @@ namespace llvm { return false; } + //===------------------------------------------------------------------===// + // Coarse grained IR lowering routines. + //===------------------------------------------------------------------===// + /// SetupMachineFunction - This should be called when a new MachineFunction /// is being processed from runOnMachineFunction. void SetupMachineFunction(MachineFunction &MF); @@ -219,19 +180,6 @@ namespace llvm { /// function. void EmitFunctionBody(); - /// EmitInstruction - Targets should implement this to emit instructions. - virtual void EmitInstruction(const MachineInstr *) { - assert(0 && "EmitInstruction not implemented"); - } - - /// EmitFunctionBodyStart - Targets can override this to emit stuff before - /// the first basic block in the function. - virtual void EmitFunctionBodyStart() {} - - /// EmitFunctionBodyEnd - Targets can override this to emit stuff after - /// the last basic block in the function. - virtual void EmitFunctionBodyEnd() {} - /// EmitConstantPool - Print to the current output stream assembly /// representations of the constants in the constant pool MCP. This is /// used to print out constants which have been "spilled to memory" by @@ -252,36 +200,6 @@ namespace llvm { /// do nothing and return false. bool EmitSpecialLLVMGlobal(const GlobalVariable *GV); - public: - //===------------------------------------------------------------------===// - // Emission and print routines - // - - /// EmitInt8 - Emit a byte directive and value. - /// - void EmitInt8(int Value) const; - - /// EmitInt16 - Emit a short directive and value. - /// - void EmitInt16(int Value) const; - - /// EmitInt32 - Emit a long directive and value. - /// - void EmitInt32(int Value) const; - - /// EmitInt64 - Emit a long long directive and value. - /// - void EmitInt64(uint64_t Value) const; - - - /// EmitLabelDifference - Emit something like ".long Hi-Lo" where the size - /// in bytes of the directive is specified by Size and Hi/Lo specify the - /// labels. This implicitly uses .set if it is available. - void EmitLabelDifference(const MCSymbol *Hi, const MCSymbol *Lo, - unsigned Size) const; - - //===------------------------------------------------------------------===// - /// EmitAlignment - Emit an alignment directive to the specified power of /// two boundary. For example, if you pass in 3 here, you will get an 8 /// byte alignment. If a global value is specified, and if that global has @@ -301,11 +219,69 @@ namespace llvm { void EmitAlignment(unsigned NumBits, const GlobalValue *GV = 0, unsigned ForcedAlignBits = 0, bool UseFillExpr = true) const; + + /// EmitBasicBlockStart - This method prints the label for the specified + /// MachineBasicBlock, an alignment (if present) and a comment describing + /// it if appropriate. + void EmitBasicBlockStart(const MachineBasicBlock *MBB) const; + + + /// EmitGlobalConstant - Print a general LLVM constant to the .s file. + void EmitGlobalConstant(const Constant *CV, unsigned AddrSpace = 0); + + + //===------------------------------------------------------------------===// + // Overridable Hooks + //===------------------------------------------------------------------===// + + // Targets can, or in the case of EmitInstruction, must implement these to + // customize output. + + /// EmitStartOfAsmFile - This virtual method can be overridden by targets + /// that want to emit something at the start of their file. + virtual void EmitStartOfAsmFile(Module &) {} + + /// EmitEndOfAsmFile - This virtual method can be overridden by targets that + /// want to emit something at the end of their file. + virtual void EmitEndOfAsmFile(Module &) {} + + /// EmitFunctionBodyStart - Targets can override this to emit stuff before + /// the first basic block in the function. + virtual void EmitFunctionBodyStart() {} + + /// EmitFunctionBodyEnd - Targets can override this to emit stuff after + /// the last basic block in the function. + virtual void EmitFunctionBodyEnd() {} + + /// EmitInstruction - Targets should implement this to emit instructions. + virtual void EmitInstruction(const MachineInstr *) { + assert(0 && "EmitInstruction not implemented"); + } + + virtual void EmitFunctionEntryLabel(); + + virtual void EmitMachineConstantPoolValue(MachineConstantPoolValue *MCPV); + + /// isBlockOnlyReachableByFallthough - Return true if the basic block has + /// exactly one predecessor and the control transfer mechanism between + /// the predecessor and this block is a fall-through. + virtual bool + isBlockOnlyReachableByFallthrough(const MachineBasicBlock *MBB) const; + + //===------------------------------------------------------------------===// + // Symbol Lowering Routines. + //===------------------------------------------------------------------===// + public: - /// printDeclare - This method prints a local variable declaration used by - /// debug tables. - void printDeclare(const MachineInstr *MI) const; - + /// GetTempSymbol - Return the MCSymbol corresponding to the assembler + /// temporary label with the specified stem and unique ID. + MCSymbol *GetTempSymbol(StringRef Name, unsigned ID) const; + + /// GetTempSymbol - Return an assembler temporary label with the specified + /// stem. + MCSymbol *GetTempSymbol(StringRef Name) const; + + /// GetSymbolWithGlobalValueBase - Return the MCSymbol for a symbol with /// global value name as its base, with the specified suffix, and where the /// symbol is forced to have private linkage if ForcePrivate is true. @@ -332,49 +308,131 @@ namespace llvm { MCSymbol *GetBlockAddressSymbol(const BlockAddress *BA) const; MCSymbol *GetBlockAddressSymbol(const BasicBlock *BB) const; - /// EmitBasicBlockStart - This method prints the label for the specified - /// MachineBasicBlock, an alignment (if present) and a comment describing - /// it if appropriate. - void EmitBasicBlockStart(const MachineBasicBlock *MBB) const; + //===------------------------------------------------------------------===// + // Emission Helper Routines. + //===------------------------------------------------------------------===// + public: + /// printOffset - This is just convenient handler for printing offsets. + void printOffset(int64_t Offset, raw_ostream &OS) const; + /// EmitInt8 - Emit a byte directive and value. + /// + void EmitInt8(int Value) const; - // Data emission. + /// EmitInt16 - Emit a short directive and value. + /// + void EmitInt16(int Value) const; - /// EmitGlobalConstant - Print a general LLVM constant to the .s file. - void EmitGlobalConstant(const Constant* CV, unsigned AddrSpace = 0); + /// EmitInt32 - Emit a long directive and value. + /// + void EmitInt32(int Value) const; - protected: - virtual void EmitFunctionEntryLabel(); + /// EmitLabelDifference - Emit something like ".long Hi-Lo" where the size + /// in bytes of the directive is specified by Size and Hi/Lo specify the + /// labels. This implicitly uses .set if it is available. + void EmitLabelDifference(const MCSymbol *Hi, const MCSymbol *Lo, + unsigned Size) const; + + //===------------------------------------------------------------------===// + // Dwarf Emission Helper Routines + //===------------------------------------------------------------------===// + + /// EmitSLEB128 - emit the specified signed leb128 value. + void EmitSLEB128(int Value, const char *Desc = 0) const; + + /// EmitULEB128 - emit the specified unsigned leb128 value. + void EmitULEB128(unsigned Value, const char *Desc = 0, + unsigned PadTo = 0) const; + + /// EmitCFAByte - Emit a .byte 42 directive for a DW_CFA_xxx value. + void EmitCFAByte(unsigned Val) const; + + /// EmitEncodingByte - Emit a .byte 42 directive that corresponds to an + /// encoding. If verbose assembly output is enabled, we output comments + /// describing the encoding. Desc is a string saying what the encoding is + /// specifying (e.g. "LSDA"). + void EmitEncodingByte(unsigned Val, const char *Desc = 0) const; + + /// GetSizeOfEncodedValue - Return the size of the encoding in bytes. + unsigned GetSizeOfEncodedValue(unsigned Encoding) const; + + /// EmitReference - Emit a reference to a label with a specified encoding. + /// + void EmitReference(const MCSymbol *Sym, unsigned Encoding) const; + void EmitReference(const GlobalValue *GV, unsigned Encoding) const; + + /// EmitSectionOffset - Emit the 4-byte offset of Label from the start of + /// its section. This can be done with a special directive if the target + /// supports it (e.g. cygwin) or by emitting it as an offset from a label at + /// the start of the section. + /// + /// SectionLabel is a temporary label emitted at the start of the section + /// that Label lives in. + void EmitSectionOffset(const MCSymbol *Label, + const MCSymbol *SectionLabel) const; + + //===------------------------------------------------------------------===// + // Dwarf Lowering Routines + //===------------------------------------------------------------------===// + + /// EmitFrameMoves - Emit frame instructions to describe the layout of the + /// frame. + void EmitFrameMoves(const std::vector &Moves, + MCSymbol *BaseLabel, bool isEH) const; + + + //===------------------------------------------------------------------===// + // Inline Asm Support + //===------------------------------------------------------------------===// + public: + // These are hooks that targets can override to implement inline asm + // support. These should probably be moved out of AsmPrinter someday. + + /// PrintSpecial - Print information related to the specified machine instr + /// that is independent of the operand, and may be independent of the instr + /// itself. This can be useful for portably encoding the comment character + /// or other bits of target-specific knowledge into the asmstrings. The + /// syntax used is ${:comment}. Targets can override this to add support + /// for their own strange codes. + virtual void PrintSpecial(const MachineInstr *MI, raw_ostream &OS, + const char *Code) const; + + /// PrintAsmOperand - Print the specified operand of MI, an INLINEASM + /// instruction, using the specified assembler variant. Targets should + /// override this to format as appropriate. This method can return true if + /// the operand is erroneous. + virtual bool PrintAsmOperand(const MachineInstr *MI, unsigned OpNo, + unsigned AsmVariant, const char *ExtraCode, + raw_ostream &OS); + + /// PrintAsmMemoryOperand - Print the specified operand of MI, an INLINEASM + /// instruction, using the specified assembler variant as an address. + /// Targets should override this to format as appropriate. This method can + /// return true if the operand is erroneous. + virtual bool PrintAsmMemoryOperand(const MachineInstr *MI, unsigned OpNo, + unsigned AsmVariant, + const char *ExtraCode, + raw_ostream &OS); - virtual void EmitMachineConstantPoolValue(MachineConstantPoolValue *MCPV); - - /// printOffset - This is just convenient handler for printing offsets. - void printOffset(int64_t Offset) const; - - /// isBlockOnlyReachableByFallthough - Return true if the basic block has - /// exactly one predecessor and the control transfer mechanism between - /// the predecessor and this block is a fall-through. - virtual bool isBlockOnlyReachableByFallthrough(const MachineBasicBlock *MBB) const; - private: + /// Private state for PrintSpecial() + // Assign a unique ID to this machine instruction. + mutable const MachineInstr *LastMI; + mutable unsigned LastFn; + mutable unsigned Counter; + mutable unsigned SetCounter; - /// processDebugLoc - Processes the debug information of each machine - /// instruction's DebugLoc. - void processDebugLoc(const MachineInstr *MI, bool BeforePrintingInsn); + /// EmitInlineAsm - Emit a blob of inline asm to the output streamer. + void EmitInlineAsm(StringRef Str, unsigned LocCookie) const; - void printLabelInst(const MachineInstr *MI) const; - - /// printInlineAsm - This method formats and prints the specified machine + /// EmitInlineAsm - This method formats and emits the specified machine /// instruction that is an inline asm. - void printInlineAsm(const MachineInstr *MI) const; - - /// printImplicitDef - This method prints the specified machine instruction - /// that is an implicit def. - void printImplicitDef(const MachineInstr *MI) const; - - /// printKill - This method prints the specified kill machine instruction. - void printKill(const MachineInstr *MI) const; + void EmitInlineAsm(const MachineInstr *MI) const; + //===------------------------------------------------------------------===// + // Internal Implementation Details + //===------------------------------------------------------------------===// + /// EmitVisibility - This emits visibility information about symbol, if /// this is suported by the target. void EmitVisibility(MCSymbol *Sym, unsigned Visibility) const; Modified: vendor/llvm/dist/include/llvm/CodeGen/FastISel.h ============================================================================== --- vendor/llvm/dist/include/llvm/CodeGen/FastISel.h Tue Apr 6 15:02:41 2010 (r206273) +++ vendor/llvm/dist/include/llvm/CodeGen/FastISel.h Tue Apr 6 15:52:58 2010 (r206274) @@ -27,8 +27,6 @@ class MachineBasicBlock; class MachineConstantPool; class MachineFunction; class MachineFrameInfo; -class MachineModuleInfo; -class DwarfWriter; class MachineRegisterInfo; class TargetData; class TargetInstrInfo; @@ -50,8 +48,6 @@ protected: SmallSet &CatchInfoLost; #endif MachineFunction &MF; - MachineModuleInfo *MMI; - DwarfWriter *DW; MachineRegisterInfo &MRI; MachineFrameInfo &MFI; MachineConstantPool &MCP; @@ -116,8 +112,6 @@ public: protected: FastISel(MachineFunction &mf, - MachineModuleInfo *mmi, - DwarfWriter *dw, DenseMap &vm, DenseMap &bm, DenseMap &am Modified: vendor/llvm/dist/include/llvm/CodeGen/GCMetadataPrinter.h ============================================================================== --- vendor/llvm/dist/include/llvm/CodeGen/GCMetadataPrinter.h Tue Apr 6 15:02:41 2010 (r206273) +++ vendor/llvm/dist/include/llvm/CodeGen/GCMetadataPrinter.h Tue Apr 6 15:52:58 2010 (r206274) @@ -27,8 +27,6 @@ namespace llvm { class GCMetadataPrinter; - class raw_ostream; - class MCAsmInfo; /// GCMetadataPrinterRegistry - The GC assembly printer registry uses all the /// defaults from Registry. @@ -63,11 +61,9 @@ namespace llvm { iterator end() { return S->end(); } /// beginAssembly/finishAssembly - Emit module metadata as assembly code. - virtual void beginAssembly(raw_ostream &OS, AsmPrinter &AP, - const MCAsmInfo &MAI); + virtual void beginAssembly(AsmPrinter &AP); - virtual void finishAssembly(raw_ostream &OS, AsmPrinter &AP, - const MCAsmInfo &MAI); + virtual void finishAssembly(AsmPrinter &AP); virtual ~GCMetadataPrinter(); }; Modified: vendor/llvm/dist/include/llvm/CodeGen/MachineDominators.h ============================================================================== --- vendor/llvm/dist/include/llvm/CodeGen/MachineDominators.h Tue Apr 6 15:02:41 2010 (r206273) +++ vendor/llvm/dist/include/llvm/CodeGen/MachineDominators.h Tue Apr 6 15:52:58 2010 (r206274) @@ -156,8 +156,13 @@ public: inline void splitBlock(MachineBasicBlock* NewBB) { DT->splitBlock(NewBB); } - - + + /// isReachableFromEntry - Return true if A is dominated by the entry + /// block of the function containing it. + bool isReachableFromEntry(MachineBasicBlock *A) { + return DT->isReachableFromEntry(A); + } + virtual void releaseMemory(); virtual void print(raw_ostream &OS, const Module*) const; Modified: vendor/llvm/dist/include/llvm/CodeGen/MachineFrameInfo.h ============================================================================== --- vendor/llvm/dist/include/llvm/CodeGen/MachineFrameInfo.h Tue Apr 6 15:02:41 2010 (r206273) +++ vendor/llvm/dist/include/llvm/CodeGen/MachineFrameInfo.h Tue Apr 6 15:52:58 2010 (r206274) @@ -14,12 +14,9 @@ #ifndef LLVM_CODEGEN_MACHINEFRAMEINFO_H #define LLVM_CODEGEN_MACHINEFRAMEINFO_H -#include "llvm/ADT/BitVector.h" -#include "llvm/ADT/DenseMap.h" #include "llvm/ADT/SmallVector.h" #include "llvm/System/DataTypes.h" #include -#include #include namespace llvm { @@ -27,26 +24,21 @@ class raw_ostream; class TargetData; class TargetRegisterClass; class Type; -class MachineModuleInfo; class MachineFunction; class MachineBasicBlock; class TargetFrameInfo; +class BitVector; /// The CalleeSavedInfo class tracks the information need to locate where a /// callee saved register in the current frame. class CalleeSavedInfo { - -private: unsigned Reg; const TargetRegisterClass *RegClass; int FrameIdx; public: CalleeSavedInfo(unsigned R, const TargetRegisterClass *RC, int FI = 0) - : Reg(R) - , RegClass(RC) - , FrameIdx(FI) - {} + : Reg(R), RegClass(RC), FrameIdx(FI) {} // Accessors. unsigned getReg() const { return Reg; } @@ -188,13 +180,6 @@ class MachineFrameInfo { /// spill slots. SmallVector SpillObjects; - /// MMI - This field is set (via setMachineModuleInfo) by a module info - /// consumer (ex. DwarfWriter) to indicate that frame layout information - /// should be acquired. Typically, it's the responsibility of the target's - /// TargetRegisterInfo prologue/epilogue emitting code to inform - /// MachineModuleInfo of frame layouts. - MachineModuleInfo *MMI; - /// TargetFrameInfo - Target information about frame layout. /// const TargetFrameInfo &TFI; @@ -208,7 +193,6 @@ public: StackProtectorIdx = -1; MaxCallFrameSize = 0; CSIValid = false; - MMI = 0; } /// hasStackObjects - Return true if there are any stack objects in this @@ -451,14 +435,6 @@ public: /// method always returns an empty set. BitVector getPristineRegs(const MachineBasicBlock *MBB) const; - /// getMachineModuleInfo - Used by a prologue/epilogue - /// emitter (TargetRegisterInfo) to provide frame layout information. - MachineModuleInfo *getMachineModuleInfo() const { return MMI; } - - /// setMachineModuleInfo - Used by a meta info consumer (DwarfWriter) to - /// indicate that frame layout information should be gathered. - void setMachineModuleInfo(MachineModuleInfo *mmi) { MMI = mmi; } - /// print - Used by the MachineFunction printer to print information about /// stack objects. Implemented in MachineFunction.cpp /// Modified: vendor/llvm/dist/include/llvm/CodeGen/MachineFunction.h ============================================================================== --- vendor/llvm/dist/include/llvm/CodeGen/MachineFunction.h Tue Apr 6 15:02:41 2010 (r206273) +++ vendor/llvm/dist/include/llvm/CodeGen/MachineFunction.h Tue Apr 6 15:52:58 2010 (r206274) @@ -32,6 +32,7 @@ class MachineRegisterInfo; class MachineFrameInfo; class MachineConstantPool; class MachineJumpTableInfo; +class MachineModuleInfo; class MCContext; class Pass; class TargetMachine; @@ -72,7 +73,8 @@ class MachineFunction { Function *Fn; const TargetMachine &Target; MCContext &Ctx; - + MachineModuleInfo &MMI; + // RegInfo - Information about each register in use in the function. MachineRegisterInfo *RegInfo; @@ -107,8 +109,8 @@ class MachineFunction { typedef ilist BasicBlockListType; BasicBlockListType BasicBlocks; - // Default debug location. Used to print out the debug label at the beginning - // of a function. + /// Default debug location. Used to print out the debug label at the beginning + /// of a function. DebugLoc DefaultDebugLoc; /// FunctionNumber - This provides a unique ID for each function emitted in @@ -116,17 +118,17 @@ class MachineFunction { /// unsigned FunctionNumber; - // The alignment of the function. + /// The alignment of the function. unsigned Alignment; MachineFunction(const MachineFunction &); // DO NOT IMPLEMENT void operator=(const MachineFunction&); // DO NOT IMPLEMENT - public: MachineFunction(Function *Fn, const TargetMachine &TM, unsigned FunctionNum, - MCContext &Ctx); + MachineModuleInfo &MMI); ~MachineFunction(); + MachineModuleInfo &getMMI() const { return MMI; } MCContext &getContext() const { return Ctx; } /// getFunction - Return the LLVM function that this machine code represents Modified: vendor/llvm/dist/include/llvm/CodeGen/MachineFunctionAnalysis.h ============================================================================== --- vendor/llvm/dist/include/llvm/CodeGen/MachineFunctionAnalysis.h Tue Apr 6 15:02:41 2010 (r206273) +++ vendor/llvm/dist/include/llvm/CodeGen/MachineFunctionAnalysis.h Tue Apr 6 15:52:58 2010 (r206274) @@ -39,7 +39,7 @@ public: CodeGenOpt::Level getOptLevel() const { return OptLevel; } private: - virtual bool doInitialization(Module &) { NextFnNum = 1; return false; } + virtual bool doInitialization(Module &M); virtual bool runOnFunction(Function &F); virtual void releaseMemory(); virtual void getAnalysisUsage(AnalysisUsage &AU) const; Modified: vendor/llvm/dist/include/llvm/CodeGen/MachineModuleInfo.h ============================================================================== --- vendor/llvm/dist/include/llvm/CodeGen/MachineModuleInfo.h Tue Apr 6 15:02:41 2010 (r206273) +++ vendor/llvm/dist/include/llvm/CodeGen/MachineModuleInfo.h Tue Apr 6 15:52:58 2010 (r206274) @@ -100,6 +100,9 @@ class MachineModuleInfo : public Immutab /// Context - This is the MCContext used for the entire code generator. MCContext Context; + /// TheModule - This is the LLVM Module being worked on. + Module *TheModule; + /// ObjFileMMI - This is the object-file-format-specific implementation of /// MachineModuleInfoImpl, which lets targets accumulate whatever info they /// want. @@ -176,6 +179,9 @@ public: const MCContext &getContext() const { return Context; } MCContext &getContext() { return Context; } + void setModule(Module *M) { TheModule = M; } + Module *getModule() const { return TheModule; } + /// getInfo - Keep track of various per-function pieces of information for /// backends that would like to do so. /// Modified: vendor/llvm/dist/include/llvm/CodeGen/ScheduleDAG.h ============================================================================== --- vendor/llvm/dist/include/llvm/CodeGen/ScheduleDAG.h Tue Apr 6 15:02:41 2010 (r206273) +++ vendor/llvm/dist/include/llvm/CodeGen/ScheduleDAG.h Tue Apr 6 15:52:58 2010 (r206274) @@ -27,7 +27,6 @@ namespace llvm { class SUnit; class MachineConstantPool; class MachineFunction; - class MachineModuleInfo; class MachineRegisterInfo; class MachineInstr; class TargetRegisterInfo; Modified: vendor/llvm/dist/include/llvm/CodeGen/SelectionDAG.h ============================================================================== --- vendor/llvm/dist/include/llvm/CodeGen/SelectionDAG.h Tue Apr 6 15:02:41 2010 (r206273) +++ vendor/llvm/dist/include/llvm/CodeGen/SelectionDAG.h Tue Apr 6 15:52:58 2010 (r206274) @@ -29,11 +29,9 @@ namespace llvm { class AliasAnalysis; -class DwarfWriter; class FunctionLoweringInfo; class MachineConstantPoolValue; class MachineFunction; -class MachineModuleInfo; class MDNode; class SDNodeOrdering; class SDDbgValue; @@ -122,9 +120,7 @@ class SelectionDAG { TargetLowering &TLI; MachineFunction *MF; FunctionLoweringInfo &FLI; - MachineModuleInfo *MMI; - DwarfWriter *DW; - LLVMContext* Context; + LLVMContext *Context; /// EntryNode - The starting token. SDNode EntryNode; @@ -182,7 +178,7 @@ public: /// init - Prepare this SelectionDAG to process code in the given /// MachineFunction. /// - void init(MachineFunction &mf, MachineModuleInfo *mmi, DwarfWriter *dw); + void init(MachineFunction &mf); /// clear - Clear state and free memory necessary to make this /// SelectionDAG ready to process a new block. @@ -193,8 +189,6 @@ public: const TargetMachine &getTarget() const; TargetLowering &getTargetLoweringInfo() const { return TLI; } FunctionLoweringInfo &getFunctionLoweringInfo() const { return FLI; } - MachineModuleInfo *getMachineModuleInfo() const { return MMI; } - DwarfWriter *getDwarfWriter() const { return DW; } LLVMContext *getContext() const {return Context; } /// viewGraph - Pop up a GraphViz/gv window with the DAG rendered using 'dot'. @@ -532,17 +526,17 @@ public: SDValue getStackArgumentTokenFactor(SDValue Chain); SDValue getMemcpy(SDValue Chain, DebugLoc dl, SDValue Dst, SDValue Src, - SDValue Size, unsigned Align, bool AlwaysInline, + SDValue Size, unsigned Align, bool isVol, bool AlwaysInline, const Value *DstSV, uint64_t DstSVOff, const Value *SrcSV, uint64_t SrcSVOff); SDValue getMemmove(SDValue Chain, DebugLoc dl, SDValue Dst, SDValue Src, - SDValue Size, unsigned Align, + SDValue Size, unsigned Align, bool isVol, const Value *DstSV, uint64_t DstOSVff, const Value *SrcSV, uint64_t SrcSVOff); SDValue getMemset(SDValue Chain, DebugLoc dl, SDValue Dst, SDValue Src, - SDValue Size, unsigned Align, + SDValue Size, unsigned Align, bool isVol, const Value *DstSV, uint64_t DstSVOff); /// getSetCC - Helper function to make it easier to build SetCC's if you just Modified: vendor/llvm/dist/include/llvm/CodeGen/SelectionDAGISel.h ============================================================================== --- vendor/llvm/dist/include/llvm/CodeGen/SelectionDAGISel.h Tue Apr 6 15:02:41 2010 (r206273) +++ vendor/llvm/dist/include/llvm/CodeGen/SelectionDAGISel.h Tue Apr 6 15:52:58 2010 (r206274) @@ -29,8 +29,6 @@ namespace llvm { class MachineBasicBlock; class MachineFunction; class MachineInstr; - class MachineModuleInfo; - class DwarfWriter; class TargetLowering; class TargetInstrInfo; class FunctionLoweringInfo; @@ -284,8 +282,6 @@ private: const SDValue *Ops, unsigned NumOps, unsigned EmitNodeInfo); void SelectAllBasicBlocks(Function &Fn, MachineFunction &MF, - MachineModuleInfo *MMI, - DwarfWriter *DW, const TargetInstrInfo &TII); void FinishBasicBlock(); Modified: vendor/llvm/dist/include/llvm/IntrinsicInst.h ============================================================================== --- vendor/llvm/dist/include/llvm/IntrinsicInst.h Tue Apr 6 15:02:41 2010 (r206273) +++ vendor/llvm/dist/include/llvm/IntrinsicInst.h Tue Apr 6 15:52:58 2010 (r206274) @@ -133,6 +133,13 @@ namespace llvm { return getAlignmentCst()->getZExtValue(); } + ConstantInt *getVolatileCst() const { + return cast(const_cast(getOperand(5))); + } + bool isVolatile() const { + return getVolatileCst()->getZExtValue() != 0; + } + /// getDest - This is just like getRawDest, but it strips off any cast /// instructions that feed it, giving the original input. The returned /// value is guaranteed to be a pointer. @@ -155,7 +162,11 @@ namespace llvm { void setAlignment(Constant* A) { setOperand(4, A); } - + + void setVolatile(Constant* V) { + setOperand(5, V); + } + const Type *getAlignmentType() const { return getOperand(4)->getType(); } Modified: vendor/llvm/dist/include/llvm/Intrinsics.td ============================================================================== --- vendor/llvm/dist/include/llvm/Intrinsics.td Tue Apr 6 15:02:41 2010 (r206273) +++ vendor/llvm/dist/include/llvm/Intrinsics.td Tue Apr 6 15:52:58 2010 (r206274) @@ -224,16 +224,16 @@ def int_stackprotector : Intrinsic<[], // def int_memcpy : Intrinsic<[], *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-vendor@FreeBSD.ORG Tue Apr 6 15:54:00 2010 Return-Path: Delivered-To: svn-src-vendor@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 31368106566C; Tue, 6 Apr 2010 15:54:00 +0000 (UTC) (envelope-from rdivacky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1A1858FC12; Tue, 6 Apr 2010 15:54:00 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o36Frx4J009929; Tue, 6 Apr 2010 15:53:59 GMT (envelope-from rdivacky@svn.freebsd.org) Received: (from rdivacky@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o36FrxCR009904; Tue, 6 Apr 2010 15:53:59 GMT (envelope-from rdivacky@svn.freebsd.org) Message-Id: <201004061553.o36FrxCR009904@svn.freebsd.org> From: Roman Divacky Date: Tue, 6 Apr 2010 15:53:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206275 - in vendor/clang/dist: examples/wpa include/clang/AST include/clang/Basic include/clang/Frontend include/clang/Parse lib/AST lib/Checker lib/CodeGen lib/Frontend lib/Lex lib/Pa... X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Apr 2010 15:54:00 -0000 Author: rdivacky Date: Tue Apr 6 15:53:59 2010 New Revision: 206275 URL: http://svn.freebsd.org/changeset/base/206275 Log: Update clang to r100520. Added: vendor/clang/dist/lib/Runtime/ vendor/clang/dist/lib/Runtime/Makefile vendor/clang/dist/test/Analysis/inline4.c vendor/clang/dist/test/CodeGenObjC/property-dbg.m vendor/clang/dist/test/Index/complete-enums.c vendor/clang/dist/test/Index/complete-macros.c Modified: vendor/clang/dist/examples/wpa/clang-wpa.cpp vendor/clang/dist/include/clang/AST/PrettyPrinter.h vendor/clang/dist/include/clang/Basic/Diagnostic.h vendor/clang/dist/include/clang/Frontend/ASTUnit.h vendor/clang/dist/include/clang/Frontend/CompilerInstance.h vendor/clang/dist/include/clang/Parse/Parser.h vendor/clang/dist/lib/AST/ASTImporter.cpp vendor/clang/dist/lib/AST/Stmt.cpp vendor/clang/dist/lib/AST/TypePrinter.cpp vendor/clang/dist/lib/Checker/BugReporter.cpp vendor/clang/dist/lib/Checker/Environment.cpp vendor/clang/dist/lib/CodeGen/CGBuiltin.cpp vendor/clang/dist/lib/CodeGen/CGDebugInfo.cpp vendor/clang/dist/lib/CodeGen/CGDecl.cpp vendor/clang/dist/lib/CodeGen/CGExpr.cpp vendor/clang/dist/lib/CodeGen/CGExprAgg.cpp vendor/clang/dist/lib/CodeGen/CGExprScalar.cpp vendor/clang/dist/lib/CodeGen/CGObjC.cpp vendor/clang/dist/lib/CodeGen/CGObjCMac.cpp vendor/clang/dist/lib/CodeGen/CGObjCRuntime.h vendor/clang/dist/lib/CodeGen/CGRecordLayout.h vendor/clang/dist/lib/CodeGen/CGRecordLayoutBuilder.cpp vendor/clang/dist/lib/CodeGen/CGValue.h vendor/clang/dist/lib/CodeGen/CodeGenFunction.cpp vendor/clang/dist/lib/CodeGen/CodeGenModule.cpp vendor/clang/dist/lib/CodeGen/CodeGenModule.h vendor/clang/dist/lib/Frontend/ASTMerge.cpp vendor/clang/dist/lib/Frontend/ASTUnit.cpp vendor/clang/dist/lib/Frontend/CompilerInstance.cpp vendor/clang/dist/lib/Frontend/FrontendAction.cpp vendor/clang/dist/lib/Frontend/PCHReader.cpp vendor/clang/dist/lib/Lex/Preprocessor.cpp vendor/clang/dist/lib/Parse/ParseDecl.cpp vendor/clang/dist/lib/Parse/ParseStmt.cpp vendor/clang/dist/lib/Sema/CodeCompleteConsumer.cpp vendor/clang/dist/lib/Sema/SemaCodeComplete.cpp vendor/clang/dist/lib/Sema/SemaObjCProperty.cpp vendor/clang/dist/test/CodeGen/asm.c vendor/clang/dist/test/CodeGen/builtin-memfns.c vendor/clang/dist/test/CodeGenCXX/eh.cpp vendor/clang/dist/test/CodeGenCXX/new.cpp vendor/clang/dist/test/CodeGenCXX/value-init.cpp vendor/clang/dist/test/Makefile vendor/clang/dist/test/Parser/cxx-decl.cpp vendor/clang/dist/tools/CIndex/CIndex.cpp vendor/clang/dist/tools/CIndex/CIndexCodeCompletion.cpp vendor/clang/dist/tools/CIndex/CIndexDiagnostic.cpp vendor/clang/dist/tools/driver/cc1_main.cpp Modified: vendor/clang/dist/examples/wpa/clang-wpa.cpp ============================================================================== --- vendor/clang/dist/examples/wpa/clang-wpa.cpp Tue Apr 6 15:52:58 2010 (r206274) +++ vendor/clang/dist/examples/wpa/clang-wpa.cpp Tue Apr 6 15:53:59 2010 (r206275) @@ -17,6 +17,7 @@ #include "clang/Frontend/ASTUnit.h" #include "clang/Frontend/CompilerInstance.h" #include "clang/Index/CallGraph.h" +#include "llvm/ADT/IntrusiveRefCntPtr.h" #include "llvm/Support/CommandLine.h" #include "llvm/Support/raw_ostream.h" using namespace clang; @@ -34,12 +35,11 @@ int main(int argc, char **argv) { return 0; DiagnosticOptions DiagOpts; - llvm::OwningPtr Diags( - CompilerInstance::createDiagnostics(DiagOpts, argc, argv)); - + llvm::IntrusiveRefCntPtr Diags + = 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::LoadFromPCHFile(InFile, Diags)); if (!AST) return 1; Modified: vendor/clang/dist/include/clang/AST/PrettyPrinter.h ============================================================================== --- vendor/clang/dist/include/clang/AST/PrettyPrinter.h Tue Apr 6 15:52:58 2010 (r206274) +++ vendor/clang/dist/include/clang/AST/PrettyPrinter.h Tue Apr 6 15:53:59 2010 (r206275) @@ -37,7 +37,8 @@ struct PrintingPolicy { PrintingPolicy(const LangOptions &LO) : Indentation(2), LangOpts(LO), SuppressSpecifiers(false), SuppressTag(false), SuppressScope(false), - Dump(false), ConstantArraySizeAsWritten(false) { } + Dump(false), ConstantArraySizeAsWritten(false), + AnonymousTagLocations(true) { } /// \brief The number of spaces to use to indent each line. unsigned Indentation : 8; @@ -97,7 +98,11 @@ struct PrintingPolicy { /// char a[9] = "A string"; /// \endcode bool ConstantArraySizeAsWritten : 1; - + + /// \brief When printing an anonymous tag name, also print the location of + /// that entity (e.g., "enum "). Otherwise, just + /// prints "" for the name. + bool AnonymousTagLocations : 1; }; } // end namespace clang Modified: vendor/clang/dist/include/clang/Basic/Diagnostic.h ============================================================================== --- vendor/clang/dist/include/clang/Basic/Diagnostic.h Tue Apr 6 15:52:58 2010 (r206274) +++ vendor/clang/dist/include/clang/Basic/Diagnostic.h Tue Apr 6 15:53:59 2010 (r206275) @@ -15,6 +15,7 @@ #define LLVM_CLANG_DIAGNOSTIC_H #include "clang/Basic/SourceLocation.h" +#include "llvm/ADT/IntrusiveRefCntPtr.h" #include "llvm/ADT/StringRef.h" #include "llvm/Support/type_traits.h" #include @@ -150,7 +151,7 @@ public: /// problems and issues. It massages the diagnostics (e.g. handling things like /// "report warnings as errors" and passes them off to the DiagnosticClient for /// reporting to the user. -class Diagnostic { +class Diagnostic : public llvm::RefCountedBase { public: /// Level - The level of the diagnostic, after it has been through mapping. enum Level { Modified: vendor/clang/dist/include/clang/Frontend/ASTUnit.h ============================================================================== --- vendor/clang/dist/include/clang/Frontend/ASTUnit.h Tue Apr 6 15:52:58 2010 (r206274) +++ vendor/clang/dist/include/clang/Frontend/ASTUnit.h Tue Apr 6 15:53:59 2010 (r206275) @@ -16,6 +16,7 @@ #include "clang/Lex/PreprocessingRecord.h" #include "clang/Basic/SourceManager.h" +#include "llvm/ADT/IntrusiveRefCntPtr.h" #include "llvm/ADT/OwningPtr.h" #include "clang/Basic/FileManager.h" #include "clang/Index/ASTLocation.h" @@ -52,10 +53,9 @@ public: typedef std::map > PreprocessedEntitiesByFileMap; private: - - FileManager FileMgr; - - SourceManager SourceMgr; + llvm::IntrusiveRefCntPtr Diagnostics; + llvm::OwningPtr FileMgr; + llvm::OwningPtr SourceMgr; llvm::OwningPtr HeaderInfo; llvm::OwningPtr Target; llvm::OwningPtr PP; @@ -90,7 +90,7 @@ private: /// \brief The set of diagnostics produced when creating this /// translation unit. - llvm::SmallVector Diagnostics; + llvm::SmallVector StoredDiagnostics; /// \brief Temporary files that should be removed when the ASTUnit is /// destroyed. @@ -118,6 +118,8 @@ private: ASTUnit(const ASTUnit&); // DO NOT IMPLEMENT ASTUnit &operator=(const ASTUnit &); // DO NOT IMPLEMENT + explicit ASTUnit(bool MainFileIsAST); + public: class ConcurrencyCheck { volatile ASTUnit &Self; @@ -137,13 +139,15 @@ public: }; friend class ConcurrencyCheck; - ASTUnit(Diagnostic &Diag, bool MainFileIsAST); ~ASTUnit(); bool isMainFileAST() const { return MainFileIsAST; } - const SourceManager &getSourceManager() const { return SourceMgr; } - SourceManager &getSourceManager() { return SourceMgr; } + const Diagnostic &getDiagnostics() const { return *Diagnostics; } + Diagnostic &getDiagnostics() { return *Diagnostics; } + + const SourceManager &getSourceManager() const { return *SourceMgr; } + SourceManager &getSourceManager() { return *SourceMgr; } const Preprocessor &getPreprocessor() const { return *PP.get(); } Preprocessor &getPreprocessor() { return *PP.get(); } @@ -151,8 +155,8 @@ public: const ASTContext &getASTContext() const { return *Ctx.get(); } ASTContext &getASTContext() { return *Ctx.get(); } - const FileManager &getFileManager() const { return FileMgr; } - FileManager &getFileManager() { return FileMgr; } + const FileManager &getFileManager() const { return *FileMgr; } + FileManager &getFileManager() { return *FileMgr; } const std::string &getOriginalSourceFileName(); const std::string &getPCHFileName(); @@ -185,12 +189,17 @@ public: } // Retrieve the diagnostics associated with this AST - typedef const StoredDiagnostic * diag_iterator; - diag_iterator diag_begin() const { return Diagnostics.begin(); } - diag_iterator diag_end() const { return Diagnostics.end(); } - unsigned diag_size() const { return Diagnostics.size(); } - llvm::SmallVector &getDiagnostics() { - return Diagnostics; + typedef const StoredDiagnostic *stored_diag_iterator; + stored_diag_iterator stored_diag_begin() const { + return StoredDiagnostics.begin(); + } + stored_diag_iterator stored_diag_end() const { + return StoredDiagnostics.end(); + } + unsigned stored_diag_size() const { return StoredDiagnostics.size(); } + + llvm::SmallVector &getStoredDiagnostics() { + return StoredDiagnostics; } /// \brief A mapping from a file name to the memory buffer that stores the @@ -206,7 +215,7 @@ public: /// /// \returns - The initialized ASTUnit or null if the PCH failed to load. static ASTUnit *LoadFromPCHFile(const std::string &Filename, - Diagnostic &Diags, + llvm::IntrusiveRefCntPtr Diags, bool OnlyLocalDecls = false, RemappedFile *RemappedFiles = 0, unsigned NumRemappedFiles = 0, @@ -224,7 +233,7 @@ public: // FIXME: Move OnlyLocalDecls, UseBumpAllocator to setters on the ASTUnit, we // shouldn't need to specify them at construction time. static ASTUnit *LoadFromCompilerInvocation(CompilerInvocation *CI, - Diagnostic &Diags, + llvm::IntrusiveRefCntPtr Diags, bool OnlyLocalDecls = false, bool CaptureDiagnostics = false); @@ -244,7 +253,7 @@ public: // shouldn't need to specify them at construction time. static ASTUnit *LoadFromCommandLine(const char **ArgBegin, const char **ArgEnd, - Diagnostic &Diags, + llvm::IntrusiveRefCntPtr Diags, llvm::StringRef ResourceFilesPath, bool OnlyLocalDecls = false, RemappedFile *RemappedFiles = 0, Modified: vendor/clang/dist/include/clang/Frontend/CompilerInstance.h ============================================================================== --- vendor/clang/dist/include/clang/Frontend/CompilerInstance.h Tue Apr 6 15:52:58 2010 (r206274) +++ vendor/clang/dist/include/clang/Frontend/CompilerInstance.h Tue Apr 6 15:53:59 2010 (r206275) @@ -11,6 +11,7 @@ #define LLVM_CLANG_FRONTEND_COMPILERINSTANCE_H_ #include "clang/Frontend/CompilerInvocation.h" +#include "llvm/ADT/IntrusiveRefCntPtr.h" #include "llvm/ADT/StringRef.h" #include "llvm/ADT/OwningPtr.h" #include @@ -63,7 +64,7 @@ class CompilerInstance { llvm::OwningPtr Invocation; /// The diagnostics engine instance. - llvm::OwningPtr Diagnostics; + llvm::IntrusiveRefCntPtr Diagnostics; /// The diagnostics client instance. llvm::OwningPtr DiagClient; @@ -255,10 +256,6 @@ public: return *Diagnostics; } - /// takeDiagnostics - Remove the current diagnostics engine and give ownership - /// to the caller. - Diagnostic *takeDiagnostics() { return Diagnostics.take(); } - /// setDiagnostics - Replace the current diagnostics engine; the compiler /// instance takes ownership of \arg Value. void setDiagnostics(Diagnostic *Value); @@ -469,8 +466,8 @@ public: /// must extend past that of the diagnostic engine. /// /// \return The new object on success, or null on failure. - static Diagnostic *createDiagnostics(const DiagnosticOptions &Opts, - int Argc, char **Argv); + static llvm::IntrusiveRefCntPtr + createDiagnostics(const DiagnosticOptions &Opts, int Argc, char **Argv); /// Create the file manager and replace any existing one with it. void createFileManager(); Modified: vendor/clang/dist/include/clang/Parse/Parser.h ============================================================================== --- vendor/clang/dist/include/clang/Parse/Parser.h Tue Apr 6 15:52:58 2010 (r206274) +++ vendor/clang/dist/include/clang/Parse/Parser.h Tue Apr 6 15:53:59 2010 (r206275) @@ -1086,7 +1086,8 @@ private: CXX0XAttributeList Attr); DeclGroupPtrTy ParseSimpleDeclaration(unsigned Context, SourceLocation &DeclEnd, - AttributeList *Attr); + AttributeList *Attr, + bool RequireSemi); DeclGroupPtrTy ParseDeclGroup(ParsingDeclSpec &DS, unsigned Context, bool AllowFunctionDefinitions, SourceLocation *DeclEnd = 0); Modified: vendor/clang/dist/lib/AST/ASTImporter.cpp ============================================================================== --- vendor/clang/dist/lib/AST/ASTImporter.cpp Tue Apr 6 15:52:58 2010 (r206274) +++ vendor/clang/dist/lib/AST/ASTImporter.cpp Tue Apr 6 15:53:59 2010 (r206275) @@ -3088,8 +3088,7 @@ FileID ASTImporter::Import(FileID FromID // FIXME: We want to re-use the existing MemoryBuffer! const llvm::MemoryBuffer *FromBuf = Cache->getBuffer(getDiags()); llvm::MemoryBuffer *ToBuf - = llvm::MemoryBuffer::getMemBufferCopy(FromBuf->getBufferStart(), - FromBuf->getBufferEnd(), + = llvm::MemoryBuffer::getMemBufferCopy(FromBuf->getBuffer(), FromBuf->getBufferIdentifier()); ToID = ToSM.createFileIDForMemBuffer(ToBuf); } Modified: vendor/clang/dist/lib/AST/Stmt.cpp ============================================================================== --- vendor/clang/dist/lib/AST/Stmt.cpp Tue Apr 6 15:52:58 2010 (r206274) +++ vendor/clang/dist/lib/AST/Stmt.cpp Tue Apr 6 15:53:59 2010 (r206275) @@ -249,14 +249,18 @@ unsigned AsmStmt::AnalyzeAsmString(llvm: } char CurChar = *CurPtr++; - if (CurChar == '$') { - CurStringPiece += "$$"; - continue; - } else if (CurChar != '%') { + switch (CurChar) { + case '$': CurStringPiece += "$$"; continue; + case '{': CurStringPiece += "$("; continue; + case '|': CurStringPiece += "$|"; continue; + case '}': CurStringPiece += "$)"; continue; + case '%': + break; + default: CurStringPiece += CurChar; continue; } - + // Escaped "%" character in asm string. if (CurPtr == StrEnd) { // % at end of string is invalid (no escape). Modified: vendor/clang/dist/lib/AST/TypePrinter.cpp ============================================================================== --- vendor/clang/dist/lib/AST/TypePrinter.cpp Tue Apr 6 15:52:58 2010 (r206274) +++ vendor/clang/dist/lib/AST/TypePrinter.cpp Tue Apr 6 15:53:59 2010 (r206275) @@ -442,18 +442,21 @@ void TypePrinter::PrintTag(TagDecl *D, s llvm::raw_string_ostream OS(Buffer); OS << "getKindName(); - - PresumedLoc PLoc = D->getASTContext().getSourceManager().getPresumedLoc( - D->getLocation()); - OS << " at " << PLoc.getFilename() - << ':' << PLoc.getLine() - << ':' << PLoc.getColumn() - << '>'; + if (Policy.AnonymousTagLocations) { + // Suppress the redundant tag keyword if we just printed one. + // We don't have to worry about ElaboratedTypes here because you can't + // refer to an anonymous type with one. + if (!HasKindDecoration) + OS << " " << D->getKindName(); + + PresumedLoc PLoc = D->getASTContext().getSourceManager().getPresumedLoc( + D->getLocation()); + OS << " at " << PLoc.getFilename() + << ':' << PLoc.getLine() + << ':' << PLoc.getColumn(); + } + + OS << '>'; OS.flush(); } Modified: vendor/clang/dist/lib/Checker/BugReporter.cpp ============================================================================== --- vendor/clang/dist/lib/Checker/BugReporter.cpp Tue Apr 6 15:52:58 2010 (r206274) +++ vendor/clang/dist/lib/Checker/BugReporter.cpp Tue Apr 6 15:53:59 2010 (r206275) @@ -58,7 +58,7 @@ void BugReporterContext::addVisitor(BugR // Helper routines for walking the ExplodedGraph and fetching statements. //===----------------------------------------------------------------------===// -static inline const Stmt* GetStmt(ProgramPoint P) { +static inline const Stmt* GetStmt(const ProgramPoint &P) { if (const StmtPoint* SP = dyn_cast(&P)) return SP->getStmt(); else if (const BlockEdge* BE = dyn_cast(&P)) Modified: vendor/clang/dist/lib/Checker/Environment.cpp ============================================================================== --- vendor/clang/dist/lib/Checker/Environment.cpp Tue Apr 6 15:52:58 2010 (r206274) +++ vendor/clang/dist/lib/Checker/Environment.cpp Tue Apr 6 15:53:59 2010 (r206275) @@ -96,6 +96,19 @@ public: }; } // end anonymous namespace +static bool isBlockExprInCallers(const Stmt *E, const LocationContext *LC) { + const LocationContext *ParentLC = LC->getParent(); + while (ParentLC) { + CFG &C = *ParentLC->getCFG(); + if (C.isBlkExpr(E)) + return true; + ParentLC = ParentLC->getParent(); + } + + return false; +} + + // RemoveDeadBindings: // - Remove subexpression bindings. // - Remove dead block expression bindings. @@ -122,13 +135,27 @@ EnvironmentManager::RemoveDeadBindings(E I != E; ++I) { const Stmt *BlkExpr = I.getKey(); + const SVal &X = I.getData(); + + // Block-level expressions in callers are assumed always live. + if (isBlockExprInCallers(BlkExpr, SymReaper.getLocationContext())) { + NewEnv.ExprBindings = F.Add(NewEnv.ExprBindings, BlkExpr, X); + + if (isa(X)) { + const MemRegion* R = cast(X).getRegion(); + DRoots.push_back(R); + } + + // Mark all symbols in the block expr's value live. + MarkLiveCallback cb(SymReaper); + ST->scanReachableSymbols(X, cb); + continue; + } // Not a block-level expression? if (!C.isBlkExpr(BlkExpr)) continue; - const SVal &X = I.getData(); - if (SymReaper.isLive(S, BlkExpr)) { // Copy the binding to the new map. NewEnv.ExprBindings = F.Add(NewEnv.ExprBindings, BlkExpr, X); @@ -137,14 +164,6 @@ EnvironmentManager::RemoveDeadBindings(E if (isa(X)) { const MemRegion* R = cast(X).getRegion(); DRoots.push_back(R); - // Mark the super region of the RX as live. - // e.g.: int x; char *y = (char*) &x; if (*y) ... - // 'y' => element region. 'x' is its super region. - // We only add one level super region for now. - - // FIXME: maybe multiple level of super regions should be added. - if (const SubRegion *SR = dyn_cast(R)) - DRoots.push_back(SR->getSuperRegion()); } // Mark all symbols in the block expr's value live. Modified: vendor/clang/dist/lib/CodeGen/CGBuiltin.cpp ============================================================================== --- vendor/clang/dist/lib/CodeGen/CGBuiltin.cpp Tue Apr 6 15:52:58 2010 (r206274) +++ vendor/clang/dist/lib/CodeGen/CGBuiltin.cpp Tue Apr 6 15:53:59 2010 (r206275) @@ -338,38 +338,50 @@ RValue CodeGenFunction::EmitBuiltinExpr( case Builtin::BIbzero: case Builtin::BI__builtin_bzero: { Value *Address = EmitScalarExpr(E->getArg(0)); - Builder.CreateCall4(CGM.getMemSetFn(), Address, - llvm::ConstantInt::get(llvm::Type::getInt8Ty(VMContext), 0), - EmitScalarExpr(E->getArg(1)), - llvm::ConstantInt::get(llvm::Type::getInt32Ty(VMContext), 1)); + Value *SizeVal = EmitScalarExpr(E->getArg(1)); + Builder.CreateCall5(CGM.getMemSetFn(Address->getType(), SizeVal->getType()), + Address, + llvm::ConstantInt::get(llvm::Type::getInt8Ty(VMContext), 0), + SizeVal, + llvm::ConstantInt::get(llvm::Type::getInt32Ty(VMContext), 1), + llvm::ConstantInt::get(llvm::Type::getInt1Ty(VMContext), 0)); return RValue::get(Address); } case Builtin::BImemcpy: case Builtin::BI__builtin_memcpy: { Value *Address = EmitScalarExpr(E->getArg(0)); - Builder.CreateCall4(CGM.getMemCpyFn(), Address, - EmitScalarExpr(E->getArg(1)), - EmitScalarExpr(E->getArg(2)), - llvm::ConstantInt::get(llvm::Type::getInt32Ty(VMContext), 1)); + Value *SrcAddr = EmitScalarExpr(E->getArg(1)); + Value *SizeVal = EmitScalarExpr(E->getArg(2)); + Builder.CreateCall5(CGM.getMemCpyFn(Address->getType(), SrcAddr->getType(), + SizeVal->getType()), + Address, SrcAddr, SizeVal, + llvm::ConstantInt::get(llvm::Type::getInt32Ty(VMContext), 1), + llvm::ConstantInt::get(llvm::Type::getInt1Ty(VMContext), 0)); return RValue::get(Address); } case Builtin::BImemmove: case Builtin::BI__builtin_memmove: { Value *Address = EmitScalarExpr(E->getArg(0)); - Builder.CreateCall4(CGM.getMemMoveFn(), Address, - EmitScalarExpr(E->getArg(1)), - EmitScalarExpr(E->getArg(2)), - llvm::ConstantInt::get(llvm::Type::getInt32Ty(VMContext), 1)); + Value *SrcAddr = EmitScalarExpr(E->getArg(1)); + Value *SizeVal = EmitScalarExpr(E->getArg(2)); + Builder.CreateCall5(CGM.getMemMoveFn(Address->getType(), SrcAddr->getType(), + SizeVal->getType()), + Address, SrcAddr, SizeVal, + llvm::ConstantInt::get(llvm::Type::getInt32Ty(VMContext), 1), + llvm::ConstantInt::get(llvm::Type::getInt1Ty(VMContext), 0)); return RValue::get(Address); } case Builtin::BImemset: case Builtin::BI__builtin_memset: { Value *Address = EmitScalarExpr(E->getArg(0)); - Builder.CreateCall4(CGM.getMemSetFn(), Address, - Builder.CreateTrunc(EmitScalarExpr(E->getArg(1)), - llvm::Type::getInt8Ty(VMContext)), - EmitScalarExpr(E->getArg(2)), - llvm::ConstantInt::get(llvm::Type::getInt32Ty(VMContext), 1)); + Value *SizeVal = EmitScalarExpr(E->getArg(2)); + Builder.CreateCall5(CGM.getMemSetFn(Address->getType(), SizeVal->getType()), + Address, + Builder.CreateTrunc(EmitScalarExpr(E->getArg(1)), + llvm::Type::getInt8Ty(VMContext)), + SizeVal, + llvm::ConstantInt::get(llvm::Type::getInt32Ty(VMContext), 1), + llvm::ConstantInt::get(llvm::Type::getInt1Ty(VMContext), 0)); return RValue::get(Address); } case Builtin::BI__builtin_dwarf_cfa: { Modified: vendor/clang/dist/lib/CodeGen/CGDebugInfo.cpp ============================================================================== --- vendor/clang/dist/lib/CodeGen/CGDebugInfo.cpp Tue Apr 6 15:52:58 2010 (r206274) +++ vendor/clang/dist/lib/CodeGen/CGDebugInfo.cpp Tue Apr 6 15:53:59 2010 (r206275) @@ -1380,7 +1380,9 @@ void CGDebugInfo::EmitStopPoint(llvm::Fu || (SM.getInstantiationLineNumber(CurLoc) == SM.getInstantiationLineNumber(PrevLoc) && SM.isFromSameFile(CurLoc, PrevLoc))) - return; + // New Builder may not be in sync with CGDebugInfo. + if (!Builder.getCurrentDebugLocation().isUnknown()) + return; // Update last state. PrevLoc = CurLoc; Modified: vendor/clang/dist/lib/CodeGen/CGDecl.cpp ============================================================================== --- vendor/clang/dist/lib/CodeGen/CGDecl.cpp Tue Apr 6 15:52:58 2010 (r206274) +++ vendor/clang/dist/lib/CodeGen/CGDecl.cpp Tue Apr 6 15:53:59 2010 (r206275) @@ -564,11 +564,15 @@ void CodeGenFunction::EmitLocalBlockVarD if (Loc->getType() != BP) Loc = Builder.CreateBitCast(Loc, BP, "tmp"); + llvm::Value *NotVolatile = + llvm::ConstantInt::get(llvm::Type::getInt1Ty(VMContext), 0); + // If the initializer is all zeros, codegen with memset. if (isa(Init)) { llvm::Value *Zero = - llvm::ConstantInt::get(llvm::Type::getInt8Ty(VMContext), 0); - Builder.CreateCall4(CGM.getMemSetFn(), Loc, Zero, SizeVal, AlignVal); + llvm::ConstantInt::get(llvm::Type::getInt8Ty(VMContext), 0); + Builder.CreateCall5(CGM.getMemSetFn(Loc->getType(), SizeVal->getType()), + Loc, Zero, SizeVal, AlignVal, NotVolatile); } else { // Otherwise, create a temporary global with the initializer then // memcpy from the global to the alloca. @@ -582,8 +586,10 @@ void CodeGenFunction::EmitLocalBlockVarD llvm::Value *SrcPtr = GV; if (SrcPtr->getType() != BP) SrcPtr = Builder.CreateBitCast(SrcPtr, BP, "tmp"); - - Builder.CreateCall4(CGM.getMemCpyFn(), Loc, SrcPtr, SizeVal, AlignVal); + + Builder.CreateCall5(CGM.getMemCpyFn(Loc->getType(), SrcPtr->getType(), + SizeVal->getType()), + Loc, SrcPtr, SizeVal, AlignVal, NotVolatile); } } else if (Ty->isReferenceType()) { RValue RV = EmitReferenceBindingToExpr(Init, /*IsInitializer=*/true); Modified: vendor/clang/dist/lib/CodeGen/CGExpr.cpp ============================================================================== --- vendor/clang/dist/lib/CodeGen/CGExpr.cpp Tue Apr 6 15:52:58 2010 (r206274) +++ vendor/clang/dist/lib/CodeGen/CGExpr.cpp Tue Apr 6 15:53:59 2010 (r206275) @@ -345,7 +345,7 @@ EmitScalarPrePostIncDec(const UnaryOpera } // Store the updated result through the lvalue. - if (LV.isBitfield()) + if (LV.isBitField()) EmitStoreThroughBitfieldLValue(RValue::get(NextVal), LV, ValTy, &NextVal); else EmitStoreThroughLValue(RValue::get(NextVal), LV, ValTy); @@ -429,7 +429,7 @@ LValue CodeGenFunction::EmitUnsupportedL LValue CodeGenFunction::EmitCheckedLValue(const Expr *E) { LValue LV = EmitLValue(E); - if (!isa(E) && !LV.isBitfield() && LV.isSimple()) + if (!isa(E) && !LV.isBitField() && LV.isSimple()) EmitCheck(LV.getAddress(), getContext().getTypeSize(E->getType()) / 8); return LV; } @@ -593,7 +593,7 @@ RValue CodeGenFunction::EmitLoadOfLValue if (LV.isExtVectorElt()) return EmitLoadOfExtVectorElementLValue(LV, ExprType); - if (LV.isBitfield()) + if (LV.isBitField()) return EmitLoadOfBitfieldLValue(LV, ExprType); if (LV.isPropertyRef()) @@ -605,9 +605,10 @@ RValue CodeGenFunction::EmitLoadOfLValue RValue CodeGenFunction::EmitLoadOfBitfieldLValue(LValue LV, QualType ExprType) { - unsigned StartBit = LV.getBitfieldStartBit(); - unsigned BitfieldSize = LV.getBitfieldSize(); - llvm::Value *Ptr = LV.getBitfieldAddr(); + const CGBitFieldInfo &Info = LV.getBitFieldInfo(); + unsigned StartBit = Info.Start; + unsigned BitfieldSize = Info.Size; + llvm::Value *Ptr = LV.getBitFieldAddr(); const llvm::Type *EltTy = cast(Ptr->getType())->getElementType(); @@ -650,7 +651,7 @@ RValue CodeGenFunction::EmitLoadOfBitfie } // Sign extend if necessary. - if (LV.isBitfieldSigned()) { + if (Info.IsSigned) { llvm::Value *ExtraBits = llvm::ConstantInt::get(EltTy, EltTySize - BitfieldSize); Val = Builder.CreateAShr(Builder.CreateShl(Val, ExtraBits), @@ -733,7 +734,7 @@ void CodeGenFunction::EmitStoreThroughLV if (Dst.isExtVectorElt()) return EmitStoreThroughExtVectorComponentLValue(Src, Dst, Ty); - if (Dst.isBitfield()) + if (Dst.isBitField()) return EmitStoreThroughBitfieldLValue(Src, Dst, Ty); if (Dst.isPropertyRef()) @@ -781,9 +782,10 @@ void CodeGenFunction::EmitStoreThroughLV void CodeGenFunction::EmitStoreThroughBitfieldLValue(RValue Src, LValue Dst, QualType Ty, llvm::Value **Result) { - unsigned StartBit = Dst.getBitfieldStartBit(); - unsigned BitfieldSize = Dst.getBitfieldSize(); - llvm::Value *Ptr = Dst.getBitfieldAddr(); + const CGBitFieldInfo &Info = Dst.getBitFieldInfo(); + unsigned StartBit = Info.Start; + unsigned BitfieldSize = Info.Size; + llvm::Value *Ptr = Dst.getBitFieldAddr(); const llvm::Type *EltTy = cast(Ptr->getType())->getElementType(); @@ -805,7 +807,7 @@ void CodeGenFunction::EmitStoreThroughBi "bf.reload.val"); // Sign extend if necessary. - if (Dst.isBitfieldSigned()) { + if (Info.IsSigned) { unsigned SrcTySize = CGM.getTargetData().getTypeSizeInBits(SrcTy); llvm::Value *ExtraBits = llvm::ConstantInt::get(SrcTy, SrcTySize - BitfieldSize); @@ -1471,7 +1473,7 @@ LValue CodeGenFunction::EmitLValueForBit unsigned CVRQualifiers) { const CGRecordLayout &RL = CGM.getTypes().getCGRecordLayout(Field->getParent()); - const CGRecordLayout::BitFieldInfo &Info = RL.getBitFieldInfo(Field); + const CGBitFieldInfo &Info = RL.getBitFieldInfo(Field); // FIXME: CodeGenTypes should expose a method to get the appropriate type for // FieldTy (the appropriate type is ABI-dependent). @@ -1481,16 +1483,11 @@ LValue CodeGenFunction::EmitLValueForBit cast(BaseValue->getType()); unsigned AS = BaseTy->getAddressSpace(); BaseValue = Builder.CreateBitCast(BaseValue, - llvm::PointerType::get(FieldTy, AS), - "tmp"); + llvm::PointerType::get(FieldTy, AS)); + llvm::Value *V = Builder.CreateConstGEP1_32(BaseValue, Info.FieldNo); - llvm::Value *Idx = - llvm::ConstantInt::get(llvm::Type::getInt32Ty(VMContext), Info.FieldNo); - llvm::Value *V = Builder.CreateGEP(BaseValue, Idx, "tmp"); - - return LValue::MakeBitfield(V, Info.Start, Info.Size, - Field->getType()->isSignedIntegerType(), - Field->getType().getCVRQualifiers()|CVRQualifiers); + return LValue::MakeBitfield(V, Info, + Field->getType().getCVRQualifiers()|CVRQualifiers); } LValue CodeGenFunction::EmitLValueForField(llvm::Value* BaseValue, Modified: vendor/clang/dist/lib/CodeGen/CGExprAgg.cpp ============================================================================== --- vendor/clang/dist/lib/CodeGen/CGExprAgg.cpp Tue Apr 6 15:52:58 2010 (r206274) +++ vendor/clang/dist/lib/CodeGen/CGExprAgg.cpp Tue Apr 6 15:53:59 2010 (r206275) @@ -771,12 +771,27 @@ void CodeGenFunction::EmitAggregateCopy( // a = b; // } // - // we need to use a differnt call here. We use isVolatile to indicate when + // we need to use a different call here. We use isVolatile to indicate when // either the source or the destination is volatile. - Builder.CreateCall4(CGM.getMemCpyFn(), + const llvm::Type *I1Ty = llvm::Type::getInt1Ty(VMContext); + const llvm::Type *I8Ty = llvm::Type::getInt8Ty(VMContext); + const llvm::Type *I32Ty = llvm::Type::getInt32Ty(VMContext); + + const llvm::PointerType *DPT = cast(DestPtr->getType()); + const llvm::Type *DBP = llvm::PointerType::get(I8Ty, DPT->getAddressSpace()); + if (DestPtr->getType() != DBP) + DestPtr = Builder.CreateBitCast(DestPtr, DBP, "tmp"); + + const llvm::PointerType *SPT = cast(SrcPtr->getType()); + const llvm::Type *SBP = llvm::PointerType::get(I8Ty, SPT->getAddressSpace()); + if (SrcPtr->getType() != SBP) + SrcPtr = Builder.CreateBitCast(SrcPtr, SBP, "tmp"); + + Builder.CreateCall5(CGM.getMemCpyFn(DestPtr->getType(), SrcPtr->getType(), + IntPtr), DestPtr, SrcPtr, // TypeInfo.first describes size in bits. llvm::ConstantInt::get(IntPtr, TypeInfo.first/8), - llvm::ConstantInt::get(llvm::Type::getInt32Ty(VMContext), - TypeInfo.second/8)); + llvm::ConstantInt::get(I32Ty, TypeInfo.second/8), + llvm::ConstantInt::get(I1Ty, isVolatile)); } Modified: vendor/clang/dist/lib/CodeGen/CGExprScalar.cpp ============================================================================== --- vendor/clang/dist/lib/CodeGen/CGExprScalar.cpp Tue Apr 6 15:52:58 2010 (r206274) +++ vendor/clang/dist/lib/CodeGen/CGExprScalar.cpp Tue Apr 6 15:53:59 2010 (r206275) @@ -1140,7 +1140,7 @@ Value *ScalarExprEmitter::EmitCompoundAs // specially because the result is altered by the store, i.e., [C99 6.5.16p1] // 'An assignment expression has the value of the left operand after the // assignment...'. - if (LHSLV.isBitfield()) { + if (LHSLV.isBitField()) { if (!LHSLV.isVolatileQualified()) { CGF.EmitStoreThroughBitfieldLValue(RValue::get(Result), LHSLV, LHSTy, &Result); @@ -1575,7 +1575,7 @@ Value *ScalarExprEmitter::VisitBinAssign // because the result is altered by the store, i.e., [C99 6.5.16p1] // 'An assignment expression has the value of the left operand after // the assignment...'. - if (LHS.isBitfield()) { + if (LHS.isBitField()) { if (!LHS.isVolatileQualified()) { CGF.EmitStoreThroughBitfieldLValue(RValue::get(RHS), LHS, E->getType(), &RHS); Modified: vendor/clang/dist/lib/CodeGen/CGObjC.cpp ============================================================================== --- vendor/clang/dist/lib/CodeGen/CGObjC.cpp Tue Apr 6 15:52:58 2010 (r206274) +++ vendor/clang/dist/lib/CodeGen/CGObjC.cpp Tue Apr 6 15:53:59 2010 (r206275) @@ -108,6 +108,10 @@ RValue CodeGenFunction::EmitObjCMessageE void CodeGenFunction::StartObjCMethod(const ObjCMethodDecl *OMD, const ObjCContainerDecl *CD) { FunctionArgList Args; + // Check if we should generate debug info for this method. + if (CGM.getDebugInfo() && !OMD->hasAttr()) + DebugInfo = CGM.getDebugInfo(); + llvm::Function *Fn = CGM.getObjCRuntime().GenerateMethod(OMD, CD); const CGFunctionInfo &FI = CGM.getTypes().getFunctionInfo(OMD); @@ -128,9 +132,6 @@ void CodeGenFunction::StartObjCMethod(co /// Generate an Objective-C method. An Objective-C method is a C function with /// its pointer, name, and types registered in the class struture. void CodeGenFunction::GenerateObjCMethod(const ObjCMethodDecl *OMD) { - // Check if we should generate debug info for this method. - if (CGM.getDebugInfo() && !OMD->hasAttr()) - DebugInfo = CGM.getDebugInfo(); StartObjCMethod(OMD, OMD->getClassInterface()); EmitStmt(OMD->getBody()); FinishFunction(OMD->getBodyRBrace()); Modified: vendor/clang/dist/lib/CodeGen/CGObjCMac.cpp ============================================================================== --- vendor/clang/dist/lib/CodeGen/CGObjCMac.cpp Tue Apr 6 15:52:58 2010 (r206274) +++ vendor/clang/dist/lib/CodeGen/CGObjCMac.cpp Tue Apr 6 15:53:59 2010 (r206275) @@ -107,24 +107,31 @@ LValue CGObjCRuntime::EmitValueForIvarAt Qualifiers Quals = CGF.MakeQualifiers(IvarTy); Quals.addCVRQualifiers(CVRQualifiers); - if (Ivar->isBitField()) { - // We need to compute the bit offset for the bit-field, the offset - // is to the byte. Note, there is a subtle invariant here: we can - // only call this routine on non-sythesized ivars but we may be - // called for synthesized ivars. However, a synthesized ivar can - // never be a bit-field so this is safe. - uint64_t BitOffset = LookupFieldBitOffset(CGF.CGM, OID, 0, Ivar) % 8; + if (!Ivar->isBitField()) + return LValue::MakeAddr(V, Quals); - uint64_t BitFieldSize = - Ivar->getBitWidth()->EvaluateAsInt(CGF.getContext()).getZExtValue(); - return LValue::MakeBitfield(V, BitOffset, BitFieldSize, - IvarTy->isSignedIntegerType(), - Quals.getCVRQualifiers()); - } + // We need to compute the bit offset for the bit-field, the offset is to the + // byte. Note, there is a subtle invariant here: we can only call this routine + // on non-synthesized ivars but we may be called for synthesized ivars. + // However, a synthesized ivar can never be a bit-field, so this is safe. + uint64_t BitOffset = LookupFieldBitOffset(CGF.CGM, OID, 0, Ivar) % 8; + uint64_t BitFieldSize = + Ivar->getBitWidth()->EvaluateAsInt(CGF.getContext()).getZExtValue(); - - LValue LV = LValue::MakeAddr(V, Quals); - return LV; + // Allocate a new CGBitFieldInfo object to describe this access. + // + // FIXME: This is incredibly wasteful, these should be uniqued or part of some + // layout object. However, this is blocked on other cleanups to the + // Objective-C code, so for now we just live with allocating a bunch of these + // objects. + unsigned FieldNo = 0; // This value is unused. + CGBitFieldInfo *Info = + new (CGF.CGM.getContext()) CGBitFieldInfo(FieldNo, BitOffset, BitFieldSize, + IvarTy->isSignedIntegerType()); + + // FIXME: We need to set a very conservative alignment on this, or make sure + // that the runtime is doing the right thing. + return LValue::MakeBitfield(V, *Info, Quals.getCVRQualifiers()); } /// @@ -3128,7 +3135,7 @@ void CGObjCCommonMac::BuildAggrIvarLayou const CGRecordLayout &RL = CGM.getTypes().getCGRecordLayout(Field->getParent()); if (Field->isBitField()) { - const CGRecordLayout::BitFieldInfo &Info = RL.getBitFieldInfo(Field); + const CGBitFieldInfo &Info = RL.getBitFieldInfo(Field); const llvm::Type *Ty = CGM.getTypes().ConvertTypeForMemRecursive(Field->getType()); Modified: vendor/clang/dist/lib/CodeGen/CGObjCRuntime.h ============================================================================== --- vendor/clang/dist/lib/CodeGen/CGObjCRuntime.h Tue Apr 6 15:52:58 2010 (r206274) +++ vendor/clang/dist/lib/CodeGen/CGObjCRuntime.h Tue Apr 6 15:53:59 2010 (r206275) @@ -61,12 +61,11 @@ namespace CodeGen { /// Implements runtime-specific code generation functions. class CGObjCRuntime { -public: +protected: // Utility functions for unified ivar access. These need to // eventually be folded into other places (the structure layout // code). -protected: /// Compute an offset to the given ivar, suitable for passing to /// EmitValueForIvarAtOffset. Note that the correct handling of /// bit-fields is carefully coordinated by these two, use caution! Modified: vendor/clang/dist/lib/CodeGen/CGRecordLayout.h ============================================================================== --- vendor/clang/dist/lib/CodeGen/CGRecordLayout.h Tue Apr 6 15:52:58 2010 (r206274) +++ vendor/clang/dist/lib/CodeGen/CGRecordLayout.h Tue Apr 6 15:53:59 2010 (r206275) @@ -19,6 +19,18 @@ namespace llvm { namespace clang { namespace CodeGen { +class CGBitFieldInfo { +public: + CGBitFieldInfo(unsigned FieldNo, unsigned Start, unsigned Size, + bool IsSigned) + : FieldNo(FieldNo), Start(Start), Size(Size), IsSigned(IsSigned) {} + + unsigned FieldNo; + unsigned Start; + unsigned Size; + bool IsSigned : 1; +}; + /// CGRecordLayout - This class handles struct and union layout info while /// lowering AST types to LLVM types. /// @@ -29,18 +41,6 @@ class CGRecordLayout { CGRecordLayout(const CGRecordLayout&); // DO NOT IMPLEMENT void operator=(const CGRecordLayout&); // DO NOT IMPLEMENT -public: - struct BitFieldInfo { - BitFieldInfo(unsigned FieldNo, - unsigned Start, - unsigned Size) - : FieldNo(FieldNo), Start(Start), Size(Size) {} - - unsigned FieldNo; - unsigned Start; - unsigned Size; - }; - private: /// The LLVMType corresponding to this record layout. const llvm::Type *LLVMType; @@ -51,7 +51,7 @@ private: /// Map from (bit-field) struct field to the corresponding llvm struct type /// field no. This info is populated by record builder. - llvm::DenseMap BitFields; + llvm::DenseMap BitFields; /// Whether one of the fields in this record layout is a pointer to data /// member, or a struct that contains pointer to data member. @@ -80,9 +80,9 @@ public: /// \brief Return llvm::StructType element number that corresponds to the /// field FD. - const BitFieldInfo &getBitFieldInfo(const FieldDecl *FD) const { + const CGBitFieldInfo &getBitFieldInfo(const FieldDecl *FD) const { assert(FD->isBitField() && "Invalid call for non bit-field decl!"); - llvm::DenseMap::const_iterator + llvm::DenseMap::const_iterator it = BitFields.find(FD); assert(it != BitFields.end() && "Unable to find bitfield info"); return it->second; Modified: vendor/clang/dist/lib/CodeGen/CGRecordLayoutBuilder.cpp ============================================================================== --- vendor/clang/dist/lib/CodeGen/CGRecordLayoutBuilder.cpp Tue Apr 6 15:52:58 2010 (r206274) +++ vendor/clang/dist/lib/CodeGen/CGRecordLayoutBuilder.cpp Tue Apr 6 15:53:59 2010 (r206275) @@ -37,17 +37,7 @@ public: llvm::SmallVector LLVMFields; /// LLVMBitFieldInfo - Holds location and size information about a bit field. - struct LLVMBitFieldInfo { - LLVMBitFieldInfo(const FieldDecl *FD, unsigned FieldNo, unsigned Start, - unsigned Size) - : FD(FD), FieldNo(FieldNo), Start(Start), Size(Size) { } - - const FieldDecl *FD; - - unsigned FieldNo; - unsigned Start; - unsigned Size; - }; + typedef std::pair LLVMBitFieldInfo; llvm::SmallVector LLVMBitFields; /// ContainsPointerToDataMember - Whether one of the fields in this record @@ -188,9 +178,11 @@ void CGRecordLayoutBuilder::LayoutBitFie const llvm::Type *Ty = Types.ConvertTypeForMemRecursive(D->getType()); uint64_t TypeSizeInBits = getTypeSizeInBytes(Ty) * 8; - LLVMBitFields.push_back(LLVMBitFieldInfo(D, FieldOffset / TypeSizeInBits, - FieldOffset % TypeSizeInBits, - FieldSize)); + bool IsSigned = D->getType()->isSignedIntegerType(); + LLVMBitFields.push_back(LLVMBitFieldInfo( + D, CGBitFieldInfo(FieldOffset / TypeSizeInBits, + FieldOffset % TypeSizeInBits, + FieldSize, IsSigned))); AppendBytes(NumBytesToAppend); @@ -288,7 +280,10 @@ void CGRecordLayoutBuilder::LayoutUnion( continue; // Add the bit field info. - LLVMBitFields.push_back(LLVMBitFieldInfo(*Field, 0, 0, FieldSize)); + bool IsSigned = Field->getType()->isSignedIntegerType(); + LLVMBitFields.push_back(LLVMBitFieldInfo( + *Field, CGBitFieldInfo(0, 0, FieldSize, + IsSigned))); } else { LLVMFields.push_back(LLVMFieldInfo(*Field, 0)); } @@ -494,21 +489,12 @@ CGRecordLayout *CodeGenTypes::ComputeRec new CGRecordLayout(Ty, Builder.ContainsPointerToDataMember); // Add all the field numbers. - for (unsigned i = 0, e = Builder.LLVMFields.size(); i != e; ++i) { - const FieldDecl *FD = Builder.LLVMFields[i].first; - unsigned FieldNo = Builder.LLVMFields[i].second; - - RL->FieldInfo.insert(std::make_pair(FD, FieldNo)); - } + for (unsigned i = 0, e = Builder.LLVMFields.size(); i != e; ++i) + RL->FieldInfo.insert(Builder.LLVMFields[i]); // Add bitfield info. - for (unsigned i = 0, e = Builder.LLVMBitFields.size(); i != e; ++i) { - const CGRecordLayoutBuilder::LLVMBitFieldInfo &Info = - Builder.LLVMBitFields[i]; - - CGRecordLayout::BitFieldInfo BFI(Info.FieldNo, Info.Start, Info.Size); - RL->BitFields.insert(std::make_pair(Info.FD, BFI)); - } + for (unsigned i = 0, e = Builder.LLVMBitFields.size(); i != e; ++i) + RL->BitFields.insert(Builder.LLVMBitFields[i]); return RL; } Modified: vendor/clang/dist/lib/CodeGen/CGValue.h ============================================================================== --- vendor/clang/dist/lib/CodeGen/CGValue.h Tue Apr 6 15:52:58 2010 (r206274) +++ vendor/clang/dist/lib/CodeGen/CGValue.h Tue Apr 6 15:53:59 2010 (r206275) @@ -27,6 +27,7 @@ namespace clang { class ObjCImplicitSetterGetterRefExpr; namespace CodeGen { + class CGBitFieldInfo; /// RValue - This trivial value class is used to represent the result of an /// expression that is evaluated. It can be one of three things: either a @@ -128,14 +129,11 @@ class LValue { llvm::Constant *VectorElts; // BitField start bit and size - struct { - unsigned short StartBit; - unsigned short Size; - bool IsSigned; - } BitfieldData; + const CGBitFieldInfo *BitFieldInfo; // Obj-C property reference expression const ObjCPropertyRefExpr *PropertyRefExpr; + // ObjC 'implicit' property reference expression const ObjCImplicitSetterGetterRefExpr *KVCRefExpr; }; @@ -170,7 +168,7 @@ private: public: bool isSimple() const { return LVType == Simple; } bool isVectorElt() const { return LVType == VectorElt; } - bool isBitfield() const { return LVType == BitField; } + bool isBitField() const { return LVType == BitField; } bool isExtVectorElt() const { return LVType == ExtVectorElt; } bool isPropertyRef() const { return LVType == PropertyRef; } bool isKVCRef() const { return LVType == KVCRef; } @@ -209,29 +207,28 @@ public: // simple lvalue llvm::Value *getAddress() const { assert(isSimple()); return V; } + // vector elt lvalue llvm::Value *getVectorAddr() const { assert(isVectorElt()); return V; } llvm::Value *getVectorIdx() const { assert(isVectorElt()); return VectorIdx; } + // extended vector elements. llvm::Value *getExtVectorAddr() const { assert(isExtVectorElt()); return V; } llvm::Constant *getExtVectorElts() const { assert(isExtVectorElt()); return VectorElts; } + // bitfield lvalue - llvm::Value *getBitfieldAddr() const { assert(isBitfield()); return V; } - unsigned short getBitfieldStartBit() const { - assert(isBitfield()); - return BitfieldData.StartBit; - } - unsigned short getBitfieldSize() const { - assert(isBitfield()); - return BitfieldData.Size; - } - bool isBitfieldSigned() const { - assert(isBitfield()); - return BitfieldData.IsSigned; + llvm::Value *getBitFieldAddr() const { + assert(isBitField()); + return V; + } + const CGBitFieldInfo &getBitFieldInfo() const { + assert(isBitField()); + return *BitFieldInfo; } + // property ref lvalue const ObjCPropertyRefExpr *getPropertyRefExpr() const { assert(isPropertyRef()); @@ -272,15 +269,12 @@ public: return R; } - static LValue MakeBitfield(llvm::Value *V, unsigned short StartBit, - unsigned short Size, bool IsSigned, + static LValue MakeBitfield(llvm::Value *V, const CGBitFieldInfo &Info, unsigned CVR) { *** DIFF OUTPUT TRUNCATED AT 1000 LINES ***