From owner-svn-src-vendor@FreeBSD.ORG Mon Mar 29 20:15:32 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 CD9DB1065672; Mon, 29 Mar 2010 20:15:32 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B95538FC20; Mon, 29 Mar 2010 20:15:32 +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 o2TKFWOW060053; Mon, 29 Mar 2010 20:15:32 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2TKFWjB060042; Mon, 29 Mar 2010 20:15:32 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201003292015.o2TKFWjB060042@svn.freebsd.org> From: Doug Barton Date: Mon, 29 Mar 2010 20:15:32 +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: r205856 - in vendor/bind9/dist-9.4: . bin/named doc/arm doc/draft lib/dns lib/dns/include/dns 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, 29 Mar 2010 20:15:32 -0000 Author: dougb Date: Mon Mar 29 20:15:32 2010 New Revision: 205856 URL: http://svn.freebsd.org/changeset/base/205856 Log: Vendor import of BIND 9.4-ESV-R1 Added: vendor/bind9/dist-9.4/doc/draft/draft-ietf-6man-text-addr-representation-07.txt (contents, props changed) vendor/bind9/dist-9.4/doc/draft/draft-ietf-behave-dns64-06.txt (contents, props changed) vendor/bind9/dist-9.4/doc/draft/draft-ietf-dnsext-axfr-clarify-13.txt (contents, props changed) vendor/bind9/dist-9.4/doc/draft/draft-ietf-dnsext-dnssec-gost-06.txt (contents, props changed) vendor/bind9/dist-9.4/doc/draft/draft-ietf-dnsext-rfc3597-bis-02.txt (contents, props changed) vendor/bind9/dist-9.4/doc/draft/draft-ietf-dnsop-dnssec-trust-history-01.txt (contents, props changed) vendor/bind9/dist-9.4/doc/draft/draft-kerr-ixfr-only-01.txt (contents, props changed) Deleted: vendor/bind9/dist-9.4/doc/draft/draft-ietf-6man-text-addr-representation-01.txt vendor/bind9/dist-9.4/doc/draft/draft-ietf-behave-dns64-01.txt vendor/bind9/dist-9.4/doc/draft/draft-ietf-dnsext-axfr-clarify-12.txt vendor/bind9/dist-9.4/doc/draft/draft-ietf-dnsext-dnssec-gost-05.txt vendor/bind9/dist-9.4/doc/draft/draft-ietf-dnsext-rfc3597-bis-00.txt Modified: vendor/bind9/dist-9.4/CHANGES vendor/bind9/dist-9.4/bin/named/server.c vendor/bind9/dist-9.4/doc/arm/Bv9ARM-book.xml vendor/bind9/dist-9.4/doc/arm/Bv9ARM.ch01.html vendor/bind9/dist-9.4/doc/arm/Bv9ARM.ch02.html vendor/bind9/dist-9.4/doc/arm/Bv9ARM.ch03.html vendor/bind9/dist-9.4/doc/arm/Bv9ARM.ch04.html vendor/bind9/dist-9.4/doc/arm/Bv9ARM.ch05.html vendor/bind9/dist-9.4/doc/arm/Bv9ARM.ch06.html vendor/bind9/dist-9.4/doc/arm/Bv9ARM.ch07.html vendor/bind9/dist-9.4/doc/arm/Bv9ARM.ch08.html vendor/bind9/dist-9.4/doc/arm/Bv9ARM.ch09.html vendor/bind9/dist-9.4/doc/arm/Bv9ARM.ch10.html vendor/bind9/dist-9.4/doc/arm/Bv9ARM.html vendor/bind9/dist-9.4/doc/arm/Bv9ARM.pdf vendor/bind9/dist-9.4/doc/arm/man.dig.html vendor/bind9/dist-9.4/doc/arm/man.dnssec-keygen.html vendor/bind9/dist-9.4/doc/arm/man.dnssec-signzone.html vendor/bind9/dist-9.4/doc/arm/man.host.html vendor/bind9/dist-9.4/doc/arm/man.named-checkconf.html vendor/bind9/dist-9.4/doc/arm/man.named-checkzone.html vendor/bind9/dist-9.4/doc/arm/man.named.html vendor/bind9/dist-9.4/doc/arm/man.rndc-confgen.html vendor/bind9/dist-9.4/doc/arm/man.rndc.conf.html vendor/bind9/dist-9.4/doc/arm/man.rndc.html vendor/bind9/dist-9.4/lib/dns/include/dns/rdataset.h vendor/bind9/dist-9.4/lib/dns/include/dns/resolver.h vendor/bind9/dist-9.4/lib/dns/include/dns/result.h vendor/bind9/dist-9.4/lib/dns/include/dns/validator.h vendor/bind9/dist-9.4/lib/dns/ncache.c vendor/bind9/dist-9.4/lib/dns/rbtdb.c vendor/bind9/dist-9.4/lib/dns/rdatalist.c vendor/bind9/dist-9.4/lib/dns/rdataset.c vendor/bind9/dist-9.4/lib/dns/rdataslab.c vendor/bind9/dist-9.4/lib/dns/resolver.c vendor/bind9/dist-9.4/lib/dns/result.c vendor/bind9/dist-9.4/lib/dns/sdb.c vendor/bind9/dist-9.4/lib/dns/sdlz.c vendor/bind9/dist-9.4/lib/dns/validator.c vendor/bind9/dist-9.4/lib/dns/view.c vendor/bind9/dist-9.4/version Modified: vendor/bind9/dist-9.4/CHANGES ============================================================================== --- vendor/bind9/dist-9.4/CHANGES Mon Mar 29 20:12:44 2010 (r205855) +++ vendor/bind9/dist-9.4/CHANGES Mon Mar 29 20:15:32 2010 (r205856) @@ -1,3 +1,7 @@ + --- 9.4-ESV-R1 released --- + +2852. [bug] Handle broken DNSSEC trust chains better. [RT #15619] + --- 9.4-ESV released --- 2831. [security] Do not attempt to validate or cache Modified: vendor/bind9/dist-9.4/bin/named/server.c ============================================================================== --- vendor/bind9/dist-9.4/bin/named/server.c Mon Mar 29 20:12:44 2010 (r205855) +++ vendor/bind9/dist-9.4/bin/named/server.c Mon Mar 29 20:15:32 2010 (r205856) @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2009 Internet Systems Consortium, Inc. ("ISC") + * Copyright (C) 2004-2010 Internet Systems Consortium, Inc. ("ISC") * Copyright (C) 1999-2003 Internet Software Consortium. * * Permission to use, copy, modify, and/or distribute this software for any @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: server.c,v 1.419.18.75 2009/07/11 04:30:49 marka Exp $ */ +/* $Id: server.c,v 1.419.18.77 2010/02/26 23:46:32 tbox Exp $ */ /*! \file */ @@ -4563,6 +4563,8 @@ dumpdone(void *arg, isc_result_t result) } if (dctx->cache != NULL) { dns_adb_dump(dctx->view->view->adb, dctx->fp); + dns_resolver_printbadcache(dctx->view->view->resolver, + dctx->fp); dns_db_detach(&dctx->cache); } if (dctx->dumpzones) { Modified: vendor/bind9/dist-9.4/doc/arm/Bv9ARM-book.xml ============================================================================== --- vendor/bind9/dist-9.4/doc/arm/Bv9ARM-book.xml Mon Mar 29 20:12:44 2010 (r205855) +++ vendor/bind9/dist-9.4/doc/arm/Bv9ARM-book.xml Mon Mar 29 20:15:32 2010 (r205856) @@ -2,7 +2,7 @@ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" []> - + BIND 9 Administrator Reference Manual @@ -30,6 +30,7 @@ 2007 2008 2009 + 2010 Internet Systems Consortium, Inc. ("ISC") @@ -7422,6 +7423,13 @@ avoid-v6-udp-ports { 40000; range 50000 1800 (30 minutes). + + Lame-ttl also controls the amount of time DNSSEC + validation failures are cached. There is a minimum + of 30 seconds applied to bad cache entries if the + lame-ttl is set to less than 30 seconds. + + Modified: vendor/bind9/dist-9.4/doc/arm/Bv9ARM.ch01.html ============================================================================== --- vendor/bind9/dist-9.4/doc/arm/Bv9ARM.ch01.html Mon Mar 29 20:12:44 2010 (r205855) +++ vendor/bind9/dist-9.4/doc/arm/Bv9ARM.ch01.html Mon Mar 29 20:15:32 2010 (r205856) @@ -1,5 +1,5 @@ - + @@ -45,17 +45,17 @@ @@ -71,7 +71,7 @@

-Scope of Document

+Scope of Document

The Berkeley Internet Name Domain (BIND) implements a @@ -87,7 +87,7 @@

-Organization of This Document

+Organization of This Document

In this document, Chapter 1 introduces the basic DNS and BIND concepts. Chapter 2 @@ -116,7 +116,7 @@

-Conventions Used in This Document

+Conventions Used in This Document

In this document, we use the following general typographic conventions: @@ -243,7 +243,7 @@

-The Domain Name System (DNS)

+The Domain Name System (DNS)

The purpose of this document is to explain the installation and upkeep of the BIND (Berkeley Internet @@ -253,7 +253,7 @@

-DNS Fundamentals

+DNS Fundamentals

The Domain Name System (DNS) is a hierarchical, distributed database. It stores information for mapping Internet host names to @@ -273,7 +273,7 @@

-Domains and Domain Names

+Domains and Domain Names

The data stored in the DNS is identified by domain names that are organized as a tree according to organizational or administrative boundaries. Each node of the tree, @@ -319,7 +319,7 @@

-Zones

+Zones

To properly operate a name server, it is important to understand the difference between a zone @@ -372,7 +372,7 @@

-Authoritative Name Servers

+Authoritative Name Servers

Each zone is served by at least one authoritative name server, @@ -389,7 +389,7 @@

-The Primary Master

+The Primary Master

The authoritative server where the master copy of the zone data is maintained is called the @@ -409,7 +409,7 @@

-Slave Servers

+Slave Servers

The other authoritative servers, the slave servers (also known as secondary servers) @@ -425,7 +425,7 @@

-Stealth Servers

+Stealth Servers

Usually all of the zone's authoritative servers are listed in NS records in the parent zone. These NS records constitute @@ -460,7 +460,7 @@

-Caching Name Servers

+Caching Name Servers

The resolver libraries provided by most operating systems are stub resolvers, meaning that they are not @@ -487,7 +487,7 @@

-Forwarding

+Forwarding

Even a caching name server does not necessarily perform the complete recursive lookup itself. Instead, it can @@ -514,7 +514,7 @@

-Name Servers in Multiple Roles

+Name Servers in Multiple Roles

The BIND name server can simultaneously act as Modified: vendor/bind9/dist-9.4/doc/arm/Bv9ARM.ch02.html ============================================================================== --- vendor/bind9/dist-9.4/doc/arm/Bv9ARM.ch02.html Mon Mar 29 20:12:44 2010 (r205855) +++ vendor/bind9/dist-9.4/doc/arm/Bv9ARM.ch02.html Mon Mar 29 20:15:32 2010 (r205856) @@ -1,5 +1,5 @@ - + @@ -45,16 +45,16 @@

-Hardware requirements

+Hardware requirements

DNS hardware requirements have traditionally been quite modest. @@ -73,7 +73,7 @@

-CPU Requirements

+CPU Requirements

CPU requirements for BIND 9 range from i486-class machines @@ -84,7 +84,7 @@

-Memory Requirements

+Memory Requirements

The memory of the server has to be large enough to fit the cache and zones loaded off disk. The max-cache-size @@ -107,7 +107,7 @@

-Name Server Intensive Environment Issues

+Name Server Intensive Environment Issues

For name server intensive environments, there are two alternative configurations that may be used. The first is where clients and @@ -124,7 +124,7 @@

-Supported Operating Systems

+Supported Operating Systems

ISC BIND 9 compiles and runs on a large number of Unix-like operating systems, and on some versions of Modified: vendor/bind9/dist-9.4/doc/arm/Bv9ARM.ch03.html ============================================================================== --- vendor/bind9/dist-9.4/doc/arm/Bv9ARM.ch03.html Mon Mar 29 20:12:44 2010 (r205855) +++ vendor/bind9/dist-9.4/doc/arm/Bv9ARM.ch03.html Mon Mar 29 20:15:32 2010 (r205856) @@ -1,5 +1,5 @@ - + @@ -47,14 +47,14 @@

Sample Configurations
-
A Caching-only Name Server
-
An Authoritative-only Name Server
+
A Caching-only Name Server
+
An Authoritative-only Name Server
-
Load Balancing
-
Name Server Operations
+
Load Balancing
+
Name Server Operations
-
Tools for Use With the Name Server Daemon
-
Signals
+
Tools for Use With the Name Server Daemon
+
Signals
@@ -68,7 +68,7 @@ Sample Configurations

-A Caching-only Name Server

+A Caching-only Name Server

The following sample configuration is appropriate for a caching-only name server for use by clients internal to a corporation. All @@ -95,7 +95,7 @@ zone "0.0.127.in-addr.arpa" {

-An Authoritative-only Name Server

+An Authoritative-only Name Server

This sample configuration is for an authoritative-only server that is the master server for "example.com" @@ -137,7 +137,7 @@ zone "eng.example.com" {

-Load Balancing

+Load Balancing

A primitive form of load balancing can be achieved in the DNS by using multiple records @@ -280,10 +280,10 @@ zone "eng.example.com" {

-Name Server Operations

+Name Server Operations

-Tools for Use With the Name Server Daemon

+Tools for Use With the Name Server Daemon

This section describes several indispensable diagnostic, administrative and monitoring tools available to the system @@ -739,7 +739,7 @@ controls {

-Signals

+Signals

Certain UNIX signals cause the name server to take specific actions, as described in the following table. These signals can Modified: vendor/bind9/dist-9.4/doc/arm/Bv9ARM.ch04.html ============================================================================== --- vendor/bind9/dist-9.4/doc/arm/Bv9ARM.ch04.html Mon Mar 29 20:12:44 2010 (r205855) +++ vendor/bind9/dist-9.4/doc/arm/Bv9ARM.ch04.html Mon Mar 29 20:15:32 2010 (r205856) @@ -1,5 +1,5 @@ - + @@ -49,29 +49,29 @@

Dynamic Update
The journal file
Incremental Zone Transfers (IXFR)
-
Split DNS
-
Example split DNS setup
+
Split DNS
+
Example split DNS setup
TSIG
-
Generate Shared Keys for Each Pair of Hosts
-
Copying the Shared Secret to Both Machines
-
Informing the Servers of the Key's Existence
-
Instructing the Server to Use the Key
-
TSIG Key Based Access Control
-
Errors
+
Generate Shared Keys for Each Pair of Hosts
+
Copying the Shared Secret to Both Machines
+
Informing the Servers of the Key's Existence
+
Instructing the Server to Use the Key
+
TSIG Key Based Access Control
+
Errors
-
TKEY
-
SIG(0)
+
TKEY
+
SIG(0)
DNSSEC
-
Generating Keys
-
Signing the Zone
-
Configuring Servers
+
Generating Keys
+
Signing the Zone
+
Configuring Servers
-
IPv6 Support in BIND 9
+
IPv6 Support in BIND 9
-
Address Lookups Using AAAA Records
-
Address to Name Lookups Using Nibble Format
+
Address Lookups Using AAAA Records
+
Address to Name Lookups Using Nibble Format
@@ -205,7 +205,7 @@

-Split DNS

+Split DNS

Setting up different views, or visibility, of the DNS space to internal and external resolvers is usually referred to as a @@ -235,7 +235,7 @@

-Example split DNS setup

+Example split DNS setup

Let's say a company named Example, Inc. (example.com) @@ -481,7 +481,7 @@ nameserver 172.16.72.4

-Generate Shared Keys for Each Pair of Hosts

+Generate Shared Keys for Each Pair of Hosts

A shared secret is generated to be shared between host1 and host2. An arbitrary key name is chosen: "host1-host2.". The key name must @@ -489,7 +489,7 @@ nameserver 172.16.72.4

-Automatic Generation

+Automatic Generation

The following command will generate a 128-bit (16 byte) HMAC-MD5 key as described above. Longer keys are better, but shorter keys @@ -514,7 +514,7 @@ nameserver 172.16.72.4

-Manual Generation

+Manual Generation

The shared secret is simply a random sequence of bits, encoded in base-64. Most ASCII strings are valid base-64 strings (assuming @@ -529,7 +529,7 @@ nameserver 172.16.72.4

-Copying the Shared Secret to Both Machines

+Copying the Shared Secret to Both Machines

This is beyond the scope of DNS. A secure transport mechanism should be used. This could be secure FTP, ssh, telephone, etc. @@ -537,7 +537,7 @@ nameserver 172.16.72.4

-Informing the Servers of the Key's Existence

+Informing the Servers of the Key's Existence

Imagine host1 and host 2 are @@ -566,7 +566,7 @@ key host1-host2. {

-Instructing the Server to Use the Key

+Instructing the Server to Use the Key

Since keys are shared between two hosts only, the server must be told when keys are to be used. The following is added to the named.conf file @@ -598,7 +598,7 @@ server 10.1.2.3 {

-TSIG Key Based Access Control

+TSIG Key Based Access Control

BIND allows IP addresses and ranges to be specified in ACL @@ -626,7 +626,7 @@ allow-update { key host1-host2. ;};

-Errors

+Errors

The processing of TSIG signed messages can result in several errors. If a signed message is sent to a non-TSIG aware @@ -652,7 +652,7 @@ allow-update { key host1-host2. ;};

-TKEY

+TKEY

TKEY is a mechanism for automatically generating a shared secret between two hosts. There are several "modes" of @@ -688,7 +688,7 @@ allow-update { key host1-host2. ;};

-SIG(0)

+SIG(0)

BIND 9 partially supports DNSSEC SIG(0) transaction signatures as specified in RFC 2535 and RFC 2931. @@ -749,7 +749,7 @@ allow-update { key host1-host2. ;};

-Generating Keys

+Generating Keys

The dnssec-keygen program is used to generate keys. @@ -800,7 +800,7 @@ allow-update { key host1-host2. ;};

-Signing the Zone

+Signing the Zone

The dnssec-signzone program is used to @@ -844,7 +844,7 @@ allow-update { key host1-host2. ;};

-Configuring Servers

+Configuring Servers

To enable named to respond appropriately to DNS requests from DNSSEC aware clients, @@ -932,7 +932,7 @@ options {

-IPv6 Support in BIND 9

+IPv6 Support in BIND 9

BIND 9 fully supports all currently defined forms of IPv6 @@ -971,7 +971,7 @@ options {

-Address Lookups Using AAAA Records

+Address Lookups Using AAAA Records

The IPv6 AAAA record is a parallel to the IPv4 A record, and, unlike the deprecated A6 record, specifies the entire @@ -990,7 +990,7 @@ host 3600 IN AAAA

-Address to Name Lookups Using Nibble Format

+Address to Name Lookups Using Nibble Format

When looking up an address in nibble format, the address components are simply reversed, just as in IPv4, and Modified: vendor/bind9/dist-9.4/doc/arm/Bv9ARM.ch05.html ============================================================================== --- vendor/bind9/dist-9.4/doc/arm/Bv9ARM.ch05.html Mon Mar 29 20:12:44 2010 (r205855) +++ vendor/bind9/dist-9.4/doc/arm/Bv9ARM.ch05.html Mon Mar 29 20:15:32 2010 (r205856) @@ -1,5 +1,5 @@ - + @@ -45,13 +45,13 @@

-The Lightweight Resolver Library

+The Lightweight Resolver Library

Traditionally applications have been linked with a stub resolver library that sends recursive DNS queries to a local caching name Modified: vendor/bind9/dist-9.4/doc/arm/Bv9ARM.ch06.html ============================================================================== --- vendor/bind9/dist-9.4/doc/arm/Bv9ARM.ch06.html Mon Mar 29 20:12:44 2010 (r205855) +++ vendor/bind9/dist-9.4/doc/arm/Bv9ARM.ch06.html Mon Mar 29 20:15:32 2010 (r205856) @@ -1,5 +1,5 @@ - + @@ -48,52 +48,52 @@

Configuration File Elements
Address Match Lists
-
Comment Syntax
+
Comment Syntax
Configuration File Grammar
-
acl Statement Grammar
+
acl Statement Grammar
acl Statement Definition and Usage
-
controls Statement Grammar
+
controls Statement Grammar
controls Statement Definition and Usage
-
include Statement Grammar
-
include Statement Definition and +
include Statement Grammar
+
include Statement Definition and Usage
-
key Statement Grammar
-
key Statement Definition and Usage
-
logging Statement Grammar
-
logging Statement Definition and +
key Statement Grammar
+
key Statement Definition and Usage
+
logging Statement Grammar
+
logging Statement Definition and Usage
-
lwres Statement Grammar
-
lwres Statement Definition and Usage
-
masters Statement Grammar
-
masters Statement Definition and +
lwres Statement Grammar
+
lwres Statement Definition and Usage
+
masters Statement Grammar
+
masters Statement Definition and Usage
-
options Statement Grammar
+
options Statement Grammar
options Statement Definition and Usage
server Statement Grammar
server Statement Definition and Usage
-
trusted-keys Statement Grammar
-
trusted-keys Statement Definition +
trusted-keys Statement Grammar
+
trusted-keys Statement Definition and Usage
view Statement Grammar
-
view Statement Definition and Usage
+
view Statement Definition and Usage
zone Statement Grammar
-
zone Statement Definition and Usage
+
zone Statement Definition and Usage
-
Zone File
+
Zone File
Types of Resource Records and When to Use Them
-
Discussion of MX Records
+
Discussion of MX Records
Setting TTLs
-
Inverse Mapping in IPv4
-
Other Zone File Directives
-
BIND Master File Extension: the $GENERATE Directive
+
Inverse Mapping in IPv4
+
Other Zone File Directives
+
BIND Master File Extension: the $GENERATE Directive
Additional File Formats
@@ -455,7 +455,7 @@ Address Match Lists

-Syntax

+Syntax
address_match_list = address_match_list_element ;
   [ address_match_list_element; ... ]
 address_match_list_element = [ ! ] (ip_address [/length] |
@@ -464,7 +464,7 @@
 
 

-Definition and Usage

+Definition and Usage

Address match lists are primarily used to determine access control for various server operations. They are also used in @@ -542,7 +542,7 @@

-Comment Syntax

+Comment Syntax

The BIND 9 comment syntax allows for comments to appear @@ -552,7 +552,7 @@

-Syntax

+Syntax

/* This is a BIND comment as in C */
@@ -567,7 +567,7 @@

-Definition and Usage

+Definition and Usage

Comments may appear anywhere that whitespace may appear in a BIND configuration file. @@ -797,7 +797,7 @@

-acl Statement Grammar

+acl Statement Grammar
acl acl-name {
     address_match_list
 };
@@ -880,7 +880,7 @@
 
 

-controls Statement Grammar

+controls Statement Grammar
controls {
    [ inet ( ip_addr | * ) [ port ip_port ] allow {  address_match_list  }
                 keys { key_list }; ]
@@ -1002,12 +1002,12 @@
 
 

-include Statement Grammar

+include Statement Grammar
include filename;

-include Statement Definition and +include Statement Definition and Usage

The include statement inserts the @@ -1022,7 +1022,7 @@

-key Statement Grammar

+key Statement Grammar
key key_id {
     algorithm string;
     secret string;
@@ -1031,7 +1031,7 @@
 
 

-key Statement Definition and Usage

+key Statement Definition and Usage

The key statement defines a shared secret key for use with TSIG (see the section called “TSIG”) @@ -1078,7 +1078,7 @@

-logging Statement Grammar

+logging Statement Grammar
logging {
    [ channel channel_name {
      ( file path_name
@@ -1102,7 +1102,7 @@
 
 

-logging Statement Definition and +logging Statement Definition and Usage

The logging statement configures a @@ -1136,7 +1136,7 @@

-The channel Phrase

+The channel Phrase

All log output goes to one or more channels; you can make as many of them as you want. @@ -1665,7 +1665,7 @@ category notify { null; };

-The query-errors Category

+The query-errors Category

The query-errors category is specifically intended for debugging purposes: To identify @@ -1893,7 +1893,7 @@ badresp:1,adberr:0,findfail:0,valfail:0]

-lwres Statement Grammar

+lwres Statement Grammar

This is the grammar of the lwres statement in the named.conf file: @@ -1908,7 +1908,7 @@ badresp:1,adberr:0,findfail:0,valfail:0]

-lwres Statement Definition and Usage

+lwres Statement Definition and Usage

The lwres statement configures the name @@ -1959,14 +1959,14 @@ badresp:1,adberr:0,findfail:0,valfail:0]

-masters Statement Grammar

+masters Statement Grammar
 masters name [port ip_port] { ( masters_list | ip_addr [port ip_port] [key key] ) ; [...] };
 

-masters Statement Definition and +masters Statement Definition and Usage

masters lists allow for a common set of masters to be easily used by @@ -1975,7 +1975,7 @@ badresp:1,adberr:0,findfail:0,valfail:0]

-options Statement Grammar

+options Statement Grammar

This is the grammar of the options statement in the named.conf file: @@ -3086,7 +3086,7 @@ options {

-Forwarding

+Forwarding

The forwarding facility can be used to create a large site-wide cache on a few servers, reducing traffic over links to external @@ -3130,7 +3130,7 @@ options {

-Dual-stack Servers

+Dual-stack Servers

Dual-stack servers are used as servers of last resort to work around @@ -3286,7 +3286,7 @@ options {

-Interfaces

+Interfaces

The interfaces and ports that the server will answer queries from may be specified using the listen-on option. listen-on takes @@ -3719,7 +3719,7 @@ avoid-v6-udp-ports {};

-UDP Port Lists

+UDP Port Lists

use-v4-udp-ports, avoid-v4-udp-ports, @@ -3761,7 +3761,7 @@ avoid-v6-udp-ports { 40000; range 50000

-Operating System Resource Limits

+Operating System Resource Limits

The server's usage of many system resources can be limited. Scaled values are allowed when specifying resource limits. For @@ -3922,7 +3922,7 @@ avoid-v6-udp-ports { 40000; range 50000

-Periodic Task Intervals

+Periodic Task Intervals
cleaning-interval

*** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-vendor@FreeBSD.ORG Mon Mar 29 20:16:05 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 0D0B41065670; Mon, 29 Mar 2010 20:16:05 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D64798FC24; Mon, 29 Mar 2010 20:16:04 +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 o2TKG4rr060227; Mon, 29 Mar 2010 20:16:04 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2TKG4X5060226; Mon, 29 Mar 2010 20:16:04 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201003292016.o2TKG4X5060226@svn.freebsd.org> From: Doug Barton Date: Mon, 29 Mar 2010 20:16:04 +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: r205857 - vendor/bind9/9.4-ESV-R1 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, 29 Mar 2010 20:16:05 -0000 Author: dougb Date: Mon Mar 29 20:16:04 2010 New Revision: 205857 URL: http://svn.freebsd.org/changeset/base/205857 Log: Tag the 9.4-ESV-R1 release Added: vendor/bind9/9.4-ESV-R1/ - copied from r205856, vendor/bind9/dist-9.4/ From owner-svn-src-vendor@FreeBSD.ORG Mon Mar 29 21:12:23 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 94157106564A; Mon, 29 Mar 2010 21:12:23 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 830FB8FC1B; Mon, 29 Mar 2010 21:12:23 +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 o2TLCNfQ072767; Mon, 29 Mar 2010 21:12:23 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2TLCN94072765; Mon, 29 Mar 2010 21:12:23 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201003292112.o2TLCN94072765@svn.freebsd.org> From: Doug Barton Date: Mon, 29 Mar 2010 21:12:23 +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: r205861 - vendor/bind9/dist-9.4 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, 29 Mar 2010 21:12:23 -0000 Author: dougb Date: Mon Mar 29 21:12:23 2010 New Revision: 205861 URL: http://svn.freebsd.org/changeset/base/205861 Log: Minor updates to the configure procedure Modified: vendor/bind9/dist-9.4/FREEBSD-Upgrade Modified: vendor/bind9/dist-9.4/FREEBSD-Upgrade ============================================================================== --- vendor/bind9/dist-9.4/FREEBSD-Upgrade Mon Mar 29 20:34:25 2010 (r205860) +++ vendor/bind9/dist-9.4/FREEBSD-Upgrade Mon Mar 29 21:12:23 2010 (r205861) @@ -54,15 +54,15 @@ directories from the configure and Makefile templates: $ sed -i.orig -e '/\/tests/d; /docutil/d; /\/xsl/d;' \ - configure.in Makefile.in */Makefile.in + configure.in Makefile.in */Makefile.in \ + lib/bind/configure.in lib/bind/Makefile.in Please do not commit this change. You only need this to generate config.h. 10) Generate and run configure: aclocal ; autoheader ; autoconf - cd lib/bind - aclocal ; autoheader ; autoconf + cd lib/bind && aclocal ; autoheader ; autoconf cd ../.. $ ./configure --prefix=/usr \ --infodir=/usr/share/info --mandir=/usr/share/man \ From owner-svn-src-vendor@FreeBSD.ORG Wed Mar 31 17:14: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 EC06A106564A; Wed, 31 Mar 2010 17:13:59 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D9B568FC12; Wed, 31 Mar 2010 17:13: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 o2VHDxIl070512; Wed, 31 Mar 2010 17:13:59 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2VHDxoH070467; Wed, 31 Mar 2010 17:13:59 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201003311713.o2VHDxoH070467@svn.freebsd.org> From: Xin LI Date: Wed, 31 Mar 2010 17:13: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: r205990 - vendor/libz/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: Wed, 31 Mar 2010 17:14:00 -0000 Author: delphij Date: Wed Mar 31 17:13:59 2010 New Revision: 205990 URL: http://svn.freebsd.org/changeset/base/205990 Log: Import zlib 1.2.4.1 beta (trimmed) Modified: vendor/libz/dist/ChangeLog vendor/libz/dist/README vendor/libz/dist/crc32.c vendor/libz/dist/deflate.c vendor/libz/dist/gzguts.h vendor/libz/dist/gzlib.c vendor/libz/dist/gzread.c vendor/libz/dist/inftrees.c vendor/libz/dist/minigzip.c vendor/libz/dist/zconf.h vendor/libz/dist/zlib.3 vendor/libz/dist/zlib.h vendor/libz/dist/zutil.c vendor/libz/dist/zutil.h Modified: vendor/libz/dist/ChangeLog ============================================================================== --- vendor/libz/dist/ChangeLog Wed Mar 31 17:05:30 2010 (r205989) +++ vendor/libz/dist/ChangeLog Wed Mar 31 17:13:59 2010 (r205990) @@ -1,6 +1,30 @@ ChangeLog file for zlib +Changes in 1.2.4.1 (28 Mar 2010) +- Remove the use of [a-z] constructs for sed in configure [gentoo 310225] +- Remove $(SHAREDLIB) from LIBS in Makefile.in [Creech] +- Restore "for debugging" comment on sprintf() in gzlib.c +- Remove fdopen for MVS from gzguts.h +- Put new README-WIN32.txt in win32 [Rowe] +- Add check for shell to configure and invoke another shell if needed +- Fix big fat stinking bug in gzseek() on uncompressed files +- Remove vestigial F_OPEN64 define in zutil.h +- Set and check the value of _LARGEFILE_SOURCE and _LARGEFILE64_SOURCE +- Avoid errors on non-LFS systems when applications define LFS macros +- Set EXE to ".exe" in configure for MINGW [Kahle] +- Match crc32() in crc32.c exactly to the prototype in zlib.h [Sherrill] +- Add prefix for cross-compilation in win32/makefile.gcc [Bar-Lev] +- Add DLL install in win32/makefile.gcc [Bar-Lev] +- Allow Linux* or linux* from uname in configure [Bar-Lev] +- Allow ldconfig to be redefined in configure and Makefile.in [Bar-Lev] +- Add cross-compilation prefixes to configure [Bar-Lev] +- Match type exactly in gz_load() invocation in gzread.c +- Match type exactly of zcalloc() in zutil.c to zlib.h alloc_func +- Provide prototypes for *64 functions when building zlib without LFS +- Don't use -lc when linking shared library on MinGW +- Remove errno.h check in configure and vestigial errno code in zutil.h + Changes in 1.2.4 (14 Mar 2010) - Fix VER3 extraction in configure for no fourth subversion - Update zlib.3, add docs to Makefile.in to make .pdf out of it Modified: vendor/libz/dist/README ============================================================================== --- vendor/libz/dist/README Wed Mar 31 17:05:30 2010 (r205989) +++ vendor/libz/dist/README Wed Mar 31 17:13:59 2010 (r205990) @@ -1,6 +1,6 @@ ZLIB DATA COMPRESSION LIBRARY -zlib 1.2.4 is a general purpose data compression library. All the code is +zlib 1.2.4.1 is a general purpose data compression library. All the code is thread safe. The data format used by the zlib library is described by RFCs (Request for Comments) 1950 to 1952 in the files http://www.ietf.org/rfc/rfc1950.txt (zlib format), rfc1951.txt (deflate format) @@ -30,7 +30,7 @@ Mark Nelson wrote an ar issue of Dr. Dobb's Journal; a copy of the article is available at http://marknelson.us/1997/01/01/zlib-engine/ . -The changes made in version 1.2.4 are documented in the file ChangeLog. +The changes made in version 1.2.4.1 are documented in the file ChangeLog. Unsupported third party contributions are provided in directory contrib/ . Modified: vendor/libz/dist/crc32.c ============================================================================== --- vendor/libz/dist/crc32.c Wed Mar 31 17:05:30 2010 (r205989) +++ vendor/libz/dist/crc32.c Wed Mar 31 17:13:59 2010 (r205990) @@ -221,7 +221,7 @@ const unsigned long FAR * ZEXPORT get_cr unsigned long ZEXPORT crc32(crc, buf, len) unsigned long crc; const unsigned char FAR *buf; - unsigned len; + uInt len; { if (buf == Z_NULL) return 0UL; Modified: vendor/libz/dist/deflate.c ============================================================================== --- vendor/libz/dist/deflate.c Wed Mar 31 17:05:30 2010 (r205989) +++ vendor/libz/dist/deflate.c Wed Mar 31 17:13:59 2010 (r205990) @@ -52,7 +52,7 @@ #include "deflate.h" const char deflate_copyright[] = - " deflate 1.2.4 Copyright 1995-2010 Jean-loup Gailly and Mark Adler "; + " deflate 1.2.4.1 Copyright 1995-2010 Jean-loup Gailly and Mark Adler "; /* If you use the zlib library in a product, an acknowledgment is welcome in the documentation of your product. If for some reason you cannot Modified: vendor/libz/dist/gzguts.h ============================================================================== --- vendor/libz/dist/gzguts.h Wed Mar 31 17:05:30 2010 (r205989) +++ vendor/libz/dist/gzguts.h Wed Mar 31 17:13:59 2010 (r205990) @@ -3,9 +3,9 @@ * For conditions of distribution and use, see copyright notice in zlib.h */ -#ifdef _LARGEFILE64_SOURCE +#if _LARGEFILE64_SOURCE == 1 # ifndef _LARGEFILE_SOURCE -# define _LARGEFILE_SOURCE +# define _LARGEFILE_SOURCE 1 # endif # ifdef _FILE_OFFSET_BITS # undef _FILE_OFFSET_BITS @@ -44,7 +44,7 @@ #endif /* get errno and strerror definition */ -#if defined UNDER_CE && defined NO_ERRNO_H +#if defined UNDER_CE # include # define zstrerror() gz_strwinerror((DWORD)GetLastError()) #else @@ -56,13 +56,7 @@ # endif #endif -/* MVS fdopen() */ -#ifdef __MVS__ - #pragma map (fdopen , "\174\174FDOPEN") - FILE *fdopen(int, const char *); -#endif - -#ifdef _LARGEFILE64_SOURCE +#if _LARGEFILE64_SOURCE == 1 # define z_off64_t off64_t #else # define z_off64_t z_off_t @@ -117,7 +111,7 @@ typedef gz_state FAR *gz_statep; /* shared functions */ ZEXTERN void ZEXPORT gz_error OF((gz_statep, int, const char *)); -#if defined UNDER_CE && defined NO_ERRNO_H +#if defined UNDER_CE ZEXTERN char ZEXPORT *gz_strwinerror OF((DWORD error)); #endif Modified: vendor/libz/dist/gzlib.c ============================================================================== --- vendor/libz/dist/gzlib.c Wed Mar 31 17:05:30 2010 (r205989) +++ vendor/libz/dist/gzlib.c Wed Mar 31 17:13:59 2010 (r205990) @@ -5,7 +5,7 @@ #include "gzguts.h" -#ifdef _LARGEFILE64_SOURCE +#if _LARGEFILE64_SOURCE == 1 && _LFS64_LARGEFILE == 1 # define LSEEK lseek64 #else # define LSEEK lseek @@ -15,7 +15,7 @@ local void gz_reset OF((gz_statep)); local gzFile gz_open OF((const char *, int, const char *)); -#if defined UNDER_CE && defined NO_ERRNO_H +#if defined UNDER_CE /* Map the Windows error number in ERROR to a locale-dependent error message string and return a pointer to it. Typically, the values for ERROR come @@ -65,7 +65,7 @@ char ZEXPORT *gz_strwinerror (error) return buf; } -#endif /* UNDER_CE && NO_ERRNO_H */ +#endif /* UNDER_CE */ /* Reset gzip file state */ local void gz_reset(state) @@ -217,7 +217,7 @@ gzFile ZEXPORT gzdopen(fd, mode) if (fd == -1 || (path = malloc(7 + 3 * sizeof(int))) == NULL) return NULL; - sprintf(path, "", fd); + sprintf(path, "", fd); /* for debugging */ gz = gz_open(path, fd, mode); free(path); return gz; @@ -305,7 +305,7 @@ z_off64_t ZEXPORT gzseek64(file, offset, /* if within raw area while reading, just go there */ if (state->mode == GZ_READ && state->how == COPY && state->pos + offset >= state->raw) { - ret = LSEEK(state->fd, offset, SEEK_CUR); + ret = LSEEK(state->fd, offset - state->have, SEEK_CUR); if (ret == -1) return -1; state->have = 0; Modified: vendor/libz/dist/gzread.c ============================================================================== --- vendor/libz/dist/gzread.c Wed Mar 31 17:05:30 2010 (r205989) +++ vendor/libz/dist/gzread.c Wed Mar 31 17:13:59 2010 (r205990) @@ -55,7 +55,8 @@ local int gz_avail(state) if (state->err != Z_OK) return -1; if (state->eof == 0) { - if (gz_load(state, state->in, state->size, &(strm->avail_in)) == -1) + if (gz_load(state, state->in, state->size, + (unsigned *)&(strm->avail_in)) == -1) return -1; strm->next_in = state->in; } Modified: vendor/libz/dist/inftrees.c ============================================================================== --- vendor/libz/dist/inftrees.c Wed Mar 31 17:05:30 2010 (r205989) +++ vendor/libz/dist/inftrees.c Wed Mar 31 17:13:59 2010 (r205990) @@ -9,7 +9,7 @@ #define MAXBITS 15 const char inflate_copyright[] = - " inflate 1.2.4 Copyright 1995-2010 Mark Adler "; + " inflate 1.2.4.1 Copyright 1995-2010 Mark Adler "; /* If you use the zlib library in a product, an acknowledgment is welcome in the documentation of your product. If for some reason you cannot @@ -62,7 +62,7 @@ unsigned short FAR *work; 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0}; static const unsigned short lext[31] = { /* Length codes 257..285 extra */ 16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18, - 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 64, 195}; + 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 67, 206}; static const unsigned short dbase[32] = { /* Distance codes 0..29 base */ 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, Modified: vendor/libz/dist/minigzip.c ============================================================================== --- vendor/libz/dist/minigzip.c Wed Mar 31 17:05:30 2010 (r205989) +++ vendor/libz/dist/minigzip.c Wed Mar 31 17:13:59 2010 (r205990) @@ -54,7 +54,7 @@ extern int unlink OF((const char *)); #endif -#if defined(UNDER_CE) && defined(NO_ERRNO_H) +#if defined(UNDER_CE) # include # define perror(s) pwinerror(s) @@ -116,7 +116,7 @@ static void pwinerror (s) fprintf(stderr, "%s\n", strwinerror(GetLastError ())); } -#endif /* UNDER_CE && NO_ERRNO_H */ +#endif /* UNDER_CE */ #ifndef GZ_SUFFIX # define GZ_SUFFIX ".gz" Modified: vendor/libz/dist/zconf.h ============================================================================== --- vendor/libz/dist/zconf.h Wed Mar 31 17:05:30 2010 (r205989) +++ vendor/libz/dist/zconf.h Wed Mar 31 17:13:59 2010 (r205990) @@ -364,7 +364,7 @@ typedef uLong FAR uLongf; # define Z_HAVE_UNISTD_H #endif -#ifdef Z_HAVE_UNISTD_H +#if defined(Z_HAVE_UNISTD_H) || _LARGEFILE64_SOURCE == 1 # include /* for off_t */ # include /* for SEEK_* and off_t */ # ifdef VMS @@ -375,15 +375,12 @@ typedef uLong FAR uLongf; # endif #endif -#ifdef _LARGEFILE64_SOURCE -# include -#endif - #ifndef SEEK_SET # define SEEK_SET 0 /* Seek from beginning of file. */ # define SEEK_CUR 1 /* Seek from current position. */ # define SEEK_END 2 /* Set file pointer to EOF plus "offset" */ #endif + #ifndef z_off_t # define z_off_t long #endif Modified: vendor/libz/dist/zlib.3 ============================================================================== --- vendor/libz/dist/zlib.3 Wed Mar 31 17:05:30 2010 (r205989) +++ vendor/libz/dist/zlib.3 Wed Mar 31 17:13:59 2010 (r205990) @@ -1,4 +1,4 @@ -.TH ZLIB 3 "14 March 2010" +.TH ZLIB 3 "28 Mar 2010" .SH NAME zlib \- compression/decompression library .SH SYNOPSIS @@ -125,7 +125,7 @@ before asking for help. Send questions and/or comments to zlib@gzip.org, or (for the Windows DLL version) to Gilles Vollant (info@winimage.com). .SH AUTHORS -Version 1.2.4 +Version 1.2.4.1 Copyright (C) 1995-2010 Jean-loup Gailly (jloup@gzip.org) and Mark Adler (madler@alumni.caltech.edu). .LP Modified: vendor/libz/dist/zlib.h ============================================================================== --- vendor/libz/dist/zlib.h Wed Mar 31 17:05:30 2010 (r205989) +++ vendor/libz/dist/zlib.h Wed Mar 31 17:13:59 2010 (r205990) @@ -1,5 +1,5 @@ /* zlib.h -- interface of the 'zlib' general purpose compression library - version 1.2.4, Mar 14th, 2010 + version 1.2.4.1, March 28th, 2010 Copyright (C) 1995-2010 Jean-loup Gailly and Mark Adler @@ -37,12 +37,12 @@ extern "C" { #endif -#define ZLIB_VERSION "1.2.4" -#define ZLIB_VERNUM 0x1240 +#define ZLIB_VERSION "1.2.4.1" +#define ZLIB_VERNUM 0x1241 #define ZLIB_VER_MAJOR 1 #define ZLIB_VER_MINOR 2 #define ZLIB_VER_REVISION 4 -#define ZLIB_VER_SUBREVISION 0 +#define ZLIB_VER_SUBREVISION 1 /* The 'zlib' compression library provides in-memory compression and @@ -1556,7 +1556,7 @@ ZEXTERN int ZEXPORT inflateBackInit_ OF( inflateBackInit_((strm), (windowBits), (window), \ ZLIB_VERSION, sizeof(z_stream)) -#ifdef _LARGEFILE64_SOURCE +#if _LARGEFILE64_SOURCE == 1 && _LFS64_LARGEFILE == 1 ZEXTERN gzFile ZEXPORT gzopen64 OF((const char *, const char *)); ZEXTERN off64_t ZEXPORT gzseek64 OF((gzFile, off64_t, int)); ZEXTERN off64_t ZEXPORT gztell64 OF((gzFile)); @@ -1565,14 +1565,14 @@ ZEXTERN int ZEXPORT inflateBackInit_ OF( ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, off64_t)); #endif -#if !defined(ZLIB_INTERNAL) && _FILE_OFFSET_BITS == 64 +#if !defined(ZLIB_INTERNAL) && _FILE_OFFSET_BITS == 64 && _LFS64_LARGEFILE == 1 # define gzopen gzopen64 # define gzseek gzseek64 # define gztell gztell64 # define gzoffset gzoffset64 # define adler32_combine adler32_combine64 # define crc32_combine crc32_combine64 -# ifndef _LARGEFILE64_SOURCE +# if _LARGEFILE64_SOURCE != 1 ZEXTERN gzFile ZEXPORT gzopen64 OF((const char *, const char *)); ZEXTERN off_t ZEXPORT gzseek64 OF((gzFile, off_t, int)); ZEXTERN off_t ZEXPORT gztell64 OF((gzFile)); Modified: vendor/libz/dist/zutil.c ============================================================================== --- vendor/libz/dist/zutil.c Wed Mar 31 17:05:30 2010 (r205989) +++ vendor/libz/dist/zutil.c Wed Mar 31 17:13:59 2010 (r205990) @@ -272,7 +272,7 @@ void zcfree (voidpf opaque, voidpf ptr) # define _hfree hfree #endif -voidpf zcalloc (voidpf opaque, unsigned items, unsigned size) +voidpf zcalloc (voidpf opaque, uInt items, uInt size) { if (opaque) opaque = 0; /* to make compiler happy */ return _halloc((long)items, size); Modified: vendor/libz/dist/zutil.h ============================================================================== --- vendor/libz/dist/zutil.h Wed Mar 31 17:05:30 2010 (r205989) +++ vendor/libz/dist/zutil.h Wed Mar 31 17:13:59 2010 (r205990) @@ -24,19 +24,6 @@ # include #endif -#if defined(UNDER_CE) && defined(NO_ERRNO_H) -# define zseterrno(ERR) SetLastError((DWORD)(ERR)) -# define zerrno() ((int)GetLastError()) -#else -# ifdef NO_ERRNO_H - extern int errno; -# else -# include -# endif -# define zseterrno(ERR) do { errno = (ERR); } while (0) -# define zerrno() errno -#endif - #ifndef local # define local static #endif @@ -167,12 +154,22 @@ extern const char * const z_errmsg[10]; #pragma warn -8066 #endif -#ifdef _LARGEFILE64_SOURCE +#if _LARGEFILE64_SOURCE == 1 && _LFS64_LARGEFILE == 1 # define z_off64_t off64_t #else # define z_off64_t z_off_t #endif +/* provide prototypes for these when building zlib without LFS */ +#if _LARGEFILE64_SOURCE != 1 || _LFS64_LARGEFILE != 1 + ZEXTERN gzFile ZEXPORT gzopen64 OF((const char *, const char *)); + ZEXTERN off_t ZEXPORT gzseek64 OF((gzFile, off_t, int)); + ZEXTERN off_t ZEXPORT gztell64 OF((gzFile)); + ZEXTERN off_t ZEXPORT gzoffset64 OF((gzFile)); + ZEXTERN uLong ZEXPORT adler32_combine64 OF((uLong, uLong, off_t)); + ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, off_t)); +#endif + /* common defaults */ #ifndef OS_CODE @@ -183,12 +180,6 @@ extern const char * const z_errmsg[10]; # define F_OPEN(name, mode) fopen((name), (mode)) #endif -#ifdef _LARGEFILE64_SOURCE -# define F_OPEN64(name, mode) fopen64((name), (mode)) -#else -# define F_OPEN64(name, mode) fopen((name), (mode)) -#endif - /* functions */ #if defined(STDC99) || (defined(__TURBOC__) && __TURBOC__ >= 0x550) From owner-svn-src-vendor@FreeBSD.ORG Wed Mar 31 17:14:33 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 2622F106566B; Wed, 31 Mar 2010 17:14:33 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EF3368FC13; Wed, 31 Mar 2010 17:14:32 +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 o2VHEWba070659; Wed, 31 Mar 2010 17:14:32 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2VHEWfi070658; Wed, 31 Mar 2010 17:14:32 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201003311714.o2VHEWfi070658@svn.freebsd.org> From: Xin LI Date: Wed, 31 Mar 2010 17:14:32 +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: r205991 - vendor/libz/1.2.4.1 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: Wed, 31 Mar 2010 17:14:33 -0000 Author: delphij Date: Wed Mar 31 17:14:32 2010 New Revision: 205991 URL: http://svn.freebsd.org/changeset/base/205991 Log: Tag zlib 1.2.4.1. Added: vendor/libz/1.2.4.1/ - copied from r205990, vendor/libz/dist/ From owner-svn-src-vendor@FreeBSD.ORG Thu Apr 1 12:25:41 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 876E6106566B; Thu, 1 Apr 2010 12:25:41 +0000 (UTC) (envelope-from simon@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 730108FC13; Thu, 1 Apr 2010 12:25:41 +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 o31CPfZ6029602; Thu, 1 Apr 2010 12:25:41 GMT (envelope-from simon@svn.freebsd.org) Received: (from simon@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o31CPfPb029573; Thu, 1 Apr 2010 12:25:41 GMT (envelope-from simon@svn.freebsd.org) Message-Id: <201004011225.o31CPfPb029573@svn.freebsd.org> From: "Simon L. Nielsen" Date: Thu, 1 Apr 2010 12:25:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor-crypto MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206035 - in vendor-crypto/openssl/dist: . apps crypto crypto/asn1 crypto/bio crypto/bn crypto/bn/asm crypto/engine crypto/evp crypto/ocsp crypto/rand engines fips ssl X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Apr 2010 12:25:41 -0000 Author: simon Date: Thu Apr 1 12:25:40 2010 New Revision: 206035 URL: http://svn.freebsd.org/changeset/base/206035 Log: Import OpenSSL 0.9.8n. Modified: vendor-crypto/openssl/dist/CHANGES vendor-crypto/openssl/dist/FAQ vendor-crypto/openssl/dist/Makefile vendor-crypto/openssl/dist/NEWS vendor-crypto/openssl/dist/README vendor-crypto/openssl/dist/apps/req.c vendor-crypto/openssl/dist/apps/speed.c vendor-crypto/openssl/dist/config vendor-crypto/openssl/dist/crypto/asn1/a_object.c vendor-crypto/openssl/dist/crypto/bio/bss_file.c vendor-crypto/openssl/dist/crypto/bn/asm/ppc.pl vendor-crypto/openssl/dist/crypto/bn/asm/x86_64-gcc.c vendor-crypto/openssl/dist/crypto/bn/bn_div.c vendor-crypto/openssl/dist/crypto/engine/eng_all.c vendor-crypto/openssl/dist/crypto/engine/eng_cryptodev.c vendor-crypto/openssl/dist/crypto/evp/digest.c vendor-crypto/openssl/dist/crypto/evp/evp_locl.h vendor-crypto/openssl/dist/crypto/evp/names.c vendor-crypto/openssl/dist/crypto/md32_common.h vendor-crypto/openssl/dist/crypto/ocsp/ocsp_prn.c vendor-crypto/openssl/dist/crypto/opensslv.h vendor-crypto/openssl/dist/crypto/rand/rand_win.c vendor-crypto/openssl/dist/engines/e_capi.c vendor-crypto/openssl/dist/engines/e_chil.c vendor-crypto/openssl/dist/fips/Makefile vendor-crypto/openssl/dist/openssl.spec vendor-crypto/openssl/dist/ssl/kssl.c vendor-crypto/openssl/dist/ssl/s3_pkt.c Modified: vendor-crypto/openssl/dist/CHANGES ============================================================================== --- vendor-crypto/openssl/dist/CHANGES Thu Apr 1 12:18:44 2010 (r206034) +++ vendor-crypto/openssl/dist/CHANGES Thu Apr 1 12:25:40 2010 (r206035) @@ -2,6 +2,21 @@ OpenSSL CHANGES _______________ + Changes between 0.9.8m and 0.9.8n [24 Mar 2010] + + *) When rejecting SSL/TLS records due to an incorrect version number, never + update s->server with a new major version number. As of + - OpenSSL 0.9.8m if 'short' is a 16-bit type, + - OpenSSL 0.9.8f if 'short' is longer than 16 bits, + the previous behavior could result in a read attempt at NULL when + receiving specific incorrect SSL/TLS records once record payload + protection is active. (CVE-2010-0740) + [Bodo Moeller, Adam Langley ] + + *) Fix for CVE-2010-0433 where some kerberos enabled versions of OpenSSL + could be crashed if the relevant tables were not present (e.g. chrooted). + [Tomas Hoger ] + Changes between 0.9.8l and 0.9.8m [25 Feb 2010] *) Always check bn_wexpend() return values for failure. (CVE-2009-3245) Modified: vendor-crypto/openssl/dist/FAQ ============================================================================== --- vendor-crypto/openssl/dist/FAQ Thu Apr 1 12:18:44 2010 (r206034) +++ vendor-crypto/openssl/dist/FAQ Thu Apr 1 12:25:40 2010 (r206035) @@ -78,7 +78,7 @@ OpenSSL - Frequently Asked Questions * Which is the current version of OpenSSL? The current version is available from . -OpenSSL 0.9.8m was released on Feb 25th, 2010. +OpenSSL 0.9.8n was released on Mar 24th, 2010. In addition to the current stable release, you can also access daily snapshots of the OpenSSL development version at value,def,value,nid,n_min,n_max, chtype)) Modified: vendor-crypto/openssl/dist/apps/speed.c ============================================================================== --- vendor-crypto/openssl/dist/apps/speed.c Thu Apr 1 12:18:44 2010 (r206034) +++ vendor-crypto/openssl/dist/apps/speed.c Thu Apr 1 12:25:40 2010 (r206035) @@ -254,12 +254,18 @@ # endif #endif -#if defined(OPENSSL_SYS_VMS) || defined(OPENSSL_SYS_WINDOWS) || defined(OPENSSL_SYS_MACINTOSH_CLASSIC) || defined(OPENSSL_SYS_OS2) || defined(OPENSSL_SYS_NETWARE) -# define NO_FORK 1 -#elif HAVE_FORK +#ifndef HAVE_FORK +# if defined(OPENSSL_SYS_VMS) || defined(OPENSSL_SYS_WINDOWS) || defined(OPENSSL_SYS_MACINTOSH_CLASSIC) || defined(OPENSSL_SYS_OS2) || defined(OPENSSL_SYS_NETWARE) +# define HAVE_FORK 0 +# else +# define HAVE_FORK 1 +# endif +#endif + +#if HAVE_FORK # undef NO_FORK #else -# define NO_FORK 1 +# define NO_FORK #endif #undef BUFSIZE Modified: vendor-crypto/openssl/dist/config ============================================================================== --- vendor-crypto/openssl/dist/config Thu Apr 1 12:18:44 2010 (r206034) +++ vendor-crypto/openssl/dist/config Thu Apr 1 12:25:40 2010 (r206035) @@ -741,6 +741,10 @@ case "$GUESSOS" in OBJECT_MODE=${OBJECT_MODE:-32} if [ "$CC" = "gcc" ]; then OUT="aix-gcc" + if [ $OBJECT_MODE -eq 64 ]; then + echo 'Your $OBJECT_MODE was found to be set to 64' + OUT="aix64-gcc" + fi elif [ $OBJECT_MODE -eq 64 ]; then echo 'Your $OBJECT_MODE was found to be set to 64' OUT="aix64-cc" Modified: vendor-crypto/openssl/dist/crypto/asn1/a_object.c ============================================================================== --- vendor-crypto/openssl/dist/crypto/asn1/a_object.c Thu Apr 1 12:18:44 2010 (r206034) +++ vendor-crypto/openssl/dist/crypto/asn1/a_object.c Thu Apr 1 12:25:40 2010 (r206035) @@ -291,12 +291,12 @@ ASN1_OBJECT *c2i_ASN1_OBJECT(ASN1_OBJECT ASN1_OBJECT *ret=NULL; const unsigned char *p; int i; - /* Sanity check OID encoding: can't have 0x80 in subidentifiers, see: - * X.690 8.19.2 + /* Sanity check OID encoding: can't have leading 0x80 in + * subidentifiers, see: X.690 8.19.2 */ for (i = 0, p = *pp + 1; i < len - 1; i++, p++) { - if (*p == 0x80) + if (*p == 0x80 && (!i || !(p[-1] & 0x80))) { ASN1err(ASN1_F_C2I_ASN1_OBJECT,ASN1_R_INVALID_OBJECT_ENCODING); return NULL; Modified: vendor-crypto/openssl/dist/crypto/bio/bss_file.c ============================================================================== --- vendor-crypto/openssl/dist/crypto/bio/bss_file.c Thu Apr 1 12:18:44 2010 (r206034) +++ vendor-crypto/openssl/dist/crypto/bio/bss_file.c Thu Apr 1 12:25:40 2010 (r206035) @@ -272,9 +272,9 @@ static long MS_CALLBACK file_ctrl(BIO *b BIO_clear_flags(b,BIO_FLAGS_UPLINK); #endif #endif -#ifdef UP_fsetmode +#ifdef UP_fsetmod if (b->flags&BIO_FLAGS_UPLINK) - UP_fsetmode(b->ptr,num&BIO_FP_TEXT?'t':'b'); + UP_fsetmod(b->ptr,(char)((num&BIO_FP_TEXT)?'t':'b')); else #endif { Modified: vendor-crypto/openssl/dist/crypto/bn/asm/ppc.pl ============================================================================== --- vendor-crypto/openssl/dist/crypto/bn/asm/ppc.pl Thu Apr 1 12:18:44 2010 (r206034) +++ vendor-crypto/openssl/dist/crypto/bn/asm/ppc.pl Thu Apr 1 12:25:40 2010 (r206035) @@ -2074,5 +2074,7 @@ EOF $data =~ s/^(\s*)cmplw(\s+)([^,]+),(.*)/$1cmpl$2$3,0,$4/gm; # assembler X doesn't accept li, load immediate value #$data =~ s/^(\s*)li(\s+)([^,]+),(.*)/$1addi$2$3,0,$4/gm; + # assembler Y chokes on apostrophes in comments + $data =~ s/'//gm; return($data); } Modified: vendor-crypto/openssl/dist/crypto/bn/asm/x86_64-gcc.c ============================================================================== --- vendor-crypto/openssl/dist/crypto/bn/asm/x86_64-gcc.c Thu Apr 1 12:18:44 2010 (r206034) +++ vendor-crypto/openssl/dist/crypto/bn/asm/x86_64-gcc.c Thu Apr 1 12:25:40 2010 (r206035) @@ -59,6 +59,7 @@ #undef mul #undef mul_add +#undef sqr /* * "m"(a), "+m"(r) is the way to favor DirectPath µ-code; Modified: vendor-crypto/openssl/dist/crypto/bn/bn_div.c ============================================================================== --- vendor-crypto/openssl/dist/crypto/bn/bn_div.c Thu Apr 1 12:18:44 2010 (r206034) +++ vendor-crypto/openssl/dist/crypto/bn/bn_div.c Thu Apr 1 12:25:40 2010 (r206035) @@ -337,7 +337,10 @@ X) -> 0x%08X\n", t2 -= d1; } #else /* !BN_LLONG */ - BN_ULONG t2l,t2h,ql,qh; + BN_ULONG t2l,t2h; +#if !defined(BN_UMULT_LOHI) && !defined(BN_UMULT_HIGH) + BN_ULONG ql,qh; +#endif q=bn_div_words(n0,n1,d0); #ifdef BN_DEBUG_LEVITTE @@ -561,7 +564,10 @@ X) -> 0x%08X\n", t2 -= d1; } #else /* !BN_LLONG */ - BN_ULONG t2l,t2h,ql,qh; + BN_ULONG t2l,t2h; +#if !defined(BN_UMULT_LOHI) && !defined(BN_UMULT_HIGH) + BN_ULONG ql,qh; +#endif q=bn_div_words(n0,n1,d0); #ifdef BN_DEBUG_LEVITTE Modified: vendor-crypto/openssl/dist/crypto/engine/eng_all.c ============================================================================== --- vendor-crypto/openssl/dist/crypto/engine/eng_all.c Thu Apr 1 12:18:44 2010 (r206034) +++ vendor-crypto/openssl/dist/crypto/engine/eng_all.c Thu Apr 1 12:25:40 2010 (r206035) @@ -104,7 +104,7 @@ void ENGINE_load_builtin_engines(void) #endif #endif #ifndef OPENSSL_NO_HW -#if defined(__OpenBSD__) || defined(__FreeBSD__) +#if defined(__OpenBSD__) || defined(__FreeBSD__) || defined(HAVE_CRYPTODEV) ENGINE_load_cryptodev(); #endif #if defined(OPENSSL_SYS_WIN32) && !defined(OPENSSL_NO_CAPIENG) Modified: vendor-crypto/openssl/dist/crypto/engine/eng_cryptodev.c ============================================================================== --- vendor-crypto/openssl/dist/crypto/engine/eng_cryptodev.c Thu Apr 1 12:18:44 2010 (r206034) +++ vendor-crypto/openssl/dist/crypto/engine/eng_cryptodev.c Thu Apr 1 12:25:40 2010 (r206035) @@ -755,10 +755,18 @@ cryptodev_bn_mod_exp(BIGNUM *r, const BI goto err; kop.crk_iparams = 3; - if (cryptodev_asym(&kop, BN_num_bytes(m), r, 0, NULL) == -1) { + if (cryptodev_asym(&kop, BN_num_bytes(m), r, 0, NULL)) { const RSA_METHOD *meth = RSA_PKCS1_SSLeay(); + printf("OCF asym process failed, Running in software\n"); + ret = meth->bn_mod_exp(r, a, p, m, ctx, in_mont); + + } else if (ECANCELED == kop.crk_status) { + const RSA_METHOD *meth = RSA_PKCS1_SSLeay(); + printf("OCF hardware operation cancelled. Running in Software\n"); ret = meth->bn_mod_exp(r, a, p, m, ctx, in_mont); } + /* else cryptodev operation worked ok ==> ret = 1*/ + err: zapparams(&kop); return (ret); @@ -801,10 +809,18 @@ cryptodev_rsa_mod_exp(BIGNUM *r0, const goto err; kop.crk_iparams = 6; - if (cryptodev_asym(&kop, BN_num_bytes(rsa->n), r0, 0, NULL) == -1) { + if (cryptodev_asym(&kop, BN_num_bytes(rsa->n), r0, 0, NULL)) { const RSA_METHOD *meth = RSA_PKCS1_SSLeay(); + printf("OCF asym process failed, running in Software\n"); + ret = (*meth->rsa_mod_exp)(r0, I, rsa, ctx); + + } else if (ECANCELED == kop.crk_status) { + const RSA_METHOD *meth = RSA_PKCS1_SSLeay(); + printf("OCF hardware operation cancelled. Running in Software\n"); ret = (*meth->rsa_mod_exp)(r0, I, rsa, ctx); } + /* else cryptodev operation worked ok ==> ret = 1*/ + err: zapparams(&kop); return (ret); @@ -940,7 +956,8 @@ cryptodev_dsa_verify(const unsigned char kop.crk_iparams = 7; if (cryptodev_asym(&kop, 0, NULL, 0, NULL) == 0) { - dsaret = kop.crk_status; +/*OCF success value is 0, if not zero, change dsaret to fail*/ + if(0 != kop.crk_status) dsaret = 0; } else { const DSA_METHOD *meth = DSA_OpenSSL(); Modified: vendor-crypto/openssl/dist/crypto/evp/digest.c ============================================================================== --- vendor-crypto/openssl/dist/crypto/evp/digest.c Thu Apr 1 12:18:44 2010 (r206034) +++ vendor-crypto/openssl/dist/crypto/evp/digest.c Thu Apr 1 12:25:40 2010 (r206035) @@ -235,6 +235,7 @@ static int do_evp_md_engine(EVP_MD_CTX * { /* Same comment from evp_enc.c */ EVPerr(EVP_F_DO_EVP_MD_ENGINE,EVP_R_INITIALIZATION_ERROR); + ENGINE_finish(impl); return 0; } /* We'll use the ENGINE's private digest definition */ Modified: vendor-crypto/openssl/dist/crypto/evp/evp_locl.h ============================================================================== --- vendor-crypto/openssl/dist/crypto/evp/evp_locl.h Thu Apr 1 12:18:44 2010 (r206034) +++ vendor-crypto/openssl/dist/crypto/evp/evp_locl.h Thu Apr 1 12:25:40 2010 (r206035) @@ -127,9 +127,9 @@ BLOCK_CIPHER_def1(cname, cbc, cbc, CBC, #define BLOCK_CIPHER_def_cfb(cname, kstruct, nid, key_len, \ iv_len, cbits, flags, init_key, cleanup, \ set_asn1, get_asn1, ctrl) \ -BLOCK_CIPHER_def1(cname, cfb##cbits, cfb##cbits, CFB, kstruct, nid, \ - (cbits + 7)/8, key_len, iv_len, \ - flags, init_key, cleanup, set_asn1, get_asn1, ctrl) +BLOCK_CIPHER_def1(cname, cfb##cbits, cfb##cbits, CFB, kstruct, nid, 1, \ + key_len, iv_len, flags, init_key, cleanup, set_asn1, \ + get_asn1, ctrl) #define BLOCK_CIPHER_def_ofb(cname, kstruct, nid, key_len, \ iv_len, cbits, flags, init_key, cleanup, \ Modified: vendor-crypto/openssl/dist/crypto/evp/names.c ============================================================================== --- vendor-crypto/openssl/dist/crypto/evp/names.c Thu Apr 1 12:18:44 2010 (r206034) +++ vendor-crypto/openssl/dist/crypto/evp/names.c Thu Apr 1 12:25:40 2010 (r206035) @@ -90,7 +90,7 @@ int EVP_add_digest(const EVP_MD *md) r=OBJ_NAME_add(OBJ_nid2ln(md->type),OBJ_NAME_TYPE_MD_METH,(const char *)md); if (r == 0) return(0); - if (md->type != md->pkey_type) + if (md->pkey_type && md->type != md->pkey_type) { r=OBJ_NAME_add(OBJ_nid2sn(md->pkey_type), OBJ_NAME_TYPE_MD_METH|OBJ_NAME_ALIAS,name); Modified: vendor-crypto/openssl/dist/crypto/md32_common.h ============================================================================== --- vendor-crypto/openssl/dist/crypto/md32_common.h Thu Apr 1 12:18:44 2010 (r206034) +++ vendor-crypto/openssl/dist/crypto/md32_common.h Thu Apr 1 12:25:40 2010 (r206035) @@ -241,11 +241,11 @@ #ifndef PEDANTIC # if defined(__GNUC__) && __GNUC__>=2 && !defined(OPENSSL_NO_ASM) && !defined(OPENSSL_NO_INLINE_ASM) # if defined(__s390x__) -# define HOST_c2l(c,l) ({ asm ("lrv %0,0(%1)" \ - :"=r"(l) : "r"(c)); \ +# define HOST_c2l(c,l) ({ asm ("lrv %0,%1" \ + :"=d"(l) :"m"(*(const unsigned int *)(c));\ (c)+=4; (l); }) -# define HOST_l2c(l,c) ({ asm ("strv %0,0(%1)" \ - : : "r"(l),"r"(c) : "memory"); \ +# define HOST_l2c(l,c) ({ asm ("strv %1,%0" \ + :"=m"(*(unsigned int *)(c)) :"d"(l));\ (c)+=4; (l); }) # endif # endif Modified: vendor-crypto/openssl/dist/crypto/ocsp/ocsp_prn.c ============================================================================== --- vendor-crypto/openssl/dist/crypto/ocsp/ocsp_prn.c Thu Apr 1 12:18:44 2010 (r206034) +++ vendor-crypto/openssl/dist/crypto/ocsp/ocsp_prn.c Thu Apr 1 12:25:40 2010 (r206035) @@ -275,6 +275,7 @@ int OCSP_RESPONSE_print(BIO *bp, OCSP_RE } if (!X509V3_extensions_print(bp, "Response Extensions", rd->responseExtensions, flags, 4)) + goto err; if(X509_signature_print(bp, br->signatureAlgorithm, br->signature) <= 0) goto err; Modified: vendor-crypto/openssl/dist/crypto/opensslv.h ============================================================================== --- vendor-crypto/openssl/dist/crypto/opensslv.h Thu Apr 1 12:18:44 2010 (r206034) +++ vendor-crypto/openssl/dist/crypto/opensslv.h Thu Apr 1 12:25:40 2010 (r206035) @@ -25,11 +25,11 @@ * (Prior to 0.9.5a beta1, a different scheme was used: MMNNFFRBB for * major minor fix final patch/beta) */ -#define OPENSSL_VERSION_NUMBER 0x009080dfL +#define OPENSSL_VERSION_NUMBER 0x009080efL #ifdef OPENSSL_FIPS -#define OPENSSL_VERSION_TEXT "OpenSSL 0.9.8m-fips 25 Feb 2010" +#define OPENSSL_VERSION_TEXT "OpenSSL 0.9.8n-fips 24 Mar 2010" #else -#define OPENSSL_VERSION_TEXT "OpenSSL 0.9.8m 25 Feb 2010" +#define OPENSSL_VERSION_TEXT "OpenSSL 0.9.8n 24 Mar 2010" #endif #define OPENSSL_VERSION_PTEXT " part of " OPENSSL_VERSION_TEXT Modified: vendor-crypto/openssl/dist/crypto/rand/rand_win.c ============================================================================== --- vendor-crypto/openssl/dist/crypto/rand/rand_win.c Thu Apr 1 12:18:44 2010 (r206034) +++ vendor-crypto/openssl/dist/crypto/rand/rand_win.c Thu Apr 1 12:25:40 2010 (r206035) @@ -750,7 +750,7 @@ static void readscreen(void) int y; /* y-coordinate of screen lines to grab */ int n = 16; /* number of screen lines to grab at a time */ - if (GetVersion() >= 0x80000000 || !OPENSSL_isservice()) + if (GetVersion() < 0x80000000 && OPENSSL_isservice()>0) return; /* Create a screen DC and a memory DC compatible to screen DC */ Modified: vendor-crypto/openssl/dist/engines/e_capi.c ============================================================================== --- vendor-crypto/openssl/dist/engines/e_capi.c Thu Apr 1 12:18:44 2010 (r206034) +++ vendor-crypto/openssl/dist/engines/e_capi.c Thu Apr 1 12:25:40 2010 (r206035) @@ -83,6 +83,10 @@ #define CERT_STORE_CREATE_NEW_FLAG 0x00002000 #endif +#ifndef CERT_SYSTEM_STORE_CURRENT_USER +#define CERT_SYSTEM_STORE_CURRENT_USER 0x00010000 +#endif + #include #include #include Modified: vendor-crypto/openssl/dist/engines/e_chil.c ============================================================================== --- vendor-crypto/openssl/dist/engines/e_chil.c Thu Apr 1 12:18:44 2010 (r206034) +++ vendor-crypto/openssl/dist/engines/e_chil.c Thu Apr 1 12:25:40 2010 (r206035) @@ -1204,6 +1204,11 @@ static int hwcrhk_get_pass(const char *p pem_password_cb *callback = NULL; void *callback_data = NULL; UI_METHOD *ui_method = NULL; + /* Despite what the documentation says prompt_info can be + * an empty string. + */ + if (prompt_info && !*prompt_info) + prompt_info = NULL; if (cactx) { @@ -1305,8 +1310,10 @@ static int hwcrhk_insert_card(const char { char answer; char buf[BUFSIZ]; - - if (wrong_info) + /* Despite what the documentation says wrong_info can be + * an empty string. + */ + if (wrong_info && *wrong_info) BIO_snprintf(buf, sizeof(buf)-1, "Current card: \"%s\"\n", wrong_info); ok = UI_dup_info_string(ui, buf); Modified: vendor-crypto/openssl/dist/fips/Makefile ============================================================================== --- vendor-crypto/openssl/dist/fips/Makefile Thu Apr 1 12:18:44 2010 (r206034) +++ vendor-crypto/openssl/dist/fips/Makefile Thu Apr 1 12:25:40 2010 (r206035) @@ -123,7 +123,7 @@ fips_premain_dso$(EXE_EXT): fips_premain $(FIPSLIBDIR)fipscanister.o ../libcrypto.a $(EX_LIBS) # this is executed only when linking with external fipscanister.o fips_standalone_sha1$(EXE_EXT): sha/fips_standalone_sha1.c - if [ -z $(HOSTCC) ] ; then \ + if [ -z "$(HOSTCC)" ] ; then \ $(CC) $(CFLAGS) -DFIPSCANISTER_O -o $@ sha/fips_standalone_sha1.c $(FIPSLIBDIR)fipscanister.o $(EX_LIBS) ; \ else \ $(HOSTCC) $(HOSTCFLAGS) -o $ $@ -I../include -I../crypto sha/fips_standalone_sha1.c ../crypto/sha/sha1dgst.c ; \ Modified: vendor-crypto/openssl/dist/openssl.spec ============================================================================== --- vendor-crypto/openssl/dist/openssl.spec Thu Apr 1 12:18:44 2010 (r206034) +++ vendor-crypto/openssl/dist/openssl.spec Thu Apr 1 12:25:40 2010 (r206035) @@ -2,7 +2,7 @@ %define libmaj 0 %define libmin 9 %define librel 8 -%define librev m +%define librev n Release: 1 %define openssldir /var/ssl Modified: vendor-crypto/openssl/dist/ssl/kssl.c ============================================================================== --- vendor-crypto/openssl/dist/ssl/kssl.c Thu Apr 1 12:18:44 2010 (r206034) +++ vendor-crypto/openssl/dist/ssl/kssl.c Thu Apr 1 12:25:40 2010 (r206035) @@ -1802,6 +1802,9 @@ kssl_ctx_show(KSSL_CTX *kssl_ctx) kssl_ctx->service_name ? kssl_ctx->service_name: KRB5SVC, KRB5_NT_SRV_HST, &princ); + if (krb5rc) + goto exit; + krb5rc = krb5_kt_get_entry(krb5context, krb5keytab, princ, 0 /* IGNORE_VNO */, Modified: vendor-crypto/openssl/dist/ssl/s3_pkt.c ============================================================================== --- vendor-crypto/openssl/dist/ssl/s3_pkt.c Thu Apr 1 12:18:44 2010 (r206034) +++ vendor-crypto/openssl/dist/ssl/s3_pkt.c Thu Apr 1 12:25:40 2010 (r206035) @@ -291,9 +291,9 @@ again: if (version != s->version) { SSLerr(SSL_F_SSL3_GET_RECORD,SSL_R_WRONG_VERSION_NUMBER); - /* Send back error using their - * version number :-) */ - s->version=version; + if ((s->version & 0xFF00) == (version & 0xFF00)) + /* Send back error using their minor version number :-) */ + s->version = (unsigned short)version; al=SSL_AD_PROTOCOL_VERSION; goto f_err; } From owner-svn-src-vendor@FreeBSD.ORG Thu Apr 1 12:26:33 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 1DE57106566B; Thu, 1 Apr 2010 12:26:33 +0000 (UTC) (envelope-from simon@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E6EF18FC15; Thu, 1 Apr 2010 12:26:32 +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 o31CQWku029877; Thu, 1 Apr 2010 12:26:32 GMT (envelope-from simon@svn.freebsd.org) Received: (from simon@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o31CQWuP029876; Thu, 1 Apr 2010 12:26:32 GMT (envelope-from simon@svn.freebsd.org) Message-Id: <201004011226.o31CQWuP029876@svn.freebsd.org> From: "Simon L. Nielsen" Date: Thu, 1 Apr 2010 12:26:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor-crypto MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206037 - vendor-crypto/openssl/0.9.8n X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Apr 2010 12:26:33 -0000 Author: simon Date: Thu Apr 1 12:26:32 2010 New Revision: 206037 URL: http://svn.freebsd.org/changeset/base/206037 Log: Tag OpenSSL 0.9.8n. Added: vendor-crypto/openssl/0.9.8n/ - copied from r206035, vendor-crypto/openssl/dist/ From owner-svn-src-vendor@FreeBSD.ORG Fri Apr 2 08:54:31 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 79B991065670; Fri, 2 Apr 2010 08:54:31 +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 63B1A8FC14; Fri, 2 Apr 2010 08:54:31 +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 o328sV6p006012; Fri, 2 Apr 2010 08:54:31 GMT (envelope-from rdivacky@svn.freebsd.org) Received: (from rdivacky@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o328sUQh005984; Fri, 2 Apr 2010 08:54:30 GMT (envelope-from rdivacky@svn.freebsd.org) Message-Id: <201004020854.o328sUQh005984@svn.freebsd.org> From: Roman Divacky Date: Fri, 2 Apr 2010 08:54:30 +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: r206083 - in vendor/llvm/dist: . autoconf docs docs/tutorial examples/OCaml-Kaleidoscope/Chapter6 examples/OCaml-Kaleidoscope/Chapter7 include/llvm include/llvm/ADT include/llvm/Analysi... 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: Fri, 02 Apr 2010 08:54:31 -0000 Author: rdivacky Date: Fri Apr 2 08:54:30 2010 New Revision: 206083 URL: http://svn.freebsd.org/changeset/base/206083 Log: Update LLVM to r100181. Added: vendor/llvm/dist/lib/Target/X86/SSEDomainFix.cpp vendor/llvm/dist/lib/VMCore/DebugLoc.cpp vendor/llvm/dist/lib/VMCore/LLVMContextImpl.cpp vendor/llvm/dist/test/Bitcode/sse41_pmulld.ll vendor/llvm/dist/test/Bitcode/sse41_pmulld.ll.bc (contents, props changed) vendor/llvm/dist/test/CodeGen/CellSPU/bigstack.ll vendor/llvm/dist/test/CodeGen/Generic/2010-ZeroSizedArg.ll vendor/llvm/dist/test/CodeGen/PowerPC/2010-04-01-MachineCSEBug.ll vendor/llvm/dist/test/CodeGen/X86/pmulld.ll vendor/llvm/dist/test/CodeGen/X86/vec_insert-4.ll vendor/llvm/dist/test/CodeGen/X86/vec_insert-9.ll vendor/llvm/dist/test/DebugInfo/2010-03-22-CU-HighLow.ll vendor/llvm/dist/test/DebugInfo/2010-03-24-MemberFn.ll vendor/llvm/dist/test/DebugInfo/2010-03-30-InvalidDbgInfoCrash.ll vendor/llvm/dist/test/FrontendC++/2010-03-22-empty-baseclass.cpp vendor/llvm/dist/test/TableGen/2010-03-24-PrematureDefaults.td vendor/llvm/dist/test/Transforms/GVN/2010-03-31-RedundantPHIs.ll vendor/llvm/dist/test/Transforms/Inline/noinline.ll vendor/llvm/dist/test/Transforms/SimplifyCFG/2010-03-30-InvokeCrash.ll vendor/llvm/dist/utils/lit/lit/LitTestCase.py Deleted: vendor/llvm/dist/test/CodeGen/X86/vec_insert_4.ll Modified: vendor/llvm/dist/Makefile vendor/llvm/dist/autoconf/configure.ac vendor/llvm/dist/configure vendor/llvm/dist/docs/CodeGenerator.html vendor/llvm/dist/docs/ProgrammersManual.html vendor/llvm/dist/docs/ReleaseNotes.html vendor/llvm/dist/docs/SourceLevelDebugging.html vendor/llvm/dist/docs/TableGenFundamentals.html vendor/llvm/dist/docs/tutorial/OCamlLangImpl6.html vendor/llvm/dist/docs/tutorial/OCamlLangImpl7.html vendor/llvm/dist/examples/OCaml-Kaleidoscope/Chapter6/myocamlbuild.ml vendor/llvm/dist/examples/OCaml-Kaleidoscope/Chapter7/myocamlbuild.ml vendor/llvm/dist/include/llvm/ADT/PointerUnion.h vendor/llvm/dist/include/llvm/ADT/SmallVector.h vendor/llvm/dist/include/llvm/ADT/Statistic.h vendor/llvm/dist/include/llvm/ADT/StringMap.h vendor/llvm/dist/include/llvm/Analysis/DebugInfo.h vendor/llvm/dist/include/llvm/Analysis/Dominators.h vendor/llvm/dist/include/llvm/CodeGen/AsmPrinter.h vendor/llvm/dist/include/llvm/CodeGen/DwarfWriter.h vendor/llvm/dist/include/llvm/CodeGen/LiveInterval.h vendor/llvm/dist/include/llvm/CodeGen/LiveIntervalAnalysis.h vendor/llvm/dist/include/llvm/CodeGen/LiveStackAnalysis.h vendor/llvm/dist/include/llvm/CodeGen/MachineOperand.h vendor/llvm/dist/include/llvm/CodeGen/RuntimeLibcalls.h vendor/llvm/dist/include/llvm/CodeGen/SelectionDAG.h vendor/llvm/dist/include/llvm/CodeGen/SelectionDAGISel.h vendor/llvm/dist/include/llvm/CodeGen/SelectionDAGNodes.h vendor/llvm/dist/include/llvm/Function.h vendor/llvm/dist/include/llvm/InlineAsm.h vendor/llvm/dist/include/llvm/Instruction.h vendor/llvm/dist/include/llvm/Instructions.h vendor/llvm/dist/include/llvm/Intrinsics.td vendor/llvm/dist/include/llvm/IntrinsicsARM.td vendor/llvm/dist/include/llvm/IntrinsicsPowerPC.td vendor/llvm/dist/include/llvm/IntrinsicsX86.td vendor/llvm/dist/include/llvm/LLVMContext.h vendor/llvm/dist/include/llvm/MC/MCAsmLayout.h vendor/llvm/dist/include/llvm/MC/MCAssembler.h vendor/llvm/dist/include/llvm/MC/MCContext.h vendor/llvm/dist/include/llvm/MC/MCExpr.h vendor/llvm/dist/include/llvm/MC/MCInst.h vendor/llvm/dist/include/llvm/MC/MCObjectWriter.h vendor/llvm/dist/include/llvm/MC/MCSection.h vendor/llvm/dist/include/llvm/MC/MCStreamer.h vendor/llvm/dist/include/llvm/MC/MachObjectWriter.h vendor/llvm/dist/include/llvm/PassManagers.h vendor/llvm/dist/include/llvm/Support/Allocator.h vendor/llvm/dist/include/llvm/Support/CFG.h vendor/llvm/dist/include/llvm/Support/CallSite.h vendor/llvm/dist/include/llvm/Support/Casting.h vendor/llvm/dist/include/llvm/Support/DebugLoc.h vendor/llvm/dist/include/llvm/Support/FileUtilities.h vendor/llvm/dist/include/llvm/Support/IRBuilder.h vendor/llvm/dist/include/llvm/Support/MathExtras.h vendor/llvm/dist/include/llvm/Support/Timer.h vendor/llvm/dist/include/llvm/Support/ValueHandle.h vendor/llvm/dist/include/llvm/Support/raw_ostream.h vendor/llvm/dist/include/llvm/System/Memory.h vendor/llvm/dist/include/llvm/Target/TargetAsmBackend.h vendor/llvm/dist/include/llvm/Target/TargetInstrDesc.h vendor/llvm/dist/include/llvm/Target/TargetLowering.h vendor/llvm/dist/include/llvm/Target/TargetMachine.h vendor/llvm/dist/include/llvm/Target/TargetSelectionDAG.td vendor/llvm/dist/include/llvm/Transforms/Utils/BuildLibCalls.h vendor/llvm/dist/include/llvm/Transforms/Utils/SSAUpdater.h vendor/llvm/dist/include/llvm/Type.h vendor/llvm/dist/include/llvm/Value.h vendor/llvm/dist/lib/Analysis/CaptureTracking.cpp vendor/llvm/dist/lib/Analysis/DebugInfo.cpp vendor/llvm/dist/lib/Analysis/IPA/CallGraphSCCPass.cpp vendor/llvm/dist/lib/Analysis/IPA/GlobalsModRef.cpp vendor/llvm/dist/lib/Analysis/InlineCost.cpp vendor/llvm/dist/lib/Analysis/LiveValues.cpp vendor/llvm/dist/lib/Analysis/LoopPass.cpp vendor/llvm/dist/lib/Analysis/MemoryBuiltins.cpp vendor/llvm/dist/lib/Analysis/ProfileEstimatorPass.cpp vendor/llvm/dist/lib/Analysis/ProfileInfo.cpp vendor/llvm/dist/lib/Analysis/ProfileInfoLoaderPass.cpp vendor/llvm/dist/lib/Analysis/ProfileVerifierPass.cpp vendor/llvm/dist/lib/Analysis/ScalarEvolutionExpander.cpp vendor/llvm/dist/lib/Archive/ArchiveWriter.cpp vendor/llvm/dist/lib/AsmParser/LLLexer.h vendor/llvm/dist/lib/AsmParser/LLParser.cpp vendor/llvm/dist/lib/AsmParser/LLParser.h vendor/llvm/dist/lib/Bitcode/Reader/BitcodeReader.cpp vendor/llvm/dist/lib/Bitcode/Writer/BitcodeWriter.cpp vendor/llvm/dist/lib/CodeGen/AsmPrinter/AsmPrinter.cpp 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/DwarfPrinter.cpp vendor/llvm/dist/lib/CodeGen/AsmPrinter/DwarfWriter.cpp vendor/llvm/dist/lib/CodeGen/BranchFolding.cpp vendor/llvm/dist/lib/CodeGen/DwarfEHPrepare.cpp vendor/llvm/dist/lib/CodeGen/LiveInterval.cpp vendor/llvm/dist/lib/CodeGen/LiveIntervalAnalysis.cpp vendor/llvm/dist/lib/CodeGen/LiveStackAnalysis.cpp vendor/llvm/dist/lib/CodeGen/LiveVariables.cpp vendor/llvm/dist/lib/CodeGen/MachineBasicBlock.cpp vendor/llvm/dist/lib/CodeGen/MachineCSE.cpp vendor/llvm/dist/lib/CodeGen/MachineFunction.cpp vendor/llvm/dist/lib/CodeGen/MachineModuleInfo.cpp vendor/llvm/dist/lib/CodeGen/OptimizeExts.cpp vendor/llvm/dist/lib/CodeGen/PHIElimination.cpp vendor/llvm/dist/lib/CodeGen/PreAllocSplitting.cpp vendor/llvm/dist/lib/CodeGen/RegAllocLocal.cpp vendor/llvm/dist/lib/CodeGen/ScheduleDAGInstrs.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/DAGCombiner.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/FastISel.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/InstrEmitter.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/InstrEmitter.h vendor/llvm/dist/lib/CodeGen/SelectionDAG/SDNodeDbgValue.h vendor/llvm/dist/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/SelectionDAG.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/TargetLowering.cpp vendor/llvm/dist/lib/CodeGen/SimpleRegisterCoalescing.cpp vendor/llvm/dist/lib/CodeGen/TargetLoweringObjectFileImpl.cpp vendor/llvm/dist/lib/CodeGen/TwoAddressInstructionPass.cpp vendor/llvm/dist/lib/CodeGen/VirtRegRewriter.cpp vendor/llvm/dist/lib/ExecutionEngine/ExecutionEngine.cpp vendor/llvm/dist/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp vendor/llvm/dist/lib/MC/MCAsmStreamer.cpp vendor/llvm/dist/lib/MC/MCAssembler.cpp vendor/llvm/dist/lib/MC/MCContext.cpp vendor/llvm/dist/lib/MC/MCExpr.cpp vendor/llvm/dist/lib/MC/MCInst.cpp vendor/llvm/dist/lib/MC/MCMachOStreamer.cpp vendor/llvm/dist/lib/MC/MCParser/AsmParser.cpp vendor/llvm/dist/lib/MC/MCSection.cpp vendor/llvm/dist/lib/MC/MachObjectWriter.cpp vendor/llvm/dist/lib/Support/APFloat.cpp vendor/llvm/dist/lib/Support/APInt.cpp vendor/llvm/dist/lib/Support/CommandLine.cpp vendor/llvm/dist/lib/Support/Debug.cpp vendor/llvm/dist/lib/Support/ErrorHandling.cpp vendor/llvm/dist/lib/Support/MemoryBuffer.cpp vendor/llvm/dist/lib/Support/Statistic.cpp vendor/llvm/dist/lib/Support/Timer.cpp vendor/llvm/dist/lib/Support/Triple.cpp vendor/llvm/dist/lib/Support/raw_ostream.cpp vendor/llvm/dist/lib/System/Unix/Mutex.inc vendor/llvm/dist/lib/System/Unix/Path.inc vendor/llvm/dist/lib/System/Win32/Program.inc vendor/llvm/dist/lib/System/Win32/Signals.inc vendor/llvm/dist/lib/Target/ARM/ARM.td vendor/llvm/dist/lib/Target/ARM/ARMBaseInstrInfo.cpp vendor/llvm/dist/lib/Target/ARM/ARMISelDAGToDAG.cpp vendor/llvm/dist/lib/Target/ARM/ARMISelLowering.cpp vendor/llvm/dist/lib/Target/ARM/ARMInstrFormats.td vendor/llvm/dist/lib/Target/ARM/ARMInstrInfo.td vendor/llvm/dist/lib/Target/ARM/ARMInstrNEON.td vendor/llvm/dist/lib/Target/ARM/ARMInstrVFP.td vendor/llvm/dist/lib/Target/ARM/ARMLoadStoreOptimizer.cpp vendor/llvm/dist/lib/Target/ARM/ARMSubtarget.cpp vendor/llvm/dist/lib/Target/ARM/ARMSubtarget.h vendor/llvm/dist/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp vendor/llvm/dist/lib/Target/ARM/AsmPrinter/ARMMCInstLower.cpp vendor/llvm/dist/lib/Target/ARM/NEONPreAllocPass.cpp vendor/llvm/dist/lib/Target/ARM/README.txt vendor/llvm/dist/lib/Target/ARM/Thumb1InstrInfo.cpp vendor/llvm/dist/lib/Target/ARM/Thumb2InstrInfo.cpp vendor/llvm/dist/lib/Target/Alpha/AlphaInstrInfo.cpp vendor/llvm/dist/lib/Target/Blackfin/BlackfinInstrInfo.td vendor/llvm/dist/lib/Target/Blackfin/BlackfinIntrinsics.td vendor/llvm/dist/lib/Target/Blackfin/BlackfinRegisterInfo.cpp vendor/llvm/dist/lib/Target/CellSPU/SPU.h vendor/llvm/dist/lib/Target/CellSPU/SPUISelDAGToDAG.cpp vendor/llvm/dist/lib/Target/CellSPU/SPUISelLowering.cpp vendor/llvm/dist/lib/Target/CellSPU/SPUInstrInfo.cpp vendor/llvm/dist/lib/Target/CellSPU/SPUInstrInfo.td vendor/llvm/dist/lib/Target/CellSPU/SPURegisterInfo.cpp vendor/llvm/dist/lib/Target/CellSPU/SPURegisterInfo.h vendor/llvm/dist/lib/Target/MBlaze/MBlazeIntrinsics.td vendor/llvm/dist/lib/Target/MSIL/MSILWriter.cpp vendor/llvm/dist/lib/Target/MSP430/AsmPrinter/MSP430MCInstLower.cpp vendor/llvm/dist/lib/Target/MSP430/MSP430InstrInfo.cpp vendor/llvm/dist/lib/Target/Mangler.cpp vendor/llvm/dist/lib/Target/Mips/MipsInstrFPU.td vendor/llvm/dist/lib/Target/Mips/MipsInstrInfo.cpp vendor/llvm/dist/lib/Target/PIC16/PIC16InstrInfo.cpp vendor/llvm/dist/lib/Target/PIC16/PIC16Section.cpp vendor/llvm/dist/lib/Target/PIC16/PIC16Section.h vendor/llvm/dist/lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp vendor/llvm/dist/lib/Target/PowerPC/PPCBranchSelector.cpp vendor/llvm/dist/lib/Target/PowerPC/PPCISelDAGToDAG.cpp vendor/llvm/dist/lib/Target/PowerPC/PPCISelLowering.cpp vendor/llvm/dist/lib/Target/PowerPC/PPCISelLowering.h vendor/llvm/dist/lib/Target/PowerPC/PPCInstrAltivec.td vendor/llvm/dist/lib/Target/PowerPC/PPCInstrInfo.cpp vendor/llvm/dist/lib/Target/PowerPC/PPCRegisterInfo.cpp vendor/llvm/dist/lib/Target/SystemZ/SystemZInstrFP.td vendor/llvm/dist/lib/Target/SystemZ/SystemZInstrInfo.cpp vendor/llvm/dist/lib/Target/SystemZ/SystemZInstrInfo.td vendor/llvm/dist/lib/Target/X86/AsmPrinter/X86AsmPrinter.cpp vendor/llvm/dist/lib/Target/X86/AsmPrinter/X86MCInstLower.cpp vendor/llvm/dist/lib/Target/X86/CMakeLists.txt vendor/llvm/dist/lib/Target/X86/X86.h vendor/llvm/dist/lib/Target/X86/X86.td vendor/llvm/dist/lib/Target/X86/X86AsmBackend.cpp 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/X86Instr64bit.td vendor/llvm/dist/lib/Target/X86/X86InstrFormats.td vendor/llvm/dist/lib/Target/X86/X86InstrInfo.cpp vendor/llvm/dist/lib/Target/X86/X86InstrInfo.h vendor/llvm/dist/lib/Target/X86/X86InstrInfo.td vendor/llvm/dist/lib/Target/X86/X86InstrMMX.td vendor/llvm/dist/lib/Target/X86/X86InstrSSE.td vendor/llvm/dist/lib/Target/X86/X86Subtarget.cpp vendor/llvm/dist/lib/Target/X86/X86Subtarget.h vendor/llvm/dist/lib/Target/X86/X86TargetMachine.cpp vendor/llvm/dist/lib/Target/X86/X86TargetMachine.h vendor/llvm/dist/lib/Target/XCore/XCoreInstrInfo.cpp vendor/llvm/dist/lib/Target/XCore/XCoreInstrInfo.td vendor/llvm/dist/lib/Transforms/IPO/ArgumentPromotion.cpp vendor/llvm/dist/lib/Transforms/IPO/DeadArgumentElimination.cpp vendor/llvm/dist/lib/Transforms/IPO/GlobalOpt.cpp vendor/llvm/dist/lib/Transforms/IPO/PruneEH.cpp vendor/llvm/dist/lib/Transforms/InstCombine/InstCombineCalls.cpp vendor/llvm/dist/lib/Transforms/Scalar/ABCD.cpp vendor/llvm/dist/lib/Transforms/Scalar/CodeGenPrepare.cpp vendor/llvm/dist/lib/Transforms/Scalar/GVN.cpp vendor/llvm/dist/lib/Transforms/Scalar/IndVarSimplify.cpp vendor/llvm/dist/lib/Transforms/Scalar/LoopStrengthReduce.cpp vendor/llvm/dist/lib/Transforms/Scalar/Reg2Mem.cpp vendor/llvm/dist/lib/Transforms/Scalar/SCCP.cpp vendor/llvm/dist/lib/Transforms/Scalar/SimplifyCFGPass.cpp vendor/llvm/dist/lib/Transforms/Scalar/SimplifyLibCalls.cpp vendor/llvm/dist/lib/Transforms/Utils/AddrModeMatcher.cpp vendor/llvm/dist/lib/Transforms/Utils/BreakCriticalEdges.cpp vendor/llvm/dist/lib/Transforms/Utils/BuildLibCalls.cpp vendor/llvm/dist/lib/Transforms/Utils/LowerInvoke.cpp vendor/llvm/dist/lib/Transforms/Utils/PromoteMemoryToRegister.cpp vendor/llvm/dist/lib/Transforms/Utils/SSAUpdater.cpp vendor/llvm/dist/lib/Transforms/Utils/SimplifyCFG.cpp vendor/llvm/dist/lib/VMCore/AsmWriter.cpp vendor/llvm/dist/lib/VMCore/AutoUpgrade.cpp vendor/llvm/dist/lib/VMCore/CMakeLists.txt vendor/llvm/dist/lib/VMCore/Constants.cpp vendor/llvm/dist/lib/VMCore/ConstantsContext.h vendor/llvm/dist/lib/VMCore/Core.cpp vendor/llvm/dist/lib/VMCore/Function.cpp vendor/llvm/dist/lib/VMCore/Globals.cpp vendor/llvm/dist/lib/VMCore/IRBuilder.cpp vendor/llvm/dist/lib/VMCore/InlineAsm.cpp vendor/llvm/dist/lib/VMCore/Instruction.cpp vendor/llvm/dist/lib/VMCore/Instructions.cpp vendor/llvm/dist/lib/VMCore/LLVMContext.cpp vendor/llvm/dist/lib/VMCore/LLVMContextImpl.h vendor/llvm/dist/lib/VMCore/Metadata.cpp vendor/llvm/dist/lib/VMCore/Module.cpp vendor/llvm/dist/lib/VMCore/PassManager.cpp vendor/llvm/dist/lib/VMCore/Type.cpp vendor/llvm/dist/lib/VMCore/Value.cpp vendor/llvm/dist/lib/VMCore/ValueSymbolTable.cpp vendor/llvm/dist/lib/VMCore/Verifier.cpp vendor/llvm/dist/test/CodeGen/ARM/fabss.ll vendor/llvm/dist/test/CodeGen/ARM/fadds.ll vendor/llvm/dist/test/CodeGen/ARM/fdivs.ll vendor/llvm/dist/test/CodeGen/ARM/fmacs.ll vendor/llvm/dist/test/CodeGen/ARM/fmscs.ll vendor/llvm/dist/test/CodeGen/ARM/fmuls.ll vendor/llvm/dist/test/CodeGen/ARM/fnegs.ll vendor/llvm/dist/test/CodeGen/ARM/fnmacs.ll vendor/llvm/dist/test/CodeGen/ARM/fnmscs.ll vendor/llvm/dist/test/CodeGen/ARM/fp_convert.ll vendor/llvm/dist/test/CodeGen/ARM/fsubs.ll vendor/llvm/dist/test/CodeGen/Generic/addr-label.ll vendor/llvm/dist/test/CodeGen/PIC16/2009-07-17-PR4566-pic16.ll vendor/llvm/dist/test/CodeGen/PIC16/2009-11-20-NewNode.ll vendor/llvm/dist/test/CodeGen/PIC16/C16-15.ll vendor/llvm/dist/test/CodeGen/PIC16/global-in-user-section.ll vendor/llvm/dist/test/CodeGen/PIC16/globals.ll vendor/llvm/dist/test/CodeGen/PIC16/sext.ll vendor/llvm/dist/test/CodeGen/PowerPC/eqv-andc-orc-nor.ll vendor/llvm/dist/test/CodeGen/PowerPC/tango.net.ftp.FtpClient.ll vendor/llvm/dist/test/CodeGen/Thumb2/2009-08-04-CoalescerBug.ll vendor/llvm/dist/test/CodeGen/Thumb2/2009-08-04-ScavengerAssert.ll vendor/llvm/dist/test/CodeGen/Thumb2/2009-08-04-SubregLoweringBug.ll vendor/llvm/dist/test/CodeGen/Thumb2/2009-08-04-SubregLoweringBug2.ll vendor/llvm/dist/test/CodeGen/Thumb2/2009-08-04-SubregLoweringBug3.ll vendor/llvm/dist/test/CodeGen/Thumb2/2009-08-07-NeonFPBug.ll vendor/llvm/dist/test/CodeGen/X86/2007-01-13-StackPtrIndex.ll vendor/llvm/dist/test/CodeGen/X86/2007-04-25-MMX-PADDQ.ll vendor/llvm/dist/test/CodeGen/X86/2009-02-05-CoalescerBug.ll vendor/llvm/dist/test/CodeGen/X86/2009-02-26-MachineLICMBug.ll vendor/llvm/dist/test/CodeGen/X86/2009-11-16-UnfoldMemOpBug.ll vendor/llvm/dist/test/CodeGen/X86/byval7.ll vendor/llvm/dist/test/CodeGen/X86/coalesce-esp.ll vendor/llvm/dist/test/CodeGen/X86/dagcombine-buildvector.ll vendor/llvm/dist/test/CodeGen/X86/gather-addresses.ll vendor/llvm/dist/test/CodeGen/X86/licm-symbol.ll vendor/llvm/dist/test/CodeGen/X86/memcpy-2.ll vendor/llvm/dist/test/CodeGen/X86/memset-2.ll vendor/llvm/dist/test/CodeGen/X86/memset64-on-x86-32.ll vendor/llvm/dist/test/CodeGen/X86/pic.ll vendor/llvm/dist/test/CodeGen/X86/pmul.ll vendor/llvm/dist/test/CodeGen/X86/postalloc-coalescing.ll vendor/llvm/dist/test/CodeGen/X86/pr2659.ll vendor/llvm/dist/test/CodeGen/X86/sibcall.ll vendor/llvm/dist/test/CodeGen/X86/small-byval-memcpy.ll vendor/llvm/dist/test/CodeGen/X86/sse-align-12.ll vendor/llvm/dist/test/CodeGen/X86/sse-align-6.ll vendor/llvm/dist/test/CodeGen/X86/sse3.ll vendor/llvm/dist/test/CodeGen/X86/unaligned-load.ll vendor/llvm/dist/test/CodeGen/X86/vec_compare.ll vendor/llvm/dist/test/CodeGen/X86/vec_return.ll vendor/llvm/dist/test/CodeGen/X86/vec_set.ll vendor/llvm/dist/test/CodeGen/X86/vec_shuffle-7.ll vendor/llvm/dist/test/CodeGen/X86/vec_shuffle-9.ll vendor/llvm/dist/test/CodeGen/X86/vec_shuffle.ll vendor/llvm/dist/test/CodeGen/X86/vec_zero.ll vendor/llvm/dist/test/CodeGen/X86/vec_zero_cse.ll vendor/llvm/dist/test/CodeGen/X86/widen_arith-5.ll vendor/llvm/dist/test/CodeGen/X86/widen_cast-2.ll vendor/llvm/dist/test/CodeGen/X86/widen_load-2.ll vendor/llvm/dist/test/CodeGen/X86/xor-icmp.ll vendor/llvm/dist/test/CodeGen/X86/xor.ll vendor/llvm/dist/test/DebugInfo/2009-11-03-InsertExtractValue.ll vendor/llvm/dist/test/Feature/unions.ll vendor/llvm/dist/test/FrontendObjC/2010-03-17-StructRef.m vendor/llvm/dist/test/MC/AsmParser/X86/x86_32-bit_cat.s vendor/llvm/dist/test/MC/AsmParser/X86/x86_32-encoding.s vendor/llvm/dist/test/MC/MachO/absolutize.s vendor/llvm/dist/test/MC/MachO/darwin-x86_64-reloc.s vendor/llvm/dist/test/Transforms/GVN/rle.ll vendor/llvm/dist/test/Transforms/InstCombine/objsize.ll vendor/llvm/dist/test/Transforms/SimplifyLibCalls/StrCpy.ll vendor/llvm/dist/tools/Makefile vendor/llvm/dist/tools/bugpoint/BugDriver.cpp vendor/llvm/dist/tools/bugpoint/BugDriver.h vendor/llvm/dist/tools/edis/Makefile vendor/llvm/dist/tools/llc/llc.cpp vendor/llvm/dist/tools/llvm-extract/llvm-extract.cpp vendor/llvm/dist/tools/llvm-ld/Optimize.cpp vendor/llvm/dist/tools/llvm-ld/llvm-ld.cpp vendor/llvm/dist/tools/llvm-link/llvm-link.cpp vendor/llvm/dist/tools/llvm-mc/llvm-mc.cpp vendor/llvm/dist/tools/llvmc/plugins/Base/Base.td.in vendor/llvm/dist/tools/lto/LTOCodeGenerator.cpp vendor/llvm/dist/tools/opt/opt.cpp vendor/llvm/dist/unittests/ADT/SmallVectorTest.cpp vendor/llvm/dist/utils/TableGen/CodeGenDAGPatterns.cpp vendor/llvm/dist/utils/TableGen/CodeGenDAGPatterns.h vendor/llvm/dist/utils/TableGen/CodeGenInstruction.cpp vendor/llvm/dist/utils/TableGen/CodeGenInstruction.h vendor/llvm/dist/utils/TableGen/CodeGenTarget.cpp vendor/llvm/dist/utils/TableGen/DAGISelEmitter.cpp vendor/llvm/dist/utils/TableGen/DAGISelMatcher.cpp vendor/llvm/dist/utils/TableGen/DAGISelMatcher.h vendor/llvm/dist/utils/TableGen/DAGISelMatcherEmitter.cpp vendor/llvm/dist/utils/TableGen/DAGISelMatcherGen.cpp vendor/llvm/dist/utils/TableGen/DAGISelMatcherOpt.cpp vendor/llvm/dist/utils/TableGen/FastISelEmitter.cpp vendor/llvm/dist/utils/TableGen/InstrInfoEmitter.cpp vendor/llvm/dist/utils/TableGen/IntrinsicEmitter.cpp vendor/llvm/dist/utils/TableGen/Record.cpp vendor/llvm/dist/utils/TableGen/Record.h vendor/llvm/dist/utils/TableGen/TableGen.cpp vendor/llvm/dist/utils/buildit/build_llvm vendor/llvm/dist/utils/lit/lit/TestFormats.py vendor/llvm/dist/utils/lit/lit/TestRunner.py vendor/llvm/dist/utils/lit/lit/lit.py Modified: vendor/llvm/dist/Makefile ============================================================================== --- vendor/llvm/dist/Makefile Fri Apr 2 06:55:31 2010 (r206082) +++ vendor/llvm/dist/Makefile Fri Apr 2 08:54:30 2010 (r206083) @@ -214,7 +214,7 @@ update: $(SVN) $(SVN-UPDATE-OPTIONS) update $(LLVM_SRC_ROOT) @ $(SVN) status $(LLVM_SRC_ROOT) | $(SUB-SVN-DIRS) | xargs $(SVN) $(SVN-UPDATE-OPTIONS) update -happiness: update all check unittests +happiness: update all check-all .PHONY: srpm rpm update happiness Modified: vendor/llvm/dist/autoconf/configure.ac ============================================================================== --- vendor/llvm/dist/autoconf/configure.ac Fri Apr 2 06:55:31 2010 (r206082) +++ vendor/llvm/dist/autoconf/configure.ac Fri Apr 2 08:54:30 2010 (r206083) @@ -110,6 +110,11 @@ do llvm-tv) AC_CONFIG_SUBDIRS([projects/llvm-tv]) ;; safecode) AC_CONFIG_SUBDIRS([projects/safecode]) ;; llvm-kernel) AC_CONFIG_SUBDIRS([projects/llvm-kernel]) ;; + llvm-gcc) ;; + test-suite) ;; + llvm-test) ;; + poolalloc) ;; + llvm-poolalloc) ;; *) AC_MSG_WARN([Unknown project (${i}) won't be configured automatically]) ;; Modified: vendor/llvm/dist/configure ============================================================================== --- vendor/llvm/dist/configure Fri Apr 2 06:55:31 2010 (r206082) +++ vendor/llvm/dist/configure Fri Apr 2 08:54:30 2010 (r206083) @@ -1999,6 +1999,11 @@ do ;; llvm-kernel) subdirs="$subdirs projects/llvm-kernel" ;; + llvm-gcc) ;; + test-suite) ;; + llvm-test) ;; + poolalloc) ;; + llvm-poolalloc) ;; *) { echo "$as_me:$LINENO: WARNING: Unknown project (${i}) won't be configured automatically" >&5 echo "$as_me: WARNING: Unknown project (${i}) won't be configured automatically" >&2;} @@ -11151,7 +11156,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <The portion of the instruction definition in bold indicates the pattern used to match the instruction. The DAG operators (like fmul/fadd) are defined in - the lib/Target/TargetSelectionDAG.td file. "F4RC" is the - register class of the input and result values.

+ the include/llvm/Target/TargetSelectionDAG.td file. " + F4RC" is the register class of the input and result values.

The TableGen DAG instruction selector generator reads the instruction patterns in the .td file and automatically builds parts of the @@ -2162,7 +2162,7 @@ MOVSX32rm16 -> movsx, 32-bit register Chris Lattner
The LLVM Compiler Infrastructure
- Last modified: $Date: 2010-03-11 01:22:57 +0100 (Thu, 11 Mar 2010) $ + Last modified: $Date: 2010-03-25 01:03:04 +0100 (Thu, 25 Mar 2010) $ Modified: vendor/llvm/dist/docs/ProgrammersManual.html ============================================================================== --- vendor/llvm/dist/docs/ProgrammersManual.html Fri Apr 2 06:55:31 2010 (r206082) +++ vendor/llvm/dist/docs/ProgrammersManual.html Fri Apr 2 08:54:30 2010 (r206083) @@ -1211,14 +1211,14 @@ and erasing, but does not support iterat

-

SmallPtrSet has all the advantages of SmallSet (and a SmallSet of pointers is -transparently implemented with a SmallPtrSet), but also supports iterators. If +

SmallPtrSet has all the advantages of SmallSet (and a SmallSet of pointers is +transparently implemented with a SmallPtrSet), but also supports iterators. If more than 'N' insertions are performed, a single quadratically probed hash table is allocated and grows as needed, providing extremely efficient access (constant time insertion/deleting/queries with low constant factors) and is very stingy with malloc traffic.

-

Note that, unlike std::set, the iterators of SmallPtrSet are invalidated +

Note that, unlike std::set, the iterators of SmallPtrSet are invalidated whenever an insertion occurs. Also, the values visited by the iterators are not visited in sorted order.

@@ -1843,6 +1843,21 @@ void printNextInstruction(Instruction* i
+

Unfortunately, these implicit conversions come at a cost; they prevent +these iterators from conforming to standard iterator conventions, and thus +from being usable with standard algorithms and containers. For example, they +prevent the following code, where B is a BasicBlock, +from compiling:

+ +
+
+  llvm::SmallVector<llvm::Instruction *, 16>(B->begin(), B->end());
+
+
+ +

Because of this, these implicit conversions may be removed some day, +and operator* changed to return a pointer instead of a reference.

+ @@ -1962,7 +1977,11 @@ for (Value::use_iterator i = F->use_b
-

Alternately, it's common to have an instance of the Note that dereferencing a Value::use_iterator is not a very cheap +operation. Instead of performing *i above several times, consider +doing it only once in the loop body and reusing its result.

+ +

Alternatively, it's common to have an instance of the User Class and need to know what Values are used by it. The list of all Values used by a User is known as a use-def chain. Instances of class @@ -1981,10 +2000,13 @@ for (User::op_iterator i = pi->op_beg

- +

Declaring objects as const is an important tool of enforcing +mutation free algorithms (such as analyses, etc.). For this purpose above +iterators come in constant flavors as Value::const_use_iterator +and Value::const_op_iterator. They automatically arise when +calling use/op_begin() on const Value*s or +const User*s respectively. Upon dereferencing, they return +const Use*s. Otherwise the above patterns remain unchanged.

@@ -3058,7 +3080,7 @@ the lib/VMCore directory.

FunctionType
Subclass of DerivedTypes for function types.
    -
  • bool isVarArg() const: Returns true if its a vararg +
  • bool isVarArg() const: Returns true if it's a vararg function
  • const Type * getReturnType() const: Returns the return type of the function.
  • @@ -3276,7 +3298,7 @@ simplifies the representation and makes
    • Value::use_iterator - Typedef for iterator over the use-list
      - Value::use_const_iterator - Typedef for const_iterator over + Value::const_use_iterator - Typedef for const_iterator over the use-list
      unsigned use_size() - Returns the number of users of the value.
      @@ -3921,7 +3943,7 @@ arguments. An argument has a pointer to Dinakar Dhurjati and Chris Lattner
      The LLVM Compiler Infrastructure
      - Last modified: $Date: 2010-02-26 00:51:27 +0100 (Fri, 26 Feb 2010) $ + Last modified: $Date: 2010-04-02 02:08:26 +0200 (Fri, 02 Apr 2010) $ Modified: vendor/llvm/dist/docs/ReleaseNotes.html ============================================================================== --- vendor/llvm/dist/docs/ReleaseNotes.html Fri Apr 2 06:55:31 2010 (r206082) +++ vendor/llvm/dist/docs/ReleaseNotes.html Fri Apr 2 08:54:30 2010 (r206083) @@ -127,8 +127,21 @@ development. Here we include updates on

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

        -
      • ...
      • -include a link to cxx_compatibility.html +
      • FIXME: C++! Include a link to cxx_compatibility.html
      • + +
      • FIXME: Static Analyzer improvements?
      • + +
      • CIndex API and Python bindings: Clang now includes a C API as part of the +CIndex library. Although we make make some changes to the API in the future, it +is intended to be stable and has been designed for use by external projects. See +the Clang +doxygen CIndex +documentation for more details. The CIndex API also includings an preliminary +set of Python bindings.
      • + +
      • ARM Support: Clang now has ABI support for both the Darwin and Linux ARM +ABIs. Coupled with many improvements to the LLVM ARM backend, Clang is now +suitable for use as a a beta quality ARM compiler.
      @@ -162,13 +175,23 @@ implementation of the CLI) using LLVM fo compilation.

      -VMKit version ?? builds with LLVM 2.7 and you can find it on its -web page. The release includes -bug fixes, cleanup and new features. The major changes are:

      +With the release of LLVM 2.7, VMKit has shifted to a great framework for writing +virtual machines. VMKit now offers precise and efficient garbage collection with +multi-threading support, thanks to the MMTk memory management toolkit, as well +as just in time and ahead of time compilation with LLVM. The major changes in +VMKit 0.27 are:

        -
      • ...
      • +
      • Garbage collection: VMKit now uses the MMTk toolkit for garbage collectors. + The first collector to be ported is the MarkSweep collector, which is precise, + and drastically improves the performance of VMKit.
      • +
      • Line number information in the JVM: by using the debug metadata of LLVM, the + JVM now supports precise line number information, useful when printing a stack + trace.
      • +
      • Interface calls in the JVM: we implemented a variant of the Interface Method + Table technique for interface calls in the JVM. +
      @@ -391,6 +414,27 @@ code.--> + + + +
      +

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

      + +

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

      + +
      @@ -439,7 +483,7 @@ New llvm/Support/Regex.h API. FileCheck Many subtle pointer invalidation bugs in Callgraph have been fixed and it now uses asserting value handles. MC Disassembler (with blog post), MCInstPrinter. Many X86 backend and AsmPrinter simplifications Various tools like llc and opt now read either .ll or .bc files as input. -Malloc and free instructions got removed. +Malloc and free instructions got removed, along with LowerAllocations pass. compiler-rt support for ARM. completely llvm-gcc NEON support. Can transcode from GAS to intel syntax with "llvm-mc foo.s -output-asm-variant=1" @@ -456,8 +500,12 @@ x86 sibcall optimization New LSR with full strength reduction mode The most awesome sext / zext optimization pass. ? +The ARM backend now has good support for ARMv4 backend (tested on StrongARM + hardware), previously only supported ARMv4T and newer. + +Defaults to RTTI off, packagers should build with make REQUIRE_RTTI=1. CondProp pass removed (functionality merged into jump threading). AndersAA got removed (from 2.7 or mainline?) PredSimplify, LoopVR, GVNPRE got removed. @@ -978,20 +1026,6 @@ ignored.
    - - - -
    - -

    The Llvm.Linkage module is broken, and has incorrect values. Only -Llvm.Linkage.External, Llvm.Linkage.Available_externally, and -Llvm.Linkage.Link_once will be correct. If you need any of the other linkage -modes, you'll have to write an external C library in order to expose the -functionality. This has been fixed in the trunk.

    -
    -
    Additional Information @@ -1024,7 +1058,7 @@ lists.

    src="http://www.w3.org/Icons/valid-html401-blue" alt="Valid HTML 4.01"> LLVM Compiler Infrastructure
    - Last modified: $Date: 2010-03-19 04:18:05 +0100 (Fri, 19 Mar 2010) $ + Last modified: $Date: 2010-04-01 03:53:24 +0200 (Thu, 01 Apr 2010) $ Modified: vendor/llvm/dist/docs/SourceLevelDebugging.html ============================================================================== --- vendor/llvm/dist/docs/SourceLevelDebugging.html Fri Apr 2 06:55:31 2010 (r206082) +++ vendor/llvm/dist/docs/SourceLevelDebugging.html Fri Apr 2 08:54:30 2010 (r206083) @@ -289,26 +289,25 @@ height="369"> 0x1000.)

    The fields of debug descriptors used internally by LLVM - are restricted to only the simple data types int, uint, - bool, float, double, mdstring and - mdnode.

    + are restricted to only the simple data types i32, i1, + float, double, mdstring and mdnode.

     !1 = metadata !{
    -  uint,   ;; A tag
    +  i32,   ;; A tag
       ...
     }
     

    The first field of a descriptor is always an - uint containing a tag value identifying the content of the + i32 containing a tag value identifying the content of the descriptor. The remaining fields are specific to the descriptor. The values of tags are loosely bound to the tag values of DWARF information entries. However, that does not restrict the use of the information supplied to DWARF targets. To facilitate versioning of debug information, the tag is augmented - with the current debug version (LLVMDebugVersion = 8 << 16 or 0x80000 or + with the current debug version (LLVMDebugVersion = 8 << 16 or 0x80000 or 524288.)

    The details of the various descriptors follow.

    @@ -829,8 +828,8 @@ DW_TAG_return_variable = 258 rules.

    In order to handle this, the LLVM debug format uses the metadata attached to - llvm instructions to encode line nuber and scoping information. Consider the - following C fragment, for example:

    + llvm instructions to encode line number and scoping information. Consider + the following C fragment, for example:

    @@ -1069,6 +1068,18 @@ int main(int argc, char *argv[]) {
     
    +

    llvm::Instruction provides easy access to metadata attached with an +instruction. One can extract line number information encoded in LLVM IR +using Instruction::getMetadata() and +DILocation::getLineNumber(). +

    + if (MDNode *N = I->getMetadata("dbg")) {  // Here I is an LLVM instruction
    +   DILocation Loc(N);                      // DILocation is in DebugInfo.h
    +   unsigned Line = Loc.getLineNumber();
    +   StringRef File = Loc.getFilename();
    +   StringRef Dir = Loc.getDirectory();
    + }
    +
    @@ -1762,7 +1773,7 @@ enum Trees { Chris Lattner
    LLVM Compiler Infrastructure
    - Last modified: $Date: 2010-03-17 16:01:50 +0100 (Wed, 17 Mar 2010) $ + Last modified: $Date: 2010-03-31 09:50:17 +0200 (Wed, 31 Mar 2010) $ Modified: vendor/llvm/dist/docs/TableGenFundamentals.html ============================================================================== --- vendor/llvm/dist/docs/TableGenFundamentals.html Fri Apr 2 06:55:31 2010 (r206082) +++ vendor/llvm/dist/docs/TableGenFundamentals.html Fri Apr 2 08:54:30 2010 (r206083) @@ -768,9 +768,6 @@ patterns:

    an implicitly defined physical register. This tells the dag instruction selection emitter the input pattern's extra definitions matches implicit physical register definitions.
    -
    (parallel (a), (b))
    -
    a list of dags specifying parallel operations which map to the same - instruction.
    @@ -797,7 +794,7 @@ This should highlight the APIs in Ta Chris Lattner
    LLVM Compiler Infrastructure
    - Last modified: $Date: 2010-02-28 00:47:46 +0100 (Sun, 28 Feb 2010) $ + Last modified: $Date: 2010-03-27 03:53:27 +0100 (Sat, 27 Mar 2010) $ Modified: vendor/llvm/dist/docs/tutorial/OCamlLangImpl6.html ============================================================================== --- vendor/llvm/dist/docs/tutorial/OCamlLangImpl6.html Fri Apr 2 06:55:31 2010 (r206082) +++ vendor/llvm/dist/docs/tutorial/OCamlLangImpl6.html Fri Apr 2 08:54:30 2010 (r206083) @@ -821,7 +821,7 @@ ocaml_lib ~extern:true "llvm_executionen ocaml_lib ~extern:true "llvm_target";; ocaml_lib ~extern:true "llvm_scalar_opts";; -flag ["link"; "ocaml"; "g++"] (S[A"-cc"; A"g++"]);; +flag ["link"; "ocaml"; "g++"] (S[A"-cc"; A"g++"; A"-cclib"; A"-rdynamic"]);; dep ["link"; "ocaml"; "use_bindings"] ["bindings.o"];;
@@ -1568,7 +1568,7 @@ SSA construction Chris Lattner
Erick Tryzelaar
The LLVM Compiler Infrastructure
- Last modified: $Date: 2010-03-08 20:32:18 +0100 (Mon, 08 Mar 2010) $ + Last modified: $Date: 2010-03-22 00:15:13 +0100 (Mon, 22 Mar 2010) $ Modified: vendor/llvm/dist/docs/tutorial/OCamlLangImpl7.html ============================================================================== --- vendor/llvm/dist/docs/tutorial/OCamlLangImpl7.html Fri Apr 2 06:55:31 2010 (r206082) +++ vendor/llvm/dist/docs/tutorial/OCamlLangImpl7.html Fri Apr 2 08:54:30 2010 (r206083) @@ -999,7 +999,7 @@ ocaml_lib ~extern:true "llvm_executionen ocaml_lib ~extern:true "llvm_target";; ocaml_lib ~extern:true "llvm_scalar_opts";; -flag ["link"; "ocaml"; "g++"] (S[A"-cc"; A"g++"]);; +flag ["link"; "ocaml"; "g++"] (S[A"-cc"; A"g++"; A"-cclib"; A"-rdynamic"]);; dep ["link"; "ocaml"; "use_bindings"] ["bindings.o"];;
@@ -1901,7 +1901,7 @@ extern double printd(double X) { Chris Lattner
The LLVM Compiler Infrastructure
Erick Tryzelaar
- Last modified: $Date: 2010-03-08 20:32:18 +0100 (Mon, 08 Mar 2010) $ + Last modified: $Date: 2010-03-22 00:15:13 +0100 (Mon, 22 Mar 2010) $ Modified: vendor/llvm/dist/examples/OCaml-Kaleidoscope/Chapter6/myocamlbuild.ml ============================================================================== --- vendor/llvm/dist/examples/OCaml-Kaleidoscope/Chapter6/myocamlbuild.ml Fri Apr 2 06:55:31 2010 (r206082) +++ vendor/llvm/dist/examples/OCaml-Kaleidoscope/Chapter6/myocamlbuild.ml Fri Apr 2 08:54:30 2010 (r206083) @@ -6,5 +6,5 @@ ocaml_lib ~extern:true "llvm_executionen ocaml_lib ~extern:true "llvm_target";; ocaml_lib ~extern:true "llvm_scalar_opts";; -flag ["link"; "ocaml"; "g++"] (S[A"-cc"; A"g++"]);; +flag ["link"; "ocaml"; "g++"] (S[A"-cc"; A"g++"; A"-cclib"; A"-rdynamic"]);; dep ["link"; "ocaml"; "use_bindings"] ["bindings.o"];; Modified: vendor/llvm/dist/examples/OCaml-Kaleidoscope/Chapter7/myocamlbuild.ml ============================================================================== --- vendor/llvm/dist/examples/OCaml-Kaleidoscope/Chapter7/myocamlbuild.ml Fri Apr 2 06:55:31 2010 (r206082) +++ vendor/llvm/dist/examples/OCaml-Kaleidoscope/Chapter7/myocamlbuild.ml Fri Apr 2 08:54:30 2010 (r206083) @@ -6,5 +6,5 @@ ocaml_lib ~extern:true "llvm_executionen ocaml_lib ~extern:true "llvm_target";; ocaml_lib ~extern:true "llvm_scalar_opts";; -flag ["link"; "ocaml"; "g++"] (S[A"-cc"; A"g++"]);; +flag ["link"; "ocaml"; "g++"] (S[A"-cc"; A"g++"; A"-cclib"; A"-rdynamic"]);; dep ["link"; "ocaml"; "use_bindings"] ["bindings.o"];; Modified: vendor/llvm/dist/include/llvm/ADT/PointerUnion.h ============================================================================== --- vendor/llvm/dist/include/llvm/ADT/PointerUnion.h Fri Apr 2 06:55:31 2010 (r206082) +++ vendor/llvm/dist/include/llvm/ADT/PointerUnion.h Fri Apr 2 08:54:30 2010 (r206083) @@ -124,7 +124,7 @@ namespace llvm { } void *getOpaqueValue() const { return Val.getOpaqueValue(); } - static PointerUnion getFromOpaqueValue(void *VP) { + static inline PointerUnion getFromOpaqueValue(void *VP) { PointerUnion V; V.Val = ValTy::getFromOpaqueValue(VP); return V; @@ -227,7 +227,7 @@ namespace llvm { } void *getOpaqueValue() const { return Val.getOpaqueValue(); } - static PointerUnion3 getFromOpaqueValue(void *VP) { + static inline PointerUnion3 getFromOpaqueValue(void *VP) { PointerUnion3 V; V.Val = ValTy::getFromOpaqueValue(VP); return V; @@ -338,7 +338,7 @@ namespace llvm { } void *getOpaqueValue() const { return Val.getOpaqueValue(); } - static PointerUnion4 getFromOpaqueValue(void *VP) { + static inline PointerUnion4 getFromOpaqueValue(void *VP) { PointerUnion4 V; V.Val = ValTy::getFromOpaqueValue(VP); return V; Modified: vendor/llvm/dist/include/llvm/ADT/SmallVector.h ============================================================================== --- vendor/llvm/dist/include/llvm/ADT/SmallVector.h Fri Apr 2 06:55:31 2010 (r206082) +++ vendor/llvm/dist/include/llvm/ADT/SmallVector.h Fri Apr 2 08:54:30 2010 (r206083) @@ -239,11 +239,20 @@ public: /// starting with "Dest", constructing elements into it as needed. template static void uninitialized_copy(It1 I, It1 E, It2 Dest) { - // Use memcpy for PODs: std::uninitialized_copy optimizes to memmove, memcpy - // is better. - memcpy(&*Dest, &*I, (E-I)*sizeof(T)); + // Arbitrary iterator types; just use the basic implementation. + std::uninitialized_copy(I, E, Dest); } - + + /// uninitialized_copy - Copy the range [I, E) onto the uninitialized memory + /// starting with "Dest", constructing elements into it as needed. + template + static void uninitialized_copy(T1 *I, T1 *E, T2 *Dest) { + // Use memcpy for PODs iterated by pointers (which includes SmallVector + // iterators): std::uninitialized_copy optimizes to memmove, but we can + // use memcpy here. + memcpy(Dest, I, (E-I)*sizeof(T)); + } + /// grow - double the size of the allocated memory, guaranteeing space for at /// least one more element or MinSize if specified. void grow(size_t MinSize = 0) { @@ -501,10 +510,13 @@ public: this->uninitialized_copy(I, OldEnd, this->end()-NumOverwritten); // Replace the overwritten part. - std::copy(From, From+NumOverwritten, I); + for (; NumOverwritten > 0; --NumOverwritten) { + *I = *From; + ++I; ++From; + } // Insert the non-overwritten middle part. - this->uninitialized_copy(From+NumOverwritten, To, OldEnd); + this->uninitialized_copy(From, To, OldEnd); return I; } Modified: vendor/llvm/dist/include/llvm/ADT/Statistic.h ============================================================================== --- vendor/llvm/dist/include/llvm/ADT/Statistic.h Fri Apr 2 06:55:31 2010 (r206082) +++ vendor/llvm/dist/include/llvm/ADT/Statistic.h Fri Apr 2 08:54:30 2010 (r206083) @@ -29,6 +29,7 @@ #include "llvm/System/Atomic.h" namespace llvm { +class raw_ostream; class Statistic { public: @@ -113,6 +114,15 @@ protected: #define STATISTIC(VARNAME, DESC) \ static llvm::Statistic VARNAME = { DEBUG_TYPE, DESC, 0, 0 } +/// \brief Enable the collection and printing of statistics. +void EnableStatistics(); + +/// \brief Print statistics to the file returned by CreateInfoOutputFile(). +void PrintStatistics(); + +/// \brief Print statistics to the given output stream. +void PrintStatistics(raw_ostream &OS); + } // End llvm namespace #endif Modified: vendor/llvm/dist/include/llvm/ADT/StringMap.h ============================================================================== --- vendor/llvm/dist/include/llvm/ADT/StringMap.h Fri Apr 2 06:55:31 2010 (r206082) +++ vendor/llvm/dist/include/llvm/ADT/StringMap.h Fri Apr 2 08:54:30 2010 (r206083) @@ -216,6 +216,14 @@ public: static const StringMapEntry &GetStringMapEntryFromValue(const ValueTy &V) { return GetStringMapEntryFromValue(const_cast(V)); } + + /// GetStringMapEntryFromKeyData - Given key data that is known to be embedded + /// into a StringMapEntry, return the StringMapEntry itself. + static StringMapEntry &GetStringMapEntryFromKeyData(const char *KeyData) { + char *Ptr = const_cast(KeyData) - sizeof(StringMapEntry); + return *reinterpret_cast(Ptr); + } + /// Destroy - Destroy this StringMapEntry, releasing memory back to the /// specified allocator. Modified: vendor/llvm/dist/include/llvm/Analysis/DebugInfo.h ============================================================================== --- vendor/llvm/dist/include/llvm/Analysis/DebugInfo.h Fri Apr 2 06:55:31 2010 (r206082) +++ vendor/llvm/dist/include/llvm/Analysis/DebugInfo.h Fri Apr 2 08:54:30 2010 (r206083) @@ -395,8 +395,21 @@ namespace llvm { } unsigned isArtificial() const { return getUnsignedField(14); } - StringRef getFilename() const { return getCompileUnit().getFilename();} - StringRef getDirectory() const { return getCompileUnit().getDirectory();} + StringRef getFilename() const { + if (getVersion() == llvm::LLVMDebugVersion7) + return getCompileUnit().getFilename(); + + DIFile F = getFieldAs(6); + return F.getFilename(); + } + + StringRef getDirectory() const { + if (getVersion() == llvm::LLVMDebugVersion7) + return getCompileUnit().getFilename(); + + DIFile F = getFieldAs(6); + return F.getDirectory(); + } /// Verify - Verify that a subprogram descriptor is well formed. bool Verify() const; Modified: vendor/llvm/dist/include/llvm/Analysis/Dominators.h ============================================================================== --- vendor/llvm/dist/include/llvm/Analysis/Dominators.h Fri Apr 2 06:55:31 2010 (r206082) +++ vendor/llvm/dist/include/llvm/Analysis/Dominators.h Fri Apr 2 08:54:30 2010 (r206083) @@ -116,12 +116,12 @@ public: return true; SmallPtrSet OtherChildren; - for(iterator I = Other->begin(), E = Other->end(); I != E; ++I) { + for (iterator I = Other->begin(), E = Other->end(); I != E; ++I) { NodeT *Nd = (*I)->getBlock(); OtherChildren.insert(Nd); } - for(iterator I = begin(), E = end(); I != E; ++I) { + for (iterator I = begin(), E = end(); I != E; ++I) { NodeT *N = (*I)->getBlock(); if (OtherChildren.count(N) == 0) return true; @@ -240,8 +240,9 @@ protected: template void Split(DominatorTreeBase& DT, typename GraphT::NodeType* NewBB) { - assert(std::distance(GraphT::child_begin(NewBB), GraphT::child_end(NewBB)) == 1 - && "NewBB should have a single successor!"); + assert(std::distance(GraphT::child_begin(NewBB), + GraphT::child_end(NewBB)) == 1 && + "NewBB should have a single successor!"); typename GraphT::NodeType* NewBBSucc = *GraphT::child_begin(NewBB); std::vector PredBlocks; @@ -374,8 +375,8 @@ public: /// isReachableFromEntry - Return true if A is dominated by the entry /// block of the function containing it. bool isReachableFromEntry(NodeT* A) { - assert (!this->isPostDominator() - && "This is not implemented for post dominators"); + assert(!this->isPostDominator() && + "This is not implemented for post dominators"); return dominates(&A->getParent()->front(), A); } @@ -393,8 +394,9 @@ public: // Compare the result of the tree walk and the dfs numbers, if expensive // checks are enabled. #ifdef XDEBUG - assert(!DFSInfoValid - || (dominatedBySlowTreeWalk(A, B) == B->DominatedBy(A))); + assert((!DFSInfoValid || + (dominatedBySlowTreeWalk(A, B) == B->DominatedBy(A))) && + "Tree walk disagrees with dfs numbers!"); #endif if (DFSInfoValid) @@ -430,16 +432,16 @@ public: /// findNearestCommonDominator - Find nearest common dominator basic block /// for basic block A and B. If there is no such block then return NULL. NodeT *findNearestCommonDominator(NodeT *A, NodeT *B) { + assert(A->getParent() == B->getParent() && + "Two blocks are not in same function"); - assert (!this->isPostDominator() - && "This is not implemented for post dominators"); - assert (A->getParent() == B->getParent() - && "Two blocks are not in same function"); - - // If either A or B is a entry block then it is nearest common dominator. - NodeT &Entry = A->getParent()->front(); - if (A == &Entry || B == &Entry) - return &Entry; + // If either A or B is a entry block then it is nearest common dominator + // (for forward-dominators). + if (!this->isPostDominator()) { + NodeT &Entry = A->getParent()->front(); + if (A == &Entry || B == &Entry) + return &Entry; + } // If B dominates A then B is nearest common dominator. if (dominates(B, A)) @@ -463,7 +465,7 @@ public: // Walk NodeB immediate dominators chain and find common dominator node. DomTreeNodeBase *IDomB = NodeB->getIDom(); - while(IDomB) { + while (IDomB) { if (NodeADoms.count(IDomB) != 0) return IDomB->getBlock(); @@ -508,8 +510,8 @@ public: /// children list. Deletes dominator node associated with basic block BB. void eraseNode(NodeT *BB) { DomTreeNodeBase *Node = getNode(BB); - assert (Node && "Removing node that isn't in dominator tree."); - assert (Node->getChildren().empty() && "Node is not a leaf node."); + assert(Node && "Removing node that isn't in dominator tree."); + assert(Node->getChildren().empty() && "Node is not a leaf node."); // Remove node from immediate dominator's children list. DomTreeNodeBase *IDom = Node->getIDom(); @@ -952,7 +954,7 @@ public: return true; } - if(!tmpSet.empty()) + if (!tmpSet.empty()) // There are nodes that are in DS2 but not in DS1. return true; Modified: vendor/llvm/dist/include/llvm/CodeGen/AsmPrinter.h ============================================================================== --- vendor/llvm/dist/include/llvm/CodeGen/AsmPrinter.h Fri Apr 2 06:55:31 2010 (r206082) +++ vendor/llvm/dist/include/llvm/CodeGen/AsmPrinter.h Fri Apr 2 08:54:30 2010 (r206083) @@ -47,7 +47,6 @@ namespace llvm { class MCSection; class MCStreamer; class MCSymbol; - class MDNode; class DwarfWriter; class Mangler; class MCAsmInfo; @@ -138,9 +137,6 @@ namespace llvm { mutable unsigned Counter; mutable unsigned SetCounter; - // Private state for processDebugLoc() - mutable const MDNode *PrevDLT; - protected: explicit AsmPrinter(formatted_raw_ostream &o, TargetMachine &TM, MCStreamer &Streamer); Modified: vendor/llvm/dist/include/llvm/CodeGen/DwarfWriter.h ============================================================================== --- vendor/llvm/dist/include/llvm/CodeGen/DwarfWriter.h Fri Apr 2 06:55:31 2010 (r206082) +++ vendor/llvm/dist/include/llvm/CodeGen/DwarfWriter.h Fri Apr 2 08:54:30 2010 (r206083) @@ -83,19 +83,11 @@ public: /// void EndFunction(const MachineFunction *MF); - /// RecordSourceLine - Register a source line with debug info. Returns the - /// unique label that was emitted and which provides correspondence to - /// the source line list. - MCSymbol *RecordSourceLine(unsigned Line, unsigned Col, MDNode *Scope); - - /// getRecordSourceLineCount - Count source lines. - unsigned getRecordSourceLineCount(); - /// ShouldEmitDwarfDebug - Returns true if Dwarf debugging declarations should /// be emitted. bool ShouldEmitDwarfDebug() const; - void BeginScope(const MachineInstr *MI, MCSymbol *Label); + void BeginScope(const MachineInstr *MI); void EndScope(const MachineInstr *MI); }; Modified: vendor/llvm/dist/include/llvm/CodeGen/LiveInterval.h ============================================================================== --- vendor/llvm/dist/include/llvm/CodeGen/LiveInterval.h Fri Apr 2 06:55:31 2010 (r206082) +++ vendor/llvm/dist/include/llvm/CodeGen/LiveInterval.h Fri Apr 2 08:54:30 2010 (r206083) @@ -67,7 +67,7 @@ namespace llvm { } cr; public: - + typedef SpecificBumpPtrAllocator Allocator; typedef SmallVector KillSet; /// The ID number of this value. @@ -330,12 +330,7 @@ namespace llvm { } void clear() { - while (!valnos.empty()) { - VNInfo *VNI = valnos.back(); - valnos.pop_back(); - VNI->~VNInfo(); - } - + valnos.clear(); ranges.clear(); } @@ -370,10 +365,8 @@ namespace llvm { /// getNextValue - Create a new value number and return it. MIIdx specifies /// the instruction that defines the value number. VNInfo *getNextValue(SlotIndex def, MachineInstr *CopyMI, - bool isDefAccurate, BumpPtrAllocator &VNInfoAllocator){ - VNInfo *VNI = - static_cast(VNInfoAllocator.Allocate((unsigned)sizeof(VNInfo), - alignof())); + bool isDefAccurate, VNInfo::Allocator &VNInfoAllocator) { + VNInfo *VNI = VNInfoAllocator.Allocate(); new (VNI) VNInfo((unsigned)valnos.size(), def, CopyMI); VNI->setIsDefAccurate(isDefAccurate); valnos.push_back(VNI); @@ -383,11 +376,8 @@ namespace llvm { /// Create a copy of the given value. The new value will be identical except /// for the Value number. VNInfo *createValueCopy(const VNInfo *orig, - BumpPtrAllocator &VNInfoAllocator) { - VNInfo *VNI = - static_cast(VNInfoAllocator.Allocate((unsigned)sizeof(VNInfo), - alignof())); - + VNInfo::Allocator &VNInfoAllocator) { + VNInfo *VNI = VNInfoAllocator.Allocate(); new (VNI) VNInfo((unsigned)valnos.size(), *orig); valnos.push_back(VNI); return VNI; @@ -427,14 +417,14 @@ namespace llvm { /// VNInfoAllocator since it will create a new val#. void MergeInClobberRanges(LiveIntervals &li_, const LiveInterval &Clobbers, - BumpPtrAllocator &VNInfoAllocator); + VNInfo::Allocator &VNInfoAllocator); /// MergeInClobberRange - Same as MergeInClobberRanges except it merge in a /// single LiveRange only. void MergeInClobberRange(LiveIntervals &li_, SlotIndex Start, SlotIndex End, - BumpPtrAllocator &VNInfoAllocator); + VNInfo::Allocator &VNInfoAllocator); /// MergeValueInAsValue - Merge all of the live ranges of a specific val# /// in RHS into this live interval as the specified value number. @@ -454,7 +444,7 @@ namespace llvm { /// Copy - Copy the specified live interval. This copies all the fields /// except for the register of the interval. void Copy(const LiveInterval &RHS, MachineRegisterInfo *MRI, - BumpPtrAllocator &VNInfoAllocator); + VNInfo::Allocator &VNInfoAllocator); bool empty() const { return ranges.empty(); } Modified: vendor/llvm/dist/include/llvm/CodeGen/LiveIntervalAnalysis.h ============================================================================== --- vendor/llvm/dist/include/llvm/CodeGen/LiveIntervalAnalysis.h Fri Apr 2 06:55:31 2010 (r206082) +++ vendor/llvm/dist/include/llvm/CodeGen/LiveIntervalAnalysis.h Fri Apr 2 08:54:30 2010 (r206083) @@ -55,7 +55,7 @@ namespace llvm { /// Special pool allocator for VNInfo's (LiveInterval val#). /// - BumpPtrAllocator VNInfoAllocator; + VNInfo::Allocator VNInfoAllocator; typedef DenseMap Reg2IntervalMap; Reg2IntervalMap r2iMap_; @@ -221,7 +221,7 @@ namespace llvm { indexes_->renumberIndexes(); } - BumpPtrAllocator& getVNInfoAllocator() { return VNInfoAllocator; } + VNInfo::Allocator& getVNInfoAllocator() { return VNInfoAllocator; } /// getVNInfoSourceReg - Helper function that parses the specified VNInfo /// copy field and returns the source register that defines it. Modified: vendor/llvm/dist/include/llvm/CodeGen/LiveStackAnalysis.h ============================================================================== --- vendor/llvm/dist/include/llvm/CodeGen/LiveStackAnalysis.h Fri Apr 2 06:55:31 2010 (r206082) +++ vendor/llvm/dist/include/llvm/CodeGen/LiveStackAnalysis.h Fri Apr 2 08:54:30 2010 (r206083) @@ -27,7 +27,7 @@ namespace llvm { class LiveStacks : public MachineFunctionPass { /// Special pool allocator for VNInfo's (LiveInterval val#). /// - BumpPtrAllocator VNInfoAllocator; + VNInfo::Allocator VNInfoAllocator; /// S2IMap - Stack slot indices to live interval mapping. /// @@ -91,7 +91,7 @@ namespace llvm { return I->second; } - BumpPtrAllocator& getVNInfoAllocator() { return VNInfoAllocator; } + VNInfo::Allocator& getVNInfoAllocator() { return VNInfoAllocator; } virtual void getAnalysisUsage(AnalysisUsage &AU) const; virtual void releaseMemory(); Modified: vendor/llvm/dist/include/llvm/CodeGen/MachineOperand.h ============================================================================== --- vendor/llvm/dist/include/llvm/CodeGen/MachineOperand.h Fri Apr 2 06:55:31 2010 (r206082) +++ vendor/llvm/dist/include/llvm/CodeGen/MachineOperand.h Fri Apr 2 08:54:30 2010 (r206083) @@ -285,6 +285,11 @@ public: IsEarlyClobber = Val; } + void setIsDebug(bool Val = true) { + assert(isReg() && IsDef && "Wrong MachineOperand accessor"); + IsDebug = Val; + } + //===--------------------------------------------------------------------===// // Accessors for various operand types. //===--------------------------------------------------------------------===// Modified: vendor/llvm/dist/include/llvm/CodeGen/RuntimeLibcalls.h ============================================================================== --- vendor/llvm/dist/include/llvm/CodeGen/RuntimeLibcalls.h Fri Apr 2 06:55:31 2010 (r206082) +++ vendor/llvm/dist/include/llvm/CodeGen/RuntimeLibcalls.h Fri Apr 2 08:54:30 2010 (r206083) @@ -169,6 +169,8 @@ namespace RTLIB { FPTOSINT_F32_I32, FPTOSINT_F32_I64, FPTOSINT_F32_I128, + FPTOSINT_F64_I8, + FPTOSINT_F64_I16, FPTOSINT_F64_I32, FPTOSINT_F64_I64, FPTOSINT_F64_I128, @@ -183,6 +185,8 @@ namespace RTLIB { FPTOUINT_F32_I32, FPTOUINT_F32_I64, FPTOUINT_F32_I128, + FPTOUINT_F64_I8, + FPTOUINT_F64_I16, FPTOUINT_F64_I32, FPTOUINT_F64_I64, FPTOUINT_F64_I128, Modified: vendor/llvm/dist/include/llvm/CodeGen/SelectionDAG.h ============================================================================== --- vendor/llvm/dist/include/llvm/CodeGen/SelectionDAG.h Fri Apr 2 06:55:31 2010 (r206082) +++ vendor/llvm/dist/include/llvm/CodeGen/SelectionDAG.h Fri Apr 2 08:54:30 2010 (r206083) @@ -34,6 +34,7 @@ class FunctionLoweringInfo; class MachineConstantPoolValue; class MachineFunction; class MachineModuleInfo; +class MDNode; class SDNodeOrdering; class SDDbgValue; class TargetLowering; @@ -60,42 +61,40 @@ private: /// SDDbgInfo - Keeps track of dbg_value information through SDISel. We do /// not build SDNodes for these so as not to perturb the generated code; -/// instead the info is kept off to the side in this structure. SDNodes may -/// have an associated dbg_value entry in DbgValMap. Debug info that is not -/// associated with any SDNode is held in DbgConstMap. It is possible for -/// optimizations to change a variable to a constant, in which case the -/// corresponding debug info is moved from the variable to the constant table -/// (NYI). +/// instead the info is kept off to the side in this structure. Each SDNode may +/// have one or more associated dbg_value entries. This information is kept in +/// DbgValMap. class SDDbgInfo { - DenseMap DbgVblMap; - SmallVector DbgConstMap; + SmallVector DbgValues; + DenseMap > DbgValMap; void operator=(const SDDbgInfo&); // Do not implement. SDDbgInfo(const SDDbgInfo&); // Do not implement. public: SDDbgInfo() {} - void add(const SDNode *Node, SDDbgValue *V) { - DbgVblMap[Node] = V; + void add(SDDbgValue *V, const SDNode *Node = 0) { + if (Node) + DbgValMap[Node].push_back(V); + DbgValues.push_back(V); } - void add(SDDbgValue *V) { DbgConstMap.push_back(V); } - void remove(const SDNode *Node) { - DenseMap::iterator Itr = - DbgVblMap.find(Node); - if (Itr != DbgVblMap.end()) - DbgVblMap.erase(Itr); - } - // No need to remove a constant. + void clear() { - DbgVblMap.clear(); - DbgConstMap.clear(); + DbgValMap.clear(); + DbgValues.clear(); } - SDDbgValue *getSDDbgValue(const SDNode *Node) { - return DbgVblMap[Node]; + + bool empty() const { + return DbgValues.empty(); + } + + SmallVector &getSDDbgValues(const SDNode *Node) { + return DbgValMap[Node]; } - typedef SmallVector::iterator ConstDbgIterator; - ConstDbgIterator DbgConstBegin() { return DbgConstMap.begin(); } - ConstDbgIterator DbgConstEnd() { return DbgConstMap.end(); } + + typedef SmallVector::iterator DbgIterator; + DbgIterator DbgBegin() { return DbgValues.begin(); } + DbgIterator DbgEnd() { return DbgValues.end(); } }; enum CombineLevel { @@ -769,6 +768,15 @@ public: SDNode *getNodeIfExists(unsigned Opcode, SDVTList VTs, const SDValue *Ops, unsigned NumOps); + /// getDbgValue - Creates a SDDbgValue node. + /// + SDDbgValue *getDbgValue(MDNode *MDPtr, SDNode *N, unsigned R, uint64_t Off, + DebugLoc DL, unsigned O); + SDDbgValue *getDbgValue(MDNode *MDPtr, Value *C, uint64_t Off, + DebugLoc DL, unsigned O); + SDDbgValue *getDbgValue(MDNode *MDPtr, unsigned FI, uint64_t Off, + DebugLoc DL, unsigned O); + /// DAGUpdateListener - Clients of various APIs that cause global effects on /// the DAG can optionally implement this interface. This allows the clients /// to handle the various sorts of updates that happen. @@ -871,19 +879,21 @@ public: /// GetOrdering - Get the order for the SDNode. unsigned GetOrdering(const SDNode *SD) const; - /// AssignDbgInfo - Assign debug info to the SDNode. - void AssignDbgInfo(SDNode *SD, SDDbgValue *db); + /// AddDbgValue - Add a dbg_value SDNode. If SD is non-null that means the + /// value is produced by SD. + void AddDbgValue(SDDbgValue *DB, SDNode *SD = 0); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-vendor@FreeBSD.ORG Fri Apr 2 08:55:12 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 CFBB2106566B; Fri, 2 Apr 2010 08:55:11 +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 B596B8FC0A; Fri, 2 Apr 2010 08:55:11 +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 o328tBPx006214; Fri, 2 Apr 2010 08:55:11 GMT (envelope-from rdivacky@svn.freebsd.org) Received: (from rdivacky@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o328tBgJ006198; Fri, 2 Apr 2010 08:55:11 GMT (envelope-from rdivacky@svn.freebsd.org) Message-Id: <201004020855.o328tBgJ006198@svn.freebsd.org> From: Roman Divacky Date: Fri, 2 Apr 2010 08:55:11 +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: r206084 - in vendor/clang/dist: . clang.xcodeproj examples/clang-interpreter include/clang/AST include/clang/Analysis include/clang/Analysis/FlowSensitive include/clang/Basic include/cl... 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: Fri, 02 Apr 2010 08:55:12 -0000 Author: rdivacky Date: Fri Apr 2 08:55:10 2010 New Revision: 206084 URL: http://svn.freebsd.org/changeset/base/206084 Log: Update clang to r100181. Added: vendor/clang/dist/include/clang/AST/DependentDiagnostic.h vendor/clang/dist/lib/Checker/AggExprVisitor.cpp vendor/clang/dist/lib/CodeGen/CGRecordLayout.h vendor/clang/dist/lib/Headers/wmmintrin.h vendor/clang/dist/test/CXX/basic/basic.stc/basic.stc.dynamic/p2-noexceptions.cpp vendor/clang/dist/test/CXX/class.access/class.access.base/p5.cpp vendor/clang/dist/test/CXX/class.derived/class.abstract/p4.cpp vendor/clang/dist/test/CXX/class.derived/class.abstract/p5.cpp vendor/clang/dist/test/CXX/class.derived/class.virtual/p2.cpp vendor/clang/dist/test/CXX/stmt.stmt/stmt.select/p3.cpp vendor/clang/dist/test/CXX/temp/temp.fct.spec/temp.deduct/p9.cpp vendor/clang/dist/test/CXX/temp/temp.fct.spec/temp.deduct/temp.deduct.type/p17.cpp vendor/clang/dist/test/CodeGen/restrict.c vendor/clang/dist/test/CodeGenCXX/multi-dim-operator-new.cpp vendor/clang/dist/test/CodeGenCXX/rtti-fundamental.cpp vendor/clang/dist/test/CodeGenCXX/template-instantiation.cpp vendor/clang/dist/test/CodeGenCXX/thunks.cpp vendor/clang/dist/test/CodeGenObjC/complex-property.m vendor/clang/dist/test/CodeGenObjC/objc2-nonfragile-abi-impl.m vendor/clang/dist/test/Driver/nostdincxx.cpp vendor/clang/dist/test/Headers/c89.c vendor/clang/dist/test/Headers/x86-intrinsics-headers.c vendor/clang/dist/test/Index/print-usrs.c vendor/clang/dist/test/Parser/cxx-default-args.cpp vendor/clang/dist/test/Sema/attr-format.c vendor/clang/dist/test/Sema/attr-sentinel.c vendor/clang/dist/test/Sema/warn-gnu-designators.c vendor/clang/dist/test/SemaCXX/PR6618.cpp vendor/clang/dist/test/SemaCXX/new-delete-predefined-decl-2.cpp vendor/clang/dist/test/SemaObjC/ivar-in-class-extension-error.m vendor/clang/dist/test/SemaObjC/no-protocol-option-tests.m vendor/clang/dist/test/SemaObjC/property-in-class-extension.m vendor/clang/dist/test/SemaTemplate/instantiate-elab-type-specifier.cpp vendor/clang/dist/test/SemaTemplate/instantiate-function-params.cpp vendor/clang/dist/www/analyzer/downloads/ Deleted: vendor/clang/dist/lib/CodeGen/CGRecordLayoutBuilder.h vendor/clang/dist/test/Preprocessor/macro_disable2.c vendor/clang/dist/test/Preprocessor/macro_disable3.c vendor/clang/dist/test/Preprocessor/macro_disable4.c vendor/clang/dist/test/Sema/format-attr-pr4470.c vendor/clang/dist/test/Sema/format-attribute-printf0.c vendor/clang/dist/test/Sema/format-attribute.c vendor/clang/dist/test/Sema/function-pointer-sentinel-attribute.c vendor/clang/dist/test/Sema/function-sentinel-attr.c vendor/clang/dist/test/Sema/x86-intrinsics-headers.c Modified: vendor/clang/dist/CMakeLists.txt vendor/clang/dist/clang.xcodeproj/project.pbxproj vendor/clang/dist/examples/clang-interpreter/main.cpp vendor/clang/dist/include/clang/AST/ASTContext.h vendor/clang/dist/include/clang/AST/CXXInheritance.h vendor/clang/dist/include/clang/AST/CanonicalType.h vendor/clang/dist/include/clang/AST/Decl.h vendor/clang/dist/include/clang/AST/DeclBase.h vendor/clang/dist/include/clang/AST/DeclCXX.h vendor/clang/dist/include/clang/AST/DeclContextInternals.h vendor/clang/dist/include/clang/AST/DeclFriend.h vendor/clang/dist/include/clang/AST/DeclTemplate.h vendor/clang/dist/include/clang/AST/DeclarationName.h vendor/clang/dist/include/clang/AST/Expr.h vendor/clang/dist/include/clang/AST/ExprCXX.h vendor/clang/dist/include/clang/AST/Type.h vendor/clang/dist/include/clang/AST/TypeLoc.h vendor/clang/dist/include/clang/AST/TypeNodes.def vendor/clang/dist/include/clang/Analysis/AnalysisContext.h vendor/clang/dist/include/clang/Analysis/FlowSensitive/DataflowSolver.h vendor/clang/dist/include/clang/Basic/Builtins.def vendor/clang/dist/include/clang/Basic/BuiltinsX86.def vendor/clang/dist/include/clang/Basic/CMakeLists.txt vendor/clang/dist/include/clang/Basic/Diagnostic.h vendor/clang/dist/include/clang/Basic/DiagnosticFrontendKinds.td vendor/clang/dist/include/clang/Basic/DiagnosticGroups.td vendor/clang/dist/include/clang/Basic/DiagnosticParseKinds.td vendor/clang/dist/include/clang/Basic/DiagnosticSemaKinds.td vendor/clang/dist/include/clang/Basic/PartialDiagnostic.h vendor/clang/dist/include/clang/Basic/SourceLocation.h vendor/clang/dist/include/clang/Checker/BugReporter/BugReporter.h vendor/clang/dist/include/clang/Checker/BugReporter/BugType.h vendor/clang/dist/include/clang/Checker/BugReporter/PathDiagnostic.h vendor/clang/dist/include/clang/Checker/DomainSpecific/CocoaConventions.h vendor/clang/dist/include/clang/Checker/PathSensitive/BasicValueFactory.h vendor/clang/dist/include/clang/Checker/PathSensitive/Checker.h vendor/clang/dist/include/clang/Checker/PathSensitive/Environment.h vendor/clang/dist/include/clang/Checker/PathSensitive/ExplodedGraph.h vendor/clang/dist/include/clang/Checker/PathSensitive/GRBlockCounter.h vendor/clang/dist/include/clang/Checker/PathSensitive/GRCoreEngine.h vendor/clang/dist/include/clang/Checker/PathSensitive/GRExprEngine.h vendor/clang/dist/include/clang/Checker/PathSensitive/GRSimpleAPICheck.h vendor/clang/dist/include/clang/Checker/PathSensitive/GRState.h vendor/clang/dist/include/clang/Checker/PathSensitive/GRSubEngine.h vendor/clang/dist/include/clang/Checker/PathSensitive/GRTransferFuncs.h vendor/clang/dist/include/clang/Checker/PathSensitive/MemRegion.h vendor/clang/dist/include/clang/Checker/PathSensitive/Store.h vendor/clang/dist/include/clang/Checker/PathSensitive/SymbolManager.h vendor/clang/dist/include/clang/CodeGen/CodeGenOptions.h vendor/clang/dist/include/clang/Driver/CC1Options.td vendor/clang/dist/include/clang/Driver/CMakeLists.txt vendor/clang/dist/include/clang/Driver/Driver.h vendor/clang/dist/include/clang/Driver/Options.td vendor/clang/dist/include/clang/Frontend/HeaderSearchOptions.h vendor/clang/dist/include/clang/Frontend/TextDiagnosticPrinter.h vendor/clang/dist/include/clang/Frontend/TypeXML.def vendor/clang/dist/include/clang/Lex/PPCallbacks.h vendor/clang/dist/include/clang/Lex/Preprocessor.h vendor/clang/dist/include/clang/Lex/PreprocessorLexer.h vendor/clang/dist/include/clang/Parse/Action.h vendor/clang/dist/lib/AST/ASTContext.cpp vendor/clang/dist/lib/AST/ASTImporter.cpp vendor/clang/dist/lib/AST/CMakeLists.txt vendor/clang/dist/lib/AST/CXXInheritance.cpp vendor/clang/dist/lib/AST/Decl.cpp vendor/clang/dist/lib/AST/DeclBase.cpp vendor/clang/dist/lib/AST/DeclCXX.cpp vendor/clang/dist/lib/AST/Expr.cpp vendor/clang/dist/lib/AST/Type.cpp vendor/clang/dist/lib/AST/TypePrinter.cpp vendor/clang/dist/lib/Analysis/AnalysisContext.cpp vendor/clang/dist/lib/Analysis/CFG.cpp vendor/clang/dist/lib/Analysis/PrintfFormatString.cpp vendor/clang/dist/lib/Basic/Diagnostic.cpp vendor/clang/dist/lib/Basic/SourceManager.cpp vendor/clang/dist/lib/Basic/Targets.cpp vendor/clang/dist/lib/Checker/AdjustedReturnValueChecker.cpp vendor/clang/dist/lib/Checker/ArrayBoundChecker.cpp vendor/clang/dist/lib/Checker/AttrNonNullChecker.cpp vendor/clang/dist/lib/Checker/BasicObjCFoundationChecks.cpp vendor/clang/dist/lib/Checker/BugReporter.cpp vendor/clang/dist/lib/Checker/BugReporterVisitors.cpp vendor/clang/dist/lib/Checker/CFRefCount.cpp vendor/clang/dist/lib/Checker/CMakeLists.txt vendor/clang/dist/lib/Checker/CallAndMessageChecker.cpp vendor/clang/dist/lib/Checker/CastToStructChecker.cpp vendor/clang/dist/lib/Checker/CheckSecuritySyntaxOnly.cpp vendor/clang/dist/lib/Checker/DereferenceChecker.cpp vendor/clang/dist/lib/Checker/DivZeroChecker.cpp vendor/clang/dist/lib/Checker/Environment.cpp vendor/clang/dist/lib/Checker/FixedAddressChecker.cpp vendor/clang/dist/lib/Checker/GRBlockCounter.cpp vendor/clang/dist/lib/Checker/GRCoreEngine.cpp vendor/clang/dist/lib/Checker/GRExprEngine.cpp vendor/clang/dist/lib/Checker/GRState.cpp vendor/clang/dist/lib/Checker/MacOSXAPIChecker.cpp vendor/clang/dist/lib/Checker/MallocChecker.cpp vendor/clang/dist/lib/Checker/MemRegion.cpp vendor/clang/dist/lib/Checker/NSErrorChecker.cpp vendor/clang/dist/lib/Checker/NoReturnFunctionChecker.cpp vendor/clang/dist/lib/Checker/PathDiagnostic.cpp vendor/clang/dist/lib/Checker/PointerArithChecker.cpp vendor/clang/dist/lib/Checker/PointerSubChecker.cpp vendor/clang/dist/lib/Checker/RegionStore.cpp vendor/clang/dist/lib/Checker/ReturnPointerRangeChecker.cpp vendor/clang/dist/lib/Checker/ReturnStackAddressChecker.cpp vendor/clang/dist/lib/Checker/ReturnUndefChecker.cpp vendor/clang/dist/lib/Checker/SymbolManager.cpp vendor/clang/dist/lib/Checker/UndefBranchChecker.cpp vendor/clang/dist/lib/Checker/UndefCapturedBlockVarChecker.cpp vendor/clang/dist/lib/Checker/UndefResultChecker.cpp vendor/clang/dist/lib/Checker/UndefinedArraySubscriptChecker.cpp vendor/clang/dist/lib/Checker/UndefinedAssignmentChecker.cpp vendor/clang/dist/lib/Checker/UnixAPIChecker.cpp vendor/clang/dist/lib/Checker/VLASizeChecker.cpp vendor/clang/dist/lib/CodeGen/CGBlocks.cpp vendor/clang/dist/lib/CodeGen/CGBlocks.h vendor/clang/dist/lib/CodeGen/CGBuiltin.cpp vendor/clang/dist/lib/CodeGen/CGCXX.cpp vendor/clang/dist/lib/CodeGen/CGCall.cpp vendor/clang/dist/lib/CodeGen/CGCall.h vendor/clang/dist/lib/CodeGen/CGClass.cpp vendor/clang/dist/lib/CodeGen/CGDebugInfo.cpp vendor/clang/dist/lib/CodeGen/CGDebugInfo.h vendor/clang/dist/lib/CodeGen/CGExpr.cpp vendor/clang/dist/lib/CodeGen/CGExprAgg.cpp vendor/clang/dist/lib/CodeGen/CGExprCXX.cpp vendor/clang/dist/lib/CodeGen/CGExprComplex.cpp vendor/clang/dist/lib/CodeGen/CGExprConstant.cpp vendor/clang/dist/lib/CodeGen/CGExprScalar.cpp vendor/clang/dist/lib/CodeGen/CGObjC.cpp vendor/clang/dist/lib/CodeGen/CGObjCGNU.cpp vendor/clang/dist/lib/CodeGen/CGObjCMac.cpp vendor/clang/dist/lib/CodeGen/CGObjCRuntime.h vendor/clang/dist/lib/CodeGen/CGRTTI.cpp vendor/clang/dist/lib/CodeGen/CGRecordLayoutBuilder.cpp vendor/clang/dist/lib/CodeGen/CGStmt.cpp vendor/clang/dist/lib/CodeGen/CGTemporaries.cpp vendor/clang/dist/lib/CodeGen/CGVTT.cpp vendor/clang/dist/lib/CodeGen/CGVtable.cpp vendor/clang/dist/lib/CodeGen/CGVtable.h vendor/clang/dist/lib/CodeGen/CodeGenFunction.cpp vendor/clang/dist/lib/CodeGen/CodeGenFunction.h vendor/clang/dist/lib/CodeGen/CodeGenModule.cpp vendor/clang/dist/lib/CodeGen/CodeGenModule.h vendor/clang/dist/lib/CodeGen/CodeGenTypes.cpp vendor/clang/dist/lib/CodeGen/CodeGenTypes.h vendor/clang/dist/lib/CodeGen/Mangle.cpp vendor/clang/dist/lib/CodeGen/Mangle.h vendor/clang/dist/lib/Driver/CMakeLists.txt vendor/clang/dist/lib/Driver/Driver.cpp vendor/clang/dist/lib/Driver/HostInfo.cpp vendor/clang/dist/lib/Driver/Tools.cpp vendor/clang/dist/lib/Frontend/ASTUnit.cpp vendor/clang/dist/lib/Frontend/CompilerInstance.cpp vendor/clang/dist/lib/Frontend/CompilerInvocation.cpp vendor/clang/dist/lib/Frontend/DependencyFile.cpp vendor/clang/dist/lib/Frontend/FixItRewriter.cpp vendor/clang/dist/lib/Frontend/FrontendAction.cpp vendor/clang/dist/lib/Frontend/HTMLDiagnostics.cpp vendor/clang/dist/lib/Frontend/InitHeaderSearch.cpp vendor/clang/dist/lib/Frontend/PCHReader.cpp vendor/clang/dist/lib/Frontend/PCHWriter.cpp vendor/clang/dist/lib/Frontend/RewriteObjC.cpp vendor/clang/dist/lib/Frontend/TextDiagnosticPrinter.cpp vendor/clang/dist/lib/Headers/emmintrin.h vendor/clang/dist/lib/Headers/mm_malloc.h vendor/clang/dist/lib/Headers/mmintrin.h vendor/clang/dist/lib/Headers/pmmintrin.h vendor/clang/dist/lib/Headers/smmintrin.h vendor/clang/dist/lib/Headers/tmmintrin.h vendor/clang/dist/lib/Headers/xmmintrin.h vendor/clang/dist/lib/Lex/Lexer.cpp vendor/clang/dist/lib/Lex/PPDirectives.cpp vendor/clang/dist/lib/Lex/PPLexerChange.cpp vendor/clang/dist/lib/Lex/PPMacroExpansion.cpp vendor/clang/dist/lib/Lex/Preprocessor.cpp vendor/clang/dist/lib/Lex/TokenConcatenation.cpp vendor/clang/dist/lib/Parse/AttributeList.cpp vendor/clang/dist/lib/Parse/DeclSpec.cpp vendor/clang/dist/lib/Parse/ParseCXXInlineMethods.cpp vendor/clang/dist/lib/Parse/ParseDecl.cpp vendor/clang/dist/lib/Parse/ParseDeclCXX.cpp vendor/clang/dist/lib/Parse/ParseExprCXX.cpp vendor/clang/dist/lib/Parse/ParseInit.cpp vendor/clang/dist/lib/Parse/ParseObjc.cpp vendor/clang/dist/lib/Parse/ParseStmt.cpp vendor/clang/dist/lib/Parse/ParseTemplate.cpp vendor/clang/dist/lib/Parse/Parser.cpp vendor/clang/dist/lib/Sema/AnalysisBasedWarnings.cpp vendor/clang/dist/lib/Sema/AnalysisBasedWarnings.h vendor/clang/dist/lib/Sema/Lookup.h vendor/clang/dist/lib/Sema/Sema.cpp vendor/clang/dist/lib/Sema/Sema.h vendor/clang/dist/lib/Sema/SemaAccess.cpp vendor/clang/dist/lib/Sema/SemaCXXCast.cpp vendor/clang/dist/lib/Sema/SemaCXXScopeSpec.cpp vendor/clang/dist/lib/Sema/SemaChecking.cpp vendor/clang/dist/lib/Sema/SemaDecl.cpp vendor/clang/dist/lib/Sema/SemaDeclAttr.cpp vendor/clang/dist/lib/Sema/SemaDeclCXX.cpp vendor/clang/dist/lib/Sema/SemaDeclObjC.cpp vendor/clang/dist/lib/Sema/SemaExceptionSpec.cpp vendor/clang/dist/lib/Sema/SemaExpr.cpp vendor/clang/dist/lib/Sema/SemaExprCXX.cpp vendor/clang/dist/lib/Sema/SemaExprObjC.cpp vendor/clang/dist/lib/Sema/SemaInit.cpp vendor/clang/dist/lib/Sema/SemaInit.h vendor/clang/dist/lib/Sema/SemaLookup.cpp vendor/clang/dist/lib/Sema/SemaObjCProperty.cpp vendor/clang/dist/lib/Sema/SemaOverload.cpp vendor/clang/dist/lib/Sema/SemaStmt.cpp vendor/clang/dist/lib/Sema/SemaTemplate.cpp vendor/clang/dist/lib/Sema/SemaTemplate.h vendor/clang/dist/lib/Sema/SemaTemplateDeduction.cpp vendor/clang/dist/lib/Sema/SemaTemplateInstantiate.cpp vendor/clang/dist/lib/Sema/SemaTemplateInstantiateDecl.cpp vendor/clang/dist/lib/Sema/SemaType.cpp vendor/clang/dist/lib/Sema/TreeTransform.h vendor/clang/dist/test/Analysis/PR3991.m vendor/clang/dist/test/Analysis/inline.c vendor/clang/dist/test/Analysis/misc-ps-region-store.m vendor/clang/dist/test/Analysis/no-outofbounds.c vendor/clang/dist/test/Analysis/null-deref-ps.c vendor/clang/dist/test/Analysis/outofbound.c vendor/clang/dist/test/Analysis/plist-output.m vendor/clang/dist/test/Analysis/pr4209.m vendor/clang/dist/test/Analysis/retain-release-region-store.m vendor/clang/dist/test/Analysis/retain-release.m vendor/clang/dist/test/Analysis/uninit-vals-ps-region.m vendor/clang/dist/test/CXX/basic/basic.lookup/basic.lookup.argdep/p4.cpp vendor/clang/dist/test/CXX/basic/basic.stc/basic.stc.dynamic/p2.cpp vendor/clang/dist/test/CXX/class.access/class.friend/p1.cpp vendor/clang/dist/test/CXX/class.access/p4.cpp vendor/clang/dist/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p1.cpp vendor/clang/dist/test/CXX/dcl.dcl/dcl.spec/dcl.type/dcl.type.elab/p3.cpp vendor/clang/dist/test/CXX/temp/temp.arg/temp.arg.nontype/p1.cpp vendor/clang/dist/test/CXX/temp/temp.arg/temp.arg.nontype/p5.cpp vendor/clang/dist/test/CXX/temp/temp.decls/temp.friend/p1.cpp vendor/clang/dist/test/CXX/temp/temp.res/temp.local/p1.cpp vendor/clang/dist/test/CXX/temp/temp.spec/temp.expl.spec/p20.cpp vendor/clang/dist/test/CodeGen/atomic.c vendor/clang/dist/test/CodeGen/mangle.c vendor/clang/dist/test/CodeGen/palignr.c vendor/clang/dist/test/CodeGen/regparm.c vendor/clang/dist/test/CodeGenCXX/constructor-init.cpp vendor/clang/dist/test/CodeGenCXX/copy-constructor-synthesis.cpp vendor/clang/dist/test/CodeGenCXX/member-expressions.cpp vendor/clang/dist/test/CodeGenCXX/references.cpp vendor/clang/dist/test/CodeGenCXX/rtti-linkage.cpp vendor/clang/dist/test/CodeGenCXX/temporaries.cpp vendor/clang/dist/test/CodeGenCXX/virt.cpp vendor/clang/dist/test/CodeGenCXX/virtual-bases.cpp vendor/clang/dist/test/CodeGenCXX/vtable-layout-abi-examples.cpp vendor/clang/dist/test/CodeGenCXX/vtable-layout.cpp vendor/clang/dist/test/CodeGenCXX/vtable-linkage.cpp vendor/clang/dist/test/FixIt/fixit.cpp vendor/clang/dist/test/Index/Inputs/remap-complete-to.c vendor/clang/dist/test/Index/cindex-on-invalid.m vendor/clang/dist/test/Index/recover-bad-code-rdar_7487294.c vendor/clang/dist/test/Index/remap-complete.c vendor/clang/dist/test/PCH/changed-files.c vendor/clang/dist/test/Parser/objc-messaging-neg-1.m vendor/clang/dist/test/Parser/statements.c vendor/clang/dist/test/Preprocessor/dependencies-and-pp.c vendor/clang/dist/test/Preprocessor/macro_disable.c vendor/clang/dist/test/Preprocessor/output_paste_avoid.c vendor/clang/dist/test/Sema/attr-unused.c vendor/clang/dist/test/Sema/format-strings.c vendor/clang/dist/test/Sema/init.c vendor/clang/dist/test/Sema/nested-redef.c vendor/clang/dist/test/Sema/return.c vendor/clang/dist/test/Sema/struct-packed-align.c vendor/clang/dist/test/Sema/warn-shadow.c vendor/clang/dist/test/SemaCXX/class-base-member-init.cpp vendor/clang/dist/test/SemaCXX/class-layout.cpp vendor/clang/dist/test/SemaCXX/conditional-expr.cpp vendor/clang/dist/test/SemaCXX/destructor.cpp vendor/clang/dist/test/SemaCXX/exception-spec.cpp vendor/clang/dist/test/SemaCXX/invalid-member-expr.cpp vendor/clang/dist/test/SemaCXX/namespace-alias.cpp vendor/clang/dist/test/SemaCXX/namespace.cpp vendor/clang/dist/test/SemaCXX/nested-name-spec.cpp vendor/clang/dist/test/SemaCXX/qual-id-test.cpp vendor/clang/dist/test/SemaCXX/static-cast.cpp vendor/clang/dist/test/SemaCXX/warn-reorder-ctor-initialization.cpp vendor/clang/dist/test/SemaObjC/block-type-safety.m vendor/clang/dist/test/SemaObjC/category-1.m vendor/clang/dist/test/SemaObjC/compare-qualified-id.m vendor/clang/dist/test/SemaObjC/comptypes-7.m vendor/clang/dist/test/SemaObjC/conditional-expr.m vendor/clang/dist/test/SemaObjC/gcc-cast-ext.m vendor/clang/dist/test/SemaObjC/ivar-in-implementations.m vendor/clang/dist/test/SemaObjC/ivar-sem-check-1.m vendor/clang/dist/test/SemaObjC/method-arg-decay.m vendor/clang/dist/test/SemaObjC/method-undef-category-warn-1.m vendor/clang/dist/test/SemaObjC/method-undef-extension-warn-1.m vendor/clang/dist/test/SemaObjC/method-undefined-warn-1.m vendor/clang/dist/test/SemaObjC/method-warn-unused-attribute.m vendor/clang/dist/test/SemaObjC/nsobject-attribute.m vendor/clang/dist/test/SemaObjC/property-expression-error.m vendor/clang/dist/test/SemaObjC/property-ivar-mismatch.m vendor/clang/dist/test/SemaObjC/property.m vendor/clang/dist/test/SemaObjC/undef-protocol-methods-1.m vendor/clang/dist/test/SemaTemplate/dependent-base-classes.cpp vendor/clang/dist/test/SemaTemplate/friend-template.cpp vendor/clang/dist/test/SemaTemplate/instantiate-declref.cpp vendor/clang/dist/test/SemaTemplate/instantiate-expr-4.cpp vendor/clang/dist/test/SemaTemplate/instantiate-init.cpp vendor/clang/dist/test/SemaTemplate/instantiate-member-class.cpp vendor/clang/dist/test/SemaTemplate/instantiate-member-initializers.cpp vendor/clang/dist/test/SemaTemplate/instantiation-default-2.cpp vendor/clang/dist/test/SemaTemplate/temp_arg_nontype.cpp vendor/clang/dist/tools/CIndex/CIndex.cpp vendor/clang/dist/tools/CIndex/CIndexDiagnostic.cpp vendor/clang/dist/tools/CIndex/CIndexUSRs.cpp vendor/clang/dist/tools/CIndex/CMakeLists.txt vendor/clang/dist/tools/c-index-test/c-index-test.c vendor/clang/dist/tools/driver/Makefile vendor/clang/dist/tools/driver/cc1_main.cpp vendor/clang/dist/tools/driver/driver.cpp vendor/clang/dist/tools/scan-build/scan-build vendor/clang/dist/utils/VtableTest/Makefile vendor/clang/dist/utils/VtableTest/check-ztt vendor/clang/dist/www/analyzer/latest_checker.html.incl vendor/clang/dist/www/get_started.html Modified: vendor/clang/dist/CMakeLists.txt ============================================================================== --- vendor/clang/dist/CMakeLists.txt Fri Apr 2 08:54:30 2010 (r206083) +++ vendor/clang/dist/CMakeLists.txt Fri Apr 2 08:55:10 2010 (r206084) @@ -92,6 +92,12 @@ install(DIRECTORY include/ PATTERN ".svn" EXCLUDE ) +install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/include/ + DESTINATION include + FILES_MATCHING + PATTERN "*.inc" + ) + add_definitions( -D_GNU_SOURCE ) option(CLANG_BUILD_EXAMPLES "Build CLANG example programs." OFF) Modified: vendor/clang/dist/clang.xcodeproj/project.pbxproj ============================================================================== --- vendor/clang/dist/clang.xcodeproj/project.pbxproj Fri Apr 2 08:54:30 2010 (r206083) +++ vendor/clang/dist/clang.xcodeproj/project.pbxproj Fri Apr 2 08:55:10 2010 (r206084) @@ -12,7 +12,6 @@ 1A2193CE0F45EEB700C0713D /* Mangle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A2193CC0F45EEB700C0713D /* Mangle.cpp */; }; 1A2A54B50FD1DD1C00F4CE45 /* AnalysisConsumer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A2A54A40FD1DD1C00F4CE45 /* AnalysisConsumer.cpp */; }; 1A2A54B60FD1DD1C00F4CE45 /* ASTConsumers.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A2A54A50FD1DD1C00F4CE45 /* ASTConsumers.cpp */; }; - 1A2A54B70FD1DD1C00F4CE45 /* Backend.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A2A54A60FD1DD1C00F4CE45 /* Backend.cpp */; }; 1A2A54B80FD1DD1C00F4CE45 /* CacheTokens.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A2A54A70FD1DD1C00F4CE45 /* CacheTokens.cpp */; }; 1A2A54B90FD1DD1C00F4CE45 /* DependencyFile.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A2A54A80FD1DD1C00F4CE45 /* DependencyFile.cpp */; }; 1A2A54BA0FD1DD1C00F4CE45 /* DiagChecker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A2A54A90FD1DD1C00F4CE45 /* DiagChecker.cpp */; }; @@ -70,6 +69,8 @@ 1ADF47AF0F782C3200E48A8A /* SemaTemplateInstantiateDecl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ADF47AE0F782C3200E48A8A /* SemaTemplateInstantiateDecl.cpp */; }; 1AE4EE3E103B89ED00888A23 /* StmtProfile.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AE4EE3D103B89ED00888A23 /* StmtProfile.cpp */; }; 1AF1B50F109A4FB800AFAFAC /* CGException.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AF1B50E109A4FB800AFAFAC /* CGException.cpp */; }; + 1AFDD8721161085D00AE030A /* ASTMerge.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AFDD8701161085D00AE030A /* ASTMerge.cpp */; }; + 1AFDD8731161085D00AE030A /* CodeGenAction.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AFDD8711161085D00AE030A /* CodeGenAction.cpp */; }; 1AFF8AE31012BFC900D248DA /* CGRecordLayoutBuilder.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AFF8AE11012BFC900D248DA /* CGRecordLayoutBuilder.cpp */; }; 3507E4C20E27FE2D00FB7B57 /* CheckObjCInstMethSignature.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3507E4C10E27FE2D00FB7B57 /* CheckObjCInstMethSignature.cpp */; }; 352246E70F5C6BE000D0D279 /* HTMLDiagnostics.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 352246E10F5C6BE000D0D279 /* HTMLDiagnostics.cpp */; }; @@ -149,6 +150,11 @@ 90FD6D85103C3D49005F5B73 /* SelectorMap.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 90FD6D7A103C3D49005F5B73 /* SelectorMap.cpp */; }; 90FD6DB6103D977E005F5B73 /* index-test.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 90FD6DB5103D977E005F5B73 /* index-test.cpp */; }; BDF87CF70FD746F300BBF872 /* SemaTemplateDeduction.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BDF87CF60FD746F300BBF872 /* SemaTemplateDeduction.cpp */; }; + BF89C3E211595818001C2D68 /* AnalysisBasedWarnings.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BF89C3E111595818001C2D68 /* AnalysisBasedWarnings.cpp */; }; + BF89C3E91159594A001C2D68 /* SemaObjCProperty.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BF89C3E81159594A001C2D68 /* SemaObjCProperty.cpp */; }; + BF89C3F911595A01001C2D68 /* SemaType.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BF89C3F811595A01001C2D68 /* SemaType.cpp */; }; + BF89C3FB11595A37001C2D68 /* SemaCodeComplete.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BF89C3FA11595A37001C2D68 /* SemaCodeComplete.cpp */; }; + BF89C3FD11595A5D001C2D68 /* SemaExceptionSpec.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BF89C3FC11595A5D001C2D68 /* SemaExceptionSpec.cpp */; }; DE01DA490B12ADA300AC22CE /* PPCallbacks.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = DE01DA480B12ADA300AC22CE /* PPCallbacks.h */; }; DE06756C0C051CFE00EBBFD8 /* ParseExprCXX.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DE06756B0C051CFE00EBBFD8 /* ParseExprCXX.cpp */; }; DE06B73E0A8307640050E87E /* LangOptions.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = DE06B73D0A8307640050E87E /* LangOptions.h */; }; @@ -365,7 +371,6 @@ 1A2193CD0F45EEB700C0713D /* Mangle.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = Mangle.h; path = lib/CodeGen/Mangle.h; sourceTree = ""; tabWidth = 2; }; 1A2A54A40FD1DD1C00F4CE45 /* AnalysisConsumer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = AnalysisConsumer.cpp; path = lib/Frontend/AnalysisConsumer.cpp; sourceTree = ""; }; 1A2A54A50FD1DD1C00F4CE45 /* ASTConsumers.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = ASTConsumers.cpp; path = lib/Frontend/ASTConsumers.cpp; sourceTree = ""; tabWidth = 2; }; - 1A2A54A60FD1DD1C00F4CE45 /* Backend.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Backend.cpp; path = lib/Frontend/Backend.cpp; sourceTree = ""; }; 1A2A54A70FD1DD1C00F4CE45 /* CacheTokens.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CacheTokens.cpp; path = lib/Frontend/CacheTokens.cpp; sourceTree = ""; }; 1A2A54A80FD1DD1C00F4CE45 /* DependencyFile.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DependencyFile.cpp; path = lib/Frontend/DependencyFile.cpp; sourceTree = ""; }; 1A2A54A90FD1DD1C00F4CE45 /* DiagChecker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DiagChecker.cpp; path = lib/Frontend/DiagChecker.cpp; sourceTree = ""; }; @@ -446,8 +451,9 @@ 1AE4EE3B103B89CA00888A23 /* TreeTransform.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = TreeTransform.h; path = lib/Sema/TreeTransform.h; sourceTree = ""; tabWidth = 2; }; 1AE4EE3D103B89ED00888A23 /* StmtProfile.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = StmtProfile.cpp; path = lib/AST/StmtProfile.cpp; sourceTree = ""; tabWidth = 2; }; 1AF1B50E109A4FB800AFAFAC /* CGException.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = CGException.cpp; path = lib/CodeGen/CGException.cpp; sourceTree = ""; tabWidth = 2; }; + 1AFDD8701161085D00AE030A /* ASTMerge.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ASTMerge.cpp; path = lib/Frontend/ASTMerge.cpp; sourceTree = ""; }; + 1AFDD8711161085D00AE030A /* CodeGenAction.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CodeGenAction.cpp; path = lib/Frontend/CodeGenAction.cpp; sourceTree = ""; }; 1AFF8AE11012BFC900D248DA /* CGRecordLayoutBuilder.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = CGRecordLayoutBuilder.cpp; path = lib/CodeGen/CGRecordLayoutBuilder.cpp; sourceTree = ""; tabWidth = 2; }; - 1AFF8AE21012BFC900D248DA /* CGRecordLayoutBuilder.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = CGRecordLayoutBuilder.h; path = lib/CodeGen/CGRecordLayoutBuilder.h; sourceTree = ""; tabWidth = 2; }; 3507E4C10E27FE2D00FB7B57 /* CheckObjCInstMethSignature.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CheckObjCInstMethSignature.cpp; path = lib/Analysis/CheckObjCInstMethSignature.cpp; sourceTree = ""; }; 352246E10F5C6BE000D0D279 /* HTMLDiagnostics.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = HTMLDiagnostics.cpp; path = lib/Frontend/HTMLDiagnostics.cpp; sourceTree = ""; }; 352246E20F5C6BE000D0D279 /* InitHeaderSearch.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = InitHeaderSearch.cpp; path = lib/Frontend/InitHeaderSearch.cpp; sourceTree = ""; }; @@ -618,6 +624,15 @@ 90FD6D91103C3D80005F5B73 /* Utils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Utils.h; path = clang/Frontend/Utils.h; sourceTree = ""; }; 90FD6DB5103D977E005F5B73 /* index-test.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = "index-test.cpp"; path = "tools/index-test/index-test.cpp"; sourceTree = ""; }; BDF87CF60FD746F300BBF872 /* SemaTemplateDeduction.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = SemaTemplateDeduction.cpp; path = lib/Sema/SemaTemplateDeduction.cpp; sourceTree = ""; tabWidth = 2; }; + BF89C3E0115957FF001C2D68 /* AnalysisBasedWarnings.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AnalysisBasedWarnings.h; path = lib/Sema/AnalysisBasedWarnings.h; sourceTree = ""; }; + BF89C3E111595818001C2D68 /* AnalysisBasedWarnings.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = AnalysisBasedWarnings.cpp; path = lib/Sema/AnalysisBasedWarnings.cpp; sourceTree = ""; }; + BF89C3E311595835001C2D68 /* Lookup.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Lookup.h; path = lib/Sema/Lookup.h; sourceTree = ""; }; + BF89C3E411595855001C2D68 /* SemaInit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SemaInit.h; path = lib/Sema/SemaInit.h; sourceTree = ""; }; + BF89C3E5115958A1001C2D68 /* TargetAttributesSema.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TargetAttributesSema.h; path = lib/Sema/TargetAttributesSema.h; sourceTree = ""; }; + BF89C3E81159594A001C2D68 /* SemaObjCProperty.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SemaObjCProperty.cpp; path = lib/Sema/SemaObjCProperty.cpp; sourceTree = ""; }; + BF89C3F811595A01001C2D68 /* SemaType.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SemaType.cpp; path = lib/Sema/SemaType.cpp; sourceTree = ""; }; + BF89C3FA11595A37001C2D68 /* SemaCodeComplete.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SemaCodeComplete.cpp; path = lib/Sema/SemaCodeComplete.cpp; sourceTree = ""; }; + BF89C3FC11595A5D001C2D68 /* SemaExceptionSpec.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SemaExceptionSpec.cpp; path = lib/Sema/SemaExceptionSpec.cpp; sourceTree = ""; }; DE01DA480B12ADA300AC22CE /* PPCallbacks.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = PPCallbacks.h; sourceTree = ""; }; DE06756B0C051CFE00EBBFD8 /* ParseExprCXX.cpp */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = ParseExprCXX.cpp; path = lib/Parse/ParseExprCXX.cpp; sourceTree = ""; tabWidth = 2; }; DE06B73D0A8307640050E87E /* LangOptions.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 2; lastKnownFileType = sourcecode.c.h; path = LangOptions.h; sourceTree = ""; tabWidth = 2; }; @@ -948,10 +963,11 @@ 352246E00F5C6BC000D0D279 /* Frontend */ = { isa = PBXGroup; children = ( + 1AFDD8701161085D00AE030A /* ASTMerge.cpp */, 9012911C1048068D0083456D /* ASTUnit.cpp */, 1A2A54A40FD1DD1C00F4CE45 /* AnalysisConsumer.cpp */, 1A2A54A50FD1DD1C00F4CE45 /* ASTConsumers.cpp */, - 1A2A54A60FD1DD1C00F4CE45 /* Backend.cpp */, + 1AFDD8711161085D00AE030A /* CodeGenAction.cpp */, 1A2A54A70FD1DD1C00F4CE45 /* CacheTokens.cpp */, 1ACB57DB1105820D0047B991 /* CompilerInstance.cpp */, 1ACB57DC1105820D0047B991 /* CompilerInvocation.cpp */, @@ -1257,29 +1273,36 @@ DE67E7070C020EAB00F66BC5 /* Sema */ = { isa = PBXGroup; children = ( + BF89C3E111595818001C2D68 /* AnalysisBasedWarnings.cpp */, + BF89C3E0115957FF001C2D68 /* AnalysisBasedWarnings.h */, 35585DBD0EAFBC4500D0A97A /* CXXFieldCollector.h */, 1A6B6CD110693FC900BB4A8F /* CodeCompleteConsumer.cpp */, 3527124F0DAFE54700C76352 /* IdentifierResolver.h */, 352712500DAFE54700C76352 /* IdentifierResolver.cpp */, DECB6D640F9AE26600F5FBC7 /* JumpDiagnostics.cpp */, + BF89C3E311595835001C2D68 /* Lookup.h */, DE67E7190C020F4F00F66BC5 /* ParseAST.cpp */, DE67E7140C020EDF00F66BC5 /* Sema.h */, DE67E7160C020EE400F66BC5 /* Sema.cpp */, 1A701B630F7C8FE400FEC4D1 /* SemaAccess.cpp */, DEB07AC70F4A427E00F5A2BE /* SemaAttr.cpp */, DEF2F00F0C6CFED5000C4259 /* SemaChecking.cpp */, + BF89C3FA11595A37001C2D68 /* SemaCodeComplete.cpp */, 35E194670ECB82FB00F21733 /* SemaCXXScopeSpec.cpp */, DE67E7120C020ED900F66BC5 /* SemaDecl.cpp */, DE22BCF10E14197E0094DC60 /* SemaDeclAttr.cpp */, 35EF676F0DAD1D2C00B19414 /* SemaDeclCXX.cpp */, DE704B250D0FBEBE009C7762 /* SemaDeclObjC.cpp */, + BF89C3FC11595A5D001C2D68 /* SemaExceptionSpec.cpp */, DE67E7100C020ED400F66BC5 /* SemaExpr.cpp */, DE47999B0D2EBE1A00706D2D /* SemaExprObjC.cpp */, DE67E70E0C020ECF00F66BC5 /* SemaExprCXX.cpp */, + BF89C3E411595855001C2D68 /* SemaInit.h */, 3599299A0DE2425300A8A33E /* SemaInit.cpp */, 357EA27C0F2526F300439B60 /* SemaLookup.cpp */, 1A6B6CD210693FC900BB4A8F /* SemaCodeComplete.cpp */, 35E194680ECB82FB00F21733 /* SemaCXXCast.cpp */, + BF89C3E81159594A001C2D68 /* SemaObjCProperty.cpp */, 35585DBE0EAFBC4500D0A97A /* SemaOverload.cpp */, 35585DBF0EAFBC4500D0A97A /* SemaOverload.h */, DE67E70C0C020ECA00F66BC5 /* SemaStmt.cpp */, @@ -1288,7 +1311,9 @@ BDF87CF60FD746F300BBF872 /* SemaTemplateDeduction.cpp */, 35544B8B0F5C803200D92AA9 /* SemaTemplateInstantiate.cpp */, 1ADF47AE0F782C3200E48A8A /* SemaTemplateInstantiateDecl.cpp */, + BF89C3F811595A01001C2D68 /* SemaType.cpp */, 1AE4EE3B103B89CA00888A23 /* TreeTransform.h */, + BF89C3E5115958A1001C2D68 /* TargetAttributesSema.h */, ); name = Sema; sourceTree = ""; @@ -1334,7 +1359,6 @@ DE38CD4F0D794D0100A273B6 /* CGObjCGNU.cpp */, 3552E7580E520DD7003A8CA5 /* CGObjCMac.cpp */, 1AFF8AE11012BFC900D248DA /* CGRecordLayoutBuilder.cpp */, - 1AFF8AE21012BFC900D248DA /* CGRecordLayoutBuilder.h */, 1A6C01F6108128710072DEE4 /* CGRTTI.cpp */, DE4772F90C10EAE5002239E8 /* CGStmt.cpp */, 1A6FE7080FD6F85800E00CA9 /* CGTemporaries.cpp */, @@ -1930,7 +1954,6 @@ DECB78170FA5882F00F5FBC7 /* PCHWriterStmt.cpp in Sources */, 1A2A54B50FD1DD1C00F4CE45 /* AnalysisConsumer.cpp in Sources */, 1A2A54B60FD1DD1C00F4CE45 /* ASTConsumers.cpp in Sources */, - 1A2A54B70FD1DD1C00F4CE45 /* Backend.cpp in Sources */, 1A2A54B80FD1DD1C00F4CE45 /* CacheTokens.cpp in Sources */, 1A2A54B90FD1DD1C00F4CE45 /* DependencyFile.cpp in Sources */, 1A2A54BA0FD1DD1C00F4CE45 /* DiagChecker.cpp in Sources */, @@ -1997,6 +2020,13 @@ 1A621C4511111D61009E6834 /* CIndexUSRs.cpp in Sources */, 1A621C4611111D61009E6834 /* CXCursor.cpp in Sources */, 1A96785211486FDC00F24372 /* RecordLayout.cpp in Sources */, + BF89C3E211595818001C2D68 /* AnalysisBasedWarnings.cpp in Sources */, + BF89C3E91159594A001C2D68 /* SemaObjCProperty.cpp in Sources */, + BF89C3F911595A01001C2D68 /* SemaType.cpp in Sources */, + BF89C3FB11595A37001C2D68 /* SemaCodeComplete.cpp in Sources */, + BF89C3FD11595A5D001C2D68 /* SemaExceptionSpec.cpp in Sources */, + 1AFDD8721161085D00AE030A /* ASTMerge.cpp in Sources */, + 1AFDD8731161085D00AE030A /* CodeGenAction.cpp in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; Modified: vendor/clang/dist/examples/clang-interpreter/main.cpp ============================================================================== --- vendor/clang/dist/examples/clang-interpreter/main.cpp Fri Apr 2 08:54:30 2010 (r206083) +++ vendor/clang/dist/examples/clang-interpreter/main.cpp Fri Apr 2 08:55:10 2010 (r206084) @@ -71,7 +71,8 @@ int main(int argc, const char **argv, ch Diagnostic Diags(&DiagClient); Driver TheDriver(Path.getBasename(), Path.getDirname(), llvm::sys::getHostTriple(), - "a.out", /*IsProduction=*/false, Diags); + "a.out", /*IsProduction=*/false, /*CXXIsProduction=*/false, + Diags); TheDriver.setTitle("clang interpreter"); // FIXME: This is a hack to try to force the driver to do something we can Modified: vendor/clang/dist/include/clang/AST/ASTContext.h ============================================================================== --- vendor/clang/dist/include/clang/AST/ASTContext.h Fri Apr 2 08:54:30 2010 (r206083) +++ vendor/clang/dist/include/clang/AST/ASTContext.h Fri Apr 2 08:55:10 2010 (r206084) @@ -17,6 +17,7 @@ #include "clang/Basic/IdentifierTable.h" #include "clang/Basic/LangOptions.h" #include "clang/Basic/OperatorKinds.h" +#include "clang/Basic/PartialDiagnostic.h" #include "clang/AST/Attr.h" #include "clang/AST/Decl.h" #include "clang/AST/NestedNameSpecifier.h" @@ -57,6 +58,7 @@ namespace clang { class ObjCIvarRefExpr; class ObjCPropertyDecl; class RecordDecl; + class StoredDeclsMap; class TagDecl; class TemplateTypeParmDecl; class TranslationUnitDecl; @@ -115,7 +117,7 @@ class ASTContext { llvm::FoldingSet SubstTemplateTypeParmTypes; llvm::FoldingSet TemplateSpecializationTypes; llvm::FoldingSet QualifiedNameTypes; - llvm::FoldingSet TypenameTypes; + llvm::FoldingSet DependentNameTypes; llvm::FoldingSet ObjCInterfaceTypes; llvm::FoldingSet ObjCObjectPointerTypes; llvm::FoldingSet ElaboratedTypes; @@ -264,6 +266,9 @@ class ASTContext { llvm::MallocAllocator MallocAlloc; llvm::BumpPtrAllocator BumpAlloc; + /// \brief Allocator for partial diagnostics. + PartialDiagnostic::StorageAllocator DiagAllocator; + public: const TargetInfo &Target; IdentifierTable &Idents; @@ -289,6 +294,11 @@ public: if (FreeMemory) MallocAlloc.Deallocate(Ptr); } + + PartialDiagnostic::StorageAllocator &getDiagAllocator() { + return DiagAllocator; + } + const LangOptions& getLangOptions() const { return LangOpts; } FullSourceLoc getFullLoc(SourceLocation Loc) const { @@ -437,6 +447,11 @@ public: /// allowable type. QualType getCallConvType(QualType T, CallingConv CallConv); + /// getRegParmType - Sets the specified regparm attribute to + /// the given type, which must be a FunctionType or a pointer to an + /// allowable type. + QualType getRegParmType(QualType T, unsigned RegParm); + /// getComplexType - Return the uniqued reference to the type for a complex /// number with the specified element type. QualType getComplexType(QualType T); @@ -554,8 +569,12 @@ public: /// getFunctionNoProtoType - Return a K&R style C function type like 'int()'. /// - QualType getFunctionNoProtoType(QualType ResultTy, bool NoReturn = false, - CallingConv CallConv = CC_Default); + QualType getFunctionNoProtoType(QualType ResultTy, + const FunctionType::ExtInfo &Info); + + QualType getFunctionNoProtoType(QualType ResultTy) { + return getFunctionNoProtoType(ResultTy, FunctionType::ExtInfo()); + } /// getFunctionType - Return a normal function type with a typed argument /// list. isVariadic indicates whether the argument list includes '...'. @@ -564,8 +583,7 @@ public: unsigned TypeQuals, bool hasExceptionSpec, bool hasAnyExceptionSpec, unsigned NumExs, const QualType *ExArray, - bool NoReturn, - CallingConv CallConv); + const FunctionType::ExtInfo &Info); /// getTypeDeclType - Return the unique reference to the type for /// the specified type declaration. @@ -612,12 +630,14 @@ public: QualType getQualifiedNameType(NestedNameSpecifier *NNS, QualType NamedType); - QualType getTypenameType(NestedNameSpecifier *NNS, - const IdentifierInfo *Name, - QualType Canon = QualType()); - QualType getTypenameType(NestedNameSpecifier *NNS, - const TemplateSpecializationType *TemplateId, - QualType Canon = QualType()); + QualType getDependentNameType(ElaboratedTypeKeyword Keyword, + NestedNameSpecifier *NNS, + const IdentifierInfo *Name, + QualType Canon = QualType()); + QualType getDependentNameType(ElaboratedTypeKeyword Keyword, + NestedNameSpecifier *NNS, + const TemplateSpecializationType *TemplateId, + QualType Canon = QualType()); QualType getElaboratedType(QualType UnderlyingType, ElaboratedType::TagKind Tag); @@ -937,8 +957,7 @@ public: llvm::SmallVectorImpl &Ivars); void CollectNonClassIvars(const ObjCInterfaceDecl *OI, llvm::SmallVectorImpl &Ivars); - unsigned CountSynthesizedIvars(const ObjCInterfaceDecl *OI); - unsigned CountProtocolSynthesizedIvars(const ObjCProtocolDecl *PD); + unsigned CountNonClassIvars(const ObjCInterfaceDecl *OI); void CollectInheritedProtocols(const Decl *CDecl, llvm::SmallPtrSet &Protocols); @@ -1273,9 +1292,8 @@ private: // FIXME: This currently contains the set of StoredDeclMaps used // by DeclContext objects. This probably should not be in ASTContext, // but we include it here so that ASTContext can quickly deallocate them. - std::vector SDMs; + llvm::PointerIntPair LastSDM; friend class DeclContext; - void *CreateStoredDeclsMap(); void ReleaseDeclContextMaps(); }; Modified: vendor/clang/dist/include/clang/AST/CXXInheritance.h ============================================================================== --- vendor/clang/dist/include/clang/AST/CXXInheritance.h Fri Apr 2 08:54:30 2010 (r206083) +++ vendor/clang/dist/include/clang/AST/CXXInheritance.h Fri Apr 2 08:55:10 2010 (r206084) @@ -19,6 +19,7 @@ #include "clang/AST/DeclCXX.h" #include "clang/AST/Type.h" #include "clang/AST/TypeOrdering.h" +#include "llvm/ADT/DenseMap.h" #include "llvm/ADT/SmallVector.h" #include #include @@ -227,6 +228,137 @@ public: /// object. void swap(CXXBasePaths &Other); }; + +/// \brief Uniquely identifies a virtual method within a class +/// hierarchy by the method itself and a class subobject number. +struct UniqueVirtualMethod { + UniqueVirtualMethod() : Method(0), Subobject(0), InVirtualSubobject(0) { } + + UniqueVirtualMethod(CXXMethodDecl *Method, unsigned Subobject, + const CXXRecordDecl *InVirtualSubobject) + : Method(Method), Subobject(Subobject), + InVirtualSubobject(InVirtualSubobject) { } + + /// \brief The overriding virtual method. + CXXMethodDecl *Method; + + /// \brief The subobject in which the overriding virtual method + /// resides. + unsigned Subobject; + + /// \brief The virtual base class subobject of which this overridden + /// virtual method is a part. Note that this records the closest + /// derived virtual base class subobject. + const CXXRecordDecl *InVirtualSubobject; + + friend bool operator==(const UniqueVirtualMethod &X, + const UniqueVirtualMethod &Y) { + return X.Method == Y.Method && X.Subobject == Y.Subobject && + X.InVirtualSubobject == Y.InVirtualSubobject; + } + + friend bool operator!=(const UniqueVirtualMethod &X, + const UniqueVirtualMethod &Y) { + return !(X == Y); + } +}; + +/// \brief The set of methods that override a given virtual method in +/// each subobject where it occurs. +/// +/// The first part of the pair is the subobject in which the +/// overridden virtual function occurs, while the second part of the +/// pair is the virtual method that overrides it (including the +/// subobject in which that virtual function occurs). +class OverridingMethods { + llvm::DenseMap > + Overrides; + +public: + // Iterate over the set of subobjects that have overriding methods. + typedef llvm::DenseMap > + ::iterator iterator; + typedef llvm::DenseMap > + ::const_iterator const_iterator; + iterator begin() { return Overrides.begin(); } + const_iterator begin() const { return Overrides.begin(); } + iterator end() { return Overrides.end(); } + const_iterator end() const { return Overrides.end(); } + unsigned size() const { return Overrides.size(); } + + // Iterate over the set of overriding virtual methods in a given + // subobject. + typedef llvm::SmallVector::iterator + overriding_iterator; + typedef llvm::SmallVector::const_iterator + overriding_const_iterator; + + // Add a new overriding method for a particular subobject. + void add(unsigned OverriddenSubobject, UniqueVirtualMethod Overriding); + + // Add all of the overriding methods from "other" into overrides for + // this method. Used when merging the overrides from multiple base + // class subobjects. + void add(const OverridingMethods &Other); + + // Replace all overriding virtual methods in all subobjects with the + // given virtual method. + void replaceAll(UniqueVirtualMethod Overriding); +}; + +/// \brief A mapping from each virtual member function to its set of +/// final overriders. +/// +/// Within a class hierarchy for a given derived class, each virtual +/// member function in that hierarchy has one or more "final +/// overriders" (C++ [class.virtual]p2). A final overrider for a +/// virtual function "f" is the virtual function that will actually be +/// invoked when dispatching a call to "f" through the +/// vtable. Well-formed classes have a single final overrider for each +/// virtual function; in abstract classes, the final overrider for at +/// least one virtual function is a pure virtual function. Due to +/// multiple, virtual inheritance, it is possible for a class to have +/// more than one final overrider. Athough this is an error (per C++ +/// [class.virtual]p2), it is not considered an error here: the final +/// overrider map can represent multiple final overriders for a +/// method, and it is up to the client to determine whether they are +/// problem. For example, the following class \c D has two final +/// overriders for the virtual function \c A::f(), one in \c C and one +/// in \c D: +/// +/// \code +/// struct A { virtual void f(); }; +/// struct B : virtual A { virtual void f(); }; +/// struct C : virtual A { virtual void f(); }; +/// struct D : B, C { }; +/// \endcode +/// +/// This data structure contaings a mapping from every virtual +/// function *that does not override an existing virtual function* and +/// in every subobject where that virtual function occurs to the set +/// of virtual functions that override it. Thus, the same virtual +/// function \c A::f can actually occur in multiple subobjects of type +/// \c A due to multiple inheritance, and may be overriden by +/// different virtual functions in each, as in the following example: +/// +/// \code +/// struct A { virtual void f(); }; +/// struct B : A { virtual void f(); }; +/// struct C : A { virtual void f(); }; +/// struct D : B, C { }; +/// \endcode +/// +/// Unlike in the previous example, where the virtual functions \c +/// B::f and \c C::f both overrode \c A::f in the same subobject of +/// type \c A, in this example the two virtual functions both override +/// \c A::f but in *different* subobjects of type A. This is +/// represented by numbering the subobjects in which the overridden +/// and the overriding virtual member functions are located. Subobject +/// 0 represents the virtua base class subobject of that type, while +/// subobject numbers greater than 0 refer to non-virtual base class +/// subobjects of that type. +class CXXFinalOverriderMap + : public llvm::DenseMap { }; } // end namespace clang Modified: vendor/clang/dist/include/clang/AST/CanonicalType.h ============================================================================== --- vendor/clang/dist/include/clang/AST/CanonicalType.h Fri Apr 2 08:54:30 2010 (r206083) +++ vendor/clang/dist/include/clang/AST/CanonicalType.h Fri Apr 2 08:55:10 2010 (r206084) @@ -165,6 +165,8 @@ public: // (dynamic) type. static CanQual CreateUnsafe(QualType Other); + void dump() const { Stored.dump(); } + void Profile(llvm::FoldingSetNodeID &ID) const { ID.AddPointer(getAsOpaquePtr()); } @@ -562,24 +564,21 @@ struct CanProxyAdaptor : template<> struct CanProxyAdaptor : public CanProxyBase { LLVM_CLANG_CANPROXY_TYPE_ACCESSOR(getResultType) - LLVM_CLANG_CANPROXY_SIMPLE_ACCESSOR(bool, getNoReturnAttr) - LLVM_CLANG_CANPROXY_SIMPLE_ACCESSOR(CallingConv, getCallConv) + LLVM_CLANG_CANPROXY_SIMPLE_ACCESSOR(FunctionType::ExtInfo, getExtInfo) }; template<> struct CanProxyAdaptor : public CanProxyBase { LLVM_CLANG_CANPROXY_TYPE_ACCESSOR(getResultType) - LLVM_CLANG_CANPROXY_SIMPLE_ACCESSOR(bool, getNoReturnAttr) - LLVM_CLANG_CANPROXY_SIMPLE_ACCESSOR(CallingConv, getCallConv) + LLVM_CLANG_CANPROXY_SIMPLE_ACCESSOR(FunctionType::ExtInfo, getExtInfo) }; template<> struct CanProxyAdaptor : public CanProxyBase { LLVM_CLANG_CANPROXY_TYPE_ACCESSOR(getResultType) - LLVM_CLANG_CANPROXY_SIMPLE_ACCESSOR(bool, getNoReturnAttr) - LLVM_CLANG_CANPROXY_SIMPLE_ACCESSOR(CallingConv, getCallConv) + LLVM_CLANG_CANPROXY_SIMPLE_ACCESSOR(FunctionType::ExtInfo, getExtInfo) LLVM_CLANG_CANPROXY_SIMPLE_ACCESSOR(unsigned, getNumArgs) CanQualType getArgType(unsigned i) const { return CanQualType::CreateUnsafe(this->getTypePtr()->getArgType(i)); Modified: vendor/clang/dist/include/clang/AST/Decl.h ============================================================================== --- vendor/clang/dist/include/clang/AST/Decl.h Fri Apr 2 08:54:30 2010 (r206083) +++ vendor/clang/dist/include/clang/AST/Decl.h Fri Apr 2 08:55:10 2010 (r206084) @@ -224,18 +224,26 @@ class NamespaceDecl : public NamedDecl, // NextNamespace points to the next extended declaration. // OrigNamespace points to the original namespace declaration. // OrigNamespace of the first namespace decl points to itself. - NamespaceDecl *OrigNamespace, *NextNamespace; + NamespaceDecl *NextNamespace; - // The (most recently entered) anonymous namespace inside this - // namespace. - NamespaceDecl *AnonymousNamespace; + /// \brief A pointer to either the original namespace definition for + /// this namespace (if the boolean value is false) or the anonymous + /// namespace that lives just inside this namespace (if the boolean + /// value is true). + /// + /// We can combine these two notions because the anonymous namespace + /// must only be stored in one of the namespace declarations (so all + /// of the namespace declarations can find it). We therefore choose + /// the original namespace declaration, since all of the namespace + /// declarations have a link directly to it; the original namespace + /// declaration itself only needs to know that it is the original + /// namespace declaration (which the boolean indicates). + llvm::PointerIntPair OrigOrAnonNamespace; NamespaceDecl(DeclContext *DC, SourceLocation L, IdentifierInfo *Id) - : NamedDecl(Namespace, DC, L, Id), DeclContext(Namespace) { - OrigNamespace = this; - NextNamespace = 0; - AnonymousNamespace = 0; - } + : NamedDecl(Namespace, DC, L, Id), DeclContext(Namespace), + NextNamespace(0), OrigOrAnonNamespace(0, true) { } + public: static NamespaceDecl *Create(ASTContext &C, DeclContext *DC, SourceLocation L, IdentifierInfo *Id); @@ -258,22 +266,33 @@ public: void setNextNamespace(NamespaceDecl *ND) { NextNamespace = ND; } NamespaceDecl *getOriginalNamespace() const { - return OrigNamespace; + if (OrigOrAnonNamespace.getInt()) + return const_cast(this); + + return OrigOrAnonNamespace.getPointer(); + } + + void setOriginalNamespace(NamespaceDecl *ND) { + if (ND != this) { + OrigOrAnonNamespace.setPointer(ND); + OrigOrAnonNamespace.setInt(false); + } } - void setOriginalNamespace(NamespaceDecl *ND) { OrigNamespace = ND; } NamespaceDecl *getAnonymousNamespace() const { - return AnonymousNamespace; + return getOriginalNamespace()->OrigOrAnonNamespace.getPointer(); } void setAnonymousNamespace(NamespaceDecl *D) { assert(!D || D->isAnonymousNamespace()); assert(!D || D->getParent() == this); - AnonymousNamespace = D; + getOriginalNamespace()->OrigOrAnonNamespace.setPointer(D); } - virtual NamespaceDecl *getCanonicalDecl() { return OrigNamespace; } - const NamespaceDecl *getCanonicalDecl() const { return OrigNamespace; } + virtual NamespaceDecl *getCanonicalDecl() { return getOriginalNamespace(); } + const NamespaceDecl *getCanonicalDecl() const { + return getOriginalNamespace(); + } virtual SourceRange getSourceRange() const { return SourceRange(getLocation(), RBracLoc); @@ -1819,12 +1838,12 @@ class RecordDecl : public TagDecl { /// If so, this cannot be contained in arrays or other structs as a member. bool HasFlexibleArrayMember : 1; - /// AnonymousStructOrUnion - Whether this is the type of an - /// anonymous struct or union. + /// AnonymousStructOrUnion - Whether this is the type of an anonymous struct + /// or union. bool AnonymousStructOrUnion : 1; - /// HasObjectMember - This is true if this struct has at least one - /// member containing an object + /// HasObjectMember - This is true if this struct has at least one member + /// containing an object. bool HasObjectMember : 1; protected: Modified: vendor/clang/dist/include/clang/AST/DeclBase.h ============================================================================== --- vendor/clang/dist/include/clang/AST/DeclBase.h Fri Apr 2 08:54:30 2010 (r206083) +++ vendor/clang/dist/include/clang/AST/DeclBase.h Fri Apr 2 08:55:10 2010 (r206084) @@ -41,6 +41,8 @@ class LinkageSpecDecl; class BlockDecl; class DeclarationName; class CompoundStmt; +class StoredDeclsMap; +class DependentDiagnostic; } namespace llvm { @@ -450,15 +452,23 @@ public: /// same entity may not (and probably don't) share this property. void setObjectOfFriendDecl(bool PreviouslyDeclared) { unsigned OldNS = IdentifierNamespace; - assert((OldNS == IDNS_Tag || OldNS == IDNS_Ordinary || - OldNS == (IDNS_Tag | IDNS_Ordinary)) - && "unsupported namespace for undeclared friend"); - if (!PreviouslyDeclared) IdentifierNamespace = 0; + assert((OldNS & (IDNS_Tag | IDNS_Ordinary | + IDNS_TagFriend | IDNS_OrdinaryFriend)) && + "namespace includes neither ordinary nor tag"); + assert(!(OldNS & ~(IDNS_Tag | IDNS_Ordinary | + IDNS_TagFriend | IDNS_OrdinaryFriend)) && + "namespace includes other than ordinary or tag"); - if (OldNS == IDNS_Tag) + IdentifierNamespace = 0; + if (OldNS & (IDNS_Tag | IDNS_TagFriend)) { IdentifierNamespace |= IDNS_TagFriend; - else + if (PreviouslyDeclared) IdentifierNamespace |= IDNS_Tag; + } + + if (OldNS & (IDNS_Ordinary | IDNS_OrdinaryFriend)) { IdentifierNamespace |= IDNS_OrdinaryFriend; + if (PreviouslyDeclared) IdentifierNamespace |= IDNS_Ordinary; + } } enum FriendObjectKind { @@ -545,9 +555,9 @@ class DeclContext { mutable bool ExternalVisibleStorage : 1; /// \brief Pointer to the data structure used to lookup declarations - /// within this context, which is a DenseMap. - mutable void* LookupPtr; + /// within this context (or a DependentStoredDeclsMap if this is a + /// dependent context). + mutable StoredDeclsMap *LookupPtr; /// FirstDecl - The first declaration stored within this declaration /// context. @@ -674,6 +684,9 @@ public: /// "primary" DeclContext structure, which will contain the /// information needed to perform name lookup into this context. DeclContext *getPrimaryContext(); + const DeclContext *getPrimaryContext() const { + return const_cast(this)->getPrimaryContext(); + } /// getLookupContext - Retrieve the innermost non-transparent /// context of this context, which corresponds to the innermost @@ -976,10 +989,15 @@ public: return getUsingDirectives().second; } + // These are all defined in DependentDiagnostic.h. + class ddiag_iterator; + inline ddiag_iterator ddiag_begin() const; + inline ddiag_iterator ddiag_end() const; + // Low-level accessors /// \brief Retrieve the internal representation of the lookup structure. - void* getLookupPtr() const { return LookupPtr; } + StoredDeclsMap* getLookupPtr() const { return LookupPtr; } /// \brief Whether this DeclContext has external storage containing /// additional declarations that are lexically in this context. @@ -1013,6 +1031,9 @@ private: void LoadLexicalDeclsFromExternalStorage() const; void LoadVisibleDeclsFromExternalStorage() const; + friend class DependentDiagnostic; + StoredDeclsMap *CreateStoredDeclsMap(ASTContext &C) const; + void buildLookup(DeclContext *DCtx); void makeDeclVisibleInContextImpl(NamedDecl *D); }; Modified: vendor/clang/dist/include/clang/AST/DeclCXX.h ============================================================================== --- vendor/clang/dist/include/clang/AST/DeclCXX.h Fri Apr 2 08:54:30 2010 (r206083) +++ vendor/clang/dist/include/clang/AST/DeclCXX.h Fri Apr 2 08:55:10 2010 (r206084) @@ -33,6 +33,7 @@ class CXXDestructorDecl; class CXXMethodDecl; class CXXRecordDecl; class CXXMemberLookupCriteria; +class CXXFinalOverriderMap; class FriendDecl; /// \brief Represents any kind of function declaration, whether it is a @@ -328,6 +329,10 @@ class CXXRecordDecl : public RecordDecl /// instantiated or specialized. llvm::PointerUnion TemplateOrInstantiation; + +#ifndef NDEBUG + void CheckConversionFunction(NamedDecl *D); +#endif protected: CXXRecordDecl(Kind K, TagKind TK, DeclContext *DC, @@ -549,17 +554,26 @@ public: return getConversionFunctions()->replace(Old, New); } + /// Removes a conversion function from this class. The conversion + /// function must currently be a member of this class. Furthermore, + /// this class must currently be in the process of being defined. + void removeConversion(const NamedDecl *Old); + /// getVisibleConversionFunctions - get all conversion functions visible /// in current class; including conversion function templates. const UnresolvedSetImpl *getVisibleConversionFunctions(); - /// addConversionFunction - Add a new conversion function to the - /// list of conversion functions. - void addConversionFunction(CXXConversionDecl *ConvDecl); - - /// \brief Add a new conversion function template to the list of conversion - /// functions. - void addConversionFunction(FunctionTemplateDecl *ConvDecl); + /// addConversionFunction - Registers a conversion function which + /// this class declares directly. + void addConversionFunction(NamedDecl *Decl) { +#ifndef NDEBUG + CheckConversionFunction(Decl); +#endif + + // We intentionally don't use the decl's access here because it + // hasn't been set yet. That's really just a misdesign in Sema. + data().Conversions.addDecl(Decl); + } /// isAggregate - Whether this class is an aggregate (C++ /// [dcl.init.aggr]), which is a class with no user-declared @@ -879,7 +893,12 @@ public: static bool FindNestedNameSpecifierMember(const CXXBaseSpecifier *Specifier, CXXBasePath &Path, void *UserData); - + + /// \brief Retrieve the final overriders for each virtual member + /// function in the class hierarchy where this class is the + /// most-derived class in the class hierarchy. + void getFinalOverriders(CXXFinalOverriderMap &FinaOverriders) const; + /// viewInheritance - Renders and displays an inheritance diagram /// for this C++ class and all of its base classes (transitively) using /// GraphViz. @@ -935,7 +954,7 @@ public: return (CD->begin_overridden_methods() != CD->end_overridden_methods()); } - + /// \brief Determine whether this is a usual deallocation function /// (C++ [basic.stc.dynamic.deallocation]p2), which is an overloaded /// delete or delete[] operator with a particular signature. Modified: vendor/clang/dist/include/clang/AST/DeclContextInternals.h ============================================================================== --- vendor/clang/dist/include/clang/AST/DeclContextInternals.h Fri Apr 2 08:54:30 2010 (r206083) +++ vendor/clang/dist/include/clang/AST/DeclContextInternals.h Fri Apr 2 08:55:10 2010 (r206084) @@ -24,6 +24,8 @@ namespace clang { +class DependentDiagnostic; + /// StoredDeclsList - This is an array of decls optimized a common case of only /// containing one entry. struct StoredDeclsList { @@ -258,8 +260,28 @@ public: } }; -typedef llvm::DenseMap StoredDeclsMap; +class StoredDeclsMap + : public llvm::DenseMap { + +public: + static void DestroyAll(StoredDeclsMap *Map, bool Dependent); + +private: + friend class ASTContext; // walks the chain deleting these + friend class DeclContext; + llvm::PointerIntPair Previous; +}; +class DependentStoredDeclsMap : public StoredDeclsMap { +public: + DependentStoredDeclsMap() : FirstDiagnostic(0) {} + +private: + friend class DependentDiagnostic; + friend class DeclContext; // iterates over diagnostics + + DependentDiagnostic *FirstDiagnostic; +}; } // end namespace clang Modified: vendor/clang/dist/include/clang/AST/DeclFriend.h ============================================================================== --- vendor/clang/dist/include/clang/AST/DeclFriend.h Fri Apr 2 08:54:30 2010 (r206083) +++ vendor/clang/dist/include/clang/AST/DeclFriend.h Fri Apr 2 08:55:10 2010 (r206084) @@ -36,7 +36,7 @@ namespace clang { /// The semantic context of a friend decl is its declaring class. class FriendDecl : public Decl { public: - typedef llvm::PointerUnion FriendUnion; + typedef llvm::PointerUnion FriendUnion; private: // The declaration that's a friend of this class. @@ -73,8 +73,8 @@ public: /// possibly dependent) type, return the type; otherwise /// return null. This is used only for C++0x's unelaborated /// friend type declarations. - Type *getFriendType() const { - return Friend.dyn_cast(); + TypeSourceInfo *getFriendType() const { + return Friend.dyn_cast(); } /// If this friend declaration doesn't name an unelaborated Modified: vendor/clang/dist/include/clang/AST/DeclTemplate.h ============================================================================== --- vendor/clang/dist/include/clang/AST/DeclTemplate.h Fri Apr 2 08:54:30 2010 (r206083) +++ vendor/clang/dist/include/clang/AST/DeclTemplate.h Fri Apr 2 08:55:10 2010 (r206084) @@ -1238,7 +1238,7 @@ public: /// template friend class Foo::Nested; // friend template class FriendTemplateDecl : public Decl { public: - typedef llvm::PointerUnion FriendUnion; + typedef llvm::PointerUnion FriendUnion; private: // The number of template parameters; always non-zero. @@ -1277,8 +1277,8 @@ public: /// If this friend declaration names a templated type (or /// a dependent member type of a templated type), return that /// type; otherwise return null. - Type *getFriendType() const { - return Friend.dyn_cast(); + TypeSourceInfo *getFriendType() const { + return Friend.dyn_cast(); } /// If this friend declaration names a templated function (or Modified: vendor/clang/dist/include/clang/AST/DeclarationName.h ============================================================================== --- vendor/clang/dist/include/clang/AST/DeclarationName.h Fri Apr 2 08:54:30 2010 (r206083) +++ vendor/clang/dist/include/clang/AST/DeclarationName.h Fri Apr 2 08:55:10 2010 (r206084) @@ -378,7 +378,7 @@ inline const PartialDiagnostic &operator Diagnostic::ak_declarationname); return PD; } - + } // end namespace clang namespace llvm { Added: vendor/clang/dist/include/clang/AST/DependentDiagnostic.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/clang/dist/include/clang/AST/DependentDiagnostic.h Fri Apr 2 08:55:10 2010 (r206084) @@ -0,0 +1,183 @@ +//===-- DependentDiagnostic.h - Dependently-generated diagnostics -*- C++ -*-=// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// This file defines interfaces for diagnostics which may or may +// fire based on how a template is instantiated. +// +// At the moment, the only consumer of this interface is access +// control. +// +//===----------------------------------------------------------------------===// + +#ifndef LLVM_CLANG_AST_DEPENDENT_DIAGNOSTIC_H +#define LLVM_CLANG_AST_DEPENDENT_DIAGNOSTIC_H + +#include "clang/Basic/PartialDiagnostic.h" +#include "clang/Basic/SourceLocation.h" +#include "clang/AST/DeclBase.h" +#include "clang/AST/DeclContextInternals.h" + +namespace clang { + +class ASTContext; +class CXXRecordDecl; +class NamedDecl; + +/// A dependently-generated diagnostic. +class DependentDiagnostic { +public: + enum AccessNonce { Access = 0 }; + + static DependentDiagnostic *Create(ASTContext &Context, + DeclContext *Parent, + AccessNonce _, + SourceLocation Loc, + bool IsMemberAccess, + AccessSpecifier AS, + NamedDecl *TargetDecl, + CXXRecordDecl *NamingClass, + const PartialDiagnostic &PDiag) { + DependentDiagnostic *DD = Create(Context, Parent, PDiag); + DD->AccessData.Loc = Loc.getRawEncoding(); + DD->AccessData.IsMember = IsMemberAccess; + DD->AccessData.Access = AS; + DD->AccessData.TargetDecl = TargetDecl; + DD->AccessData.NamingClass = NamingClass; + return DD; + } + + unsigned getKind() const { + return Access; + } + + bool isAccessToMember() const { + assert(getKind() == Access); + return AccessData.IsMember; + } + + AccessSpecifier getAccess() const { + assert(getKind() == Access); + return AccessSpecifier(AccessData.Access); + } + + SourceLocation getAccessLoc() const { + assert(getKind() == Access); + return SourceLocation::getFromRawEncoding(AccessData.Loc); + } + + NamedDecl *getAccessTarget() const { + assert(getKind() == Access); + return AccessData.TargetDecl; + } + + NamedDecl *getAccessNamingClass() const { + assert(getKind() == Access); + return AccessData.NamingClass; + } + + const PartialDiagnostic &getDiagnostic() const { + return Diag; + } + +private: + DependentDiagnostic(const PartialDiagnostic &PDiag, + PartialDiagnostic::Storage *Storage) + : Diag(PDiag, Storage) {} + + static DependentDiagnostic *Create(ASTContext &Context, + DeclContext *Parent, + const PartialDiagnostic &PDiag); + + friend class DependentStoredDeclsMap; + friend class DeclContext::ddiag_iterator; + DependentDiagnostic *NextDiagnostic; + + PartialDiagnostic Diag; + + union { + struct { + unsigned Loc; + unsigned Access : 2; + unsigned IsMember : 1; + NamedDecl *TargetDecl; + CXXRecordDecl *NamingClass; + } AccessData; + }; +}; + +/// + +/// An iterator over the dependent diagnostics in a dependent context. +class DeclContext::ddiag_iterator { +public: + ddiag_iterator() : Ptr(0) {} + explicit ddiag_iterator(DependentDiagnostic *Ptr) : Ptr(Ptr) {} + + typedef DependentDiagnostic *value_type; + typedef DependentDiagnostic *reference; + typedef DependentDiagnostic *pointer; + typedef int difference_type; + typedef std::forward_iterator_tag iterator_category; + + reference operator*() const { return Ptr; } + + ddiag_iterator &operator++() { + assert(Ptr && "attempt to increment past end of diag list"); + Ptr = Ptr->NextDiagnostic; + return *this; + } + + ddiag_iterator operator++(int) { + ddiag_iterator tmp = *this; + ++*this; + return tmp; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-vendor@FreeBSD.ORG Fri Apr 2 16:48: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 E8CA0106564A; Fri, 2 Apr 2010 16:48:51 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D418A8FC19; Fri, 2 Apr 2010 16:48:51 +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 o32GmpBq015125; Fri, 2 Apr 2010 16:48:51 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o32GmpJf015113; Fri, 2 Apr 2010 16:48:51 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201004021648.o32GmpJf015113@svn.freebsd.org> From: Jung-uk Kim Date: Fri, 2 Apr 2010 16:48:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor-sys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206104 - in vendor-sys/acpica/dist: . common compiler debugger events executer include include/platform os_specific/service_layers parser tables tools/acpiexec utilities 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: Fri, 02 Apr 2010 16:48:52 -0000 Author: jkim Date: Fri Apr 2 16:48:51 2010 New Revision: 206104 URL: http://svn.freebsd.org/changeset/base/206104 Log: Import ACPICA 20100331. Modified: vendor-sys/acpica/dist/changes.txt vendor-sys/acpica/dist/common/dmextern.c vendor-sys/acpica/dist/compiler/aslanalyze.c vendor-sys/acpica/dist/compiler/aslcompiler.h vendor-sys/acpica/dist/compiler/aslpredef.c vendor-sys/acpica/dist/compiler/aslstubs.c vendor-sys/acpica/dist/compiler/asltypes.h vendor-sys/acpica/dist/debugger/dbdisply.c vendor-sys/acpica/dist/events/evgpe.c vendor-sys/acpica/dist/events/evgpeblk.c vendor-sys/acpica/dist/events/evxface.c vendor-sys/acpica/dist/events/evxfevnt.c vendor-sys/acpica/dist/executer/exdebug.c vendor-sys/acpica/dist/executer/exmutex.c vendor-sys/acpica/dist/executer/exoparg2.c vendor-sys/acpica/dist/executer/exregion.c vendor-sys/acpica/dist/include/acevents.h vendor-sys/acpica/dist/include/acexcep.h vendor-sys/acpica/dist/include/acglobal.h vendor-sys/acpica/dist/include/aclocal.h vendor-sys/acpica/dist/include/acpixf.h vendor-sys/acpica/dist/include/actables.h vendor-sys/acpica/dist/include/actypes.h vendor-sys/acpica/dist/include/platform/acfreebsd.h vendor-sys/acpica/dist/os_specific/service_layers/oswintbl.c vendor-sys/acpica/dist/os_specific/service_layers/oswinxf.c vendor-sys/acpica/dist/parser/psxface.c vendor-sys/acpica/dist/tables/tbutils.c vendor-sys/acpica/dist/tables/tbxface.c vendor-sys/acpica/dist/tools/acpiexec/aeexec.c vendor-sys/acpica/dist/utilities/utglobal.c Modified: vendor-sys/acpica/dist/changes.txt ============================================================================== --- vendor-sys/acpica/dist/changes.txt Fri Apr 2 16:09:55 2010 (r206103) +++ vendor-sys/acpica/dist/changes.txt Fri Apr 2 16:48:51 2010 (r206104) @@ -1,4 +1,79 @@ ---------------------------------------- +31 March 2010. Summary of changes for version 20100331: + +1) ACPI CA Core Subsystem: + +Completed a major update for the GPE support in order to improve support for +shared GPEs and to simplify both host OS and ACPICA code. Added a reference +count mechanism to support shared GPEs that require multiple device drivers. +Several external interfaces have changed. One external interface has been +removed. One new external interface was added. Most of the GPE external +interfaces now use the GPE spinlock instead of the events mutex (and the +Flags parameter for many GPE interfaces has been removed.) See the updated +ACPICA Programmer Reference for details. Matthew Garrett, Bob Moore, Rafael +Wysocki. ACPICA BZ 831. + +Changed: + AcpiEnableGpe, AcpiDisableGpe, AcpiClearGpe, AcpiGetGpeStatus +Removed: + AcpiSetGpeType +New: + AcpiSetGpe + +Implemented write support for DataTable operation regions. These regions are +defined via the DataTableRegion() operator. Previously, only read support was +implemented. The ACPI specification allows DataTableRegions to be read/write, +however. + +Implemented a new subsystem option to force a copy of the DSDT to local +memory. Optionally copy the entire DSDT to local memory (instead of simply +mapping it.) There are some (albeit very rare) BIOSs that corrupt or replace +the original DSDT, creating the need for this option. Default is FALSE, do +not copy the DSDT. + +Implemented detection of a corrupted or replaced DSDT. This change adds +support to detect a DSDT that has been corrupted and/or replaced from outside +the OS (by firmware). This is typically catastrophic for the system, but has +been seen on some machines. Once this problem has been detected, the DSDT +copy option can be enabled via system configuration. Lin Ming, Bob Moore. + +Fixed two problems with AcpiReallocateRootTable during the root table copy. +When copying the root table to the new allocation, the length used was +incorrect. The new size was used instead of the current table size, meaning +too much data was copied. Also, the count of available slots for ACPI tables +was not set correctly. Alexey Starikovskiy, Bob Moore. + +Example Code and Data Size: These are the sizes for the OS-independent +acpica.lib produced by the Microsoft Visual C++ 6.0 32-bit compiler. The +debug version of the code includes the debug output trace mechanism and has a +much larger code and data size. + + Previous Release: + Non-Debug Version: 87.5K Code, 18.4K Data, 105.9K Total + Debug Version: 163.4K Code, 51.1K Data, 214.5K Total + Current Release: + Non-Debug Version: 87.9K Code, 18.6K Data, 106.5K Total + Debug Version: 163.5K Code, 51.3K Data, 214.8K Total + +2) iASL Compiler/Disassembler and Tools: + +iASL: Implement limited typechecking for values returned from predefined +control methods. The type of any returned static (unnamed) object is now +validated. For example, Return(1). ACPICA BZ 786. + +iASL: Fixed a predefined name object verification regression. Fixes a problem +introduced in version 20100304. An error is incorrectly generated if a +predefined name is declared as a static named object with a value defined +using the keywords "Zero", "One", or "Ones". Lin Ming. + +iASL: Added Windows 7 support for the -g option (get local ACPI tables) by +reducing the requested registry access rights. ACPICA BZ 842. + +Disassembler: fixed a possible fault when generating External() statements. +Introduced in commit ae7d6fd: Properly handle externals with parent-prefix +(carat). Fixes a string length allocation calculation. Lin Ming. + +---------------------------------------- 04 March 2010. Summary of changes for version 20100304: 1) ACPI CA Core Subsystem: Modified: vendor-sys/acpica/dist/common/dmextern.c ============================================================================== --- vendor-sys/acpica/dist/common/dmextern.c Fri Apr 2 16:09:55 2010 (r206103) +++ vendor-sys/acpica/dist/common/dmextern.c Fri Apr 2 16:48:51 2010 (r206104) @@ -270,6 +270,15 @@ AcpiDmNormalizeParentPrefix ( } Length = (ACPI_STRLEN (ParentPath) + ACPI_STRLEN (Path) + 1); + if (ParentPath[1]) + { + /* + * If ParentPath is not just a simple '\', increment the length + * for the required dot separator (ParentPath.Path) + */ + Length++; + } + Fullpath = ACPI_ALLOCATE_ZEROED (Length); if (!Fullpath) { Modified: vendor-sys/acpica/dist/compiler/aslanalyze.c ============================================================================== --- vendor-sys/acpica/dist/compiler/aslanalyze.c Fri Apr 2 16:09:55 2010 (r206103) +++ vendor-sys/acpica/dist/compiler/aslanalyze.c Fri Apr 2 16:48:51 2010 (r206104) @@ -1157,6 +1157,12 @@ AnMethodAnalysisWalkEnd ( case PARSEOP_RETURN: /* + * If the parent is a predefined method name, attempt to typecheck + * the return value. Only static types can be validated. + */ + ApCheckPredefinedReturnValue (Op, MethodInfo); + + /* * The parent block does not "exit" and continue execution -- the * method is terminated here with the Return() statement. */ Modified: vendor-sys/acpica/dist/compiler/aslcompiler.h ============================================================================== --- vendor-sys/acpica/dist/compiler/aslcompiler.h Fri Apr 2 16:09:55 2010 (r206103) +++ vendor-sys/acpica/dist/compiler/aslcompiler.h Fri Apr 2 16:48:51 2010 (r206104) @@ -461,6 +461,11 @@ ApCheckForPredefinedMethod ( ACPI_PARSE_OBJECT *Op, ASL_METHOD_INFO *MethodInfo); +void +ApCheckPredefinedReturnValue ( + ACPI_PARSE_OBJECT *Op, + ASL_METHOD_INFO *MethodInfo); + UINT32 ApCheckForPredefinedName ( ACPI_PARSE_OBJECT *Op, Modified: vendor-sys/acpica/dist/compiler/aslpredef.c ============================================================================== --- vendor-sys/acpica/dist/compiler/aslpredef.c Fri Apr 2 16:09:55 2010 (r206103) +++ vendor-sys/acpica/dist/compiler/aslpredef.c Fri Apr 2 16:48:51 2010 (r206104) @@ -296,7 +296,11 @@ ApCheckForPredefinedMethod ( if (MethodInfo->NumReturnNoValue && PredefinedNames[Index].Info.ExpectedBtypes) { - sprintf (MsgBuffer, "%4.4s", PredefinedNames[Index].Info.Name); + ApGetExpectedTypes (StringBuffer, + PredefinedNames[Index].Info.ExpectedBtypes); + + sprintf (MsgBuffer, "%s required for %4.4s", + StringBuffer, PredefinedNames[Index].Info.Name); AslError (ASL_WARNING, ASL_MSG_RESERVED_RETURN_VALUE, Op, MsgBuffer); @@ -308,6 +312,90 @@ ApCheckForPredefinedMethod ( /******************************************************************************* * + * FUNCTION: ApCheckPredefinedReturnValue + * + * PARAMETERS: Op - A parse node of type "RETURN". + * MethodInfo - Saved info about this method + * + * RETURN: None + * + * DESCRIPTION: If method is a predefined name, attempt to validate the return + * value. Only "static" types can be validated - a simple return + * of an integer/string/buffer/package or a named reference to + * a static object. Values such as a Localx or Argx or a control + * method invocation are not checked. + * + ******************************************************************************/ + +void +ApCheckPredefinedReturnValue ( + ACPI_PARSE_OBJECT *Op, + ASL_METHOD_INFO *MethodInfo) +{ + UINT32 Index; + ACPI_PARSE_OBJECT *ReturnValueOp; + + + /* Check parent method for a match against the predefined name list */ + + Index = ApCheckForPredefinedName (MethodInfo->Op, + MethodInfo->Op->Asl.NameSeg); + + switch (Index) + { + case ACPI_NOT_RESERVED_NAME: /* No underscore or _Txx or _xxx name not matched */ + case ACPI_PREDEFINED_NAME: /* Resource Name or reserved scope name */ + case ACPI_COMPILER_RESERVED_NAME: /* A _Txx that was not emitted by compiler */ + case ACPI_EVENT_RESERVED_NAME: /* _Lxx, _Exx, and _Qxx methods */ + + /* Just return, nothing to do */ + return; + + default: /* a real predefined ACPI name */ + + /* Exit if no return value expected */ + + if (!PredefinedNames[Index].Info.ExpectedBtypes) + { + return; + } + + /* Get the object returned, it is the next argument */ + + ReturnValueOp = Op->Asl.Child; + switch (ReturnValueOp->Asl.ParseOpcode) + { + case PARSEOP_ZERO: + case PARSEOP_ONE: + case PARSEOP_ONES: + case PARSEOP_INTEGER: + case PARSEOP_STRING_LITERAL: + case PARSEOP_BUFFER: + case PARSEOP_PACKAGE: + + /* Static data return object - check against expected type */ + + ApCheckObjectType (ReturnValueOp, + PredefinedNames[Index].Info.ExpectedBtypes); + break; + + default: + + /* + * All other ops are very difficult or impossible to typecheck at + * compile time. These include all Localx, Argx, and method + * invocations. Also, NAMESEG and NAMESTRING because the type of + * any named object can be changed at runtime (for example, + * CopyObject will change the type of the target object.) + */ + break; + } + } +} + + +/******************************************************************************* + * * FUNCTION: ApCheckForPredefinedObject * * PARAMETERS: Op - A parse node @@ -441,7 +529,7 @@ ApCheckForPredefinedName ( * * RETURN: None * - * DESCRIPTION: Check for the "special" predefined names - + * DESCRIPTION: Check for the "special" predefined names - * _Lxx, _Exx, _Qxx, and _T_x * ******************************************************************************/ @@ -512,7 +600,7 @@ ApCheckForSpecialName ( * * FUNCTION: ApCheckObjectType * - * PARAMETERS: Op - A parse node + * PARAMETERS: Op - Current parse node * ExpectedBtypes - Bitmap of expected return type(s) * * RETURN: None @@ -529,11 +617,13 @@ ApCheckObjectType ( UINT32 ExpectedBtypes) { UINT32 ReturnBtype; - char TypeBuffer[48]; /* Room for 5 types */ switch (Op->Asl.ParseOpcode) { + case PARSEOP_ZERO: + case PARSEOP_ONE: + case PARSEOP_ONES: case PARSEOP_INTEGER: ReturnBtype = ACPI_RTYPE_INTEGER; break; @@ -552,11 +642,11 @@ ApCheckObjectType ( default: /* Not one of the supported object types */ - + goto TypeErrorExit; } - /* Is the object one of the expected types? */ + /* Exit if the object is one of the expected types */ if (ReturnBtype & ExpectedBtypes) { @@ -568,10 +658,13 @@ TypeErrorExit: /* Format the expected types and emit an error message */ - ApGetExpectedTypes (TypeBuffer, ExpectedBtypes); + ApGetExpectedTypes (StringBuffer, ExpectedBtypes); + + sprintf (MsgBuffer, "found %s, requires %s", + UtGetOpName (Op->Asl.ParseOpcode), StringBuffer); AslError (ASL_ERROR, ASL_MSG_RESERVED_OPERAND_TYPE, Op, - TypeBuffer); + MsgBuffer); } Modified: vendor-sys/acpica/dist/compiler/aslstubs.c ============================================================================== --- vendor-sys/acpica/dist/compiler/aslstubs.c Fri Apr 2 16:09:55 2010 (r206103) +++ vendor-sys/acpica/dist/compiler/aslstubs.c Fri Apr 2 16:48:51 2010 (r206104) @@ -243,13 +243,6 @@ AcpiEvInitializeRegion ( return (AE_OK); } -ACPI_STATUS -AcpiEvCheckForWakeOnlyGpe ( - ACPI_GPE_EVENT_INFO *GpeEventInfo) -{ - return (AE_OK); -} - void AcpiExDoDebugObject ( ACPI_OPERAND_OBJECT *SourceDesc, Modified: vendor-sys/acpica/dist/compiler/asltypes.h ============================================================================== --- vendor-sys/acpica/dist/compiler/asltypes.h Fri Apr 2 16:09:55 2010 (r206103) +++ vendor-sys/acpica/dist/compiler/asltypes.h Fri Apr 2 16:48:51 2010 (r206104) @@ -507,7 +507,7 @@ char *AslMessages /* ASL_MSG_RESERVED_ARG_COUNT_HI */ "Reserved method has too many arguments", /* ASL_MSG_RESERVED_ARG_COUNT_LO */ "Reserved method has too few arguments", /* ASL_MSG_RESERVED_METHOD */ "Reserved name must be a control method", -/* ASL_MSG_RESERVED_OPERAND_TYPE */ "Invalid object type for reserved name, must be", +/* ASL_MSG_RESERVED_OPERAND_TYPE */ "Invalid object type for reserved name", /* ASL_MSG_RESERVED_RETURN_VALUE */ "Reserved method must return a value", /* ASL_MSG_RESERVED_USE */ "Invalid use of reserved name", /* ASL_MSG_RESERVED_WORD */ "Use of reserved name", Modified: vendor-sys/acpica/dist/debugger/dbdisply.c ============================================================================== --- vendor-sys/acpica/dist/debugger/dbdisply.c Fri Apr 2 16:09:55 2010 (r206103) +++ vendor-sys/acpica/dist/debugger/dbdisply.c Fri Apr 2 16:48:51 2010 (r206104) @@ -848,13 +848,12 @@ AcpiDbDisplayGpes ( Block, GpeBlock, GpeBlock->Node, Buffer); AcpiOsPrintf (" Registers: %u (%u GPEs)\n", - GpeBlock->RegisterCount, - ACPI_MUL_8 (GpeBlock->RegisterCount)); + GpeBlock->RegisterCount, GpeBlock->GpeCount); - AcpiOsPrintf (" GPE range: 0x%X to 0x%X\n", + AcpiOsPrintf (" GPE range: 0x%X to 0x%X on interrupt %u\n", GpeBlock->BlockBaseNumber, - GpeBlock->BlockBaseNumber + - (GpeBlock->RegisterCount * 8) -1); + GpeBlock->BlockBaseNumber + (GpeBlock->GpeCount - 1), + GpeXruptInfo->InterruptNumber); AcpiOsPrintf ( " RegisterInfo: %p Status %8.8X%8.8X Enable %8.8X%8.8X\n", @@ -871,9 +870,12 @@ AcpiDbDisplayGpes ( GpeRegisterInfo = &GpeBlock->RegisterInfo[i]; AcpiOsPrintf ( - " Reg %u: WakeEnable %2.2X, RunEnable %2.2X Status %8.8X%8.8X Enable %8.8X%8.8X\n", - i, GpeRegisterInfo->EnableForWake, + " Reg %u: (GPE %.2X-%.2X) RunEnable %2.2X WakeEnable %2.2X" + " Status %8.8X%8.8X Enable %8.8X%8.8X\n", + i, GpeRegisterInfo->BaseGpeNumber, + GpeRegisterInfo->BaseGpeNumber + (ACPI_GPE_REGISTER_WIDTH - 1), GpeRegisterInfo->EnableForRun, + GpeRegisterInfo->EnableForWake, ACPI_FORMAT_UINT64 (GpeRegisterInfo->StatusAddress.Address), ACPI_FORMAT_UINT64 (GpeRegisterInfo->EnableAddress.Address)); @@ -886,17 +888,19 @@ AcpiDbDisplayGpes ( if (!(GpeEventInfo->Flags & ACPI_GPE_DISPATCH_MASK)) { - /* This GPE is not used (no method or handler) */ + /* This GPE is not used (no method or handler), ignore it */ continue; } AcpiOsPrintf ( - " GPE %.3X: %p Flags %2.2X: ", - GpeBlock->BlockBaseNumber + GpeIndex, - GpeEventInfo, + " GPE %.2X: %p RunRefs %2.2X WakeRefs %2.2X Flags %2.2X (", + GpeBlock->BlockBaseNumber + GpeIndex, GpeEventInfo, + GpeEventInfo->RuntimeCount, GpeEventInfo->WakeupCount, GpeEventInfo->Flags); + /* Decode the flags byte */ + if (GpeEventInfo->Flags & ACPI_GPE_LEVEL_TRIGGERED) { AcpiOsPrintf ("Level, "); @@ -906,38 +910,13 @@ AcpiDbDisplayGpes ( AcpiOsPrintf ("Edge, "); } - switch (GpeEventInfo->Flags & ACPI_GPE_TYPE_MASK) - { - case ACPI_GPE_TYPE_WAKE: - AcpiOsPrintf ("WakeOnly: "); - break; - case ACPI_GPE_TYPE_RUNTIME: - AcpiOsPrintf (" RunOnly: "); - break; - case ACPI_GPE_TYPE_WAKE_RUN: - AcpiOsPrintf (" WakeRun: "); - break; - default: - AcpiOsPrintf (" NotUsed: "); - break; - } - - if (GpeEventInfo->Flags & ACPI_GPE_WAKE_ENABLED) - { - AcpiOsPrintf ("[Wake 1 "); - } - else - { - AcpiOsPrintf ("[Wake 0 "); - } - - if (GpeEventInfo->Flags & ACPI_GPE_RUN_ENABLED) + if (GpeEventInfo->Flags & ACPI_GPE_CAN_WAKE) { - AcpiOsPrintf ("Run 1], "); + AcpiOsPrintf ("CanWake, "); } else { - AcpiOsPrintf ("Run 0], "); + AcpiOsPrintf ("RunOnly, "); } switch (GpeEventInfo->Flags & ACPI_GPE_DISPATCH_MASK) @@ -957,7 +936,7 @@ AcpiDbDisplayGpes ( break; } - AcpiOsPrintf ("\n"); + AcpiOsPrintf (")\n"); } } Block++; Modified: vendor-sys/acpica/dist/events/evgpe.c ============================================================================== --- vendor-sys/acpica/dist/events/evgpe.c Fri Apr 2 16:09:55 2010 (r206103) +++ vendor-sys/acpica/dist/events/evgpe.c Fri Apr 2 16:48:51 2010 (r206104) @@ -134,71 +134,20 @@ AcpiEvAsynchEnableGpe ( /******************************************************************************* * - * FUNCTION: AcpiEvSetGpeType - * - * PARAMETERS: GpeEventInfo - GPE to set - * Type - New type - * - * RETURN: Status - * - * DESCRIPTION: Sets the new type for the GPE (wake, run, or wake/run) - * - ******************************************************************************/ - -ACPI_STATUS -AcpiEvSetGpeType ( - ACPI_GPE_EVENT_INFO *GpeEventInfo, - UINT8 Type) -{ - ACPI_STATUS Status; - - - ACPI_FUNCTION_TRACE (EvSetGpeType); - - - /* Validate type and update register enable masks */ - - switch (Type) - { - case ACPI_GPE_TYPE_WAKE: - case ACPI_GPE_TYPE_RUNTIME: - case ACPI_GPE_TYPE_WAKE_RUN: - break; - - default: - return_ACPI_STATUS (AE_BAD_PARAMETER); - } - - /* Disable the GPE if currently enabled */ - - Status = AcpiEvDisableGpe (GpeEventInfo); - - /* Clear the type bits and insert the new Type */ - - GpeEventInfo->Flags &= ~ACPI_GPE_TYPE_MASK; - GpeEventInfo->Flags |= Type; - return_ACPI_STATUS (Status); -} - - -/******************************************************************************* - * * FUNCTION: AcpiEvUpdateGpeEnableMasks * * PARAMETERS: GpeEventInfo - GPE to update - * Type - What to do: ACPI_GPE_DISABLE or - * ACPI_GPE_ENABLE * * RETURN: Status * - * DESCRIPTION: Updates GPE register enable masks based on the GPE type + * DESCRIPTION: Updates GPE register enable masks based upon whether there are + * references (either wake or run) to this GPE * ******************************************************************************/ ACPI_STATUS AcpiEvUpdateGpeEnableMasks ( - ACPI_GPE_EVENT_INFO *GpeEventInfo, - UINT8 Type) + ACPI_GPE_EVENT_INFO *GpeEventInfo) { ACPI_GPE_REGISTER_INFO *GpeRegisterInfo; UINT8 RegisterBit; @@ -216,36 +165,21 @@ AcpiEvUpdateGpeEnableMasks ( RegisterBit = (UINT8) (1 << (GpeEventInfo->GpeNumber - GpeRegisterInfo->BaseGpeNumber)); - /* 1) Disable case. Simply clear all enable bits */ + /* Clear the wake/run bits up front */ - if (Type == ACPI_GPE_DISABLE) - { - ACPI_CLEAR_BIT (GpeRegisterInfo->EnableForWake, RegisterBit); - ACPI_CLEAR_BIT (GpeRegisterInfo->EnableForRun, RegisterBit); - return_ACPI_STATUS (AE_OK); - } + ACPI_CLEAR_BIT (GpeRegisterInfo->EnableForWake, RegisterBit); + ACPI_CLEAR_BIT (GpeRegisterInfo->EnableForRun, RegisterBit); - /* 2) Enable case. Set/Clear the appropriate enable bits */ + /* Set the mask bits only if there are references to this GPE */ - switch (GpeEventInfo->Flags & ACPI_GPE_TYPE_MASK) + if (GpeEventInfo->RuntimeCount) { - case ACPI_GPE_TYPE_WAKE: - ACPI_SET_BIT (GpeRegisterInfo->EnableForWake, RegisterBit); - ACPI_CLEAR_BIT (GpeRegisterInfo->EnableForRun, RegisterBit); - break; - - case ACPI_GPE_TYPE_RUNTIME: - ACPI_CLEAR_BIT (GpeRegisterInfo->EnableForWake, RegisterBit); - ACPI_SET_BIT (GpeRegisterInfo->EnableForRun, RegisterBit); - break; - - case ACPI_GPE_TYPE_WAKE_RUN: - ACPI_SET_BIT (GpeRegisterInfo->EnableForWake, RegisterBit); - ACPI_SET_BIT (GpeRegisterInfo->EnableForRun, RegisterBit); - break; + ACPI_SET_BIT (GpeRegisterInfo->EnableForRun, RegisterBit); + } - default: - return_ACPI_STATUS (AE_BAD_PARAMETER); + if (GpeEventInfo->WakeupCount) + { + ACPI_SET_BIT (GpeRegisterInfo->EnableForWake, RegisterBit); } return_ACPI_STATUS (AE_OK); @@ -257,19 +191,19 @@ AcpiEvUpdateGpeEnableMasks ( * FUNCTION: AcpiEvEnableGpe * * PARAMETERS: GpeEventInfo - GPE to enable - * WriteToHardware - Enable now, or just mark data structs - * (WAKE GPEs should be deferred) * * RETURN: Status * - * DESCRIPTION: Enable a GPE based on the GPE type + * DESCRIPTION: Hardware-enable a GPE. Always enables the GPE, regardless + * of type or number of references. + * + * Note: The GPE lock should be already acquired when this function is called. * ******************************************************************************/ ACPI_STATUS AcpiEvEnableGpe ( - ACPI_GPE_EVENT_INFO *GpeEventInfo, - BOOLEAN WriteToHardware) + ACPI_GPE_EVENT_INFO *GpeEventInfo) { ACPI_STATUS Status; @@ -277,54 +211,37 @@ AcpiEvEnableGpe ( ACPI_FUNCTION_TRACE (EvEnableGpe); - /* Make sure HW enable masks are updated */ + /* + * We will only allow a GPE to be enabled if it has either an + * associated method (_Lxx/_Exx) or a handler. Otherwise, the + * GPE will be immediately disabled by AcpiEvGpeDispatch the + * first time it fires. + */ + if (!(GpeEventInfo->Flags & ACPI_GPE_DISPATCH_MASK)) + { + return_ACPI_STATUS (AE_NO_HANDLER); + } + + /* Ensure the HW enable masks are current */ - Status = AcpiEvUpdateGpeEnableMasks (GpeEventInfo, ACPI_GPE_ENABLE); + Status = AcpiEvUpdateGpeEnableMasks (GpeEventInfo); if (ACPI_FAILURE (Status)) { return_ACPI_STATUS (Status); } - /* Mark wake-enabled or HW enable, or both */ + /* Clear the GPE (of stale events) */ - switch (GpeEventInfo->Flags & ACPI_GPE_TYPE_MASK) + Status = AcpiHwClearGpe (GpeEventInfo); + if (ACPI_FAILURE (Status)) { - case ACPI_GPE_TYPE_WAKE: - - ACPI_SET_BIT (GpeEventInfo->Flags, ACPI_GPE_WAKE_ENABLED); - break; - - case ACPI_GPE_TYPE_WAKE_RUN: - - ACPI_SET_BIT (GpeEventInfo->Flags, ACPI_GPE_WAKE_ENABLED); - - /*lint -fallthrough */ - - case ACPI_GPE_TYPE_RUNTIME: - - ACPI_SET_BIT (GpeEventInfo->Flags, ACPI_GPE_RUN_ENABLED); - - if (WriteToHardware) - { - /* Clear the GPE (of stale events), then enable it */ - - Status = AcpiHwClearGpe (GpeEventInfo); - if (ACPI_FAILURE (Status)) - { - return_ACPI_STATUS (Status); - } - - /* Enable the requested runtime GPE */ - - Status = AcpiHwWriteGpeEnableReg (GpeEventInfo); - } - break; - - default: - return_ACPI_STATUS (AE_BAD_PARAMETER); + return_ACPI_STATUS (Status); } - return_ACPI_STATUS (AE_OK); + /* Enable the requested GPE */ + + Status = AcpiHwWriteGpeEnableReg (GpeEventInfo); + return_ACPI_STATUS (Status); } @@ -336,7 +253,10 @@ AcpiEvEnableGpe ( * * RETURN: Status * - * DESCRIPTION: Disable a GPE based on the GPE type + * DESCRIPTION: Hardware-disable a GPE. Always disables the requested GPE, + * regardless of the type or number of references. + * + * Note: The GPE lock should be already acquired when this function is called. * ******************************************************************************/ @@ -356,40 +276,14 @@ AcpiEvDisableGpe ( * the GPE behind our back. */ - /* Make sure HW enable masks are updated */ + /* Ensure the HW enable masks are current */ - Status = AcpiEvUpdateGpeEnableMasks (GpeEventInfo, ACPI_GPE_DISABLE); + Status = AcpiEvUpdateGpeEnableMasks (GpeEventInfo); if (ACPI_FAILURE (Status)) { return_ACPI_STATUS (Status); } - /* Clear the appropriate enabled flags for this GPE */ - - switch (GpeEventInfo->Flags & ACPI_GPE_TYPE_MASK) - { - case ACPI_GPE_TYPE_WAKE: - - ACPI_CLEAR_BIT (GpeEventInfo->Flags, ACPI_GPE_WAKE_ENABLED); - break; - - case ACPI_GPE_TYPE_WAKE_RUN: - - ACPI_CLEAR_BIT (GpeEventInfo->Flags, ACPI_GPE_WAKE_ENABLED); - - /*lint -fallthrough */ - - case ACPI_GPE_TYPE_RUNTIME: - - /* Disable the requested runtime GPE */ - - ACPI_CLEAR_BIT (GpeEventInfo->Flags, ACPI_GPE_RUN_ENABLED); - break; - - default: - break; - } - /* * Always H/W disable this GPE, even if we don't know the GPE type. * Simply clear the enable bit for this particular GPE, but do not @@ -405,6 +299,49 @@ AcpiEvDisableGpe ( /******************************************************************************* * + * FUNCTION: AcpiEvLowGetGpeInfo + * + * PARAMETERS: GpeNumber - Raw GPE number + * GpeBlock - A GPE info block + * + * RETURN: A GPE EventInfo struct. NULL if not a valid GPE (The GpeNumber + * is not within the specified GPE block) + * + * DESCRIPTION: Returns the EventInfo struct associated with this GPE. This is + * the low-level implementation of EvGetGpeEventInfo. + * + ******************************************************************************/ + +ACPI_GPE_EVENT_INFO * +AcpiEvLowGetGpeInfo ( + UINT32 GpeNumber, + ACPI_GPE_BLOCK_INFO *GpeBlock) +{ + UINT32 GpeIndex; + + + /* + * Validate that the GpeNumber is within the specified GpeBlock. + * (Two steps) + */ + if (!GpeBlock || + (GpeNumber < GpeBlock->BlockBaseNumber)) + { + return (NULL); + } + + GpeIndex = GpeNumber - GpeBlock->BlockBaseNumber; + if (GpeIndex >= GpeBlock->GpeCount) + { + return (NULL); + } + + return (&GpeBlock->EventInfo[GpeIndex]); +} + + +/******************************************************************************* + * * FUNCTION: AcpiEvGetGpeEventInfo * * PARAMETERS: GpeDevice - Device node. NULL for GPE0/GPE1 @@ -426,7 +363,7 @@ AcpiEvGetGpeEventInfo ( UINT32 GpeNumber) { ACPI_OPERAND_OBJECT *ObjDesc; - ACPI_GPE_BLOCK_INFO *GpeBlock; + ACPI_GPE_EVENT_INFO *GpeInfo; UINT32 i; @@ -441,16 +378,11 @@ AcpiEvGetGpeEventInfo ( for (i = 0; i < ACPI_MAX_GPE_BLOCKS; i++) { - GpeBlock = AcpiGbl_GpeFadtBlocks[i]; - if (GpeBlock) + GpeInfo = AcpiEvLowGetGpeInfo (GpeNumber, + AcpiGbl_GpeFadtBlocks[i]); + if (GpeInfo) { - if ((GpeNumber >= GpeBlock->BlockBaseNumber) && - (GpeNumber < GpeBlock->BlockBaseNumber + - (GpeBlock->RegisterCount * 8))) - { - return (&GpeBlock->EventInfo[GpeNumber - - GpeBlock->BlockBaseNumber]); - } + return (GpeInfo); } } @@ -468,15 +400,7 @@ AcpiEvGetGpeEventInfo ( return (NULL); } - GpeBlock = ObjDesc->Device.GpeBlock; - - if ((GpeNumber >= GpeBlock->BlockBaseNumber) && - (GpeNumber < GpeBlock->BlockBaseNumber + (GpeBlock->RegisterCount * 8))) - { - return (&GpeBlock->EventInfo[GpeNumber - GpeBlock->BlockBaseNumber]); - } - - return (NULL); + return (AcpiEvLowGetGpeInfo (GpeNumber, ObjDesc->Device.GpeBlock)); } @@ -654,9 +578,9 @@ AcpiEvAsynchExecuteGpeMethod ( return_VOID; } - /* Set the GPE flags for return to enabled state */ + /* Update the GPE register masks for return to enabled state */ - (void) AcpiEvEnableGpe (GpeEventInfo, FALSE); + (void) AcpiEvUpdateGpeEnableMasks (GpeEventInfo); /* * Take a snapshot of the GPE info for this level - we copy the info to @@ -872,15 +796,18 @@ AcpiEvGpeDispatch ( default: - /* No handler or method to run! */ - + /* + * No handler or method to run! + * 03/2010: This case should no longer be possible. We will not allow + * a GPE to be enabled if it has no handler or method. + */ ACPI_ERROR ((AE_INFO, "No handler or method for GPE[0x%2X], disabling event", GpeNumber)); /* - * Disable the GPE. The GPE will remain disabled until the ACPICA - * Core Subsystem is restarted, or a handler is installed. + * Disable the GPE. The GPE will remain disabled a handler + * is installed or ACPICA is restarted. */ Status = AcpiEvDisableGpe (GpeEventInfo); if (ACPI_FAILURE (Status)) Modified: vendor-sys/acpica/dist/events/evgpeblk.c ============================================================================== --- vendor-sys/acpica/dist/events/evgpeblk.c Fri Apr 2 16:09:55 2010 (r206103) +++ vendor-sys/acpica/dist/events/evgpeblk.c Fri Apr 2 16:48:51 2010 (r206104) @@ -124,7 +124,7 @@ /* Local prototypes */ static ACPI_STATUS -AcpiEvSaveMethodInfo ( +AcpiEvMatchGpeMethod ( ACPI_HANDLE ObjHandle, UINT32 Level, void *ObjDesc, @@ -194,8 +194,7 @@ AcpiEvValidGpeEvent ( while (GpeBlock) { if ((&GpeBlock->EventInfo[0] <= GpeEventInfo) && - (&GpeBlock->EventInfo[((ACPI_SIZE) - GpeBlock->RegisterCount) * 8] > GpeEventInfo)) + (&GpeBlock->EventInfo[GpeBlock->GpeCount] > GpeEventInfo)) { return (TRUE); } @@ -328,7 +327,7 @@ AcpiEvDeleteGpeHandlers ( /******************************************************************************* * - * FUNCTION: AcpiEvSaveMethodInfo + * FUNCTION: AcpiEvMatchGpeMethod * * PARAMETERS: Callback from WalkNamespace * @@ -340,8 +339,7 @@ AcpiEvDeleteGpeHandlers ( * information for quick lookup during GPE dispatch * * The name of each GPE control method is of the form: - * "_Lxx" or "_Exx" - * Where: + * "_Lxx" or "_Exx", where: * L - means that the GPE is level triggered * E - means that the GPE is edge triggered * xx - is the GPE number [in HEX] @@ -349,38 +347,44 @@ AcpiEvDeleteGpeHandlers ( ******************************************************************************/ static ACPI_STATUS -AcpiEvSaveMethodInfo ( +AcpiEvMatchGpeMethod ( ACPI_HANDLE ObjHandle, UINT32 Level, void *ObjDesc, void **ReturnValue) { + ACPI_NAMESPACE_NODE *MethodNode = ACPI_CAST_PTR (ACPI_NAMESPACE_NODE, ObjHandle); ACPI_GPE_BLOCK_INFO *GpeBlock = (void *) ObjDesc; ACPI_GPE_EVENT_INFO *GpeEventInfo; UINT32 GpeNumber; char Name[ACPI_NAME_SIZE + 1]; UINT8 Type; - ACPI_STATUS Status; - ACPI_FUNCTION_TRACE (EvSaveMethodInfo); + ACPI_FUNCTION_TRACE (EvMatchGpeMethod); /* - * _Lxx and _Exx GPE method support + * Match and decode the _Lxx and _Exx GPE method names * - * 1) Extract the name from the object and convert to a string + * 1) Extract the method name and null terminate it */ - ACPI_MOVE_32_TO_32 ( - Name, &((ACPI_NAMESPACE_NODE *) ObjHandle)->Name.Integer); + ACPI_MOVE_32_TO_32 (Name, &MethodNode->Name.Integer); Name[ACPI_NAME_SIZE] = 0; + /* 2) Name must begin with an underscore */ + + if (Name[0] != '_') + { + return_ACPI_STATUS (AE_OK); /* Ignore this method */ + } + /* - * 2) Edge/Level determination is based on the 2nd character + * 3) Edge/Level determination is based on the 2nd character * of the method name * - * NOTE: Default GPE type is RUNTIME. May be changed later to WAKE - * if a _PRW object is found that points to this GPE. + * NOTE: Default GPE type is RUNTIME only. Later, if a _PRW object is + * found that points to this GPE, the ACPI_GPE_CAN_WAKE flag is set. */ switch (Name[1]) { @@ -393,16 +397,15 @@ AcpiEvSaveMethodInfo ( break; default: - /* Unknown method type, just ignore it! */ + /* Unknown method type, just ignore it */ ACPI_DEBUG_PRINT ((ACPI_DB_LOAD, "Ignoring unknown GPE method type: %s " - "(name not of form _Lxx or _Exx)", - Name)); + "(name not of form _Lxx or _Exx)", Name)); return_ACPI_STATUS (AE_OK); } - /* Convert the last two characters of the name to the GPE Number */ + /* 4) The last two characters of the name are the hex GPE Number */ GpeNumber = ACPI_STRTOUL (&Name[2], NULL, 16); if (GpeNumber == ACPI_UINT32_MAX) @@ -411,45 +414,34 @@ AcpiEvSaveMethodInfo ( ACPI_DEBUG_PRINT ((ACPI_DB_LOAD, "Could not extract GPE number from name: %s " - "(name is not of form _Lxx or _Exx)", - Name)); + "(name is not of form _Lxx or _Exx)", Name)); return_ACPI_STATUS (AE_OK); } /* Ensure that we have a valid GPE number for this GPE block */ - if ((GpeNumber < GpeBlock->BlockBaseNumber) || - (GpeNumber >= (GpeBlock->BlockBaseNumber + - (GpeBlock->RegisterCount * 8)))) + GpeEventInfo = AcpiEvLowGetGpeInfo (GpeNumber, GpeBlock); + if (!GpeEventInfo) { /* - * Not valid for this GPE block, just ignore it. However, it may be - * valid for a different GPE block, since GPE0 and GPE1 methods both - * appear under \_GPE. + * This GpeNumber is not valid for this GPE block, just ignore it. + * However, it may be valid for a different GPE block, since GPE0 + * and GPE1 methods both appear under \_GPE. */ return_ACPI_STATUS (AE_OK); } /* - * Now we can add this information to the GpeEventInfo block for use - * during dispatch of this GPE. Default type is RUNTIME, although this may - * change when the _PRW methods are executed later. + * Add the GPE information from above to the GpeEventInfo block for + * use during dispatch of this GPE. */ - GpeEventInfo = &GpeBlock->EventInfo[GpeNumber - GpeBlock->BlockBaseNumber]; - *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-vendor@FreeBSD.ORG Fri Apr 2 16:50:24 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 BDC8E106566C; Fri, 2 Apr 2010 16:50:24 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 92BC88FC16; Fri, 2 Apr 2010 16:50:24 +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 o32GoOQq015517; Fri, 2 Apr 2010 16:50:24 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o32GoO2f015516; Fri, 2 Apr 2010 16:50:24 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201004021650.o32GoO2f015516@svn.freebsd.org> From: Jung-uk Kim Date: Fri, 2 Apr 2010 16:50:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor-sys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206105 - vendor-sys/acpica/20100331 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: Fri, 02 Apr 2010 16:50:24 -0000 Author: jkim Date: Fri Apr 2 16:50:24 2010 New Revision: 206105 URL: http://svn.freebsd.org/changeset/base/206105 Log: Tag ACPICA 20100331. Added: vendor-sys/acpica/20100331/ - copied from r206104, vendor-sys/acpica/dist/ From owner-svn-src-vendor@FreeBSD.ORG Fri Apr 2 16:57:25 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 83D9D106566C; Fri, 2 Apr 2010 16:57:25 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 72D9E8FC18; Fri, 2 Apr 2010 16:57:25 +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 o32GvPZ8017104; Fri, 2 Apr 2010 16:57:25 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o32GvPp4017102; Fri, 2 Apr 2010 16:57:25 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201004021657.o32GvPp4017102@svn.freebsd.org> From: Jung-uk Kim Date: Fri, 2 Apr 2010 16:57:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor-sys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206106 - vendor-sys/acpica/dist/include/platform 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: Fri, 02 Apr 2010 16:57:25 -0000 Author: jkim Date: Fri Apr 2 16:57:25 2010 New Revision: 206106 URL: http://svn.freebsd.org/changeset/base/206106 Log: Integrate FreeBSD changes for acfreebsd.h. http://git.moblin.org/cgit.cgi/acpica/commit/?id=4580a813dd812d85c9a0ec1b77f7855c9940c60c Obtained from: Intel Modified: vendor-sys/acpica/dist/include/platform/acfreebsd.h Modified: vendor-sys/acpica/dist/include/platform/acfreebsd.h ============================================================================== --- vendor-sys/acpica/dist/include/platform/acfreebsd.h Fri Apr 2 16:50:24 2010 (r206105) +++ vendor-sys/acpica/dist/include/platform/acfreebsd.h Fri Apr 2 16:57:25 2010 (r206106) @@ -124,9 +124,10 @@ #include #define ACPI_UINTPTR_T uintptr_t + +#define ACPI_USE_DO_WHILE_0 #define ACPI_USE_LOCAL_CACHE #define ACPI_USE_SYSTEM_CLIBRARY -#define __cdecl #ifdef _KERNEL @@ -139,6 +140,7 @@ #include "opt_acpi.h" #define ACPI_THREAD_ID lwpid_t +#define ACPI_MUTEX_TYPE ACPI_OSL_MUTEX #ifdef ACPI_DEBUG #define ACPI_DEBUG_OUTPUT /* for backward compatibility */ @@ -166,11 +168,10 @@ #define ACPI_THREAD_ID pthread_t -/* Not building kernel code, so use libc */ #define ACPI_USE_STANDARD_HEADERS + #define ACPI_FLUSH_CPU_CACHE() -#define __cli() -#define __sti() +#define __cdecl #endif /* _KERNEL */ From owner-svn-src-vendor@FreeBSD.ORG Fri Apr 2 17:00:37 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 ADBAA1065676; Fri, 2 Apr 2010 17:00:37 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 83A9B8FC1B; Fri, 2 Apr 2010 17:00:37 +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 o32H0bNW017861; Fri, 2 Apr 2010 17:00:37 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o32H0bp2017859; Fri, 2 Apr 2010 17:00:37 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201004021700.o32H0bp2017859@svn.freebsd.org> From: Jung-uk Kim Date: Fri, 2 Apr 2010 17:00:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor-sys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206107 - vendor-sys/acpica/dist/tables 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: Fri, 02 Apr 2010 17:00:37 -0000 Author: jkim Date: Fri Apr 2 17:00:37 2010 New Revision: 206107 URL: http://svn.freebsd.org/changeset/base/206107 Log: Fixes for table load regression. http://git.moblin.org/cgit.cgi/acpica/commit/?id=e4c530f4e71d70804ed911d41d922dce4cea8b23 http://git.moblin.org/cgit.cgi/acpica/commit/?id=67a1ef8c98791bd4a0fb84fe0c2feff7082151dc Obtained from: Intel Modified: vendor-sys/acpica/dist/tables/tbxface.c Modified: vendor-sys/acpica/dist/tables/tbxface.c ============================================================================== --- vendor-sys/acpica/dist/tables/tbxface.c Fri Apr 2 16:57:25 2010 (r206106) +++ vendor-sys/acpica/dist/tables/tbxface.c Fri Apr 2 17:00:37 2010 (r206107) @@ -552,18 +552,13 @@ AcpiTbLoadNamespace ( (void) AcpiUtAcquireMutex (ACPI_MTX_TABLES); /* - * Save the DSDT pointer for simple access. This is the mapped memory - * address. We must take care here because the address of the .Tables - * array can change dynamically as tables are loaded at run-time - */ - AcpiGbl_DSDT = AcpiGbl_RootTableList.Tables[ACPI_TABLE_INDEX_DSDT].Pointer; - - /* * Load the namespace. The DSDT is required, but any SSDT and * PSDT tables are optional. Verify the DSDT. */ if (!AcpiGbl_RootTableList.Count || - !ACPI_COMPARE_NAME (AcpiGbl_DSDT->Signature, ACPI_SIG_DSDT) || + !ACPI_COMPARE_NAME ( + &(AcpiGbl_RootTableList.Tables[ACPI_TABLE_INDEX_DSDT].Signature), + ACPI_SIG_DSDT) || ACPI_FAILURE (AcpiTbVerifyTable ( &AcpiGbl_RootTableList.Tables[ACPI_TABLE_INDEX_DSDT]))) { @@ -572,6 +567,14 @@ AcpiTbLoadNamespace ( } /* + * Save the DSDT pointer for simple access. This is the mapped memory + * address. We must take care here because the address of the .Tables + * array can change dynamically as tables are loaded at run-time. Note: + * .Pointer field is not validated until after call to AcpiTbVerifyTable. + */ + AcpiGbl_DSDT = AcpiGbl_RootTableList.Tables[ACPI_TABLE_INDEX_DSDT].Pointer; + + /* * Optionally copy the entire DSDT to local memory (instead of simply * mapping it.) There are some BIOSs that corrupt or replace the original * DSDT, creating the need for this option. Default is FALSE, do not copy From owner-svn-src-vendor@FreeBSD.ORG Fri Apr 2 21:05:29 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 20A4F106566B; Fri, 2 Apr 2010 21:05:29 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0F0948FC15; Fri, 2 Apr 2010 21:05:29 +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 o32L5S1B076525; Fri, 2 Apr 2010 21:05:28 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o32L5S5A076523; Fri, 2 Apr 2010 21:05:28 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201004022105.o32L5S5A076523@svn.freebsd.org> From: Jung-uk Kim Date: Fri, 2 Apr 2010 21:05:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor-sys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206113 - vendor-sys/acpica/dist/tables 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: Fri, 02 Apr 2010 21:05:29 -0000 Author: jkim Date: Fri Apr 2 21:05:28 2010 New Revision: 206113 URL: http://svn.freebsd.org/changeset/base/206113 Log: Additional fix for root table size regression. Set the size of the new root table correctly. Not the current size, but the number of current tables + the default increment. http://git.moblin.org/cgit.cgi/acpica/commit/?id=752d13e80656436cd58e9710225a80c9deb3b053 Obtained from: Intel Modified: vendor-sys/acpica/dist/tables/tbxface.c Modified: vendor-sys/acpica/dist/tables/tbxface.c ============================================================================== --- vendor-sys/acpica/dist/tables/tbxface.c Fri Apr 2 20:08:44 2010 (r206112) +++ vendor-sys/acpica/dist/tables/tbxface.c Fri Apr 2 21:05:28 2010 (r206113) @@ -300,10 +300,14 @@ AcpiReallocateRootTable ( ACPI_MEMCPY (Tables, AcpiGbl_RootTableList.Tables, CurrentSize); - /* Update the root table descriptor */ - + /* + * Update the root table descriptor. The new size will be the current + * number of tables plus the increment, independent of the reserved + * size of the original table list. + */ AcpiGbl_RootTableList.Tables = Tables; - AcpiGbl_RootTableList.Size += ACPI_ROOT_TABLE_SIZE_INCREMENT; + AcpiGbl_RootTableList.Size = + AcpiGbl_RootTableList.Count + ACPI_ROOT_TABLE_SIZE_INCREMENT; AcpiGbl_RootTableList.Flags = ACPI_ROOT_ORIGIN_ALLOCATED | ACPI_ROOT_ALLOW_RESIZE; From owner-svn-src-vendor@FreeBSD.ORG Sat Apr 3 07:51:11 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 3914F106566C; Sat, 3 Apr 2010 07:51:11 +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 2393D8FC08; Sat, 3 Apr 2010 07:51:11 +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 o337pBGJ022173; Sat, 3 Apr 2010 07:51:11 GMT (envelope-from rdivacky@svn.freebsd.org) Received: (from rdivacky@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o337pAHY022141; Sat, 3 Apr 2010 07:51:10 GMT (envelope-from rdivacky@svn.freebsd.org) Message-Id: <201004030751.o337pAHY022141@svn.freebsd.org> From: Roman Divacky Date: Sat, 3 Apr 2010 07:51:10 +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: r206124 - in vendor/llvm/dist: . docs include/llvm include/llvm/Analysis include/llvm/Assembly include/llvm/Bitcode include/llvm/CodeGen include/llvm/Support include/llvm/Target include... X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Apr 2010 07:51:11 -0000 Author: rdivacky Date: Sat Apr 3 07:51:10 2010 New Revision: 206124 URL: http://svn.freebsd.org/changeset/base/206124 Log: Update LLVM to r100285. Added: vendor/llvm/dist/lib/CodeGen/MachineFunctionPrinterPass.cpp vendor/llvm/dist/lib/Target/ARM/Disassembler/ vendor/llvm/dist/lib/Target/ARM/Disassembler/ARMDisassembler.cpp vendor/llvm/dist/lib/Target/ARM/Disassembler/ARMDisassembler.h vendor/llvm/dist/lib/Target/ARM/Disassembler/ARMDisassemblerCore.cpp vendor/llvm/dist/lib/Target/ARM/Disassembler/ARMDisassemblerCore.h vendor/llvm/dist/lib/Target/ARM/Disassembler/Makefile vendor/llvm/dist/lib/Target/ARM/Disassembler/ThumbDisassemblerCore.h vendor/llvm/dist/test/CodeGen/X86/memset-3.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/IndVarSimplify/crash.ll vendor/llvm/dist/test/Transforms/IndVarSimplify/dangling-use.ll vendor/llvm/dist/test/Transforms/IndVarSimplify/floating-point-iv.ll vendor/llvm/dist/utils/TableGen/ARMDecoderEmitter.cpp vendor/llvm/dist/utils/TableGen/ARMDecoderEmitter.h Deleted: vendor/llvm/dist/test/Transforms/GVN/2010-03-31-RedundantPHIs.ll vendor/llvm/dist/test/Transforms/IndVarSimplify/2008-11-03-Floating.ll vendor/llvm/dist/test/Transforms/IndVarSimplify/2008-11-17-Floating.ll Modified: vendor/llvm/dist/Makefile.rules vendor/llvm/dist/docs/ReleaseNotes.html vendor/llvm/dist/include/llvm/Analysis/DebugInfo.h vendor/llvm/dist/include/llvm/Analysis/LoopPass.h vendor/llvm/dist/include/llvm/Assembly/PrintModulePass.h vendor/llvm/dist/include/llvm/BasicBlock.h vendor/llvm/dist/include/llvm/Bitcode/LLVMBitCodes.h vendor/llvm/dist/include/llvm/CallGraphSCCPass.h vendor/llvm/dist/include/llvm/CodeGen/AsmPrinter.h vendor/llvm/dist/include/llvm/CodeGen/MachineFunction.h vendor/llvm/dist/include/llvm/CodeGen/MachineFunctionPass.h vendor/llvm/dist/include/llvm/CodeGen/MachineInstr.h vendor/llvm/dist/include/llvm/CodeGen/MachineModuleInfo.h vendor/llvm/dist/include/llvm/CodeGen/Passes.h vendor/llvm/dist/include/llvm/CodeGen/SelectionDAG.h vendor/llvm/dist/include/llvm/CodeGen/SelectionDAGNodes.h vendor/llvm/dist/include/llvm/CodeGen/SlotIndexes.h vendor/llvm/dist/include/llvm/Instruction.h vendor/llvm/dist/include/llvm/IntrinsicsX86.td vendor/llvm/dist/include/llvm/Pass.h vendor/llvm/dist/include/llvm/Support/Allocator.h vendor/llvm/dist/include/llvm/Support/DebugLoc.h vendor/llvm/dist/include/llvm/Support/IRBuilder.h vendor/llvm/dist/include/llvm/Support/MathExtras.h vendor/llvm/dist/include/llvm/Support/SlowOperationInformer.h vendor/llvm/dist/include/llvm/Target/TargetLowering.h vendor/llvm/dist/include/llvm/Transforms/Utils/SSAUpdater.h vendor/llvm/dist/lib/Analysis/DebugInfo.cpp vendor/llvm/dist/lib/Analysis/IPA/CallGraphSCCPass.cpp vendor/llvm/dist/lib/Analysis/LoopPass.cpp vendor/llvm/dist/lib/Bitcode/Reader/BitcodeReader.cpp vendor/llvm/dist/lib/Bitcode/Writer/BitcodeWriter.cpp vendor/llvm/dist/lib/Bitcode/Writer/ValueEnumerator.cpp vendor/llvm/dist/lib/CodeGen/AsmPrinter/AsmPrinter.cpp vendor/llvm/dist/lib/CodeGen/AsmPrinter/DwarfDebug.cpp vendor/llvm/dist/lib/CodeGen/AsmPrinter/DwarfDebug.h vendor/llvm/dist/lib/CodeGen/CMakeLists.txt vendor/llvm/dist/lib/CodeGen/DwarfEHPrepare.cpp vendor/llvm/dist/lib/CodeGen/MachineFunction.cpp vendor/llvm/dist/lib/CodeGen/MachineFunctionPass.cpp vendor/llvm/dist/lib/CodeGen/MachineInstr.cpp vendor/llvm/dist/lib/CodeGen/MachineSSAUpdater.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/FastISel.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/SDNodeDbgValue.h 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/Target/ARM/ARMBaseInstrInfo.cpp vendor/llvm/dist/lib/Target/ARM/ARMBaseRegisterInfo.cpp vendor/llvm/dist/lib/Target/ARM/ARMConstantIslandPass.cpp vendor/llvm/dist/lib/Target/ARM/AsmParser/ARMAsmParser.cpp vendor/llvm/dist/lib/Target/ARM/Makefile vendor/llvm/dist/lib/Target/ARM/Thumb1InstrInfo.cpp vendor/llvm/dist/lib/Target/ARM/Thumb1RegisterInfo.cpp vendor/llvm/dist/lib/Target/ARM/Thumb2InstrInfo.cpp vendor/llvm/dist/lib/Target/Alpha/AlphaISelLowering.cpp vendor/llvm/dist/lib/Target/Alpha/AlphaInstrInfo.cpp vendor/llvm/dist/lib/Target/Alpha/AlphaLLRP.cpp vendor/llvm/dist/lib/Target/Alpha/AlphaRegisterInfo.cpp vendor/llvm/dist/lib/Target/Blackfin/BlackfinInstrInfo.cpp vendor/llvm/dist/lib/Target/Blackfin/BlackfinRegisterInfo.cpp vendor/llvm/dist/lib/Target/CellSPU/SPUInstrInfo.cpp vendor/llvm/dist/lib/Target/CellSPU/SPURegisterInfo.cpp vendor/llvm/dist/lib/Target/MBlaze/MBlazeInstrInfo.cpp vendor/llvm/dist/lib/Target/MBlaze/MBlazeRegisterInfo.cpp vendor/llvm/dist/lib/Target/MSP430/MSP430InstrInfo.cpp vendor/llvm/dist/lib/Target/MSP430/MSP430RegisterInfo.cpp vendor/llvm/dist/lib/Target/Mips/MipsInstrInfo.cpp vendor/llvm/dist/lib/Target/Mips/MipsRegisterInfo.cpp vendor/llvm/dist/lib/Target/PIC16/PIC16DebugInfo.cpp vendor/llvm/dist/lib/Target/PIC16/PIC16InstrInfo.cpp vendor/llvm/dist/lib/Target/PowerPC/PPCISelDAGToDAG.cpp vendor/llvm/dist/lib/Target/PowerPC/PPCISelLowering.cpp vendor/llvm/dist/lib/Target/PowerPC/PPCISelLowering.h vendor/llvm/dist/lib/Target/PowerPC/PPCInstrInfo.cpp vendor/llvm/dist/lib/Target/PowerPC/PPCRegisterInfo.cpp vendor/llvm/dist/lib/Target/Sparc/DelaySlotFiller.cpp vendor/llvm/dist/lib/Target/Sparc/SparcInstrInfo.cpp vendor/llvm/dist/lib/Target/Sparc/SparcRegisterInfo.cpp vendor/llvm/dist/lib/Target/SystemZ/SystemZInstrInfo.cpp vendor/llvm/dist/lib/Target/SystemZ/SystemZRegisterInfo.cpp vendor/llvm/dist/lib/Target/X86/Disassembler/X86Disassembler.cpp vendor/llvm/dist/lib/Target/X86/Disassembler/X86DisassemblerDecoder.c vendor/llvm/dist/lib/Target/X86/Disassembler/X86DisassemblerDecoder.h vendor/llvm/dist/lib/Target/X86/X86.td vendor/llvm/dist/lib/Target/X86/X86FloatingPointRegKill.cpp vendor/llvm/dist/lib/Target/X86/X86ISelDAGToDAG.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/X86InstrSSE.td vendor/llvm/dist/lib/Target/X86/X86Subtarget.cpp vendor/llvm/dist/lib/Target/X86/X86Subtarget.h vendor/llvm/dist/lib/Target/XCore/XCoreInstrInfo.cpp vendor/llvm/dist/lib/Target/XCore/XCoreRegisterInfo.cpp vendor/llvm/dist/lib/Transforms/IPO/Internalize.cpp vendor/llvm/dist/lib/Transforms/Scalar/IndVarSimplify.cpp vendor/llvm/dist/lib/Transforms/Scalar/LoopUnswitch.cpp vendor/llvm/dist/lib/Transforms/Utils/SSAUpdater.cpp vendor/llvm/dist/lib/VMCore/BasicBlock.cpp vendor/llvm/dist/lib/VMCore/Core.cpp vendor/llvm/dist/lib/VMCore/DebugLoc.cpp vendor/llvm/dist/lib/VMCore/Metadata.cpp vendor/llvm/dist/lib/VMCore/Pass.cpp vendor/llvm/dist/lib/VMCore/PassManager.cpp vendor/llvm/dist/lib/VMCore/PrintModulePass.cpp vendor/llvm/dist/test/CodeGen/X86/memset-2.ll vendor/llvm/dist/tools/llvm-bcanalyzer/llvm-bcanalyzer.cpp vendor/llvm/dist/tools/llvmc/plugins/Base/Base.td.in vendor/llvm/dist/utils/TableGen/CMakeLists.txt vendor/llvm/dist/utils/TableGen/DisassemblerEmitter.cpp vendor/llvm/dist/utils/TableGen/TableGen.cpp Modified: vendor/llvm/dist/Makefile.rules ============================================================================== --- vendor/llvm/dist/Makefile.rules Sat Apr 3 07:27:32 2010 (r206123) +++ vendor/llvm/dist/Makefile.rules Sat Apr 3 07:51:10 2010 (r206124) @@ -1612,6 +1612,11 @@ $(ObjDir)/%GenIntrinsics.inc.tmp : %.td $(Echo) "Building $(

-The goal of DragonEgg is to make -gcc-4.5 act like llvm-gcc without requiring any gcc modifications whatsoever. -DragonEgg is a shared library (dragonegg.so) -that is loaded by gcc at runtime. It ... +DragonEgg is a port of llvm-gcc to +gcc-4.5. Unlike llvm-gcc, which makes many intrusive changes to the underlying +gcc-4.2 code, dragonegg in theory does not require any gcc-4.5 modifications +whatsoever (currently one small patch is needed). This is thanks to the new +gcc plugin architecture, which +makes it possible to modify the behaviour of gcc at runtime by loading a plugin, +which is nothing more than a dynamic library which conforms to the gcc plugin +interface. DragonEgg is a gcc plugin that causes the LLVM optimizers to be run +instead of the gcc optimizers, and the LLVM code generators instead of the gcc +code generators, just like llvm-gcc. To use it, you add +"-fplugin=path/dragonegg.so" to the gcc-4.5 command line, and gcc-4.5 magically +becomes llvm-gcc-4.5! +

+ +

+DragonEgg is still a work in progress. Currently C works very well, while C++, +Ada and Fortran work fairly well. All other languages either don't work at all, +or only work poorly. For the moment only the x86-32 and x86-64 targets are +supported, and only on linux. +

+ +

+DragonEgg has not yet been released. Once gcc-4.5 has been released, dragonegg +will probably be released as part of the following LLVM release.

@@ -1058,7 +1078,7 @@ lists.

src="http://www.w3.org/Icons/valid-html401-blue" alt="Valid HTML 4.01"> LLVM Compiler Infrastructure
- Last modified: $Date: 2010-04-01 03:53:24 +0200 (Thu, 01 Apr 2010) $ + Last modified: $Date: 2010-04-02 11:23:15 +0200 (Fri, 02 Apr 2010) $ Modified: vendor/llvm/dist/include/llvm/Analysis/DebugInfo.h ============================================================================== --- vendor/llvm/dist/include/llvm/Analysis/DebugInfo.h Sat Apr 3 07:27:32 2010 (r206123) +++ vendor/llvm/dist/include/llvm/Analysis/DebugInfo.h Sat Apr 3 07:51:10 2010 (r206124) @@ -31,8 +31,6 @@ namespace llvm { class Type; class Value; class DbgDeclareInst; - class DebugLoc; - struct DebugLocTracker; class Instruction; class MDNode; class LLVMContext; @@ -710,11 +708,6 @@ namespace llvm { std::string &Type, unsigned &LineNo, std::string &File, std::string &Dir); - /// ExtractDebugLocation - Extract debug location information - /// from DILocation. - DebugLoc ExtractDebugLocation(DILocation &Loc, - DebugLocTracker &DebugLocInfo); - /// getDISubprogram - Find subprogram that is enclosing this scope. DISubprogram getDISubprogram(MDNode *Scope); Modified: vendor/llvm/dist/include/llvm/Analysis/LoopPass.h ============================================================================== --- vendor/llvm/dist/include/llvm/Analysis/LoopPass.h Sat Apr 3 07:27:32 2010 (r206123) +++ vendor/llvm/dist/include/llvm/Analysis/LoopPass.h Sat Apr 3 07:51:10 2010 (r206124) @@ -31,6 +31,10 @@ public: explicit LoopPass(intptr_t pid) : Pass(PT_Loop, pid) {} explicit LoopPass(void *pid) : Pass(PT_Loop, pid) {} + /// getPrinterPass - Get a pass to print the function corresponding + /// to a Loop. + Pass *createPrinterPass(raw_ostream &O, const std::string &Banner) const; + // runOnLoop - This method should be implemented by the subclass to perform // whatever action is necessary for the specified Loop. virtual bool runOnLoop(Loop *L, LPPassManager &LPM) = 0; Modified: vendor/llvm/dist/include/llvm/Assembly/PrintModulePass.h ============================================================================== --- vendor/llvm/dist/include/llvm/Assembly/PrintModulePass.h Sat Apr 3 07:27:32 2010 (r206123) +++ vendor/llvm/dist/include/llvm/Assembly/PrintModulePass.h Sat Apr 3 07:51:10 2010 (r206124) @@ -27,7 +27,9 @@ namespace llvm { /// createPrintModulePass - Create and return a pass that writes the /// module to the specified raw_ostream. - ModulePass *createPrintModulePass(raw_ostream *OS, bool DeleteStream=false); + ModulePass *createPrintModulePass(raw_ostream *OS, + bool DeleteStream=false, + const std::string &Banner = ""); /// createPrintFunctionPass - Create and return a pass that prints /// functions to the specified raw_ostream as they are processed. Modified: vendor/llvm/dist/include/llvm/BasicBlock.h ============================================================================== --- vendor/llvm/dist/include/llvm/BasicBlock.h Sat Apr 3 07:27:32 2010 (r206123) +++ vendor/llvm/dist/include/llvm/BasicBlock.h Sat Apr 3 07:51:10 2010 (r206124) @@ -131,6 +131,12 @@ public: const Instruction* getFirstNonPHI() const { return const_cast(this)->getFirstNonPHI(); } + + // Same as above, but also skip debug intrinsics. + Instruction* getFirstNonPHIOrDbg(); + const Instruction* getFirstNonPHIOrDbg() const { + return const_cast(this)->getFirstNonPHIOrDbg(); + } /// removeFromParent - This method unlinks 'this' from the containing /// function, but does not delete it. Modified: vendor/llvm/dist/include/llvm/Bitcode/LLVMBitCodes.h ============================================================================== --- vendor/llvm/dist/include/llvm/Bitcode/LLVMBitCodes.h Sat Apr 3 07:27:32 2010 (r206123) +++ vendor/llvm/dist/include/llvm/Bitcode/LLVMBitCodes.h Sat Apr 3 07:51:10 2010 (r206124) @@ -240,7 +240,10 @@ namespace bitc { // new select on i1 or [N x i1] FUNC_CODE_INST_VSELECT = 29, // VSELECT: [ty,opval,opval,predty,pred] FUNC_CODE_INST_INBOUNDS_GEP= 30, // INBOUNDS_GEP: [n x operands] - FUNC_CODE_INST_INDIRECTBR = 31 // INDIRECTBR: [opty, op0, op1, ...] + FUNC_CODE_INST_INDIRECTBR = 31, // INDIRECTBR: [opty, op0, op1, ...] + + FUNC_CODE_DEBUG_LOC = 32, // DEBUG_LOC: [Line,Col,ScopeVal, IAVal] + FUNC_CODE_DEBUG_LOC_AGAIN = 33 // DEBUG_LOC_AGAIN }; } // End bitc namespace } // End llvm namespace Modified: vendor/llvm/dist/include/llvm/CallGraphSCCPass.h ============================================================================== --- vendor/llvm/dist/include/llvm/CallGraphSCCPass.h Sat Apr 3 07:27:32 2010 (r206123) +++ vendor/llvm/dist/include/llvm/CallGraphSCCPass.h Sat Apr 3 07:51:10 2010 (r206124) @@ -35,6 +35,10 @@ struct CallGraphSCCPass : public Pass { explicit CallGraphSCCPass(intptr_t pid) : Pass(PT_CallGraphSCC, pid) {} explicit CallGraphSCCPass(void *pid) : Pass(PT_CallGraphSCC, pid) {} + /// createPrinterPass - Get a pass that prints the Module + /// corresponding to a CallGraph. + Pass *createPrinterPass(raw_ostream &O, const std::string &Banner) const; + /// doInitialization - This method is called before the SCC's of the program /// has been processed, allowing the pass to do initialization as necessary. virtual bool doInitialization(CallGraph &CG) { Modified: vendor/llvm/dist/include/llvm/CodeGen/AsmPrinter.h ============================================================================== --- vendor/llvm/dist/include/llvm/CodeGen/AsmPrinter.h Sat Apr 3 07:27:32 2010 (r206123) +++ vendor/llvm/dist/include/llvm/CodeGen/AsmPrinter.h Sat Apr 3 07:51:10 2010 (r206124) @@ -19,6 +19,7 @@ #include "llvm/CodeGen/MachineFunctionPass.h" #include "llvm/Support/DebugLoc.h" #include "llvm/Target/TargetMachine.h" +#include "llvm/ADT/DenseMap.h" namespace llvm { class BlockAddress; Modified: vendor/llvm/dist/include/llvm/CodeGen/MachineFunction.h ============================================================================== --- vendor/llvm/dist/include/llvm/CodeGen/MachineFunction.h Sat Apr 3 07:27:32 2010 (r206123) +++ vendor/llvm/dist/include/llvm/CodeGen/MachineFunction.h Sat Apr 3 07:51:10 2010 (r206124) @@ -26,7 +26,6 @@ namespace llvm { -class DILocation; class Value; class Function; class MachineRegisterInfo; @@ -112,9 +111,6 @@ class MachineFunction { // of a function. DebugLoc DefaultDebugLoc; - // Tracks debug locations. - DebugLocTracker DebugLocInfo; - /// FunctionNumber - This provides a unique ID for each function emitted in /// this translation unit. /// @@ -402,9 +398,6 @@ public: // Debug location. // - /// getDILocation - Get the DILocation for a given DebugLoc object. - DILocation getDILocation(DebugLoc DL) const; - /// getDefaultDebugLoc - Get the default debug location for the machine /// function. DebugLoc getDefaultDebugLoc() const { return DefaultDebugLoc; } @@ -412,9 +405,6 @@ public: /// setDefaultDebugLoc - Get the default debug location for the machine /// function. void setDefaultDebugLoc(DebugLoc DL) { DefaultDebugLoc = DL; } - - /// getDebugLocInfo - Get the debug info location tracker. - DebugLocTracker &getDebugLocInfo() { return DebugLocInfo; } }; //===--------------------------------------------------------------------===// Modified: vendor/llvm/dist/include/llvm/CodeGen/MachineFunctionPass.h ============================================================================== --- vendor/llvm/dist/include/llvm/CodeGen/MachineFunctionPass.h Sat Apr 3 07:27:32 2010 (r206123) +++ vendor/llvm/dist/include/llvm/CodeGen/MachineFunctionPass.h Sat Apr 3 07:51:10 2010 (r206124) @@ -34,6 +34,9 @@ protected: explicit MachineFunctionPass(intptr_t ID) : FunctionPass(ID) {} explicit MachineFunctionPass(void *ID) : FunctionPass(ID) {} + /// createPrinterPass - Get a machine function printer pass. + Pass *createPrinterPass(raw_ostream &O, const std::string &Banner) const; + /// runOnMachineFunction - This method must be overloaded to perform the /// desired machine code transformation or analysis. /// Modified: vendor/llvm/dist/include/llvm/CodeGen/MachineInstr.h ============================================================================== --- vendor/llvm/dist/include/llvm/CodeGen/MachineInstr.h Sat Apr 3 07:27:32 2010 (r206123) +++ vendor/llvm/dist/include/llvm/CodeGen/MachineInstr.h Sat Apr 3 07:51:10 2010 (r206124) @@ -16,12 +16,13 @@ #ifndef LLVM_CODEGEN_MACHINEINSTR_H #define LLVM_CODEGEN_MACHINEINSTR_H -#include "llvm/ADT/ilist.h" -#include "llvm/ADT/ilist_node.h" -#include "llvm/ADT/STLExtras.h" #include "llvm/CodeGen/MachineOperand.h" #include "llvm/Target/TargetInstrDesc.h" #include "llvm/Target/TargetOpcodes.h" +#include "llvm/ADT/ilist.h" +#include "llvm/ADT/ilist_node.h" +#include "llvm/ADT/STLExtras.h" +#include "llvm/ADT/DenseMapInfo.h" #include "llvm/Support/DebugLoc.h" #include Modified: vendor/llvm/dist/include/llvm/CodeGen/MachineModuleInfo.h ============================================================================== --- vendor/llvm/dist/include/llvm/CodeGen/MachineModuleInfo.h Sat Apr 3 07:27:32 2010 (r206123) +++ vendor/llvm/dist/include/llvm/CodeGen/MachineModuleInfo.h Sat Apr 3 07:51:10 2010 (r206124) @@ -37,6 +37,7 @@ #include "llvm/CodeGen/MachineLocation.h" #include "llvm/MC/MCContext.h" #include "llvm/Support/Dwarf.h" +#include "llvm/Support/DebugLoc.h" #include "llvm/Support/ValueHandle.h" #include "llvm/System/DataTypes.h" #include "llvm/ADT/DenseMap.h" @@ -156,8 +157,8 @@ class MachineModuleInfo : public Immutab public: static char ID; // Pass identification, replacement for typeid - typedef std::pair > UnsignedAndMDNodePair; - typedef SmallVector< std::pair, UnsignedAndMDNodePair>, 4> + typedef std::pair UnsignedDebugLocPair; + typedef SmallVector, UnsignedDebugLocPair>, 4> VariableDbgInfoMapTy; VariableDbgInfoMapTy VariableDbgInfo; @@ -330,10 +331,10 @@ public: /// of one is required to emit exception handling info. Function *getPersonality() const; - /// setVariableDbgInfo - Collect information used to emit debugging information - /// of a variable. - void setVariableDbgInfo(MDNode *N, unsigned Slot, MDNode *Scope) { - VariableDbgInfo.push_back(std::make_pair(N, std::make_pair(Slot, Scope))); + /// setVariableDbgInfo - Collect information used to emit debugging + /// information of a variable. + void setVariableDbgInfo(MDNode *N, unsigned Slot, DebugLoc Loc) { + VariableDbgInfo.push_back(std::make_pair(N, std::make_pair(Slot, Loc))); } VariableDbgInfoMapTy &getVariableDbgInfo() { return VariableDbgInfo; } Modified: vendor/llvm/dist/include/llvm/CodeGen/Passes.h ============================================================================== --- vendor/llvm/dist/include/llvm/CodeGen/Passes.h Sat Apr 3 07:27:32 2010 (r206123) +++ vendor/llvm/dist/include/llvm/CodeGen/Passes.h Sat Apr 3 07:51:10 2010 (r206124) @@ -21,6 +21,7 @@ namespace llvm { class FunctionPass; + class MachineFunctionPass; class PassInfo; class TargetLowering; class RegisterCoalescer; @@ -36,8 +37,9 @@ namespace llvm { /// MachineFunctionPrinter pass - This pass prints out the machine function to /// the given stream, as a debugging tool. - FunctionPass *createMachineFunctionPrinterPass(raw_ostream &OS, - const std::string &Banner =""); + MachineFunctionPass * + createMachineFunctionPrinterPass(raw_ostream &OS, + const std::string &Banner =""); /// MachineLoopInfo pass - This pass is a loop analysis pass. /// Modified: vendor/llvm/dist/include/llvm/CodeGen/SelectionDAG.h ============================================================================== --- vendor/llvm/dist/include/llvm/CodeGen/SelectionDAG.h Sat Apr 3 07:27:32 2010 (r206123) +++ vendor/llvm/dist/include/llvm/CodeGen/SelectionDAG.h Sat Apr 3 07:51:10 2010 (r206124) @@ -461,8 +461,7 @@ public: SDValue getCALLSEQ_START(SDValue Chain, SDValue Op) { SDVTList VTs = getVTList(MVT::Other, MVT::Flag); SDValue Ops[] = { Chain, Op }; - return getNode(ISD::CALLSEQ_START, DebugLoc::getUnknownLoc(), - VTs, Ops, 2); + return getNode(ISD::CALLSEQ_START, DebugLoc(), VTs, Ops, 2); } /// getCALLSEQ_END - Return a new CALLSEQ_END node, which always must have a @@ -476,20 +475,19 @@ public: Ops.push_back(Op1); Ops.push_back(Op2); Ops.push_back(InFlag); - return getNode(ISD::CALLSEQ_END, DebugLoc::getUnknownLoc(), NodeTys, - &Ops[0], + return getNode(ISD::CALLSEQ_END, DebugLoc(), NodeTys, &Ops[0], (unsigned)Ops.size() - (InFlag.getNode() == 0 ? 1 : 0)); } /// getUNDEF - Return an UNDEF node. UNDEF does not have a useful DebugLoc. SDValue getUNDEF(EVT VT) { - return getNode(ISD::UNDEF, DebugLoc::getUnknownLoc(), VT); + return getNode(ISD::UNDEF, DebugLoc(), VT); } /// getGLOBAL_OFFSET_TABLE - Return a GLOBAL_OFFSET_TABLE node. This does /// not have a useful DebugLoc. SDValue getGLOBAL_OFFSET_TABLE(EVT VT) { - return getNode(ISD::GLOBAL_OFFSET_TABLE, DebugLoc::getUnknownLoc(), VT); + return getNode(ISD::GLOBAL_OFFSET_TABLE, DebugLoc(), VT); } /// getNode - Gets or creates the specified node. Modified: vendor/llvm/dist/include/llvm/CodeGen/SelectionDAGNodes.h ============================================================================== --- vendor/llvm/dist/include/llvm/CodeGen/SelectionDAGNodes.h Sat Apr 3 07:27:32 2010 (r206123) +++ vendor/llvm/dist/include/llvm/CodeGen/SelectionDAGNodes.h Sat Apr 3 07:51:10 2010 (r206124) @@ -1569,8 +1569,7 @@ public: #else explicit HandleSDNode(SDValue X) #endif - : SDNode(ISD::HANDLENODE, DebugLoc::getUnknownLoc(), - getSDVTList(MVT::Other)) { + : SDNode(ISD::HANDLENODE, DebugLoc(), getSDVTList(MVT::Other)) { InitOperands(&Op, X); } ~HandleSDNode(); @@ -1801,7 +1800,7 @@ class ConstantSDNode : public SDNode { friend class SelectionDAG; ConstantSDNode(bool isTarget, const ConstantInt *val, EVT VT) : SDNode(isTarget ? ISD::TargetConstant : ISD::Constant, - DebugLoc::getUnknownLoc(), getSDVTList(VT)), Value(val) { + DebugLoc(), getSDVTList(VT)), Value(val) { } public: @@ -1825,7 +1824,7 @@ class ConstantFPSDNode : public SDNode { friend class SelectionDAG; ConstantFPSDNode(bool isTarget, const ConstantFP *val, EVT VT) : SDNode(isTarget ? ISD::TargetConstantFP : ISD::ConstantFP, - DebugLoc::getUnknownLoc(), getSDVTList(VT)), Value(val) { + DebugLoc(), getSDVTList(VT)), Value(val) { } public: @@ -1896,7 +1895,7 @@ class FrameIndexSDNode : public SDNode { friend class SelectionDAG; FrameIndexSDNode(int fi, EVT VT, bool isTarg) : SDNode(isTarg ? ISD::TargetFrameIndex : ISD::FrameIndex, - DebugLoc::getUnknownLoc(), getSDVTList(VT)), FI(fi) { + DebugLoc(), getSDVTList(VT)), FI(fi) { } public: @@ -1915,7 +1914,7 @@ class JumpTableSDNode : public SDNode { friend class SelectionDAG; JumpTableSDNode(int jti, EVT VT, bool isTarg, unsigned char TF) : SDNode(isTarg ? ISD::TargetJumpTable : ISD::JumpTable, - DebugLoc::getUnknownLoc(), getSDVTList(VT)), JTI(jti), TargetFlags(TF) { + DebugLoc(), getSDVTList(VT)), JTI(jti), TargetFlags(TF) { } public: @@ -1941,7 +1940,7 @@ class ConstantPoolSDNode : public SDNode ConstantPoolSDNode(bool isTarget, Constant *c, EVT VT, int o, unsigned Align, unsigned char TF) : SDNode(isTarget ? ISD::TargetConstantPool : ISD::ConstantPool, - DebugLoc::getUnknownLoc(), + DebugLoc(), getSDVTList(VT)), Offset(o), Alignment(Align), TargetFlags(TF) { assert((int)Offset >= 0 && "Offset is too large"); Val.ConstVal = c; @@ -1949,7 +1948,7 @@ class ConstantPoolSDNode : public SDNode ConstantPoolSDNode(bool isTarget, MachineConstantPoolValue *v, EVT VT, int o, unsigned Align, unsigned char TF) : SDNode(isTarget ? ISD::TargetConstantPool : ISD::ConstantPool, - DebugLoc::getUnknownLoc(), + DebugLoc(), getSDVTList(VT)), Offset(o), Alignment(Align), TargetFlags(TF) { assert((int)Offset >= 0 && "Offset is too large"); Val.MachineCPVal = v; @@ -1997,8 +1996,7 @@ class BasicBlockSDNode : public SDNode { /// blocks out of order when they're jumped to, which makes it a bit /// harder. Let's see if we need it first. explicit BasicBlockSDNode(MachineBasicBlock *mbb) - : SDNode(ISD::BasicBlock, DebugLoc::getUnknownLoc(), - getSDVTList(MVT::Other)), MBB(mbb) { + : SDNode(ISD::BasicBlock, DebugLoc(), getSDVTList(MVT::Other)), MBB(mbb) { } public: @@ -2044,8 +2042,7 @@ class SrcValueSDNode : public SDNode { friend class SelectionDAG; /// Create a SrcValue for a general value. explicit SrcValueSDNode(const Value *v) - : SDNode(ISD::SRCVALUE, DebugLoc::getUnknownLoc(), - getSDVTList(MVT::Other)), V(v) {} + : SDNode(ISD::SRCVALUE, DebugLoc(), getSDVTList(MVT::Other)), V(v) {} public: /// getValue - return the contained Value. @@ -2062,8 +2059,7 @@ class RegisterSDNode : public SDNode { unsigned Reg; friend class SelectionDAG; RegisterSDNode(unsigned reg, EVT VT) - : SDNode(ISD::Register, DebugLoc::getUnknownLoc(), - getSDVTList(VT)), Reg(reg) { + : SDNode(ISD::Register, DebugLoc(), getSDVTList(VT)), Reg(reg) { } public: @@ -2081,7 +2077,7 @@ class BlockAddressSDNode : public SDNode friend class SelectionDAG; BlockAddressSDNode(unsigned NodeTy, EVT VT, BlockAddress *ba, unsigned char Flags) - : SDNode(NodeTy, DebugLoc::getUnknownLoc(), getSDVTList(VT)), + : SDNode(NodeTy, DebugLoc(), getSDVTList(VT)), BA(ba), TargetFlags(Flags) { } public: @@ -2119,8 +2115,7 @@ class ExternalSymbolSDNode : public SDNo friend class SelectionDAG; ExternalSymbolSDNode(bool isTarget, const char *Sym, unsigned char TF, EVT VT) : SDNode(isTarget ? ISD::TargetExternalSymbol : ISD::ExternalSymbol, - DebugLoc::getUnknownLoc(), - getSDVTList(VT)), Symbol(Sym), TargetFlags(TF) { + DebugLoc(), getSDVTList(VT)), Symbol(Sym), TargetFlags(TF) { } public: @@ -2138,8 +2133,8 @@ class CondCodeSDNode : public SDNode { ISD::CondCode Condition; friend class SelectionDAG; explicit CondCodeSDNode(ISD::CondCode Cond) - : SDNode(ISD::CONDCODE, DebugLoc::getUnknownLoc(), - getSDVTList(MVT::Other)), Condition(Cond) { + : SDNode(ISD::CONDCODE, DebugLoc(), getSDVTList(MVT::Other)), + Condition(Cond) { } public: @@ -2296,8 +2291,8 @@ class VTSDNode : public SDNode { EVT ValueType; friend class SelectionDAG; explicit VTSDNode(EVT VT) - : SDNode(ISD::VALUETYPE, DebugLoc::getUnknownLoc(), - getSDVTList(MVT::Other)), ValueType(VT) { + : SDNode(ISD::VALUETYPE, DebugLoc(), getSDVTList(MVT::Other)), + ValueType(VT) { } public: Modified: vendor/llvm/dist/include/llvm/CodeGen/SlotIndexes.h ============================================================================== --- vendor/llvm/dist/include/llvm/CodeGen/SlotIndexes.h Sat Apr 3 07:27:32 2010 (r206123) +++ vendor/llvm/dist/include/llvm/CodeGen/SlotIndexes.h Sat Apr 3 07:51:10 2010 (r206124) @@ -22,11 +22,11 @@ #ifndef LLVM_CODEGEN_SLOTINDEXES_H #define LLVM_CODEGEN_SLOTINDEXES_H -#include "llvm/ADT/PointerIntPair.h" -#include "llvm/ADT/SmallVector.h" #include "llvm/CodeGen/MachineBasicBlock.h" #include "llvm/CodeGen/MachineFunctionPass.h" -#include "llvm/CodeGen/MachineInstr.h" +#include "llvm/ADT/PointerIntPair.h" +#include "llvm/ADT/SmallVector.h" +#include "llvm/ADT/DenseMap.h" #include "llvm/Support/Allocator.h" #include "llvm/Support/ErrorHandling.h" Modified: vendor/llvm/dist/include/llvm/Instruction.h ============================================================================== --- vendor/llvm/dist/include/llvm/Instruction.h Sat Apr 3 07:27:32 2010 (r206123) +++ vendor/llvm/dist/include/llvm/Instruction.h Sat Apr 3 07:51:10 2010 (r206124) @@ -32,7 +32,7 @@ class Instruction : public User, public Instruction(const Instruction &); // Do not implement BasicBlock *Parent; - NewDebugLoc DbgLoc; // 'dbg' Metadata cache. + DebugLoc DbgLoc; // 'dbg' Metadata cache. enum { /// HasMetadataBit - This is a bit stored in the SubClassData field which @@ -181,10 +181,10 @@ public: } /// setDebugLoc - Set the debug location information for this instruction. - void setDebugLoc(const NewDebugLoc &Loc) { DbgLoc = Loc; } + void setDebugLoc(const DebugLoc &Loc) { DbgLoc = Loc; } /// getDebugLoc - Return the debug location for this node as a DebugLoc. - const NewDebugLoc &getDebugLoc() const { return DbgLoc; } + const DebugLoc &getDebugLoc() const { return DbgLoc; } private: /// hasMetadataHashEntry - Return true if we have an entry in the on-the-side Modified: vendor/llvm/dist/include/llvm/IntrinsicsX86.td ============================================================================== --- vendor/llvm/dist/include/llvm/IntrinsicsX86.td Sat Apr 3 07:27:32 2010 (r206123) +++ vendor/llvm/dist/include/llvm/IntrinsicsX86.td Sat Apr 3 07:51:10 2010 (r206124) @@ -782,7 +782,7 @@ let TargetPrefix = "x86" in { // All in // Advanced Encryption Standard (AES) Instructions let TargetPrefix = "x86" in { // All intrinsics start with "llvm.x86.". def int_x86_aesni_aesimc : GCCBuiltin<"__builtin_ia32_aesimc128">, - Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_v2i64_ty], + Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty], [IntrNoMem]>; def int_x86_aesni_aesenc : GCCBuiltin<"__builtin_ia32_aesenc128">, Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_v2i64_ty], @@ -797,7 +797,7 @@ let TargetPrefix = "x86" in { // All in Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_v2i64_ty], [IntrNoMem]>; def int_x86_aesni_aeskeygenassist : - GCCBuiltin<"__builtin_ia32_aeskeygenassist">, + GCCBuiltin<"__builtin_ia32_aeskeygenassist128">, Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_i32_ty], [IntrNoMem]>; } Modified: vendor/llvm/dist/include/llvm/Pass.h ============================================================================== --- vendor/llvm/dist/include/llvm/Pass.h Sat Apr 3 07:27:32 2010 (r206123) +++ vendor/llvm/dist/include/llvm/Pass.h Sat Apr 3 07:51:10 2010 (r206124) @@ -30,7 +30,9 @@ #define LLVM_PASS_H #include "llvm/System/DataTypes.h" + #include +#include #include #include @@ -120,6 +122,11 @@ public: virtual void print(raw_ostream &O, const Module *M) const; void dump() const; // dump - Print to stderr. + /// createPrinterPass - Get a Pass appropriate to print the IR this + /// pass operates one (Module, Function or MachineFunction). + virtual Pass *createPrinterPass(raw_ostream &O, + const std::string &Banner) const = 0; + /// Each pass is responsible for assigning a pass manager to itself. /// PMS is the stack of available pass manager. virtual void assignPassManager(PMStack &, @@ -233,6 +240,9 @@ public: /// class ModulePass : public Pass { public: + /// createPrinterPass - Get a module printer pass. + Pass *createPrinterPass(raw_ostream &O, const std::string &Banner) const; + /// runOnModule - Virtual method overriden by subclasses to process the module /// being operated on. virtual bool runOnModule(Module &M) = 0; @@ -293,6 +303,9 @@ public: explicit FunctionPass(intptr_t pid) : Pass(PT_Function, pid) {} explicit FunctionPass(const void *pid) : Pass(PT_Function, pid) {} + /// createPrinterPass - Get a function printer pass. + Pass *createPrinterPass(raw_ostream &O, const std::string &Banner) const; + /// doInitialization - Virtual method overridden by subclasses to do /// any necessary per-module initialization. /// @@ -343,6 +356,9 @@ public: explicit BasicBlockPass(intptr_t pid) : Pass(PT_BasicBlock, pid) {} explicit BasicBlockPass(const void *pid) : Pass(PT_BasicBlock, pid) {} + /// createPrinterPass - Get a function printer pass. + Pass *createPrinterPass(raw_ostream &O, const std::string &Banner) const; + /// doInitialization - Virtual method overridden by subclasses to do /// any necessary per-module initialization. /// Modified: vendor/llvm/dist/include/llvm/Support/Allocator.h ============================================================================== --- vendor/llvm/dist/include/llvm/Support/Allocator.h Sat Apr 3 07:27:32 2010 (r206123) +++ vendor/llvm/dist/include/llvm/Support/Allocator.h Sat Apr 3 07:51:10 2010 (r206124) @@ -200,7 +200,7 @@ public: while (Slab) { char *End = Slab == Allocator.CurSlab ? Allocator.CurPtr : (char *)Slab + Slab->Size; - for (char *Ptr = (char*)Slab+1; Ptr < End; Ptr += sizeof(T)) { + for (char *Ptr = (char*)(Slab+1); Ptr < End; Ptr += sizeof(T)) { Ptr = Allocator.AlignPtr(Ptr, alignof()); if (Ptr + sizeof(T) <= End) reinterpret_cast(Ptr)->~T(); Modified: vendor/llvm/dist/include/llvm/Support/DebugLoc.h ============================================================================== --- vendor/llvm/dist/include/llvm/Support/DebugLoc.h Sat Apr 3 07:27:32 2010 (r206123) +++ vendor/llvm/dist/include/llvm/Support/DebugLoc.h Sat Apr 3 07:51:10 2010 (r206124) @@ -12,11 +12,8 @@ // //===----------------------------------------------------------------------===// -#ifndef LLVM_DEBUGLOC_H -#define LLVM_DEBUGLOC_H - -#include "llvm/ADT/DenseMap.h" -#include +#ifndef LLVM_SUPPORT_DEBUGLOC_H +#define LLVM_SUPPORT_DEBUGLOC_H namespace llvm { class MDNode; @@ -25,7 +22,7 @@ namespace llvm { /// DebugLoc - Debug location id. This is carried by Instruction, SDNode, /// and MachineInstr to compactly encode file/line/scope information for an /// operation. - class NewDebugLoc { + class DebugLoc { /// LineCol - This 32-bit value encodes the line and column number for the /// location, encoded as 24-bits for line and 8 bits for col. A value of 0 /// for either means unknown. @@ -35,15 +32,15 @@ namespace llvm { /// decoded by LLVMContext. 0 is unknown. int ScopeIdx; public: - NewDebugLoc() : LineCol(0), ScopeIdx(0) {} // Defaults to unknown. + DebugLoc() : LineCol(0), ScopeIdx(0) {} // Defaults to unknown. /// get - Get a new DebugLoc that corresponds to the specified line/col /// scope/inline location. - static NewDebugLoc get(unsigned Line, unsigned Col, - MDNode *Scope, MDNode *InlinedAt = 0); + static DebugLoc get(unsigned Line, unsigned Col, + MDNode *Scope, MDNode *InlinedAt = 0); - /// getFromDILocation - Translate the DILocation quad into a NewDebugLoc. - static NewDebugLoc getFromDILocation(MDNode *N); + /// getFromDILocation - Translate the DILocation quad into a DebugLoc. + static DebugLoc getFromDILocation(MDNode *N); /// isUnknown - Return true if this is an unknown location. bool isUnknown() const { return ScopeIdx == 0; } @@ -73,48 +70,11 @@ namespace llvm { /// DILocation compatible MDNode. MDNode *getAsMDNode(const LLVMContext &Ctx) const; - bool operator==(const NewDebugLoc &DL) const { + bool operator==(const DebugLoc &DL) const { return LineCol == DL.LineCol && ScopeIdx == DL.ScopeIdx; } - bool operator!=(const NewDebugLoc &DL) const { return !(*this == DL); } - }; - - - - /// DebugLoc - Debug location id. This is carried by SDNode and MachineInstr - /// to index into a vector of unique debug location tuples. - class DebugLoc { - unsigned Idx; - public: - DebugLoc() : Idx(~0U) {} // Defaults to invalid. - - static DebugLoc getUnknownLoc() { DebugLoc L; L.Idx = ~0U; return L; } - static DebugLoc get(unsigned idx) { DebugLoc L; L.Idx = idx; return L; } - - unsigned getIndex() const { return Idx; } - - /// isUnknown - Return true if there is no debug info for the SDNode / - /// MachineInstr. - bool isUnknown() const { return Idx == ~0U; } - - bool operator==(const DebugLoc &DL) const { return Idx == DL.Idx; } bool operator!=(const DebugLoc &DL) const { return !(*this == DL); } }; - - /// DebugLocTracker - This class tracks debug location information. - /// - struct DebugLocTracker { - /// DebugLocations - A vector of unique DebugLocTuple's. - /// - std::vector DebugLocations; - - /// DebugIdMap - This maps DebugLocTuple's to indices into the - /// DebugLocations vector. - DenseMap DebugIdMap; - - DebugLocTracker() {} - }; - } // end namespace llvm #endif /* LLVM_DEBUGLOC_H */ Modified: vendor/llvm/dist/include/llvm/Support/IRBuilder.h ============================================================================== --- vendor/llvm/dist/include/llvm/Support/IRBuilder.h Sat Apr 3 07:27:32 2010 (r206123) +++ vendor/llvm/dist/include/llvm/Support/IRBuilder.h Sat Apr 3 07:51:10 2010 (r206124) @@ -40,7 +40,7 @@ protected: /// IRBuilderBase - Common base class shared among various IRBuilders. class IRBuilderBase { - NewDebugLoc CurDbgLocation; + DebugLoc CurDbgLocation; protected: BasicBlock *BB; BasicBlock::iterator InsertPt; @@ -82,13 +82,13 @@ public: /// SetCurrentDebugLocation - Set location information used by debugging /// information. - void SetCurrentDebugLocation(const NewDebugLoc &L) { + void SetCurrentDebugLocation(const DebugLoc &L) { CurDbgLocation = L; } /// getCurrentDebugLocation - Get location information used by debugging /// information. - const NewDebugLoc &getCurrentDebugLocation() const { return CurDbgLocation; } + const DebugLoc &getCurrentDebugLocation() const { return CurDbgLocation; } /// SetInstDebugLocation - If this builder has a current debug location, set /// it on the specified instruction. Modified: vendor/llvm/dist/include/llvm/Support/MathExtras.h ============================================================================== --- vendor/llvm/dist/include/llvm/Support/MathExtras.h Sat Apr 3 07:27:32 2010 (r206123) +++ vendor/llvm/dist/include/llvm/Support/MathExtras.h Sat Apr 3 07:51:10 2010 (r206124) @@ -457,6 +457,18 @@ inline int64_t abs64(int64_t x) { return (x < 0) ? -x : x; } +/// SignExtend32 - Sign extend B-bit number x to 32-bit int. +/// Usage int32_t r = SignExtend32<5>(x); +template inline int32_t SignExtend32(int32_t x) { + return (x << (32 - B)) >> (32 - B); +} + +/// SignExtend64 - Sign extend B-bit number x to 64-bit int. +/// Usage int64_t r = SignExtend64<5>(x); +template inline int64_t SignExtend64(int32_t x) { + return (x << (64 - B)) >> (64 - B); +} + } // End llvm namespace #endif Modified: vendor/llvm/dist/include/llvm/Support/SlowOperationInformer.h ============================================================================== --- vendor/llvm/dist/include/llvm/Support/SlowOperationInformer.h Sat Apr 3 07:27:32 2010 (r206123) +++ vendor/llvm/dist/include/llvm/Support/SlowOperationInformer.h Sat Apr 3 07:51:10 2010 (r206124) @@ -41,7 +41,7 @@ namespace llvm { SlowOperationInformer(const SlowOperationInformer&); // DO NOT IMPLEMENT void operator=(const SlowOperationInformer&); // DO NOT IMPLEMENT public: - SlowOperationInformer(const std::string &Name); + explicit SlowOperationInformer(const std::string &Name); ~SlowOperationInformer(); /// progress - Clients should periodically call this method when they can Modified: vendor/llvm/dist/include/llvm/Target/TargetLowering.h ============================================================================== --- vendor/llvm/dist/include/llvm/Target/TargetLowering.h Sat Apr 3 07:27:32 2010 (r206123) +++ vendor/llvm/dist/include/llvm/Target/TargetLowering.h Sat Apr 3 07:51:10 2010 (r206124) @@ -633,15 +633,19 @@ public: } /// getOptimalMemOpType - Returns the target specific optimal type for load - /// and store operations as a result of memset, memcpy, and memmove lowering. - /// If DstAlign is zero that means it's safe to destination alignment can - /// satisfy any constraint. Similarly if SrcAlign is zero it means there isn't - /// a need to check it against alignment requirement, probably because the - /// source does not need to be loaded. It returns EVT::Other if SelectionDAG - /// should be responsible for determining it. + /// and store operations as a result of memset, memcpy, and memmove + /// lowering. If DstAlign is zero that means it's safe to destination + /// alignment can satisfy any constraint. Similarly if SrcAlign is zero it + /// means there isn't a need to check it against alignment requirement, + /// probably because the source does not need to be loaded. If + /// 'NonScalarIntSafe' is true, that means it's safe to return a + /// non-scalar-integer type, e.g. empty string source, constant, or loaded + /// from memory. It returns EVT::Other if SelectionDAG should be responsible + /// for determining it. virtual EVT getOptimalMemOpType(uint64_t Size, unsigned DstAlign, unsigned SrcAlign, - bool SafeToUseFP, SelectionDAG &DAG) const { + bool NonScalarIntSafe, + SelectionDAG &DAG) const { return MVT::Other; } Modified: vendor/llvm/dist/include/llvm/Transforms/Utils/SSAUpdater.h ============================================================================== --- vendor/llvm/dist/include/llvm/Transforms/Utils/SSAUpdater.h Sat Apr 3 07:27:32 2010 (r206123) +++ vendor/llvm/dist/include/llvm/Transforms/Utils/SSAUpdater.h Sat Apr 3 07:51:10 2010 (r206124) @@ -27,28 +27,22 @@ namespace llvm { /// transformation wants to rewrite a set of uses of one value with uses of a /// set of values. class SSAUpdater { -public: - class BBInfo; - -private: /// AvailableVals - This keeps track of which value to use on a per-block - /// basis. When we insert PHI nodes, we keep track of them here. - //typedef DenseMap AvailableValsTy; + /// basis. When we insert PHI nodes, we keep track of them here. We use + /// TrackingVH's for the value of the map because we RAUW PHI nodes when we + /// eliminate them, and want the TrackingVH's to track this. + //typedef DenseMap > AvailableValsTy; void *AV; /// PrototypeValue is an arbitrary representative value, which we derive names /// and a type for PHI nodes. Value *PrototypeValue; - /// BBMap - The GetValueAtEndOfBlock method maintains this mapping from - /// basic blocks to BBInfo structures. - /// typedef DenseMap BBMapTy; - void *BM; - - /// Allocator - The GetValueAtEndOfBlock method uses this BumpPtrAllocator to - /// hold its internal data. The allocator and its storage is created and - /// discarded for each invocation of GetValueAtEndOfBlock. - void *BPA; + /// IncomingPredInfo - We use this as scratch space when doing our recursive + /// walk. This should only be used in GetValueInBlockInternal, normally it + /// should be empty. + //std::vector > > IncomingPredInfo; + void *IPI; /// InsertedPHIs - If this is non-null, the SSAUpdater adds all PHI nodes that /// it creates to the vector. @@ -105,14 +99,6 @@ public: private: Value *GetValueAtEndOfBlockInternal(BasicBlock *BB); - void FindPHIPlacement(BasicBlock *BB, BBInfo *Info, bool &Changed, - unsigned Counter); - void FindAvailableVal(BasicBlock *BB, BBInfo *Info, unsigned Counter); - void FindExistingPHI(BasicBlock *BB); - bool CheckIfPHIMatches(PHINode *PHI); - void RecordMatchingPHI(PHINode *PHI); - void ClearPHITags(PHINode *PHI); - void operator=(const SSAUpdater&); // DO NOT IMPLEMENT SSAUpdater(const SSAUpdater&); // DO NOT IMPLEMENT }; Modified: vendor/llvm/dist/lib/Analysis/DebugInfo.cpp ============================================================================== --- vendor/llvm/dist/lib/Analysis/DebugInfo.cpp Sat Apr 3 07:27:32 2010 (r206123) +++ vendor/llvm/dist/lib/Analysis/DebugInfo.cpp Sat Apr 3 07:51:10 2010 (r206124) @@ -24,7 +24,6 @@ #include "llvm/ADT/SmallPtrSet.h" #include "llvm/Support/Debug.h" #include "llvm/Support/Dwarf.h" -#include "llvm/Support/DebugLoc.h" #include "llvm/Support/raw_ostream.h" using namespace llvm; using namespace llvm::dwarf; @@ -1147,16 +1146,31 @@ Instruction *DIFactory::InsertDbgValueIn /// processModule - Process entire module and collect debug info. void DebugInfoFinder::processModule(Module &M) { - unsigned MDDbgKind = M.getMDKindID("dbg"); - for (Module::iterator I = M.begin(), E = M.end(); I != E; ++I) for (Function::iterator FI = (*I).begin(), FE = (*I).end(); FI != FE; ++FI) for (BasicBlock::iterator BI = (*FI).begin(), BE = (*FI).end(); BI != BE; ++BI) { - if (DbgDeclareInst *DDI = dyn_cast(BI)) + if (DbgDeclareInst *DDI = dyn_cast(BI)) { processDeclare(DDI); - else if (MDNode *L = BI->getMetadata(MDDbgKind)) - processLocation(DILocation(L)); + continue; + } + + DebugLoc Loc = BI->getDebugLoc(); + if (Loc.isUnknown()) + continue; + + LLVMContext &Ctx = BI->getContext(); + DIDescriptor Scope(Loc.getScope(Ctx)); + + if (Scope.isCompileUnit()) + addCompileUnit(DICompileUnit(Scope.getNode())); + else if (Scope.isSubprogram()) + processSubprogram(DISubprogram(Scope.getNode())); + else if (Scope.isLexicalBlock()) + processLexicalBlock(DILexicalBlock(Scope.getNode())); + + if (MDNode *IA = Loc.getInlinedAt(Ctx)) + processLocation(DILocation(IA)); } NamedMDNode *NMD = M.getNamedMetadata("llvm.dbg.gv"); @@ -1372,23 +1386,6 @@ bool llvm::getLocationInfo(const Value * return true; } -/// ExtractDebugLocation - Extract debug location information -/// from DILocation. -DebugLoc llvm::ExtractDebugLocation(DILocation &Loc, - DebugLocTracker &DebugLocInfo) { - DenseMap::iterator II - = DebugLocInfo.DebugIdMap.find(Loc.getNode()); - if (II != DebugLocInfo.DebugIdMap.end()) - return DebugLoc::get(II->second); - - // Add a new location entry. - unsigned Id = DebugLocInfo.DebugLocations.size(); - DebugLocInfo.DebugLocations.push_back(Loc.getNode()); - DebugLocInfo.DebugIdMap[Loc.getNode()] = Id; - - return DebugLoc::get(Id); -} - /// getDISubprogram - Find subprogram that is enclosing this scope. DISubprogram llvm::getDISubprogram(MDNode *Scope) { DIDescriptor D(Scope); Modified: vendor/llvm/dist/lib/Analysis/IPA/CallGraphSCCPass.cpp ============================================================================== --- vendor/llvm/dist/lib/Analysis/IPA/CallGraphSCCPass.cpp Sat Apr 3 07:27:32 2010 (r206123) +++ vendor/llvm/dist/lib/Analysis/IPA/CallGraphSCCPass.cpp Sat Apr 3 07:51:10 2010 (r206124) @@ -87,10 +87,40 @@ private: bool IsCheckingMode); }; +/// PrintCallGraphPass - Print a Module corresponding to a call graph. +/// +class PrintCallGraphPass : public CallGraphSCCPass { +private: + std::string Banner; + raw_ostream &Out; // raw_ostream to print on. + +public: + static char ID; + PrintCallGraphPass() : CallGraphSCCPass(&ID), Out(dbgs()) {} + PrintCallGraphPass(const std::string &B, raw_ostream &o) + : CallGraphSCCPass(&ID), Banner(B), Out(o) {} + + virtual void getAnalysisUsage(AnalysisUsage &AU) const { + AU.setPreservesAll(); + } + + bool runOnSCC(std::vector &SCC) { + Out << Banner; + for (std::vector::iterator n = SCC.begin(), ne = SCC.end(); + n != ne; + ++n) { + (*n)->getFunction()->print(Out); + } + return false; + } +}; + } // end anonymous namespace. char CGPassManager::ID = 0; +char PrintCallGraphPass::ID = 0; + bool CGPassManager::RunPassOnSCC(Pass *P, std::vector &CurSCC, CallGraph &CG, bool &CallGraphUpToDate) { bool Changed = false; @@ -396,6 +426,11 @@ bool CGPassManager::doFinalization(CallG return Changed; } +Pass *CallGraphSCCPass::createPrinterPass(raw_ostream &O, + const std::string &Banner) const { + return new PrintCallGraphPass(Banner, O); +} + /// Assign pass manager to manage this pass. void CallGraphSCCPass::assignPassManager(PMStack &PMS, PassManagerType PreferredType) { Modified: vendor/llvm/dist/lib/Analysis/LoopPass.cpp ============================================================================== --- vendor/llvm/dist/lib/Analysis/LoopPass.cpp Sat Apr 3 07:27:32 2010 (r206123) +++ vendor/llvm/dist/lib/Analysis/LoopPass.cpp Sat Apr 3 07:51:10 2010 (r206124) @@ -14,9 +14,44 @@ //===----------------------------------------------------------------------===// #include "llvm/Analysis/LoopPass.h" +#include "llvm/Assembly/PrintModulePass.h" +#include "llvm/Support/Debug.h" #include "llvm/Support/Timer.h" using namespace llvm; +namespace { + +/// PrintLoopPass - Print a Function corresponding to a Loop. +/// +class PrintLoopPass : public LoopPass { +private: + std::string Banner; + raw_ostream &Out; // raw_ostream to print on. + +public: + static char ID; + PrintLoopPass() : LoopPass(&ID), Out(dbgs()) {} + PrintLoopPass(const std::string &B, raw_ostream &o) + : LoopPass(&ID), Banner(B), Out(o) {} + + virtual void getAnalysisUsage(AnalysisUsage &AU) const { + AU.setPreservesAll(); + } + + bool runOnLoop(Loop *L, LPPassManager &) { + Out << Banner; + for (Loop::block_iterator b = L->block_begin(), be = L->block_end(); + b != be; + ++b) { + (*b)->print(Out); + } + return false; + } +}; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-vendor@FreeBSD.ORG Sat Apr 3 07:51:35 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 251BC106564A; Sat, 3 Apr 2010 07:51:35 +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 0F9888FC16; Sat, 3 Apr 2010 07:51:35 +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 o337pYAd022300; Sat, 3 Apr 2010 07:51:34 GMT (envelope-from rdivacky@svn.freebsd.org) Received: (from rdivacky@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o337pYnc022275; Sat, 3 Apr 2010 07:51:34 GMT (envelope-from rdivacky@svn.freebsd.org) Message-Id: <201004030751.o337pYnc022275@svn.freebsd.org> From: Roman Divacky Date: Sat, 3 Apr 2010 07:51:34 +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: r206125 - in vendor/clang/dist: include/clang/AST include/clang/Basic include/clang/Driver lib/AST lib/Basic lib/CodeGen lib/Parse lib/Sema test/CodeGen test/CodeGenCXX test/Parser test... X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Apr 2010 07:51:35 -0000 Author: rdivacky Date: Sat Apr 3 07:51:34 2010 New Revision: 206125 URL: http://svn.freebsd.org/changeset/base/206125 Log: Update clang to r100285. Added: vendor/clang/dist/test/CodeGenCXX/copy-initialization.cpp vendor/clang/dist/test/SemaObjC/class-extension-after-implementation.m Deleted: vendor/clang/dist/test/CodeGen/rdr-6098585-default-after-caserange.c vendor/clang/dist/test/CodeGen/rdr-6098585-default-fallthrough-to-caserange.c vendor/clang/dist/test/CodeGen/rdr-6098585-empty-case-range.c vendor/clang/dist/test/CodeGen/rdr-6098585-fallthrough-to-empty-range.c vendor/clang/dist/test/CodeGen/rdr-6098585-unsigned-caserange.c Modified: vendor/clang/dist/include/clang/AST/DeclObjC.h vendor/clang/dist/include/clang/AST/Expr.h vendor/clang/dist/include/clang/Basic/DiagnosticParseKinds.td vendor/clang/dist/include/clang/Basic/DiagnosticSemaKinds.td vendor/clang/dist/include/clang/Driver/Options.td vendor/clang/dist/lib/AST/ASTImporter.cpp vendor/clang/dist/lib/AST/DeclObjC.cpp vendor/clang/dist/lib/AST/Expr.cpp vendor/clang/dist/lib/Basic/Targets.cpp vendor/clang/dist/lib/CodeGen/CGDebugInfo.cpp vendor/clang/dist/lib/CodeGen/CGExprCXX.cpp vendor/clang/dist/lib/CodeGen/CGObjCMac.cpp vendor/clang/dist/lib/CodeGen/CGVtable.cpp vendor/clang/dist/lib/Parse/ParseObjc.cpp vendor/clang/dist/lib/Sema/SemaDecl.cpp vendor/clang/dist/lib/Sema/SemaDeclCXX.cpp vendor/clang/dist/lib/Sema/SemaDeclObjC.cpp vendor/clang/dist/lib/Sema/SemaExpr.cpp vendor/clang/dist/lib/Sema/SemaInit.cpp vendor/clang/dist/lib/Sema/SemaObjCProperty.cpp vendor/clang/dist/test/CodeGen/enum.c vendor/clang/dist/test/CodeGen/indirect-goto.c vendor/clang/dist/test/CodeGen/switch.c vendor/clang/dist/test/CodeGenCXX/derived-to-base-conv.cpp vendor/clang/dist/test/CodeGenCXX/virt.cpp vendor/clang/dist/test/CodeGenCXX/vtable-linkage.cpp vendor/clang/dist/test/Parser/check-syntax-1.m vendor/clang/dist/test/SemaCXX/conditional-expr.cpp vendor/clang/dist/test/SemaCXX/copy-initialization.cpp vendor/clang/dist/test/SemaObjC/default-synthesize.m Modified: vendor/clang/dist/include/clang/AST/DeclObjC.h ============================================================================== --- vendor/clang/dist/include/clang/AST/DeclObjC.h Sat Apr 3 07:51:10 2010 (r206124) +++ vendor/clang/dist/include/clang/AST/DeclObjC.h Sat Apr 3 07:51:34 2010 (r206125) @@ -624,17 +624,23 @@ public: }; private: - ObjCIvarDecl(DeclContext *DC, SourceLocation L, IdentifierInfo *Id, + ObjCIvarDecl(ObjCContainerDecl *DC, SourceLocation L, IdentifierInfo *Id, QualType T, TypeSourceInfo *TInfo, AccessControl ac, Expr *BW) : FieldDecl(ObjCIvar, DC, L, Id, T, TInfo, BW, /*Mutable=*/false), DeclAccess(ac) {} public: - static ObjCIvarDecl *Create(ASTContext &C, DeclContext *DC, SourceLocation L, - IdentifierInfo *Id, QualType T, + static ObjCIvarDecl *Create(ASTContext &C, ObjCContainerDecl *DC, + SourceLocation L, IdentifierInfo *Id, QualType T, TypeSourceInfo *TInfo, AccessControl ac, Expr *BW = NULL); + /// \brief Return the class interface that this ivar is logically contained + /// in; this is either the interface where the ivar was declared, or the + /// interface the ivar is conceptually a part of in the case of synthesized + /// ivars. + const ObjCInterfaceDecl *getContainingInterface() const; + void setAccessControl(AccessControl ac) { DeclAccess = ac; } AccessControl getAccessControl() const { return AccessControl(DeclAccess); } Modified: vendor/clang/dist/include/clang/AST/Expr.h ============================================================================== --- vendor/clang/dist/include/clang/AST/Expr.h Sat Apr 3 07:51:10 2010 (r206124) +++ vendor/clang/dist/include/clang/AST/Expr.h Sat Apr 3 07:51:34 2010 (r206125) @@ -322,6 +322,15 @@ public: /// the expression is a default argument. bool isDefaultArgument() const; + /// \brief Determine whether this expression directly creates a + /// temporary object (of class type). + bool isTemporaryObject() const { return getTemporaryObject() != 0; } + + /// \brief If this expression directly creates a temporary object of + /// class type, return the expression that actually constructs that + /// temporary object. + const Expr *getTemporaryObject() const; + const Expr* IgnoreParens() const { return const_cast(this)->IgnoreParens(); } Modified: vendor/clang/dist/include/clang/Basic/DiagnosticParseKinds.td ============================================================================== --- vendor/clang/dist/include/clang/Basic/DiagnosticParseKinds.td Sat Apr 3 07:51:10 2010 (r206124) +++ vendor/clang/dist/include/clang/Basic/DiagnosticParseKinds.td Sat Apr 3 07:51:34 2010 (r206125) @@ -182,6 +182,8 @@ def err_unexected_colon_in_nested_name_s "unexpected ':' in nested name specifier">; /// Objective-C parser diagnostics +def err_expected_minus_or_plus : Error< + "method type specifier must start with '-' or '+'">; def err_objc_no_attributes_on_category : Error< "attributes may not be specified on a category">; def err_objc_missing_end : Error<"missing @end">; Modified: vendor/clang/dist/include/clang/Basic/DiagnosticSemaKinds.td ============================================================================== --- vendor/clang/dist/include/clang/Basic/DiagnosticSemaKinds.td Sat Apr 3 07:51:10 2010 (r206124) +++ vendor/clang/dist/include/clang/Basic/DiagnosticSemaKinds.td Sat Apr 3 07:51:34 2010 (r206125) @@ -256,6 +256,10 @@ def warn_property_attribute : Warning< def warn_property_types_are_incompatible : Warning< "property type %0 is incompatible with type %1 inherited from %2">; def err_undef_interface : Error<"cannot find interface declaration for %0">; +def err_class_extension_after_impl : Error< + "cannot declare class extension for %0 after class implementation">; +def note_implementation_declared : Note< + "class implementation is declared here">; def warn_dup_category_def : Warning< "duplicate definition of category %1 on interface %0">; def err_conflicting_super_class : Error<"conflicting super class name %0">; Modified: vendor/clang/dist/include/clang/Driver/Options.td ============================================================================== --- vendor/clang/dist/include/clang/Driver/Options.td Sat Apr 3 07:51:10 2010 (r206124) +++ vendor/clang/dist/include/clang/Driver/Options.td Sat Apr 3 07:51:34 2010 (r206125) @@ -431,6 +431,7 @@ def mno_sse4_1 : Flag<"-mno-sse4.1">, Gr def mno_sse4_2 : Flag<"-mno-sse4.2">, Group; def mno_sse : Flag<"-mno-sse">, Group; def mno_ssse3 : Flag<"-mno-ssse3">, Group; +def mno_aes : Flag<"-mno-aes">, Group; def mno_thumb : Flag<"-mno-thumb">, Group; def marm : Flag<"-marm">, Alias; @@ -447,6 +448,7 @@ def msse4_1 : Flag<"-msse4.1">, Group, Group; def msse : Flag<"-msse">, Group; def mssse3 : Flag<"-mssse3">, Group; +def maes : Flag<"-maes">, Group; def mthumb : Flag<"-mthumb">, Group; def mtune_EQ : Joined<"-mtune=">, Group; def multi__module : Flag<"-multi_module">; Modified: vendor/clang/dist/lib/AST/ASTImporter.cpp ============================================================================== --- vendor/clang/dist/lib/AST/ASTImporter.cpp Sat Apr 3 07:51:10 2010 (r206124) +++ vendor/clang/dist/lib/AST/ASTImporter.cpp Sat Apr 3 07:51:34 2010 (r206125) @@ -2013,7 +2013,8 @@ Decl *ASTNodeImporter::VisitObjCIvarDecl if (!BitWidth && D->getBitWidth()) return 0; - ObjCIvarDecl *ToIvar = ObjCIvarDecl::Create(Importer.getToContext(), DC, + ObjCIvarDecl *ToIvar = ObjCIvarDecl::Create(Importer.getToContext(), + cast(DC), Loc, Name.getAsIdentifierInfo(), T, TInfo, D->getAccessControl(), BitWidth); Modified: vendor/clang/dist/lib/AST/DeclObjC.cpp ============================================================================== --- vendor/clang/dist/lib/AST/DeclObjC.cpp Sat Apr 3 07:51:10 2010 (r206124) +++ vendor/clang/dist/lib/AST/DeclObjC.cpp Sat Apr 3 07:51:34 2010 (r206125) @@ -561,14 +561,53 @@ bool ObjCInterfaceDecl::ClassImplementsP // ObjCIvarDecl //===----------------------------------------------------------------------===// -ObjCIvarDecl *ObjCIvarDecl::Create(ASTContext &C, DeclContext *DC, +ObjCIvarDecl *ObjCIvarDecl::Create(ASTContext &C, ObjCContainerDecl *DC, SourceLocation L, IdentifierInfo *Id, QualType T, TypeSourceInfo *TInfo, AccessControl ac, Expr *BW) { + if (DC) { + // Ivar's can only appear in interfaces, implementations (via synthesized + // properties), and class extensions (via direct declaration, or synthesized + // properties). + // + // FIXME: This should really be asserting this: + // (isa(DC) && + // cast(DC)->IsClassExtension())) + // but unfortunately we sometimes place ivars into non-class extension + // categories on error. This breaks an AST invariant, and should not be + // fixed. + assert((isa(DC) || isa(DC) || + isa(DC)) && + "Invalid ivar decl context!"); + } + return new (C) ObjCIvarDecl(DC, L, Id, T, TInfo, ac, BW); } +const ObjCInterfaceDecl *ObjCIvarDecl::getContainingInterface() const { + const ObjCContainerDecl *DC = cast(getDeclContext()); + + switch (DC->getKind()) { + default: + case ObjCCategoryImpl: + case ObjCProtocol: + assert(0 && "invalid ivar container!"); + return 0; + + // Ivars can only appear in class extension categories. + case ObjCCategory: { + const ObjCCategoryDecl *CD = cast(DC); + assert(CD->IsClassExtension() && "invalid container for ivar!"); + return CD->getClassInterface(); + } + case ObjCImplementation: + return cast(DC)->getClassInterface(); + + case ObjCInterface: + return cast(DC); + } +} //===----------------------------------------------------------------------===// // ObjCAtDefsFieldDecl Modified: vendor/clang/dist/lib/AST/Expr.cpp ============================================================================== --- vendor/clang/dist/lib/AST/Expr.cpp Sat Apr 3 07:51:10 2010 (r206124) +++ vendor/clang/dist/lib/AST/Expr.cpp Sat Apr 3 07:51:34 2010 (r206125) @@ -1476,6 +1476,71 @@ bool Expr::isDefaultArgument() const { return isa(E); } +/// \brief Skip over any no-op casts and any temporary-binding +/// expressions. +static const Expr *skipTemporaryBindingsAndNoOpCasts(const Expr *E) { + while (const ImplicitCastExpr *ICE = dyn_cast(E)) { + if (ICE->getCastKind() == CastExpr::CK_NoOp) + E = ICE->getSubExpr(); + else + break; + } + + while (const CXXBindTemporaryExpr *BE = dyn_cast(E)) + E = BE->getSubExpr(); + + while (const ImplicitCastExpr *ICE = dyn_cast(E)) { + if (ICE->getCastKind() == CastExpr::CK_NoOp) + E = ICE->getSubExpr(); + else + break; + } + + return E; +} + +const Expr *Expr::getTemporaryObject() const { + const Expr *E = skipTemporaryBindingsAndNoOpCasts(this); + + // A cast can produce a temporary object. The object's construction + // is represented as a CXXConstructExpr. + if (const CastExpr *Cast = dyn_cast(E)) { + // Only user-defined and constructor conversions can produce + // temporary objects. + if (Cast->getCastKind() != CastExpr::CK_ConstructorConversion && + Cast->getCastKind() != CastExpr::CK_UserDefinedConversion) + return 0; + + // Strip off temporary bindings and no-op casts. + const Expr *Sub = skipTemporaryBindingsAndNoOpCasts(Cast->getSubExpr()); + + // If this is a constructor conversion, see if we have an object + // construction. + if (Cast->getCastKind() == CastExpr::CK_ConstructorConversion) + return dyn_cast(Sub); + + // If this is a user-defined conversion, see if we have a call to + // a function that itself returns a temporary object. + if (Cast->getCastKind() == CastExpr::CK_UserDefinedConversion) + if (const CallExpr *CE = dyn_cast(Sub)) + if (CE->getCallReturnType()->isRecordType()) + return CE; + + return 0; + } + + // A call returning a class type returns a temporary. + if (const CallExpr *CE = dyn_cast(E)) { + if (CE->getCallReturnType()->isRecordType()) + return CE; + + return 0; + } + + // Explicit temporary object constructors create temporaries. + return dyn_cast(E); +} + /// hasAnyTypeDependentArguments - Determines if any of the expressions /// in Exprs is type-dependent. bool Expr::hasAnyTypeDependentArguments(Expr** Exprs, unsigned NumExprs) { Modified: vendor/clang/dist/lib/Basic/Targets.cpp ============================================================================== --- vendor/clang/dist/lib/Basic/Targets.cpp Sat Apr 3 07:51:10 2010 (r206124) +++ vendor/clang/dist/lib/Basic/Targets.cpp Sat Apr 3 07:51:34 2010 (r206125) @@ -765,9 +765,12 @@ class X86TargetInfo : public TargetInfo NoAMD3DNow, AMD3DNow, AMD3DNowAthlon } AMD3DNowLevel; + bool HasAES; + public: X86TargetInfo(const std::string& triple) - : TargetInfo(triple), SSELevel(NoMMXSSE), AMD3DNowLevel(NoAMD3DNow) { + : TargetInfo(triple), SSELevel(NoMMXSSE), AMD3DNowLevel(NoAMD3DNow), + HasAES(false) { LongDoubleFormat = &llvm::APFloat::x87DoubleExtended; } virtual void getTargetBuiltins(const Builtin::Info *&Records, @@ -813,6 +816,7 @@ void X86TargetInfo::getDefaultFeatures(c Features["ssse3"] = false; Features["sse41"] = false; Features["sse42"] = false; + Features["aes"] = false; // LLVM does not currently recognize this. // Features["sse4a"] = false; @@ -841,8 +845,10 @@ void X86TargetInfo::getDefaultFeatures(c Features["sse42"] = false; } else if (CPU == "atom") setFeatureEnabled(Features, "sse3", true); - else if (CPU == "corei7") + else if (CPU == "corei7") { setFeatureEnabled(Features, "sse4", true); + setFeatureEnabled(Features, "aes", true); + } else if (CPU == "k6" || CPU == "winchip-c6") setFeatureEnabled(Features, "mmx", true); else if (CPU == "k6-2" || CPU == "k6-3" || CPU == "athlon" || @@ -892,6 +898,8 @@ bool X86TargetInfo::setFeatureEnabled(ll Features["3dnowa"] = true; else if (Name == "3dnowa") Features["3dnow"] = Features["3dnowa"] = true; + else if (Name == "aes") + Features["aes"] = true; } else { if (Name == "mmx") Features["mmx"] = Features["sse"] = Features["sse2"] = Features["sse3"] = @@ -917,6 +925,8 @@ bool X86TargetInfo::setFeatureEnabled(ll Features["3dnow"] = Features["3dnowa"] = false; else if (Name == "3dnowa") Features["3dnowa"] = false; + else if (Name == "aes") + Features["aes"] = false; } return true; @@ -931,6 +941,11 @@ void X86TargetInfo::HandleTargetFeatures if (Features[i][0] == '-') continue; + if (Features[i].substr(1) == "aes") { + HasAES = true; + continue; + } + assert(Features[i][0] == '+' && "Invalid target feature!"); X86SSEEnum Level = llvm::StringSwitch(Features[i].substr(1)) .Case("sse42", SSE42) @@ -969,6 +984,9 @@ void X86TargetInfo::getTargetDefines(con DefineStd(Builder, "i386", Opts); } + if (HasAES) + Builder.defineMacro("__AES__"); + // Target properties. Builder.defineMacro("__LITTLE_ENDIAN__"); Modified: vendor/clang/dist/lib/CodeGen/CGDebugInfo.cpp ============================================================================== --- vendor/clang/dist/lib/CodeGen/CGDebugInfo.cpp Sat Apr 3 07:51:10 2010 (r206124) +++ vendor/clang/dist/lib/CodeGen/CGDebugInfo.cpp Sat Apr 3 07:51:34 2010 (r206125) @@ -1390,9 +1390,9 @@ void CGDebugInfo::EmitStopPoint(llvm::Fu PresumedLoc PLoc = SM.getPresumedLoc(CurLoc); llvm::MDNode *Scope = RegionStack.back(); - Builder.SetCurrentDebugLocation(llvm::NewDebugLoc::get(PLoc.getLine(), - PLoc.getColumn(), - Scope)); + Builder.SetCurrentDebugLocation(llvm::DebugLoc::get(PLoc.getLine(), + PLoc.getColumn(), + Scope)); } /// EmitRegionStart- Constructs the debug code for entering a declarative @@ -1596,7 +1596,7 @@ void CGDebugInfo::EmitDeclare(const VarD DebugFactory.InsertDeclare(Storage, D, Builder.GetInsertBlock()); llvm::MDNode *Scope = RegionStack.back(); - Call->setDebugLoc(llvm::NewDebugLoc::get(Line, Column, Scope)); + Call->setDebugLoc(llvm::DebugLoc::get(Line, Column, Scope)); } /// EmitDeclare - Emit local variable declaration debug info. @@ -1660,7 +1660,7 @@ void CGDebugInfo::EmitDeclare(const Bloc DebugFactory.InsertDeclare(Storage, D, Builder.GetInsertBlock()); llvm::MDNode *Scope = RegionStack.back(); - Call->setDebugLoc(llvm::NewDebugLoc::get(Line, PLoc.getColumn(), Scope)); + Call->setDebugLoc(llvm::DebugLoc::get(Line, PLoc.getColumn(), Scope)); } void CGDebugInfo::EmitDeclareOfAutoVariable(const VarDecl *VD, Modified: vendor/clang/dist/lib/CodeGen/CGExprCXX.cpp ============================================================================== --- vendor/clang/dist/lib/CodeGen/CGExprCXX.cpp Sat Apr 3 07:51:10 2010 (r206124) +++ vendor/clang/dist/lib/CodeGen/CGExprCXX.cpp Sat Apr 3 07:51:34 2010 (r206125) @@ -307,23 +307,7 @@ CodeGenFunction::EmitCXXConstructExpr(ll // Code gen optimization to eliminate copy constructor and return // its first argument instead. if (getContext().getLangOptions().ElideConstructors && E->isElidable()) { - const Expr *Arg = E->getArg(0); - - if (const ImplicitCastExpr *ICE = dyn_cast(Arg)) { - assert((ICE->getCastKind() == CastExpr::CK_NoOp || - ICE->getCastKind() == CastExpr::CK_ConstructorConversion || - ICE->getCastKind() == CastExpr::CK_UserDefinedConversion) && - "Unknown implicit cast kind in constructor elision"); - Arg = ICE->getSubExpr(); - } - - if (const CXXFunctionalCastExpr *FCE = dyn_cast(Arg)) - Arg = FCE->getSubExpr(); - - if (const CXXBindTemporaryExpr *BindExpr = - dyn_cast(Arg)) - Arg = BindExpr->getSubExpr(); - + const Expr *Arg = E->getArg(0)->getTemporaryObject(); EmitAggExpr(Arg, Dest, false); return; } Modified: vendor/clang/dist/lib/CodeGen/CGObjCMac.cpp ============================================================================== --- vendor/clang/dist/lib/CodeGen/CGObjCMac.cpp Sat Apr 3 07:51:10 2010 (r206124) +++ vendor/clang/dist/lib/CodeGen/CGObjCMac.cpp Sat Apr 3 07:51:34 2010 (r206125) @@ -42,41 +42,15 @@ using namespace CodeGen; // don't belong in CGObjCRuntime either so we will live with it for // now. -/// FindIvarInterface - Find the interface containing the ivar. -/// -/// FIXME: We shouldn't need to do this, the containing context should -/// be fixed. -static const ObjCInterfaceDecl *FindIvarInterface(ASTContext &Context, - const ObjCInterfaceDecl *OID, - const ObjCIvarDecl *OIVD, - unsigned &Index) { - // FIXME: The index here is closely tied to how - // ASTContext::getObjCLayout is implemented. This should be fixed to - // get the information from the layout directly. - Index = 0; - llvm::SmallVector Ivars; - Context.ShallowCollectObjCIvars(OID, Ivars); - for (unsigned k = 0, e = Ivars.size(); k != e; ++k) { - if (OIVD == Ivars[k]) - return OID; - ++Index; - } - - // Otherwise check in the super class. - if (const ObjCInterfaceDecl *Super = OID->getSuperClass()) - return FindIvarInterface(Context, Super, OIVD, Index); - - return 0; -} - static uint64_t LookupFieldBitOffset(CodeGen::CodeGenModule &CGM, const ObjCInterfaceDecl *OID, const ObjCImplementationDecl *ID, const ObjCIvarDecl *Ivar) { - unsigned Index; - const ObjCInterfaceDecl *Container = - FindIvarInterface(CGM.getContext(), OID, Ivar, Index); - assert(Container && "Unable to find ivar container"); + const ObjCInterfaceDecl *Container = Ivar->getContainingInterface(); + + // FIXME: We should eliminate the need to have ObjCImplementationDecl passed + // in here; it should never be necessary because that should be the lexical + // decl context for the ivar. // If we know have an implementation (and the ivar is in it) then // look up in the implementation layout. @@ -85,6 +59,22 @@ static uint64_t LookupFieldBitOffset(Cod RL = &CGM.getContext().getASTObjCImplementationLayout(ID); else RL = &CGM.getContext().getASTObjCInterfaceLayout(Container); + + // Compute field index. + // + // FIXME: The index here is closely tied to how ASTContext::getObjCLayout is + // implemented. This should be fixed to get the information from the layout + // directly. + unsigned Index = 0; + llvm::SmallVector Ivars; + CGM.getContext().ShallowCollectObjCIvars(Container, Ivars); + for (unsigned k = 0, e = Ivars.size(); k != e; ++k) { + if (Ivar == Ivars[k]) + break; + ++Index; + } + assert(Index != Ivars.size() && "Ivar is not inside container!"); + return RL->getFieldOffset(Index); } @@ -4727,14 +4717,10 @@ llvm::Constant *CGObjCNonFragileABIMac:: /// ObjCIvarOffsetVariable - Returns the ivar offset variable for /// the given ivar. -llvm::GlobalVariable * CGObjCNonFragileABIMac::ObjCIvarOffsetVariable( - const ObjCInterfaceDecl *ID, - const ObjCIvarDecl *Ivar) { - // FIXME: We shouldn't need to do this lookup. - unsigned Index; - const ObjCInterfaceDecl *Container = - FindIvarInterface(CGM.getContext(), ID, Ivar, Index); - assert(Container && "Unable to find ivar container!"); +llvm::GlobalVariable * +CGObjCNonFragileABIMac::ObjCIvarOffsetVariable(const ObjCInterfaceDecl *ID, + const ObjCIvarDecl *Ivar) { + const ObjCInterfaceDecl *Container = Ivar->getContainingInterface(); std::string Name = "OBJC_IVAR_$_" + Container->getNameAsString() + '.' + Ivar->getNameAsString(); llvm::GlobalVariable *IvarOffsetGV = @@ -4749,10 +4735,10 @@ llvm::GlobalVariable * CGObjCNonFragileA return IvarOffsetGV; } -llvm::Constant * CGObjCNonFragileABIMac::EmitIvarOffsetVar( - const ObjCInterfaceDecl *ID, - const ObjCIvarDecl *Ivar, - unsigned long int Offset) { +llvm::Constant * +CGObjCNonFragileABIMac::EmitIvarOffsetVar(const ObjCInterfaceDecl *ID, + const ObjCIvarDecl *Ivar, + unsigned long int Offset) { llvm::GlobalVariable *IvarOffsetGV = ObjCIvarOffsetVariable(ID, Ivar); IvarOffsetGV->setInitializer(llvm::ConstantInt::get(ObjCTypes.LongTy, Offset)); Modified: vendor/clang/dist/lib/CodeGen/CGVtable.cpp ============================================================================== --- vendor/clang/dist/lib/CodeGen/CGVtable.cpp Sat Apr 3 07:51:10 2010 (r206124) +++ vendor/clang/dist/lib/CodeGen/CGVtable.cpp Sat Apr 3 07:51:34 2010 (r206125) @@ -3146,11 +3146,16 @@ void CodeGenVTables::EmitVTableRelatedDa if (KeyFunction->getCanonicalDecl() != MD->getCanonicalDecl()) return; } else { + // If we have no key funcion and this is a explicit instantiation declaration, + // we will produce a vtable at the explicit instantiation. We don't need one + // here. + if (RDKind == clang::TSK_ExplicitInstantiationDeclaration) + return; + // If this is an explicit instantiation of a method, we don't need a vtable. // Since we have no key function, we will emit the vtable when we see // a use, and just defining a function is not an use. - if ((RDKind == TSK_ImplicitInstantiation || - RDKind == TSK_ExplicitInstantiationDeclaration) && + if (RDKind == TSK_ImplicitInstantiation && MDKind == TSK_ExplicitInstantiationDefinition) return; } Modified: vendor/clang/dist/lib/Parse/ParseObjc.cpp ============================================================================== --- vendor/clang/dist/lib/Parse/ParseObjc.cpp Sat Apr 3 07:51:10 2010 (r206124) +++ vendor/clang/dist/lib/Parse/ParseObjc.cpp Sat Apr 3 07:51:34 2010 (r206125) @@ -142,12 +142,11 @@ Parser::DeclPtrTy Parser::ParseObjCAtInt // We have a class or category name - consume it. IdentifierInfo *nameId = Tok.getIdentifierInfo(); SourceLocation nameLoc = ConsumeToken(); - + bool Err = false; if (Tok.is(tok::l_paren)) { // we have a category. SourceLocation lparenLoc = ConsumeParen(); SourceLocation categoryLoc, rparenLoc; IdentifierInfo *categoryId = 0; - if (Tok.is(tok::code_completion)) { Actions.CodeCompleteObjCInterfaceCategory(CurScope, nameId); ConsumeToken(); @@ -157,7 +156,14 @@ Parser::DeclPtrTy Parser::ParseObjCAtInt if (Tok.is(tok::identifier)) { categoryId = Tok.getIdentifierInfo(); categoryLoc = ConsumeToken(); - } else if (!getLang().ObjC2) { + } + else if (isKnownToBeTypeSpecifier(Tok)) { + // Fall thru after diagnosing for better error recovery. + Diag(Tok, diag::err_expected_minus_or_plus); + ConsumeToken(); + Err = true; + } + else if (!getLang().ObjC2) { Diag(Tok, diag::err_expected_ident); // missing category name. return DeclPtrTy(); } @@ -167,33 +173,34 @@ Parser::DeclPtrTy Parser::ParseObjCAtInt return DeclPtrTy(); } rparenLoc = ConsumeParen(); - - // Next, we need to check for any protocol references. - SourceLocation LAngleLoc, EndProtoLoc; - llvm::SmallVector ProtocolRefs; - llvm::SmallVector ProtocolLocs; - if (Tok.is(tok::less) && - ParseObjCProtocolReferences(ProtocolRefs, ProtocolLocs, true, + if (!Err) { + // Next, we need to check for any protocol references. + SourceLocation LAngleLoc, EndProtoLoc; + llvm::SmallVector ProtocolRefs; + llvm::SmallVector ProtocolLocs; + if (Tok.is(tok::less) && + ParseObjCProtocolReferences(ProtocolRefs, ProtocolLocs, true, LAngleLoc, EndProtoLoc)) - return DeclPtrTy(); + return DeclPtrTy(); - if (attrList) // categories don't support attributes. - Diag(Tok, diag::err_objc_no_attributes_on_category); + if (attrList) // categories don't support attributes. + Diag(Tok, diag::err_objc_no_attributes_on_category); - DeclPtrTy CategoryType = - Actions.ActOnStartCategoryInterface(atLoc, - nameId, nameLoc, - categoryId, categoryLoc, - ProtocolRefs.data(), - ProtocolRefs.size(), - ProtocolLocs.data(), - EndProtoLoc); - if (Tok.is(tok::l_brace)) + DeclPtrTy CategoryType = + Actions.ActOnStartCategoryInterface(atLoc, + nameId, nameLoc, + categoryId, categoryLoc, + ProtocolRefs.data(), + ProtocolRefs.size(), + ProtocolLocs.data(), + EndProtoLoc); + if (Tok.is(tok::l_brace)) ParseObjCClassInstanceVariables(CategoryType, tok::objc_private, atLoc); - ParseObjCInterfaceDeclList(CategoryType, tok::objc_not_keyword); - return CategoryType; + ParseObjCInterfaceDeclList(CategoryType, tok::objc_not_keyword); + return CategoryType; + } } // Parse a class interface. IdentifierInfo *superClassId = 0; @@ -235,7 +242,7 @@ Parser::DeclPtrTy Parser::ParseObjCAtInt ParseObjCClassInstanceVariables(ClsType, tok::objc_protected, atLoc); ParseObjCInterfaceDeclList(ClsType, tok::objc_interface); - return ClsType; + return Err ? DeclPtrTy() : ClsType; } /// The Objective-C property callback. This should be defined where @@ -328,7 +335,14 @@ void Parser::ParseObjCInterfaceDeclList( "", tok::semi); continue; } - + if (Tok.is(tok::l_paren)) { + Diag(Tok, diag::err_expected_minus_or_plus); + DeclPtrTy methodPrototype = ParseObjCMethodDecl(Tok.getLocation(), + tok::minus, + interfaceDecl, + MethodImplKind); + continue; + } // Ignore excess semicolons. if (Tok.is(tok::semi)) { ConsumeToken(); Modified: vendor/clang/dist/lib/Sema/SemaDecl.cpp ============================================================================== --- vendor/clang/dist/lib/Sema/SemaDecl.cpp Sat Apr 3 07:51:10 2010 (r206124) +++ vendor/clang/dist/lib/Sema/SemaDecl.cpp Sat Apr 3 07:51:34 2010 (r206125) @@ -5740,17 +5740,15 @@ Sema::DeclPtrTy Sema::ActOnIvar(Scope *S Visibility != tok::objc_not_keyword ? TranslateIvarVisibility(Visibility) : ObjCIvarDecl::None; // Must set ivar's DeclContext to its enclosing interface. - Decl *EnclosingDecl = IntfDecl.getAs(); - DeclContext *EnclosingContext; + ObjCContainerDecl *EnclosingDecl = IntfDecl.getAs(); + ObjCContainerDecl *EnclosingContext; if (ObjCImplementationDecl *IMPDecl = dyn_cast(EnclosingDecl)) { // Case of ivar declared in an implementation. Context is that of its class. - ObjCInterfaceDecl* IDecl = IMPDecl->getClassInterface(); - assert(IDecl && "No class- ActOnIvar"); - EnclosingContext = cast_or_null(IDecl); + EnclosingContext = IMPDecl->getClassInterface(); + assert(EnclosingContext && "Implementation has no class interface!"); } else - EnclosingContext = dyn_cast(EnclosingDecl); - assert(EnclosingContext && "null DeclContext for ivar - ActOnIvar"); + EnclosingContext = EnclosingDecl; // Construct the decl. ObjCIvarDecl *NewID = ObjCIvarDecl::Create(Context, Modified: vendor/clang/dist/lib/Sema/SemaDeclCXX.cpp ============================================================================== --- vendor/clang/dist/lib/Sema/SemaDeclCXX.cpp Sat Apr 3 07:51:10 2010 (r206124) +++ vendor/clang/dist/lib/Sema/SemaDeclCXX.cpp Sat Apr 3 07:51:34 2010 (r206125) @@ -3965,33 +3965,21 @@ Sema::BuildCXXConstructExpr(SourceLocati bool BaseInitialization) { bool Elidable = false; - // C++ [class.copy]p15: - // Whenever a temporary class object is copied using a copy constructor, and - // this object and the copy have the same cv-unqualified type, an - // implementation is permitted to treat the original and the copy as two - // different ways of referring to the same object and not perform a copy at - // all, even if the class copy constructor or destructor have side effects. - - // FIXME: Is this enough? - if (Constructor->isCopyConstructor()) { - Expr *E = ((Expr **)ExprArgs.get())[0]; - if (ImplicitCastExpr *ICE = dyn_cast(E)) - if (ICE->getCastKind() == CastExpr::CK_NoOp) - E = ICE->getSubExpr(); - if (CXXFunctionalCastExpr *FCE = dyn_cast(E)) - E = FCE->getSubExpr(); - while (CXXBindTemporaryExpr *BE = dyn_cast(E)) - E = BE->getSubExpr(); - if (ImplicitCastExpr *ICE = dyn_cast(E)) - if (ICE->getCastKind() == CastExpr::CK_NoOp) - E = ICE->getSubExpr(); - - if (CallExpr *CE = dyn_cast(E)) - Elidable = !CE->getCallReturnType()->isReferenceType(); - else if (isa(E)) - Elidable = true; - else if (isa(E)) - Elidable = true; + // C++0x [class.copy]p34: + // When certain criteria are met, an implementation is allowed to + // omit the copy/move construction of a class object, even if the + // copy/move constructor and/or destructor for the object have + // side effects. [...] + // - when a temporary class object that has not been bound to a + // reference (12.2) would be copied/moved to a class object + // with the same cv-unqualified type, the copy/move operation + // can be omitted by constructing the temporary object + // directly into the target of the omitted copy/move + if (Constructor->isCopyConstructor() && ExprArgs.size() >= 1) { + Expr *SubExpr = ((Expr **)ExprArgs.get())[0]; + Elidable = SubExpr->isTemporaryObject() && + Context.hasSameUnqualifiedType(SubExpr->getType(), + Context.getTypeDeclType(Constructor->getParent())); } return BuildCXXConstructExpr(ConstructLoc, DeclInitType, Constructor, Modified: vendor/clang/dist/lib/Sema/SemaDeclObjC.cpp ============================================================================== --- vendor/clang/dist/lib/Sema/SemaDeclObjC.cpp Sat Apr 3 07:51:10 2010 (r206124) +++ vendor/clang/dist/lib/Sema/SemaDeclObjC.cpp Sat Apr 3 07:51:34 2010 (r206125) @@ -431,6 +431,11 @@ ActOnStartCategoryInterface(SourceLocati // Class extensions require a special treatment. Use an existing one. // Note that 'getClassExtension()' can return NULL. CDecl = IDecl->getClassExtension(); + if (IDecl->getImplementation()) { + Diag(ClassLoc, diag::err_class_extension_after_impl) << ClassName; + Diag(IDecl->getImplementation()->getLocation(), + diag::note_implementation_declared); + } } if (!CDecl) { Modified: vendor/clang/dist/lib/Sema/SemaExpr.cpp ============================================================================== --- vendor/clang/dist/lib/Sema/SemaExpr.cpp Sat Apr 3 07:51:10 2010 (r206124) +++ vendor/clang/dist/lib/Sema/SemaExpr.cpp Sat Apr 3 07:51:34 2010 (r206125) @@ -1345,11 +1345,6 @@ Sema::LookupInObjCMethod(LookupResult &L } } } - if (LangOpts.ObjCNonFragileABI2 && LookForIvars && Lookup.empty()) { - ObjCIvarDecl *Ivar = SynthesizeNewPropertyIvar(IFace, II); - if (Ivar) - return LookupInObjCMethod(Lookup, S, II, AllowBuiltinCreation); - } // Sentinel value saying that we didn't do anything special. return Owned((Expr*) 0); } Modified: vendor/clang/dist/lib/Sema/SemaInit.cpp ============================================================================== --- vendor/clang/dist/lib/Sema/SemaInit.cpp Sat Apr 3 07:51:10 2010 (r206124) +++ vendor/clang/dist/lib/Sema/SemaInit.cpp Sat Apr 3 07:51:34 2010 (r206125) @@ -2583,10 +2583,7 @@ static void TryConstructorInitialization Expr **Args, unsigned NumArgs, QualType DestType, InitializationSequence &Sequence) { - if (Kind.getKind() == InitializationKind::IK_Copy) - Sequence.setSequenceKind(InitializationSequence::UserDefinedConversion); - else - Sequence.setSequenceKind(InitializationSequence::ConstructorInitialization); + Sequence.setSequenceKind(InitializationSequence::ConstructorInitialization); // Build the candidate set directly in the initialization sequence // structure, so that it will persist if we fail. @@ -2597,7 +2594,7 @@ static void TryConstructorInitialization // explicit conversion operators. bool AllowExplicit = (Kind.getKind() == InitializationKind::IK_Direct || Kind.getKind() == InitializationKind::IK_Value || - Kind.getKind() == InitializationKind::IK_Default); + Kind.getKind() == InitializationKind::IK_Default); // The type we're converting to is a class type. Enumerate its constructors // to see if one is suitable. @@ -2661,14 +2658,10 @@ static void TryConstructorInitialization // Add the constructor initialization step. Any cv-qualification conversion is // subsumed by the initialization. - if (Kind.getKind() == InitializationKind::IK_Copy) { - Sequence.AddUserConversionStep(Best->Function, Best->FoundDecl, DestType); - } else { - Sequence.AddConstructorInitializationStep( + Sequence.AddConstructorInitializationStep( cast(Best->Function), Best->FoundDecl.getAccess(), DestType); - } } /// \brief Attempt value initialization (C++ [dcl.init]p7). @@ -3085,14 +3078,11 @@ getAssignmentAction(const InitializedEnt return Sema::AA_Converting; } -static bool shouldBindAsTemporary(const InitializedEntity &Entity, - bool IsCopy) { +static bool shouldBindAsTemporary(const InitializedEntity &Entity) { switch (Entity.getKind()) { - case InitializedEntity::EK_Result: case InitializedEntity::EK_ArrayElement: case InitializedEntity::EK_Member: - return !IsCopy; - + case InitializedEntity::EK_Result: case InitializedEntity::EK_New: case InitializedEntity::EK_Variable: case InitializedEntity::EK_Base: @@ -3108,21 +3098,38 @@ static bool shouldBindAsTemporary(const llvm_unreachable("missed an InitializedEntity kind?"); } -/// \brief If we need to perform an additional copy of the initialized object -/// for this kind of entity (e.g., the result of a function or an object being -/// thrown), make the copy. -static Sema::OwningExprResult CopyIfRequiredForEntity(Sema &S, - const InitializedEntity &Entity, - const InitializationKind &Kind, - Sema::OwningExprResult CurInit) { +static Sema::OwningExprResult CopyObject(Sema &S, + const InitializedEntity &Entity, + const InitializationKind &Kind, + Sema::OwningExprResult CurInit) { + // Determine which class type we're copying. Expr *CurInitExpr = (Expr *)CurInit.get(); - + CXXRecordDecl *Class = 0; + if (const RecordType *Record = CurInitExpr->getType()->getAs()) + Class = cast(Record->getDecl()); + if (!Class) + return move(CurInit); + + // C++0x [class.copy]p34: + // When certain criteria are met, an implementation is allowed to + // omit the copy/move construction of a class object, even if the + // copy/move constructor and/or destructor for the object have + // side effects. [...] + // - when a temporary class object that has not been bound to a + // reference (12.2) would be copied/moved to a class object + // with the same cv-unqualified type, the copy/move operation + // can be omitted by constructing the temporary object + // directly into the target of the omitted copy/move + // + // Note that the other three bullets are handled elsewhere. Copy + // elision for return statements and throw expressions are (FIXME: + // not yet) handled as part of constructor initialization, while + // copy elision for exception handlers is handled by the run-time. + bool Elidable = CurInitExpr->isTemporaryObject() && + S.Context.hasSameUnqualifiedType(Entity.getType(), CurInitExpr->getType()); SourceLocation Loc; - switch (Entity.getKind()) { case InitializedEntity::EK_Result: - if (Entity.getType()->isReferenceType()) - return move(CurInit); Loc = Entity.getReturnLoc(); break; @@ -3131,38 +3138,20 @@ static Sema::OwningExprResult CopyIfRequ break; case InitializedEntity::EK_Variable: - if (Entity.getType()->isReferenceType() || - Kind.getKind() != InitializationKind::IK_Copy) - return move(CurInit); Loc = Entity.getDecl()->getLocation(); break; case InitializedEntity::EK_ArrayElement: case InitializedEntity::EK_Member: - if (Entity.getType()->isReferenceType() || - Kind.getKind() != InitializationKind::IK_Copy) - return move(CurInit); - Loc = CurInitExpr->getLocStart(); - break; - case InitializedEntity::EK_Parameter: - // FIXME: Do we need this initialization for a parameter? - return move(CurInit); - - case InitializedEntity::EK_New: case InitializedEntity::EK_Temporary: + case InitializedEntity::EK_New: case InitializedEntity::EK_Base: case InitializedEntity::EK_VectorElement: - // We don't need to copy for any of these initialized entities. - return move(CurInit); + Loc = CurInitExpr->getLocStart(); + break; } - - CXXRecordDecl *Class = 0; - if (const RecordType *Record = CurInitExpr->getType()->getAs()) - Class = cast(Record->getDecl()); - if (!Class) - return move(CurInit); - + // Perform overload resolution using the class's copy constructors. DeclarationName ConstructorName = S.Context.DeclarationNames.getCXXConstructorName( @@ -3171,7 +3160,7 @@ static Sema::OwningExprResult CopyIfRequ OverloadCandidateSet CandidateSet(Loc); for (llvm::tie(Con, ConEnd) = Class->lookup(ConstructorName); Con != ConEnd; ++Con) { - // Find the constructor (which may be a template). + // Only consider copy constructors. CXXConstructorDecl *Constructor = dyn_cast(*Con); if (!Constructor || Constructor->isInvalidDecl() || !Constructor->isCopyConstructor()) @@ -3181,7 +3170,7 @@ static Sema::OwningExprResult CopyIfRequ = DeclAccessPair::make(Constructor, Constructor->getAccess()); S.AddOverloadCandidate(Constructor, FoundDecl, &CurInitExpr, 1, CandidateSet); - } + } OverloadCandidateSet::iterator Best; switch (S.BestViableFunction(CandidateSet, Loc, Best)) { @@ -3218,9 +3207,9 @@ static Sema::OwningExprResult CopyIfRequ Best->FoundDecl.getAccess()); CurInit.release(); - return S.BuildCXXConstructExpr(Loc, CurInitExpr->getType(), + return S.BuildCXXConstructExpr(Loc, Entity.getType().getNonReferenceType(), cast(Best->Function), - /*Elidable=*/true, + Elidable, Sema::MultiExprArg(S, (void**)&CurInitExpr, 1)); } @@ -3474,7 +3463,9 @@ InitializationSequence::Perform(Sema &S, CastKind = CastExpr::CK_UserDefinedConversion; } - if (shouldBindAsTemporary(Entity, IsCopy)) + bool RequiresCopy = !IsCopy && + getKind() != InitializationSequence::ReferenceBinding; + if (RequiresCopy || shouldBindAsTemporary(Entity)) CurInit = S.MaybeBindToTemporary(CurInit.takeAs()); CurInitExpr = CurInit.takeAs(); @@ -3483,8 +3474,8 @@ InitializationSequence::Perform(Sema &S, CurInitExpr, IsLvalue)); - if (!IsCopy) - CurInit = CopyIfRequiredForEntity(S, Entity, Kind, move(CurInit)); + if (RequiresCopy) + CurInit = CopyObject(S, Entity, Kind, move(CurInit)); break; } @@ -3560,13 +3551,9 @@ InitializationSequence::Perform(Sema &S, S.CheckConstructorAccess(Loc, Constructor, Step->Function.FoundDecl.getAccess()); - bool Elidable - = cast((Expr *)CurInit.get())->isElidable(); - if (shouldBindAsTemporary(Entity, Elidable)) + if (shouldBindAsTemporary(Entity)) CurInit = S.MaybeBindToTemporary(CurInit.takeAs()); - - if (!Elidable) - CurInit = CopyIfRequiredForEntity(S, Entity, Kind, move(CurInit)); + break; } Modified: vendor/clang/dist/lib/Sema/SemaObjCProperty.cpp ============================================================================== --- vendor/clang/dist/lib/Sema/SemaObjCProperty.cpp Sat Apr 3 07:51:10 2010 (r206124) +++ vendor/clang/dist/lib/Sema/SemaObjCProperty.cpp Sat Apr 3 07:51:34 2010 (r206125) @@ -281,7 +281,7 @@ Sema::DeclPtrTy Sema::ActOnPropertyImplD DeclPtrTy ClassCatImpDecl, IdentifierInfo *PropertyId, IdentifierInfo *PropertyIvar) { - Decl *ClassImpDecl = ClassCatImpDecl.getAs(); + ObjCContainerDecl *ClassImpDecl = ClassCatImpDecl.getAs(); // Make sure we have a context for the property implementation declaration. if (!ClassImpDecl) { Diag(AtLoc, diag::error_missing_property_context); @@ -353,14 +353,11 @@ Sema::DeclPtrTy Sema::ActOnPropertyImplD ObjCInterfaceDecl *ClassDeclared; Ivar = IDecl->lookupInstanceVariable(PropertyIvar, ClassDeclared); if (!Ivar) { - DeclContext *EnclosingContext = cast_or_null(ClassImpDecl); - assert(EnclosingContext && - "null DeclContext for synthesized ivar - ActOnPropertyImplDecl"); - Ivar = ObjCIvarDecl::Create(Context, EnclosingContext, PropertyLoc, + Ivar = ObjCIvarDecl::Create(Context, ClassImpDecl, PropertyLoc, PropertyIvar, PropType, /*Dinfo=*/0, ObjCIvarDecl::Public, (Expr *)0); - EnclosingContext->addDecl(Ivar); + ClassImpDecl->addDecl(Ivar); IDecl->makeDeclVisibleInContext(Ivar, false); property->setPropertyIvarDecl(Ivar); @@ -1072,15 +1069,10 @@ Sema::SynthesizeNewPropertyIvar(ObjCInte ObjCIvarDecl *Ivar = 0; ObjCPropertyDecl *Prop = LookupPropertyDecl(IDecl, NameII); if (Prop && !Prop->isInvalidDecl()) { - DeclContext *EnclosingContext = cast_or_null(IDecl); QualType PropType = Context.getCanonicalType(Prop->getType()); - assert(EnclosingContext && - "null DeclContext for synthesized ivar - SynthesizeNewPropertyIvar"); - Ivar = ObjCIvarDecl::Create(Context, EnclosingContext, - Prop->getLocation(), - NameII, PropType, /*Dinfo=*/0, - ObjCIvarDecl::Public, - (Expr *)0); + Ivar = ObjCIvarDecl::Create(Context, IDecl, Prop->getLocation(), NameII, + PropType, /*Dinfo=*/0, + ObjCIvarDecl::Public, (Expr *)0); Ivar->setLexicalDeclContext(IDecl); IDecl->addDecl(Ivar); Prop->setPropertyIvarDecl(Ivar); Modified: vendor/clang/dist/test/CodeGen/enum.c ============================================================================== --- vendor/clang/dist/test/CodeGen/enum.c Sat Apr 3 07:51:10 2010 (r206124) +++ vendor/clang/dist/test/CodeGen/enum.c Sat Apr 3 07:51:34 2010 (r206125) @@ -1,5 +1,5 @@ -// RUN: %clang_cc1 -triple i386-unknown-unknown %s -emit-llvm-bc -o - | opt -std-compile-opts | llvm-dis | grep 'ret i32 6' -// RUN: %clang_cc1 -triple i386-unknown-unknown -x c++ %s -emit-llvm-bc -o - | opt -std-compile-opts | llvm-dis | grep 'ret i32 7' +// RUN: %clang_cc1 -triple i386-unknown-unknown %s -O3 -emit-llvm -o - | grep 'ret i32 6' +// RUN: %clang_cc1 -triple i386-unknown-unknown -x c++ %s -O3 -emit-llvm -o - | grep 'ret i32 7' static enum { foo, bar = 1U } z; Modified: vendor/clang/dist/test/CodeGen/indirect-goto.c ============================================================================== --- vendor/clang/dist/test/CodeGen/indirect-goto.c Sat Apr 3 07:51:10 2010 (r206124) +++ vendor/clang/dist/test/CodeGen/indirect-goto.c Sat Apr 3 07:51:34 2010 (r206125) @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -triple i386-unknown-unknown -emit-llvm-bc -o - %s | opt -std-compile-opts -S | grep "ret i32 2520" +// RUN: %clang_cc1 -triple i386-unknown-unknown -O3 -emit-llvm -o - %s | grep "ret i32 2520" static int foo(unsigned i) { void *addrs[] = { &&L1, &&L2, &&L3, &&L4, &&L5 }; Modified: vendor/clang/dist/test/CodeGen/switch.c ============================================================================== --- vendor/clang/dist/test/CodeGen/switch.c Sat Apr 3 07:51:10 2010 (r206124) +++ vendor/clang/dist/test/CodeGen/switch.c Sat Apr 3 07:51:34 2010 (r206125) @@ -100,3 +100,97 @@ void foo7(){ } } *** DIFF OUTPUT TRUNCATED AT 1000 LINES ***