]> granicus.if.org Git - clang/log
clang
9 years ago[TableGen] Change a couple methods to return an ArrayRef instead of a const std:...
Craig Topper [Mon, 6 Jul 2015 06:23:06 +0000 (06:23 +0000)]
[TableGen] Change a couple methods to return an ArrayRef instead of a const std::vector reference. NFC

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@241431 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[OPENMP 4.0] Codegen for 'omp cancel' directive.
Alexey Bataev [Mon, 6 Jul 2015 05:50:32 +0000 (05:50 +0000)]
[OPENMP 4.0] Codegen for 'omp cancel' directive.

Add the next codegen for 'omp cancel' directive:
if (__kmpc_cancel()) {
  __kmpc_cancel_barrier();
  <exit construct>;
}

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@241429 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoPR24030, PR24033: Consistently check whether a new declaration conflicts with
Richard Smith [Mon, 6 Jul 2015 04:43:58 +0000 (04:43 +0000)]
PR24030, PR24033: Consistently check whether a new declaration conflicts with
an existing using shadow declaration if they define entities of the same kind
in different namespaces.

We'd previously check this consistently if the using-declaration came after the
other declaration, but not if it came before.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@241428 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoDR1909: Diagnose all invalid cases of a class member sharing its name with the class.
Richard Smith [Mon, 6 Jul 2015 01:45:27 +0000 (01:45 +0000)]
DR1909: Diagnose all invalid cases of a class member sharing its name with the class.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@241425 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoWhen we see something that looks like a constructor with a return type, only issue...
Richard Smith [Mon, 6 Jul 2015 01:04:39 +0000 (01:04 +0000)]
When we see something that looks like a constructor with a return type, only issue one error, not two.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@241424 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoMark clang/test/Modules/signal.m as REQUIRES:crash-recovery.
NAKAMURA Takumi [Sun, 5 Jul 2015 23:00:44 +0000 (23:00 +0000)]
Mark clang/test/Modules/signal.m as REQUIRES:crash-recovery.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@241421 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoDocument problems when trying libclang tests on Windows 7.
Yaron Keren [Sun, 5 Jul 2015 17:53:00 +0000 (17:53 +0000)]
Document problems when trying libclang tests on Windows 7.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@241407 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoAdd the missing return statements from revision 241399.
Nemanja Ivanovic [Sun, 5 Jul 2015 10:54:10 +0000 (10:54 +0000)]
Add the missing return statements from revision 241399.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@241405 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[CMake] clang-*.*: Prevent versioning if the buildhost is targeting for Win32.
NAKAMURA Takumi [Sun, 5 Jul 2015 10:16:24 +0000 (10:16 +0000)]
[CMake] clang-*.*: Prevent versioning if the buildhost is targeting for Win32.

CMake-2.8.12 is hardcoded to create symlinked clang.exe if the target property VERSION is present and the host is not Win32.
Then clang.exe-*.* is generated and clang.exe is symlinked to it.

  lrwxrwxrwx. 1 bb bb      13 Jul  5 18:04 clang.exe -> clang.exe-3.7
  -rwxr-x---. 1 bb bb  244763 Jul  5 18:04 clang++.exe
  -rwxr-x---. 1 bb bb  244763 Jul  5 18:04 clang.exe-3.7

It made me unhappy when built binaries were copied to the Windows target.

FIXME: Could we just remove the target property VERSION in add_llvm_executable() ?

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@241403 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoclang/test/CodeGen/builtins-ppc-vsx.c: Fix for -Asserts.
NAKAMURA Takumi [Sun, 5 Jul 2015 08:37:54 +0000 (08:37 +0000)]
clang/test/CodeGen/builtins-ppc-vsx.c: Fix for -Asserts.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@241401 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoAdd missing builtins to altivec.h for ABI compliance (vol. 2)
Nemanja Ivanovic [Sun, 5 Jul 2015 06:40:52 +0000 (06:40 +0000)]
Add missing builtins to altivec.h for ABI compliance (vol. 2)

This patch corresponds to review:
http://reviews.llvm.org/D10875

The bulk of the second round of additions to altivec.h.
The following interfaces were added:
vector double vec_floor(vector double)
vector double vec_madd(vector double, vector double, vector double)
vector float vec_msub(vector float, vector float, vector float)
vector double vec_msub(vector double, vector double, vector double)
vector float vec_mul(vector float, vector float)
vector double vec_mul(vector double, vector double)
vector float vec_nmadd(vector float, vector float, vector float)
vector double vec_nmadd(vector double, vector double, vector double)
vector double vec_nmsub(vector double, vector double, vector double)
vector double vec_nor(vector double, vector double)
vector double vec_or(vector double, vector double)
vector float vec_rint(vector float)
vector double vec_rint(vector double)
vector float vec_nearbyint(vector float)
vector double vec_nearbyint(vector double)
vector float vec_sqrt(vector float)
vector double vec_sqrt(vector double)
vector double vec_rsqrte(vector double)
vector double vec_sel(vector double, vector double, vector unsigned long long)
vector double vec_sel(vector double, vector double, vector unsigned long long)
vector double vec_sub(vector double, vector double)
vector double vec_trunc(vector double)
vector double vec_xor(vector double, vector double)
vector double vec_xor(vector double, vector bool long long)
vector double vec_xor(vector bool long long, vector double)

New VSX paths for the following interfaces:
vector float vec_madd(vector float, vector float, vector float)
vector float vec_nmsub(vector float, vector float, vector float)
vector float vec_rsqrte(vector float)
vector float vec_trunc(vector float)
vector float vec_floor(vector float)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@241399 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoclang-format: Add MacroBlock{Begin,End} options
Birunthan Mohanathas [Fri, 3 Jul 2015 17:25:16 +0000 (17:25 +0000)]
clang-format: Add MacroBlock{Begin,End} options

The MacroBlockBegin and MacroBlockEnd options make matching macro identifiers
behave like '{' and '}', respectively, in terms of indentation.

Mozilla code, for example, uses several macros that begin and end a scope.
Previously, Clang-Format removed the indentation resulting in:

    MACRO_BEGIN(...)
    MACRO_ENTRY(...)
    MACRO_ENTRY(...)
    MACRO_END

Now, using the options

    MacroBlockBegin: "^[A-Z_]+_BEGIN$"
    MacroBlockEnd: "^[A-Z_]+_END$"

will yield the expected result:

    MACRO_BEGIN(...)
      MACRO_ENTRY(...)
      MACRO_ENTRY(...)
    MACRO_END

Differential Revision: http://reviews.llvm.org/D10840

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@241363 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoRevert "Refactored ARMTargetInfo in order to use the API of llvm/lib/Support/TargetPa...
Renato Golin [Fri, 3 Jul 2015 16:41:13 +0000 (16:41 +0000)]
Revert "Refactored ARMTargetInfo in order to use the API of llvm/lib/Support/TargetParser.cpp

This reverts commit r241343, as it was, again, breaking all ARM buildbots.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@241362 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoStmtIterator: Put stmt and decl group pointer into a union.
Benjamin Kramer [Fri, 3 Jul 2015 15:12:36 +0000 (15:12 +0000)]
StmtIterator: Put stmt and decl group pointer into a union.

Reduce the size of StmtIterator without changing behavior.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@241356 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoRewrite users of Stmt::child_begin/end into for-range loops.
Benjamin Kramer [Fri, 3 Jul 2015 15:12:24 +0000 (15:12 +0000)]
Rewrite users of Stmt::child_begin/end into for-range loops.

No functionality change intended.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@241355 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago- Refactored ARMTargetInfo in order to use the API of llvm/lib/Support/TargetParser.cpp
Alexandros Lamprineas [Fri, 3 Jul 2015 11:57:23 +0000 (11:57 +0000)]
- Refactored ARMTargetInfo in order to use the API of llvm/lib/Support/TargetParser.cpp
  for extracting target specific information.
- Patch for commit 241267: ShouldUseInlineAtomic was set incorrectly when subArch was
  not specified, causing regressions.

Change-Id: Iabb35d59722f4972f1a3ab4365880add5bbcfdcc

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@241343 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoclang-format: [JS] Allow line breaks after TypeScript type colons.
Daniel Jasper [Fri, 3 Jul 2015 10:37:23 +0000 (10:37 +0000)]
clang-format: [JS] Allow line breaks after TypeScript type colons.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@241339 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoclang-format: [Java/JS] Properly support instanceof and its precedence.
Daniel Jasper [Fri, 3 Jul 2015 10:12:53 +0000 (10:12 +0000)]
clang-format: [Java/JS] Properly support instanceof and its precedence.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@241337 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[OPENMP 4.0] Fixed codegen for 'cancellation point' construct.
Alexey Bataev [Fri, 3 Jul 2015 09:56:58 +0000 (09:56 +0000)]
[OPENMP 4.0] Fixed codegen for 'cancellation point' construct.

Generate the next code for 'cancellation point':
if (__kmpc_cancellationpoint()) {
  __kmpc_cancel_barrier();
  <exit construct>;
}

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@241336 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoRevert r241330. It compiled with Visual C++ 2013 and gcc 4.9.1 (mingw) but now fails...
Yaron Keren [Fri, 3 Jul 2015 09:30:33 +0000 (09:30 +0000)]
Revert r241330. It compiled with Visual C++ 2013 and gcc 4.9.1 (mingw) but now fails the bots.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@241335 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoReplace some const std::string & with llvm::StringRef or std::string
Yaron Keren [Fri, 3 Jul 2015 09:16:20 +0000 (09:16 +0000)]
Replace some const std::string & with llvm::StringRef or std::string
and std::move to avoid implicit std::string construction.

Patch by Eugene Kosov.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@241330 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoclang/test/CodeGenCXX/trap-fnattr.cpp: Tweak to match MS-mangled names.
NAKAMURA Takumi [Fri, 3 Jul 2015 08:21:27 +0000 (08:21 +0000)]
clang/test/CodeGenCXX/trap-fnattr.cpp: Tweak to match MS-mangled names.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@241328 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoDriver: Replace a couple of out of date terms in the docs
Justin Bogner [Fri, 3 Jul 2015 08:03:43 +0000 (08:03 +0000)]
Driver: Replace a couple of out of date terms in the docs

The Job base class was removed in r241310, so replace a couple of
references to it with Command. Also change another use of Job with
Action, since that's the term used in the source.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@241327 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoRevert r241319, investigating.
Yaron Keren [Fri, 3 Jul 2015 05:31:54 +0000 (05:31 +0000)]
Revert r241319, investigating.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@241321 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoReplace some const std::string & with llvm::StringRef or std::string
Yaron Keren [Fri, 3 Jul 2015 05:09:59 +0000 (05:09 +0000)]
Replace some const std::string & with llvm::StringRef or std::string
and std::move to avoid implicit std::string construction.

Part 1/2.

Patch by Eugene Kosov.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@241319 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoMake corrections to r241314.
Akira Hatanaka [Fri, 3 Jul 2015 01:05:19 +0000 (01:05 +0000)]
Make corrections to r241314.

The return type of a function follows the signext attribute.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@241315 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoFix test case to appease buildbot.
Akira Hatanaka [Fri, 3 Jul 2015 00:50:30 +0000 (00:50 +0000)]
Fix test case to appease buildbot.

Test case trap-fnattr.cpp was failng on clang-ppc64-elf-linux2 because ppc64
sign-extends the i32 return value.

This is a follow-up to r241306.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@241314 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoDriver: Remove the Job class. NFC
Justin Bogner [Thu, 2 Jul 2015 22:52:08 +0000 (22:52 +0000)]
Driver: Remove the Job class. NFC

We had a strange relationship here where we made a list of Jobs
inherit from a single Job, but there weren't actually any places where
this arbitrary nesting was used or needed.

Simplify all of this by removing Job entirely and updating all of the
users to either work with a JobList or a single Command.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@241310 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoDriver: Don't use reserved names. NFC
Justin Bogner [Thu, 2 Jul 2015 22:52:04 +0000 (22:52 +0000)]
Driver: Don't use reserved names. NFC

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@241309 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoAttach attribute "trap-func-name" to call sites of llvm.trap and llvm.debugtrap.
Akira Hatanaka [Thu, 2 Jul 2015 22:15:41 +0000 (22:15 +0000)]
Attach attribute "trap-func-name" to call sites of llvm.trap and llvm.debugtrap.

This is needed to use clang's command line option "-ftrap-function" for LTO and
enable changing the trap function name on a per-call-site basis.

rdar://problem/21225723

Differential Revision: http://reviews.llvm.org/D10831

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@241306 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoSwitch users of the 'for (StmtRange range = stmt->children(); range; ++range)‘ patter...
Benjamin Kramer [Thu, 2 Jul 2015 21:03:14 +0000 (21:03 +0000)]
Switch users of the 'for (StmtRange range = stmt->children(); range; ++range)‘ pattern to range for loops.

The pattern was born out of the lack of range-based for loops in C++98
and is somewhat obscure. No functionality change intended.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@241300 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[CodeGen] Use llvm::join to simplify string joining.
Benjamin Kramer [Thu, 2 Jul 2015 21:02:39 +0000 (21:02 +0000)]
[CodeGen] Use llvm::join to simplify string joining.

While there replace stable_sort of std::string with just sort, stability
is not necessary for "simple" value types. No functional change intended.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@241299 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoInstrProf: Add a comment to clarify an argument
Justin Bogner [Thu, 2 Jul 2015 20:47:25 +0000 (20:47 +0000)]
InstrProf: Add a comment to clarify an argument

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@241296 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoThis patch adds support for the vector merge even word and vector merge odd word
Kit Barton [Thu, 2 Jul 2015 19:29:05 +0000 (19:29 +0000)]
This patch adds support for the vector merge even word and vector merge odd word
instructions introduced in POWER8.

These are the Clang-related changes for http://reviews.llvm.org/D10704

All builtins are added in altivec.h and guarded with the POWER8_VECTOR macro.

Phabricator review: http://reviews.llvm.org/D10736

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@241293 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[Static Analyzer] No longer include the full path of the source file in the single...
Gabor Horvath [Thu, 2 Jul 2015 19:20:46 +0000 (19:20 +0000)]
[Static Analyzer] No longer include the full path of the source file in the single file tests' bug identifiers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@241292 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[Sema] Range-loopify SemaTemplateInstantiateDecl.cpp. NFC.
Davide Italiano [Thu, 2 Jul 2015 19:20:11 +0000 (19:20 +0000)]
[Sema] Range-loopify SemaTemplateInstantiateDecl.cpp. NFC.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@241291 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoRevert "Refactored ARMTargetInfo in order to use the API of llvm/lib/Support/TargetPa...
Rafael Espindola [Thu, 2 Jul 2015 15:14:10 +0000 (15:14 +0000)]
Revert "Refactored ARMTargetInfo in order to use the API of llvm/lib/Support/TargetParser.cpp for extracting target specific information."

This reverts commit r241267. Tests were failing on the bots.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@241275 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoclang-format: [JS] Treat regex literals like string literals.
Daniel Jasper [Thu, 2 Jul 2015 15:00:44 +0000 (15:00 +0000)]
clang-format: [JS] Treat regex literals like string literals.

Using the token type "unknown" can interfere badly with
WhitespaceManager's way of handling multiline comments.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@241273 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoRemove whitespace from start of line, NFC.
Yaron Keren [Thu, 2 Jul 2015 14:44:35 +0000 (14:44 +0000)]
Remove whitespace from start of line, NFC.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@241272 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoRefactored ARMTargetInfo in order to use the API of llvm/lib/Support/TargetParser.cpp
Alexandros Lamprineas [Thu, 2 Jul 2015 14:21:40 +0000 (14:21 +0000)]
Refactored ARMTargetInfo in order to use the API of llvm/lib/Support/TargetParser.cpp
for extracting target specific information.

Change-Id: Ia0b83ecdb8d9223f9c4ef38dd9206969f78e53f3

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@241267 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoclang-format: [JS] Skip comments when applying the regex-literal heuristic
Daniel Jasper [Thu, 2 Jul 2015 14:14:04 +0000 (14:14 +0000)]
clang-format: [JS] Skip comments when applying the regex-literal heuristic

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@241264 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoWhen testing for anyOf(), the test should not be for an exact type match for all...
Aaron Ballman [Thu, 2 Jul 2015 14:02:41 +0000 (14:02 +0000)]
When testing for anyOf(), the test should not be for an exact type match for all members of the set. Instead, test that all members are convertible to the common type.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@241263 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoclang-format: [JS] Fix bug in regex literal parsing.
Daniel Jasper [Thu, 2 Jul 2015 14:01:34 +0000 (14:01 +0000)]
clang-format: [JS] Fix bug in regex literal parsing.

The lexer wasn't properly reset leading to unexpected deletions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@241262 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agotest commit
Alexandros Lamprineas [Thu, 2 Jul 2015 13:21:34 +0000 (13:21 +0000)]
test commit

Change-Id: Ibaa2e1115544ddfa491335b81226819fd9cc04b4

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@241260 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoclang-format: [JS] Support regex literals at the start of a file.
Daniel Jasper [Thu, 2 Jul 2015 13:20:45 +0000 (13:20 +0000)]
clang-format: [JS] Support regex literals at the start of a file.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@241259 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[Modules] Be consistent about finding a module for framework headers
Ben Langmuir [Thu, 2 Jul 2015 13:19:48 +0000 (13:19 +0000)]
[Modules] Be consistent about finding a module for framework headers

We use findModuleForHeader() in several places, but in header search we
were not calling it when a framework module didn't show up with the
expected name, which would then lead to unexpected non-modular includes.
Now we will find the module unconditionally for frameworks.  For regular
frameworks, we use the spelling of the module name from the module map
file, and for inferred ones we use the canonical directory name.

In the future we might want to lock down framework modules sufficiently
that these name mismatches cannot happen.

rdar://problem/20465870

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@241258 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoclang-format: [JS] Fix character counting in template strings.
Daniel Jasper [Thu, 2 Jul 2015 13:08:28 +0000 (13:08 +0000)]
clang-format: [JS] Fix character counting in template strings.

Some counts were off, we don't need to take the leading newlines of the
first ` into account and some tests were just wrong.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@241257 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoImplement an AST matcher for C++ exception catch handlers that can catch any exceptio...
Aaron Ballman [Thu, 2 Jul 2015 12:53:22 +0000 (12:53 +0000)]
Implement an AST matcher for C++ exception catch handlers that can catch any exception type (...).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@241256 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[OPENMP 4.0] Initial support for 'omp cancel' construct.
Alexey Bataev [Thu, 2 Jul 2015 11:25:17 +0000 (11:25 +0000)]
[OPENMP 4.0] Initial support for 'omp cancel' construct.

Implemented parsing/sema analysis + (de)serialization.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@241253 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[MS ABI] nullptr data member ptrs are mangled differently for classes vs fns
David Majnemer [Thu, 2 Jul 2015 09:43:11 +0000 (09:43 +0000)]
[MS ABI] nullptr data member ptrs are mangled differently for classes vs fns

It turns out that nullptr pointers to data members act differently in
function templates vs class templates.  Class templates use a variable
width representation proportional to the number of fields needed to
materialize it.  Function templates always use a single '0' template
parameter.  However, using '0' all the time is problematic if the class
uses single or multiple inheritance.  In those cases, use -1.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@241251 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoSpecify --target, hopefully fixing non-x86 bots.
Peter Collingbourne [Thu, 2 Jul 2015 09:10:31 +0000 (09:10 +0000)]
Specify --target, hopefully fixing non-x86 bots.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@241248 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoRevert 241171, 241187, 241199 (32-bit SEH).
Nico Weber [Thu, 2 Jul 2015 06:10:53 +0000 (06:10 +0000)]
Revert 241171, 241187, 241199 (32-bit SEH).

It still doesn't produce quite the right code, test binaries built with this
enabled fail some tests.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@241244 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoParse 'technical term' format specifier.
Ted Kremenek [Thu, 2 Jul 2015 05:39:16 +0000 (05:39 +0000)]
Parse 'technical term' format specifier.

Objective-C format strings now support modifier flags
that can be attached to a '@' conversion.  Currently
the only one supported, as of iOS 9 and OS X 10.11,
is the new "technical term", denoted by the flag "tt",
for example:

  %[tt]@

instead of just:

  %@

The 'tt' stands for "technical term", which is used
by the string-localization facilities on Darwin to
add the appropriate spacing or quotation depending
the language locale.

Implements <rdar://problem/20374720>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@241243 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoChange OptionalFlag::setPosition() to set the flag as well.
Ted Kremenek [Thu, 2 Jul 2015 05:39:10 +0000 (05:39 +0000)]
Change OptionalFlag::setPosition() to set the flag as well.

This change reduces some unnecessary boilerplate
since all calls to 'setPosition' are currently paired
with setting the flag of OptionalFlag.

No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@241242 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoSupport mingw-w64 and mingw.org toolchains at any install location.
Yaron Keren [Thu, 2 Jul 2015 04:45:27 +0000 (04:45 +0000)]
Support mingw-w64 and mingw.org toolchains at any install location.

No more hardcoded paths: clang will use -sysroot as gcc root location if
provided. Otherwise, it will search for gcc on the path. If not found it
will use the driver installed location.

 http://reviews.llvm.org/D5268

Patch by Ruben Van Boxem, Martell Malone, Yaron Keren.
Reviewed by Reid Kleckner.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@241241 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[OPENMP 4.0] Fixed test for 'cancellation point' directive.
Alexey Bataev [Thu, 2 Jul 2015 04:36:13 +0000 (04:36 +0000)]
[OPENMP 4.0] Fixed test for 'cancellation point' directive.

Added explicit target to pch test

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@241240 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[OPENMP 4.0] Codegen for 'cancellation point' directive.
Alexey Bataev [Thu, 2 Jul 2015 04:17:07 +0000 (04:17 +0000)]
[OPENMP 4.0] Codegen for 'cancellation point' directive.

The next code is generated for this construct:
```
if (__kmpc_cancellationpoint(ident_t *loc, kmp_int32 global_tid, kmp_int32 cncl_kind) != 0)
  <exit from outer innermost construct>;
```

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@241239 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[OPENMP] Introduced type trait "__builtin_omp_required_simd_align" for default simd...
Alexey Bataev [Thu, 2 Jul 2015 03:40:19 +0000 (03:40 +0000)]
[OPENMP] Introduced type trait "__builtin_omp_required_simd_align" for default simd alignment.

Adds type trait "__builtin_omp_required_simd_align" after discussions here http://reviews.llvm.org/D9894
Differential Revision: http://reviews.llvm.org/D10597

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@241237 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoSpecify -arch:IA32. Should fix hexagon bot.
Peter Collingbourne [Thu, 2 Jul 2015 02:14:50 +0000 (02:14 +0000)]
Specify -arch:IA32. Should fix hexagon bot.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@241229 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoMake getArchNameForCompilerRTLib return the right thing on 32-bit Windows. Fixes...
Peter Collingbourne [Thu, 2 Jul 2015 02:07:43 +0000 (02:07 +0000)]
Make getArchNameForCompilerRTLib return the right thing on 32-bit Windows. Fixes the tests there.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@241228 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoDriver: add support for linking the UBSan runtime library on Windows.
Peter Collingbourne [Thu, 2 Jul 2015 01:48:12 +0000 (01:48 +0000)]
Driver: add support for linking the UBSan runtime library on Windows.

On Windows the user may invoke the linker directly, so we might not have an
opportunity to add runtime library flags to the linker command line. Instead,
instruct the code generator to embed linker directive in the object file
that cause the required runtime libraries to be linked.

We might also want to do something similar for ASan, but it seems to have
its own special complexities which may make this infeasible.

Differential Revision: http://reviews.llvm.org/D10862

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@241225 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoInstrProf: Pack the coverage mapping structs that we write out
Justin Bogner [Thu, 2 Jul 2015 00:42:32 +0000 (00:42 +0000)]
InstrProf: Pack the coverage mapping structs that we write out

When we read this data we treat it as unaligned and packed, so we
should really be explicit about that when we write it.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@241218 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[modules] Merging support for specializations of a function template. This very
Richard Smith [Wed, 1 Jul 2015 23:19:58 +0000 (23:19 +0000)]
[modules] Merging support for specializations of a function template. This very
rarely matters, but can affect whether two dependent types are canonically
equivalent.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@241207 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[modules] Remove some out-of-date (fixed) FIXMEs.
Richard Smith [Wed, 1 Jul 2015 23:10:03 +0000 (23:10 +0000)]
[modules] Remove some out-of-date (fixed) FIXMEs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@241205 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[analyzer] Prevent ccc/c++-analyzer from hanging on Windows.
Anton Yartsev [Wed, 1 Jul 2015 22:35:29 +0000 (22:35 +0000)]
[analyzer] Prevent ccc/c++-analyzer from hanging on Windows.

'fork'+'exec' combination made scan-build and ccc-analyzer hang under Windows. The patch replaces 'fork'+'exec' with more reliable 'system' (ccc-analyzer) and piped 'open' (scan-build). See http://reviews.llvm.org/D8774 and http://reviews.llvm.org/D9357 for more details.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@241201 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[SEH] Update EmitCapturedLocals to match r241187
Reid Kleckner [Wed, 1 Jul 2015 22:33:45 +0000 (22:33 +0000)]
[SEH] Update EmitCapturedLocals to match r241187

It was still using frameaddress(1) to get the parent FP, even though it
had the value it wanted as a parameter.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@241199 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[Sema] Range-loopify InititializationSequence destructor. NFC intended.
Davide Italiano [Wed, 1 Jul 2015 21:51:58 +0000 (21:51 +0000)]
[Sema] Range-loopify InititializationSequence destructor. NFC intended.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@241195 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoclang-format: Support member function reference qualifiers with
Daniel Jasper [Wed, 1 Jul 2015 21:02:24 +0000 (21:02 +0000)]
clang-format: Support member function reference qualifiers with
trailing return types.

Before:
  template <typename T>
      auto x() & -> int {}

After:
  template <typename T>
  auto x() & -> int {}

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@241188 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[SEH] Delete the 32-bit IR lowering for __finally blocks and use x64
Reid Kleckner [Wed, 1 Jul 2015 21:00:00 +0000 (21:00 +0000)]
[SEH] Delete the 32-bit IR lowering for __finally blocks and use x64

32-bit finally funclets are intended to be called both directly from the
parent function and indirectly from the EH runtime. Because we aren't
contorting LLVM's X86 prologue to match MSVC's, calling the finally
block directly passes in a different value of EBP than the one that the
runtime provides. We need an adapter thunk to adjust EBP to the expected
value. However, WinEHPrepare already has to solve this problem when
cleanups are not pre-outlined, so we can go ahead and rely on it rather
than duplicating work.

Now we only do the llvm.x86.seh.recoverfp dance for 32-bit SEH filter
functions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@241187 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[modules] Don't make out-of-line member specializations of an instantiated
Richard Smith [Wed, 1 Jul 2015 19:32:54 +0000 (19:32 +0000)]
[modules] Don't make out-of-line member specializations of an instantiated
class template specialization visible just because the class template
specialization's definition is visible.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@241182 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[modules] Skip trailing attributes when skipping a class definition during parse...
Richard Smith [Wed, 1 Jul 2015 18:56:50 +0000 (18:56 +0000)]
[modules] Skip trailing attributes when skipping a class definition during parse-merging.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@241180 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoRevert "[DebugInfo] Fix debug info generation for function static variables, typedefs...
David Blaikie [Wed, 1 Jul 2015 18:07:22 +0000 (18:07 +0000)]
Revert "[DebugInfo] Fix debug info generation for function static variables, typedefs, and records"

Caused PR24008.

This reverts commit r241154.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@241177 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[SEH] Add 32-bit lowering for SEH __try
Reid Kleckner [Wed, 1 Jul 2015 17:10:10 +0000 (17:10 +0000)]
[SEH] Add 32-bit lowering for SEH __try

This re-lands r236052 and adds support for __exception_code().

In 32-bit SEH, the exception code is not available in eax. It is only
available in the filter function, and now we arrange to load it and
store it into an escaped variable in the parent frame.

As a consequence, we have to disable the "catch i8* null" optimization
on 32-bit and always generate a filter function. We can re-enable the
optimization if we detect an __except block that doesn't use the
exception code, but this probably isn't worth optimizing.

Reviewers: majnemer

Differential Revision: http://reviews.llvm.org/D10852

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@241171 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[DebugInfo] Fix debug info generation for function static variables, typedefs, and...
Michael Kuperstein [Wed, 1 Jul 2015 12:34:39 +0000 (12:34 +0000)]
[DebugInfo] Fix debug info generation for function static variables, typedefs, and records

Function static variables, typedefs and records (class, struct or union) declared inside
a lexical scope were associated with the function as their parent scope, rather than the
lexical scope they are defined or declared in.

This fixes PR19238

Patch by: amjad.aboud@intel.com
Differential Revision: http://reviews.llvm.org/D9760

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@241154 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[modules] Don't require the 'inline' specifier when merging an inline function;
Richard Smith [Wed, 1 Jul 2015 07:24:18 +0000 (07:24 +0000)]
[modules] Don't require the 'inline' specifier when merging an inline function;
any source of the inline nature is sufficient.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@241146 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[OPENMP 4.0] Initial support for 'omp cancellation point' construct.
Alexey Bataev [Wed, 1 Jul 2015 06:57:41 +0000 (06:57 +0000)]
[OPENMP 4.0] Initial support for 'omp cancellation point' construct.

Add parsing and sema analysis for 'omp cancellation point' directive.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@241145 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoFix a couple of unused variables in no-asserts
Justin Bogner [Wed, 1 Jul 2015 05:41:50 +0000 (05:41 +0000)]
Fix a couple of unused variables in no-asserts

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@241144 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago-frewrite-includes: Prefer insert to emplace
Justin Bogner [Wed, 1 Jul 2015 04:53:19 +0000 (04:53 +0000)]
-frewrite-includes: Prefer insert to emplace

Some bots didn't like r241140.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@241141 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago-frewrite-includes: Rework how includes and modules are differentiated
Justin Bogner [Wed, 1 Jul 2015 04:40:10 +0000 (04:40 +0000)]
-frewrite-includes: Rework how includes and modules are differentiated

The map of FileChange structs here was storing two disjoint types of
information:

1. A pointer to the Module that an #include directive implicitly
   imported

2. A FileID and FileType for an included file. These would be left
   uninitialized in the Module case.

This change splits these two kinds of information into their own maps,
which both simplifies how we access either and avoids the undefined
behaviour we were hitting due to the uninitialized fields in the
included file case.

Mostly NFC, but fixes some errors found by self-host with ubsan.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@241140 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[modules] Before checking whether the controlling macro of a header is defined,
Richard Smith [Wed, 1 Jul 2015 02:29:35 +0000 (02:29 +0000)]
[modules] Before checking whether the controlling macro of a header is defined,
update the identifier in case we've imported a definition of the macro (and
thus the contents of the header) from a module.

Also fold ExternalIdentifierLookup into ExternalPreprocessorSource; it no longer
makes sense to keep these separate now that the only user of the former also
needs the latter.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@241137 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoCodeGen: Do not give local-linkage functions externally available linkage, even tempo...
Peter Collingbourne [Wed, 1 Jul 2015 02:10:26 +0000 (02:10 +0000)]
CodeGen: Do not give local-linkage functions externally available linkage, even temporarily.

When an internal-linkage thunk is code gen'd, CodeGenVTables::emitThunk
will first be called with ForVTable=true (which incorrectly set the
thunk's linkage to available_externally under the Itanium ABI) and later
with ForVTable=false (which reset it to internal). Because we will always
see a call with ForVTable=false, this incorrect linkage never ended up in
the final IR. However, the temporary presence of this linkage caused us
to give such functions a comdat as a result of code introduced in r241102.
To avoid this, check that the thunk is externally visible before giving it
available_externally linkage.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@241136 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[modules] Make the include guard optimization fire a bit more when considering
Richard Smith [Wed, 1 Jul 2015 01:51:38 +0000 (01:51 +0000)]
[modules] Make the include guard optimization fire a bit more when considering
re-entering a modular header.

When we do the include guard check, we're in the visibility state for the file
with the #include; the include guard may not be visible there, but we don't
actually need it to be: if we've already parsed the submodule we're considering
entering, it's always safe to skip it.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@241135 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoUse a stable sort to guarantee target feature ordering in the IR
Eric Christopher [Wed, 1 Jul 2015 01:07:12 +0000 (01:07 +0000)]
Use a stable sort to guarantee target feature ordering in the IR
in order to make testing somewhat more feasible. Has the advantage
of making it easier to find target features as well.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@241134 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoCodeGen: Resize LifetimeExtendedCleanupHeader to avoid alignment issues
Justin Bogner [Wed, 1 Jul 2015 00:59:27 +0000 (00:59 +0000)]
CodeGen: Resize LifetimeExtendedCleanupHeader to avoid alignment issues

The LifetimeExtendedCleanupHeader is carefully fit into 32 bytes,
meaning that cleanups on the LifetimeExtendedCleanupStack are *always*
allocated at a misaligned address and cause undefined behaviour.

There are two ways to solve this - add padding after the header when
we allocated our cleanups, or just simplify the header and let it use
64 bits in the first place. I've opted for the latter, and added a
static assert to avoid the issue in the future.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@241133 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[Sema] Don't crash when deduction fails for decltype(auto)
David Majnemer [Wed, 1 Jul 2015 00:29:28 +0000 (00:29 +0000)]
[Sema] Don't crash when deduction fails for decltype(auto)

We didn't check the return result of BuildDecltypeType, resulting in us
crashing when we tried to grab the canonical version of the type.

This fixes PR23995.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@241131 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoFix sse4 for target attribute feature additions.
Eric Christopher [Wed, 1 Jul 2015 00:08:32 +0000 (00:08 +0000)]
Fix sse4 for target attribute feature additions.
This reinstates part of the hack removed in r233223, by special
casing sse4 as part of the feature additions. The notable change
here is that we consider it only as part of setting the SSE level
and not as part of the actual target features set which handles
setting the rest of the masks.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@241130 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoFix a TODO dealing with canonicalizing attributes on functions by
Eric Christopher [Wed, 1 Jul 2015 00:08:29 +0000 (00:08 +0000)]
Fix a TODO dealing with canonicalizing attributes on functions by
using a string map to canonicalize. Fix up a couple of testcases
that needed changing since we are no longer simply appending features
to the list, but all of their mask dependencies as well.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@241129 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoFix use-after-free.
Peter Collingbourne [Tue, 30 Jun 2015 22:08:44 +0000 (22:08 +0000)]
Fix use-after-free.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@241121 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[modules] Make sure macros get made visible in the top-level file if we've got
Richard Smith [Tue, 30 Jun 2015 21:29:55 +0000 (21:29 +0000)]
[modules] Make sure macros get made visible in the top-level file if we've got
local submodule visibility enabled; that top-level file might not actually be
the module includes buffer if use of prebuilt modules is disabled.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@241120 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[MS ABI] Stick constructor closures in an IR COMDAT group
David Majnemer [Tue, 30 Jun 2015 21:23:51 +0000 (21:23 +0000)]
[MS ABI] Stick constructor closures in an IR COMDAT group

We no-longer stick linkonce_odr entities in COMDATs in the backend.
Instead, we rely on the IR COMDAT mechanism.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@241117 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoMore range-based-for-loopification. NFC
Douglas Katzman [Tue, 30 Jun 2015 19:32:57 +0000 (19:32 +0000)]
More range-based-for-loopification. NFC

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@241106 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoCodeGen: Assign an appropriate comdat to thunks.
Peter Collingbourne [Tue, 30 Jun 2015 19:07:26 +0000 (19:07 +0000)]
CodeGen: Assign an appropriate comdat to thunks.

Previously we were not assigning a comdat to thunks in the Microsoft ABI,
which would have required us to emit these functions outside of a comdat.
(Due to an inconsistency in how we were emitting objects, we were getting this
right most of the time, but only when compiling with function sections.) This
code generator change causes us to create a comdat for each thunk.

Differential Revision: http://reviews.llvm.org/D10829

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@241102 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoUpdate testcases: DICompileUnits are now created distinct by DIBuilder.
Adrian Prantl [Tue, 30 Jun 2015 18:32:50 +0000 (18:32 +0000)]
Update testcases: DICompileUnits are now created distinct by DIBuilder.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@241098 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoRelax this test so it also works on platforms that use characters other
Adrian Prantl [Tue, 30 Jun 2015 18:05:46 +0000 (18:05 +0000)]
Relax this test so it also works on platforms that use characters other
than forward slashes as path separators.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@241090 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoUse an early exit to improve readability. (NFC)
Adrian Prantl [Tue, 30 Jun 2015 18:01:05 +0000 (18:01 +0000)]
Use an early exit to improve readability. (NFC)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@241088 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoDebug Info: Emit debug info for @import declarations.
Adrian Prantl [Tue, 30 Jun 2015 17:39:51 +0000 (17:39 +0000)]
Debug Info: Emit debug info for @import declarations.

This allows a module-aware debugger such as LLDB to import the currently
visible modules before dropping into the expression evaluator.

rdar://problem/20965932

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@241084 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoAdd a function to ExternalASTSource that returns a descriptor that
Adrian Prantl [Tue, 30 Jun 2015 17:39:43 +0000 (17:39 +0000)]
Add a function to ExternalASTSource that returns a descriptor that
abstracts the commonalities between modules and PCH files that are
needed to emit debug info for a module or precompiled header.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@241083 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[clang-cl] Use /arch: to set the base target CPU
Reid Kleckner [Tue, 30 Jun 2015 16:32:04 +0000 (16:32 +0000)]
[clang-cl] Use /arch: to set the base target CPU

The main effect of this change is that /arch:IA32 will use i386 as the
CPU, while clang-cl will continue to default to pentium4 (aka SSE2 plus
the usual other features).

/arch:AVX and /arch:AVX2 will also now enable the other features
available in sandybridge and haswell respectively, which is consistent
with MSDN.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@241077 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[Static Analyzer] Minor improvements to SATest.
Gabor Horvath [Tue, 30 Jun 2015 15:31:17 +0000 (15:31 +0000)]
[Static Analyzer] Minor improvements to SATest.

Differential Revision: http://reviews.llvm.org/D10812

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@241073 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[X86] Rename DEFAULT_FN_ATTR macro to __DEFAULT_FN_ATTR
Michael Kuperstein [Tue, 30 Jun 2015 13:36:19 +0000 (13:36 +0000)]
[X86] Rename DEFAULT_FN_ATTR macro to __DEFAULT_FN_ATTR

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@241065 91177308-0d34-0410-b5e6-96231b3b80d8