]> granicus.if.org Git - clang/log
clang
10 years agoSema: Allow dllimport entities in template args for mingw
David Majnemer [Thu, 26 Jun 2014 07:48:46 +0000 (07:48 +0000)]
Sema: Allow dllimport entities in template args for mingw

Previously dllimport variables inside of template arguments relied on
not using the C++11 codepath when -fms-compatibility was set.

While this allowed us to achieve compatibility with MSVC, it did so at
the expense of MingW.

Instead, try to use the DeclRefExpr we dig out of the template argument.
If it has the dllimport attribute, accept it and skip the C++11
null-pointer check.

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

10 years agoConvert some function arguments to use ArrayRef.
Craig Topper [Thu, 26 Jun 2014 04:58:53 +0000 (04:58 +0000)]
Convert some function arguments to use ArrayRef.

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

10 years agoConvert StringLiteralParser constructor to use ArrayRef instead of a pointer and...
Craig Topper [Thu, 26 Jun 2014 04:58:39 +0000 (04:58 +0000)]
Convert StringLiteralParser constructor to use ArrayRef instead of a pointer and count.

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

10 years agoMake test from r211758 portable
Alp Toker [Thu, 26 Jun 2014 02:07:06 +0000 (02:07 +0000)]
Make test from r211758 portable

It turns out the -fblocks option is determined by the default tooling target
and not implied by the other two flags.

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

10 years agoCodeGen: Improve warnings about uninstrumented files when profiling
Justin Bogner [Thu, 26 Jun 2014 01:45:07 +0000 (01:45 +0000)]
CodeGen: Improve warnings about uninstrumented files when profiling

Improve the warning when building with -fprofile-instr-use and a file
appears not to have been profiled at all. This keys on whether a
function is defined in the main file or not to avoid false negatives
when one includes a header with functions that have been profiled.

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

10 years agoReformat RAVs to sync up following recent updates
Alp Toker [Thu, 26 Jun 2014 01:42:30 +0000 (01:42 +0000)]
Reformat RAVs to sync up following recent updates

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

10 years agoRAV: visit copy expressions of captured variables in blocks (ObjC++11)
Alp Toker [Thu, 26 Jun 2014 01:42:24 +0000 (01:42 +0000)]
RAV: visit copy expressions of captured variables in blocks (ObjC++11)

Patch by Mathieu Baudet.

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

10 years agoForward -u to the linker on gnutools toolchains
Reid Kleckner [Thu, 26 Jun 2014 01:08:54 +0000 (01:08 +0000)]
Forward -u to the linker on gnutools toolchains

Summary:
The BSDs and Darwin all forward the whole 'u' group, but gcc only
forwards -u so far as I can tell.  I only forward -u, since that's a
minimal change, and many people object to magically recognizing and
forwarding linker arguments.

Reviewers: chandlerc, joerg

Subscribers: cfe-commits

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

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

10 years agoMake -Wincomplete-umbrella go through the VFS
Ben Langmuir [Wed, 25 Jun 2014 23:53:43 +0000 (23:53 +0000)]
Make -Wincomplete-umbrella go through the VFS

By using vfs::recursive_directory_iterator, this warning will now fire
when some or all of a module's headers are from VFS mappings.

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

10 years agoMake PR20038.cpp test case portable to non-Itanium ABIs
David Blaikie [Wed, 25 Jun 2014 23:19:58 +0000 (23:19 +0000)]
Make PR20038.cpp test case portable to non-Itanium ABIs

The only call in this function is to the dtor, so there's no need to
name a non-portable mangled function name to match it.

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

10 years agoRemove REQUIRES lines from portable tests
Alp Toker [Wed, 25 Jun 2014 22:46:44 +0000 (22:46 +0000)]
Remove REQUIRES lines from portable tests

These tests are target-independent and shouldn't ever be suppressed.

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

10 years agoDon't allow dllimport variables in constant initializers
Hans Wennborg [Wed, 25 Jun 2014 22:19:48 +0000 (22:19 +0000)]
Don't allow dllimport variables in constant initializers

This is a follow-up to David's r211677. For the following code,
we would end up referring to 'foo' in the initializer for 'arr',
and then fail to link, because 'foo' is dllimport and needs to be
accessed through the __imp_?foo.

  __declspec(dllimport) extern const char foo[];
  const char* f() {
    static const char* const arr[] = { foo };
    return arr[0];
  }

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

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

10 years agofixed typos in comment
Sanjay Patel [Wed, 25 Jun 2014 22:15:12 +0000 (22:15 +0000)]
fixed typos in comment

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

10 years agoAdd vfs::recursive_directory_iterator
Ben Langmuir [Wed, 25 Jun 2014 20:25:40 +0000 (20:25 +0000)]
Add vfs::recursive_directory_iterator

For now, this is only used by its unit tests.  It is similar to the API
in llvm::sys::fs::recursive_directory_iterator, but without some of the
more complex features like requesting that the iterator not recurse into
the next directory, for example.

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

10 years agoMS ABI: Propagate class-level DLL attributes to class template specialization bases...
Hans Wennborg [Wed, 25 Jun 2014 18:25:57 +0000 (18:25 +0000)]
MS ABI: Propagate class-level DLL attributes to class template specialization bases (PR11170)

Consider the following code:

  template <typename T> class Base {};
  class __declspec(dllexport) class Derived : public Base<int> {}

When the base of an exported or imported class is a class template
specialization, MSVC will propagate the dll attribute to the base.
In the example code, Base<int> becomes a dllexported class.

This commit makes Clang do the proopagation when the base hasn't been
instantiated yet, and warns about it being unsupported otherwise.
This is different from MSVC, which allows changing a specialization
back and forth between dllimport and dllexport and seems to let the
last one win. Changing the dll attribute after instantiation would be
hard for us, and doesn't seem to come up in practice, so I think this
is a reasonable limitation to have.

MinGW doesn't do this kind of propagation.

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

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

10 years agoPR20038: DebugInfo: Call sites without DebugLocs for temporary dtors after a conditional
David Blaikie [Wed, 25 Jun 2014 17:57:34 +0000 (17:57 +0000)]
PR20038: DebugInfo: Call sites without DebugLocs for temporary dtors after a conditional

With && at the top level of an expression, the last thing done when
emitting the expression was an unconditional jump to the cleanup block.
To reduce the amount of stepping, the DebugLoc is omitted from the
unconditional jump. This is done by clearing the IRBuilder's
"CurrentDebugLocation"*. If this is not set to some non-empty value
before the cleanup block is emitted, the cleanups don't get a location
either. If a call without a location is emitted in a function with debug
info, and that call is then inlined - bad things happen. (without a
location for the call site, the inliner would just leave the inlined
DebugLocs as they were - pointing to roots in the original function, not
inlined into the current function)

Follow up commit to LLVM will ensure that breaking the invariants of the
DebugLoc chains by having chains that don't lead to the current function
will fail assertions, so we shouldn't accidentally slip any of these
cases in anymore. Those assertions may reveal further cases that need to
be fixed in clang, though I've tried to test heavily to avoid that.

* See r128471, r128513 for the code that clears the
  CurrentDebugLocation. Simply removing this code or moving the code
  into IRBuilder to apply to all unconditional branches would regress
  desired behavior, unfortunately.

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

10 years agoFix treatment of types defined in function prototype
Serge Pavlov [Wed, 25 Jun 2014 17:09:41 +0000 (17:09 +0000)]
Fix treatment of types defined in function prototype

Types defined in function prototype are diagnosed earlier in C++ compilation.
They are put into declaration context where the prototype is introduced. Later on,
when FunctionDecl object is created, these types are moved into the function context.

This patch fixes PR19018 and PR18963.

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

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

10 years agoHeaders: be a bit more careful about inline asm
Saleem Abdulrasool [Wed, 25 Jun 2014 16:48:40 +0000 (16:48 +0000)]
Headers: be a bit more careful about inline asm

Conditionally include x86intrin.h if we are building for x86 or x86_64.
Conditionalise definition of inline assembly routines which use x86 or x86_64
inline assembly. This is needed as clang can target Windows on ARM where these
definitions may be included into user code.

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

10 years agoRename loop unrolling and loop vectorizer metadata to have a common prefix.
Eli Bendersky [Wed, 25 Jun 2014 15:42:16 +0000 (15:42 +0000)]
Rename loop unrolling and loop vectorizer metadata to have a common prefix.

[Clang part]

These patches rename the loop unrolling and loop vectorizer metadata
such that they have a common 'llvm.loop.' prefix.  Metadata name
changes:

llvm.vectorizer.* => llvm.loop.vectorizer.*
llvm.loopunroll.* => llvm.loop.unroll.*

This was a suggestion from an earlier review
(http://reviews.llvm.org/D4090) which added the loop unrolling
metadata.

Patch by Mark Heffernan.

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

10 years agoFixing the RST markup for the #pragma loop attribute documentation.
Aaron Ballman [Wed, 25 Jun 2014 12:49:05 +0000 (12:49 +0000)]
Fixing the RST markup for the #pragma loop attribute documentation.

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

10 years agoFixing the position of the supported syntax marker when generating attribute document...
Aaron Ballman [Wed, 25 Jun 2014 12:48:06 +0000 (12:48 +0000)]
Fixing the position of the supported syntax marker when generating attribute documentation.

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

10 years agoEscaping a literal character to fix an RST warning.
Aaron Ballman [Wed, 25 Jun 2014 12:41:28 +0000 (12:41 +0000)]
Escaping a literal character to fix an RST warning.

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

10 years agoAlign with new GCC options for x86 Android
Alexey Volkov [Wed, 25 Jun 2014 12:15:36 +0000 (12:15 +0000)]
Align with new GCC options for x86 Android
32-bit: +ssse3
64-bit: +sse4.2 +popcnt

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

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

10 years agoCHECK-LABEL'ify this test.
James Molloy [Wed, 25 Jun 2014 11:50:56 +0000 (11:50 +0000)]
CHECK-LABEL'ify this test.

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

10 years ago[AArch32] Fix a stupid error in an architectural guard
James Molloy [Wed, 25 Jun 2014 11:46:24 +0000 (11:46 +0000)]
[AArch32] Fix a stupid error in an architectural guard

The < 8 instead of <= 8 meant that a bunch of vreinterprets were not available on v8 AArch32. Simplify the guard to just !defined(aarch64) while we're at it, and enable some v8 AArch32 testing.

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

10 years ago[OPENMP] Initial support for 'sections' directive.
Alexey Bataev [Wed, 25 Jun 2014 11:44:49 +0000 (11:44 +0000)]
[OPENMP] Initial support for 'sections' directive.

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

10 years agoAST: Initialization with dllimport functions in C
David Majnemer [Wed, 25 Jun 2014 08:15:07 +0000 (08:15 +0000)]
AST: Initialization with dllimport functions in C

The C++ language requires that the address of a function be the same
across all translation units.  To make __declspec(dllimport) useful,
this means that a dllimported function must also obey this rule.  MSVC
implements this by dynamically querying the import address table located
in the linked executable.  This means that the address of such a
function in C++ is not constant (which violates other rules).

However, the C language has no notion of ODR nor does it permit dynamic
initialization whatsoever.  This requires implementations to _not_
dynamically query the import address table and instead utilize a wrapper
function that will be synthesized by the linker which will eventually
query the import address table.  The effect this has is, to say the
least, perplexing.

Consider the following C program:
__declspec(dllimport) void f(void);

typedef void (*fp)(void);

static const fp var = &f;

const fp fun() { return &f; }

int main() { return fun() == var; }

MSVC will statically initialize "var" with the address of the wrapper
function and "fun" returns the address of the actual imported function.
This means that "main" will return false!

Note that LLVM's optimizers are strong enough to figure out that "main"
should return true.  However, this result is dependent on having
optimizations enabled!

N.B.  This change also permits the usage of dllimport declarators inside
of template arguments; they are sufficiently constant for such a
purpose.  Add tests to make sure we don't regress here.

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

10 years agoAdded a test to ensure -Wimplicit-fallthrough works with -fblocks correctly.
Alexander Kornienko [Wed, 25 Jun 2014 08:09:35 +0000 (08:09 +0000)]
Added a test to ensure -Wimplicit-fallthrough works with -fblocks correctly.

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

10 years ago[OPENMP] OMPSimdDirective and OMPForDirective: added initialization for CollapsedNum...
Alexey Bataev [Wed, 25 Jun 2014 06:52:00 +0000 (06:52 +0000)]
[OPENMP] OMPSimdDirective and OMPForDirective: added initialization for CollapsedNum member.

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

10 years agoDon't go through the TypeSourceInfo when getting the SourceRange.
Zachary Turner [Wed, 25 Jun 2014 05:37:25 +0000 (05:37 +0000)]
Don't go through the TypeSourceInfo when getting the SourceRange.

VarDecl provides a method getSourceRange(), which provides a more
robust way of getting the SourceRange since the TypeSourceInfo can
be null in certain cases.

Reviewed by: majnemer

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

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

10 years ago[Driver] Follow-up to r211598, r211663. Do not build a dynamic linker
Simon Atanasyan [Wed, 25 Jun 2014 05:00:59 +0000 (05:00 +0000)]
[Driver] Follow-up to r211598, r211663. Do not build a dynamic linker
path using sub-strings concatenation. Return the whole string explicitly.

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

10 years agoTools.cpp: Update getLinuxDynamicLinker() to return Twine instead of StringRef, since...
NAKAMURA Takumi [Wed, 25 Jun 2014 04:34:20 +0000 (04:34 +0000)]
Tools.cpp: Update getLinuxDynamicLinker() to return Twine instead of StringRef, since r211598 has introduced manipulation of return string.

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

10 years agoVirtualFileSystemTest.cpp: Get rid of initializer list on std::vector, to appease...
NAKAMURA Takumi [Wed, 25 Jun 2014 04:34:10 +0000 (04:34 +0000)]
VirtualFileSystemTest.cpp: Get rid of initializer list on std::vector, to appease msc17.

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

10 years agoReformat.
NAKAMURA Takumi [Wed, 25 Jun 2014 04:34:00 +0000 (04:34 +0000)]
Reformat.

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

10 years ago[OPENMP] Improved code and replaced struct by lambda.
Alexey Bataev [Wed, 25 Jun 2014 04:09:13 +0000 (04:09 +0000)]
[OPENMP] Improved code and replaced struct by lambda.

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

10 years agoImplement predefined stdint macros
JF Bastien [Wed, 25 Jun 2014 01:31:33 +0000 (01:31 +0000)]
Implement predefined stdint macros

Add predefined stdint macros that match the given patterns:

U?INT{_,_FAST,_LEAST}{8,16,32,64}_{MAX,TYPE}
U?INT{PTR,MAX}_{MAX,TYPE}

http://reviews.llvm.org/D4141

Author: binji

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

10 years agoFix parsing nested __if_exists blocks
Reid Kleckner [Wed, 25 Jun 2014 00:28:35 +0000 (00:28 +0000)]
Fix parsing nested __if_exists blocks

Rather than having kw___if_exists be a special case of
ParseCompoundStatementBody, we can look for kw___if_exists in the big
switch over for valid statement tokens in ParseStatementOrDeclaration.

Nested __if_exists blocks are used in the DECLARE_REGISTRY_RESOURCEID
macro from atlcom.h.

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

10 years agoAdd a missing test for the __if_exists extension
Reid Kleckner [Wed, 25 Jun 2014 00:10:50 +0000 (00:10 +0000)]
Add a missing test for the __if_exists extension

MSVC does not create a new scope for the body of an __if_exists compound
statement.  Clang already gets this right today, but it was untested.

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

10 years agoSplit tests for __if_exists out into their own file
Reid Kleckner [Wed, 25 Jun 2014 00:08:10 +0000 (00:08 +0000)]
Split tests for __if_exists out into their own file

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

10 years agoMS ABI: Ignore dll attributes on partial template specializations
Hans Wennborg [Tue, 24 Jun 2014 23:57:13 +0000 (23:57 +0000)]
MS ABI: Ignore dll attributes on partial template specializations

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

10 years agoMerge handleDLLImportAttr and handleDLLExportAttr into one function.
Hans Wennborg [Tue, 24 Jun 2014 23:57:05 +0000 (23:57 +0000)]
Merge handleDLLImportAttr and handleDLLExportAttr into one function.

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

10 years agoProvide a better diagnostic when braces are put before the identifier.
Richard Trieu [Tue, 24 Jun 2014 23:14:24 +0000 (23:14 +0000)]
Provide a better diagnostic when braces are put before the identifier.

When a user types:
  int [4] foo;
assume that the user means:
  int foo[4];

Update the information for 'foo' to prevent additional errors, and provide
a fix-it hint to move the brackets to the correct location.

Additionally, suggest parens for types that require it, such as:
  int [4] *foo;
to:
  int (*foo)[4];

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

10 years agoFix test issues from r211623 and remove test-only API
Ben Langmuir [Tue, 24 Jun 2014 21:08:13 +0000 (21:08 +0000)]
Fix test issues from r211623 and remove test-only API

1) missing iterator bits needed by libstdc++4.7
Using find_if was convenient, but since operator++ wasn't a good
interface anyway, I just replaced with a range-based for loop and
removed operator++ from the directory_iterator class.

2) stop relying on order of iterating real files

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

10 years agoForgot to add file in r211631
Matt Arsenault [Tue, 24 Jun 2014 20:58:46 +0000 (20:58 +0000)]
Forgot to add file in r211631

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

10 years agoAdd R600 builtin codegen.
Matt Arsenault [Tue, 24 Jun 2014 20:45:01 +0000 (20:45 +0000)]
Add R600 builtin codegen.

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

10 years agoFix missing C++ mode comment
Matt Arsenault [Tue, 24 Jun 2014 20:32:13 +0000 (20:32 +0000)]
Fix missing C++ mode comment

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

10 years agoCorrectly Load Mixed FP-GP Variadic Arguments for x86-64.
Rafael Espindola [Tue, 24 Jun 2014 20:01:50 +0000 (20:01 +0000)]
Correctly Load Mixed FP-GP Variadic Arguments for x86-64.

According to the x86-64 ABI, structures with both floating point and
integer members are split between floating-point and general purpose
registers, and consecutive 32-bit floats can be packed into a single
floating point register.

In the case of variadic functions these are stored to memory and the position
recorded in the va_list. This was already correctly implemented in
llvm.va_start.

The problem is that the code in clang for implementing va_arg was reading
floating point registers from the wrong location.

Patch by Thomas Jablin.

Fixes PR20018.

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

10 years agoDisable the bits of r211623 that broke the bots
Ben Langmuir [Tue, 24 Jun 2014 20:00:30 +0000 (20:00 +0000)]
Disable the bits of r211623 that broke the bots

Part of my test seems to rely on iterator bits that I didn't implement,
at least in the gcc bots. Disabling while I investigate.

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

10 years agoUse appropriate default PIE settings for OpenBSD.
Brad Smith [Tue, 24 Jun 2014 19:51:29 +0000 (19:51 +0000)]
Use appropriate default PIE settings for OpenBSD.

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

10 years agoAdd directory_iterator for (non-recursive) iteration of VFS directories
Ben Langmuir [Tue, 24 Jun 2014 19:37:16 +0000 (19:37 +0000)]
Add directory_iterator for (non-recursive) iteration of VFS directories

The API is based on sys::fs::directory_iterator, but it allows iterating
over overlays and the yaml-based VFS.  For now, it isn't used by
anything (except its tests).

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

10 years agoSimplify optimization-remark.c test following r211610
Alp Toker [Tue, 24 Jun 2014 19:23:10 +0000 (19:23 +0000)]
Simplify optimization-remark.c test following r211610

With LocTrackingOnly there's no longer a user-facing distinction so the NDEBUG
checks can go away. (Except maybe column info, but -verify only checks line
numbers anyway.)

Also add a RUN line to validate the traditional !LocTrackingOnly case.

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

10 years ago[Driver][Mips] Support mips64-linux-gnuabi64 / mips64el-linux-gnuabi64 target triples.
Simon Atanasyan [Tue, 24 Jun 2014 19:00:12 +0000 (19:00 +0000)]
[Driver][Mips] Support mips64-linux-gnuabi64 / mips64el-linux-gnuabi64 target triples.

The patch fixes the bug #19869.
http://llvm.org/bugs/show_bug.cgi?id=19869

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

10 years agoFix test added in r211610 so it doesn't race on output file creation.
David Blaikie [Tue, 24 Jun 2014 17:31:05 +0000 (17:31 +0000)]
Fix test added in r211610 so it doesn't race on output file creation.

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

10 years agoObjective-C. When we use @selector(save:), etc. there may be more
Fariborz Jahanian [Tue, 24 Jun 2014 17:02:19 +0000 (17:02 +0000)]
Objective-C. When we use @selector(save:), etc. there may be more
than one method with mismatched type of same selector name.
clang issues a warning to point this out since it may cause
undefined behavior. There are cases though that some APIs
don't care about user methods and such warnings are perceived as
noise. This patch allows users to add paren delimiters around
selector name to turn off such warnings. So, @selector((save:)) will
turn off the warning. It also provides 'fixit' so user knows
what to do. // rdar://16458579

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

10 years agoAdd new debug kind LocTrackingOnly.
Diego Novillo [Tue, 24 Jun 2014 17:02:17 +0000 (17:02 +0000)]
Add new debug kind LocTrackingOnly.

Summary:
This new debug emission kind supports emitting line location
information in all instructions, but stops code generation
from emitting debug info to the final output.

This mode is useful when the backend wants to track source
locations during code generation, but it does not want to
produce debug info. This is currently used by optimization
remarks (-Rpass, -Rpass-missed and -Rpass-analysis).

When one of the -Rpass flags is used, the front end will enable
location tracking, only if no other debug option is enabled.

To prevent debug information from being generated, a new debug
info kind LocTrackingOnly causes DIBuilder::createCompileUnit() to
not emit the llvm.dbg.cu annotation. This blocks final code generation
from generating debug info in the back end.

Depends on D4234.

Reviewers: echristo, dblaikie

Subscribers: cfe-commits

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

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

10 years agoAllow static_assert inside an anonymous union; fixes PR20021 as well as implements...
Aaron Ballman [Tue, 24 Jun 2014 16:22:41 +0000 (16:22 +0000)]
Allow static_assert inside an anonymous union; fixes PR20021 as well as implements C++ Issue 1940.

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

10 years agoUse lowercase windows.h for mingw cross compilation.
Logan Chien [Tue, 24 Jun 2014 16:18:10 +0000 (16:18 +0000)]
Use lowercase windows.h for mingw cross compilation.

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

10 years agoFix "warning: fallthrough annotation does not directly precede switch label" in lambdas.
Alexander Kornienko [Tue, 24 Jun 2014 15:28:21 +0000 (15:28 +0000)]
Fix "warning: fallthrough annotation does not directly precede switch label" in lambdas.

Summary: This patch fixes http://llvm.org/PR17864 - "warning: fallthrough annotation does not directly precede switch label" in lambdas.

Reviewers: rsmith

Reviewed By: rsmith

Subscribers: rnk, cfe-commits

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

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

10 years ago[mips] Correct linux dynamic linker for -mnan=2008
Daniel Sanders [Tue, 24 Jun 2014 15:04:16 +0000 (15:04 +0000)]
[mips] Correct linux dynamic linker for -mnan=2008

Summary:
The dynamic linker is named ld-linux-mipsn8.so.1 when -mnan=2008 is given (or
is the default). It remains ld.so.1 for other cases.

This is necessary for MIPS32r6/MIPS64r6 since these ISA's default to -mnan=2008.

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

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

10 years agoRevert r211121 (and r211285), "Change libclang initialization to use std::call_once...
NAKAMURA Takumi [Tue, 24 Jun 2014 13:50:01 +0000 (13:50 +0000)]
Revert r211121 (and r211285), "Change libclang initialization to use std::call_once instead of"

It broke mingw builder and cygwin-clang stage2, possibly lack of tls in <mutex>.

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

10 years ago[OPENMP] Additional checking for 'collapse' clause.
Alexey Bataev [Tue, 24 Jun 2014 12:55:56 +0000 (12:55 +0000)]
[OPENMP] Additional checking for 'collapse' clause.

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

10 years agoARM: remove dead CodeGen functions.
Tim Northover [Tue, 24 Jun 2014 12:07:44 +0000 (12:07 +0000)]
ARM: remove dead CodeGen functions.

These two are no longer being used by NEON codegen.

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

10 years agoclang-format: Understand that breaking before lambdas is fine.
Daniel Jasper [Tue, 24 Jun 2014 09:15:49 +0000 (09:15 +0000)]
clang-format: Understand that breaking before lambdas is fine.

Before:
  aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa([](
      const aaaaaaaaaa &a) { return a; });

After:
  aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa(
      [](const aaaaaaaaaa &a) { return a; });

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

10 years agoDriver: Restore proper naming of crashdump files
Justin Bogner [Tue, 24 Jun 2014 08:01:01 +0000 (08:01 +0000)]
Driver: Restore proper naming of crashdump files

Based on a review of r211411 by Jordan Rose.

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

10 years agoAST: Address of dllimport functions isn't constant
David Majnemer [Tue, 24 Jun 2014 06:40:51 +0000 (06:40 +0000)]
AST: Address of dllimport functions isn't constant

The address of dllimport functions can be accessed one of two ways:
- Through the IAT which is symbolically referred to with a symbol
  starting with __imp_.
- Via the wrapper-function which ends up calling through the __imp_
  symbol.

The problem with using the wrapper-function is that it's address will
not compare as equal in all translation units.  Specifically, it will
compare unequally with the translation unit which defines the function.

This fixes PR19955.

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

10 years agoAST: Address of dllimport variables isn't constant
David Majnemer [Tue, 24 Jun 2014 05:59:13 +0000 (05:59 +0000)]
AST: Address of dllimport variables isn't constant

The address of dllimport variables isn't something that can be
meaningfully used in a constexpr context and isn't suitable for
evaluation at load-time.  They require loads from memory to properly
evaluate.

This fixes PR19955.

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

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

10 years ago[OPENMP] Added initial checking of nesting of OpenMP regions.
Alexey Bataev [Tue, 24 Jun 2014 04:39:47 +0000 (04:39 +0000)]
[OPENMP] Added initial checking of nesting of OpenMP regions.

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

10 years agoPropagate isAddressOfMember into typo correction so that we don't correct &qualified...
Nick Lewycky [Mon, 23 Jun 2014 22:57:51 +0000 (22:57 +0000)]
Propagate isAddressOfMember into typo correction so that we don't correct &qualified-id into &unqualified-id. Also make sure to set the naming class when we find the qualified-id in a different class than the nested name specifier specified so far. Fixes PR19681!

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

10 years agoFix spelling. s/overloaed/overloaded/
Jim Grosbach [Mon, 23 Jun 2014 20:28:43 +0000 (20:28 +0000)]
Fix spelling. s/overloaed/overloaded/

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

10 years agoCodeGen: Remove a stray tab character (NFC)
Justin Bogner [Mon, 23 Jun 2014 20:03:28 +0000 (20:03 +0000)]
CodeGen: Remove a stray tab character (NFC)

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

10 years agoDriver: correct behaviour of -fmsc-version=MAJOR
Saleem Abdulrasool [Mon, 23 Jun 2014 17:36:36 +0000 (17:36 +0000)]
Driver: correct behaviour of -fmsc-version=MAJOR

Ensure that we properly handle the case where just the major version component
is provided by the user.

Thanks to Alp Toker for pointing out that this was not handled correctly!

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

10 years agoMS ABI: Add an additional test for typeid
David Majnemer [Mon, 23 Jun 2014 17:30:27 +0000 (17:30 +0000)]
MS ABI: Add an additional test for typeid

This tests typeid with polymorphic arguments which have an extendable
virtual function table.

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

10 years agoStop sharing the FileManager in ASTUnit::Parse
Ben Langmuir [Mon, 23 Jun 2014 16:36:40 +0000 (16:36 +0000)]
Stop sharing the FileManager in ASTUnit::Parse

We were using old stat values for any files that had previously been
looked up, leading to badness. There might be a more elegant solution in
invalidating the cache for those file (since we already know which ones
they are), but it seems too likely there are existing references to
them hiding somewhere.

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

10 years ago[OPENMP] Reformatting and code improvement.
Alexey Bataev [Mon, 23 Jun 2014 08:21:53 +0000 (08:21 +0000)]
[OPENMP] Reformatting and code improvement.

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

10 years agoclang-format: [proto] Add required space before absolute references.
Daniel Jasper [Mon, 23 Jun 2014 07:36:25 +0000 (07:36 +0000)]
clang-format: [proto] Add required space before absolute references.

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

10 years agoclang-format: Fix corner case in pointer/reference detection.
Daniel Jasper [Mon, 23 Jun 2014 07:36:18 +0000 (07:36 +0000)]
clang-format: Fix corner case in pointer/reference detection.

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

10 years agoParse: Simplify construction of the clobber list
David Majnemer [Mon, 23 Jun 2014 02:16:41 +0000 (02:16 +0000)]
Parse: Simplify construction of the clobber list

This avoids going over the clobber list twice.

No functionality change.

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

10 years agoStaticAnalyzer: Switch a loop to a range-based for
David Majnemer [Mon, 23 Jun 2014 02:16:38 +0000 (02:16 +0000)]
StaticAnalyzer: Switch a loop to a range-based for

Merely a code simplification, no functionality change.

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

10 years agoAST: Add ranges for AsmStmt's inputs and outputs
David Majnemer [Mon, 23 Jun 2014 02:16:34 +0000 (02:16 +0000)]
AST: Add ranges for AsmStmt's inputs and outputs

No functionality change.

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

10 years agocindex.py: remove obsolete workaround and FIXME
Alp Toker [Sun, 22 Jun 2014 23:28:54 +0000 (23:28 +0000)]
cindex.py: remove obsolete workaround and FIXME

clang_getCursorSpelling() doesn't assert on non-declarations any more and the
behaviour is covered by c-index tests.

Passes nosetests.

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

10 years agoDiagnosticIDs: use diagnostic severities to simplify extension handling
Alp Toker [Sun, 22 Jun 2014 21:58:33 +0000 (21:58 +0000)]
DiagnosticIDs: use diagnostic severities to simplify extension handling

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

10 years agoFix the category name for hash-warnings and hash-errors
Alp Toker [Sun, 22 Jun 2014 21:16:50 +0000 (21:16 +0000)]
Fix the category name for hash-warnings and hash-errors

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

10 years agoDriver: Skip the -ivfsoverlay argument in driver crash diags
Justin Bogner [Sun, 22 Jun 2014 20:35:10 +0000 (20:35 +0000)]
Driver: Skip the -ivfsoverlay argument in driver crash diags

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

10 years agoRevert "Revert r211402 (and r211408,r211410), "CodeGen: Refactor dynamic_cast and...
David Majnemer [Sun, 22 Jun 2014 19:05:33 +0000 (19:05 +0000)]
Revert "Revert r211402 (and r211408,r211410), "CodeGen: Refactor dynamic_cast and typeid" It crashes msvc codegen in clang/test/SemaCXX/undefined-internal.cpp."

This reverts commit r211467 which reverted r211408,r211410, it caused
crashes in test/SemaCXX/undefined-internal.cpp for i686-win32 targets.

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

10 years ago[cxx_status] Minor wording tweaks.
Richard Smith [Sun, 22 Jun 2014 16:00:05 +0000 (16:00 +0000)]
[cxx_status] Minor wording tweaks.

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

10 years ago[cxx_status] Be a bit more precise.
Richard Smith [Sun, 22 Jun 2014 15:56:23 +0000 (15:56 +0000)]
[cxx_status] Be a bit more precise.

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

10 years agoFix dead link.
Richard Smith [Sun, 22 Jun 2014 15:54:54 +0000 (15:54 +0000)]
Fix dead link.

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

10 years agoRevert r211402 (and r211408,r211410), "CodeGen: Refactor dynamic_cast and typeid...
NAKAMURA Takumi [Sun, 22 Jun 2014 12:42:29 +0000 (12:42 +0000)]
Revert r211402 (and r211408,r211410), "CodeGen: Refactor dynamic_cast and typeid" It crashes msvc codegen in clang/test/SemaCXX/undefined-internal.cpp.

It is reproducible with:

  $ clang -cc1 -triple i686-win32 -emit-llvm-only clang/test/SemaCXX/undefined-internal.cpp

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

10 years agoRemove unused diagnostic and diagnostic group.
Benjamin Kramer [Sun, 22 Jun 2014 12:16:35 +0000 (12:16 +0000)]
Remove unused diagnostic and diagnostic group.

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

10 years agoTextDiagnosticPrinter: use the mapped level for remark flag computation
Alp Toker [Sun, 22 Jun 2014 10:08:06 +0000 (10:08 +0000)]
TextDiagnosticPrinter: use the mapped level for remark flag computation

Custom diagnostics don't have a builtin class so this wouldn't have worked.
Reduces surface area of remark-related changes.

No test coverage.

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

10 years agoEnable WindowsToolChain on all native Windows builds
Alp Toker [Sun, 22 Jun 2014 04:31:15 +0000 (04:31 +0000)]
Enable WindowsToolChain on all native Windows builds

Make binaries built by MSVC, mingw and clang functionally equivalent. The
checks are trivially performed at runtime to eliminate functional differences
between supported configurations that used to be hard-coded.

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

10 years agoWindowsToolChain: decouple build environment from the toolchain
Alp Toker [Sun, 22 Jun 2014 03:27:52 +0000 (03:27 +0000)]
WindowsToolChain: decouple build environment from the toolchain

Don't try to find the MSVC version that the binaries were built with. Doing so
defeats testing by causing invalid test passes on the build servers.

Whichever Visual Studio (or clang-cl.exe) edition was used to build the clang
package, it's strictly orthogonal and has no relation to software versions
available on the user's PC.

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

10 years agoMake WindowsToolChain portable
Alp Toker [Sun, 22 Jun 2014 03:27:45 +0000 (03:27 +0000)]
Make WindowsToolChain portable

De-conditionalize as much as possible so we can start to fix this code.

No change in functionality.

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

10 years ago[analyzer] Check for NULL passed to CFAutorelease.
Jordan Rose [Sat, 21 Jun 2014 23:50:40 +0000 (23:50 +0000)]
[analyzer] Check for NULL passed to CFAutorelease.

Patch by Sean McBride, tests adjusted by me.

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

10 years agoMake MS i128 suffix test from r211446 more robust
Alp Toker [Sat, 21 Jun 2014 23:32:05 +0000 (23:32 +0000)]
Make MS i128 suffix test from r211446 more robust

We want to catch both negative and positive failure conditions.

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

10 years agoDiagnosticRenderer: emit basic notes as real diagnostics
Alp Toker [Sat, 21 Jun 2014 23:31:59 +0000 (23:31 +0000)]
DiagnosticRenderer: emit basic notes as real diagnostics

Fixes terminal column wrapping and vestigial 'note:' prefixes that would appear
when using emitBasicNote().

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

10 years agoTextDiagnostic: print remark level diagnostics in bold too
Alp Toker [Sat, 21 Jun 2014 23:31:52 +0000 (23:31 +0000)]
TextDiagnostic: print remark level diagnostics in bold too

The purpose of bolding these is to make them visually distinct from
continuations (supplemental note diagnostics). Therefore, the bolding applies
to all severities _including_ remarks -- it's not in any way an indicator of
priority. Also simplify and comment.

No tests.

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

10 years agoThe i128 suffix isn't always available.
David Majnemer [Sat, 21 Jun 2014 22:49:50 +0000 (22:49 +0000)]
The i128 suffix isn't always available.

This Lexer test unconditionally used the i128 integer literal suffix.
This suffix is only available to targets that have 128-bit arithmetic
support.

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

10 years agoLex: Use the correct types for MS integer suffixes
David Majnemer [Sat, 21 Jun 2014 18:46:07 +0000 (18:46 +0000)]
Lex: Use the correct types for MS integer suffixes

Something went wrong with r211426, it is an older version of this code
and should not have been committed.  It was reverted with r211434.

Original commit message:
We didn't properly implement support for the sized integer suffixes.
Suffixes like i16 were essentially ignored instead of mapping them to
the appropriately sized integer type.

This fixes PR20008.

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

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

10 years ago[test] Add '-target' option to fix bot failure.
Argyrios Kyrtzidis [Sat, 21 Jun 2014 18:28:44 +0000 (18:28 +0000)]
[test] Add '-target' option to fix bot failure.

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