]> granicus.if.org Git - clang/log
clang
10 years agoCodeGen: Cleanup MS ABI RTTI LLVM IR
David Majnemer [Mon, 7 Jul 2014 08:09:15 +0000 (08:09 +0000)]
CodeGen: Cleanup MS ABI RTTI LLVM IR

The MS ABI RTTI emission code would choose names for IR types like
%"MSRTTITypeDescriptor\02".  This name is undesirable because it
requires escaping; the underlying reason for this is that the name is
unprintable.  Fix this by naming it %rtti.TypeDescriptor2.

While here, stop trying to do lookups in the LLVM Module's type table.
Instead, store the IR types in MicrosoftCXXABI.  Lookups by name aren't
particularly fast.

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

10 years agoPeel away old-style file remapping typedefs and cruft
Alp Toker [Mon, 7 Jul 2014 07:47:20 +0000 (07:47 +0000)]
Peel away old-style file remapping typedefs and cruft

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

10 years agoFix an iterator invalidation issue: deserializing a key function can write to
Richard Smith [Mon, 7 Jul 2014 06:38:20 +0000 (06:38 +0000)]
Fix an iterator invalidation issue: deserializing a key function can write to
the key functions table. Don't hold references to anything within that table
across such an access.

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

10 years agoStaticAnalyzer: Silence a warning
David Majnemer [Mon, 7 Jul 2014 06:20:50 +0000 (06:20 +0000)]
StaticAnalyzer: Silence a warning

ExprEngine wasn't ready for SEHLeaveStmtClass.  Handle it like all the
other SEH constructs by aborting.

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

10 years agoCodeGen: Refactor RTTI emission
David Majnemer [Mon, 7 Jul 2014 06:20:47 +0000 (06:20 +0000)]
CodeGen: Refactor RTTI emission

Let's not expose ABI specific minutia inside of CodeGenModule and Type.
Instead, let's abstract it through CXXABI.

This gets rid of:
CodeGenModule::getCompleteObjectLocator,
CodeGenModule::EmitFundamentalTypeDescriptor{s,},
CodeGenModule::getMSTypeDescriptor,
CodeGenModule::getMSCompleteObjectLocator,
CGCXXABI::shouldRTTIBeUnique,
CGCXXABI::classifyRTTIUniqueness.

CGRTTI was *almost* entirely centered around providing Itanium-style
RTTI information.  Instead of providing interfaces that only it
consumes, move it to the ItaniumCXXABI implementation file.  This allows
it to have access to Itanium-specific implementation details without
providing useless expansion points for the Microsoft ABI side.

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

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

10 years agoFix layering of file remapping and header search initialization
Alp Toker [Mon, 7 Jul 2014 06:05:00 +0000 (06:05 +0000)]
Fix layering of file remapping and header search initialization

These two functions initialize the source manager and header search objects and
shouldn't be in InitPreprocessor which is concerned with priming the
preprocessor itself and predefining macros.

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

10 years agoAdd an explicit diagnostic for the case where an expression is not a constant
Richard Smith [Mon, 7 Jul 2014 06:00:13 +0000 (06:00 +0000)]
Add an explicit diagnostic for the case where an expression is not a constant
expression because it uses 'this'. Inspired by PR20219 comment#2.

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

10 years agoCleanup. No functionality change intended.
Richard Smith [Mon, 7 Jul 2014 05:36:14 +0000 (05:36 +0000)]
Cleanup. No functionality change intended.

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

10 years agolibclang: refactor handling of unsaved_files
Alp Toker [Mon, 7 Jul 2014 01:23:14 +0000 (01:23 +0000)]
libclang: refactor handling of unsaved_files

Consolidate CXUnsavedFile argument handling in API functions to support a wider
cleanup of various file remapping schemes in the frontend.

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

10 years agoUpdate internals manual on how to add AST nodes.
Nico Weber [Mon, 7 Jul 2014 00:50:39 +0000 (00:50 +0000)]
Update internals manual on how to add AST nodes.

StmtDumper.cpp is called ASTDumper.cpp these days, and usually works well
for new AST nodes without changes.  There's now DataRecursiveASTVisitor
in addition to RecursiveASTVisitor, and serialization wasn't mentioned.

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

10 years agoAdd an AST node for __leave statements, hook it up.
Nico Weber [Mon, 7 Jul 2014 00:12:30 +0000 (00:12 +0000)]
Add an AST node for __leave statements, hook it up.

Codegen is still missing (and I won't work on that), but __leave is now
as implemented as __try and friends.

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

10 years agoSema: Check that __leave is contained in a __try block.
Nico Weber [Sun, 6 Jul 2014 22:53:19 +0000 (22:53 +0000)]
Sema: Check that __leave is contained in a __try block.

Give scope a SEHTryScope bit, set that in ParseSEHTry(), and let Sema
walk the scope chain to find the SEHTry parent on __leave statements.
(They are rare enough that it seems better to do the walk instead of
giving Scope a SEHTryParent pointer -- this is similar to AtCatchScope.)

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

10 years agoAdd parser support for __leave (sema and onward still missing).
Nico Weber [Sun, 6 Jul 2014 22:32:59 +0000 (22:32 +0000)]
Add parser support for __leave (sema and onward still missing).

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

10 years agoGiving this test a triple to satisfy the build bots.
Aaron Ballman [Sun, 6 Jul 2014 20:07:16 +0000 (20:07 +0000)]
Giving this test a triple to satisfy the build bots.

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

10 years agoThe MicrosoftExtensions.c test file should not rely on -x objective-c++. Removed...
Aaron Ballman [Sun, 6 Jul 2014 20:04:10 +0000 (20:04 +0000)]
The MicrosoftExtensions.c test file should not rely on -x objective-c++. Removed that from the RUN line, fixed obvious C++isms in the code, and moved some C++ tests into MicrosoftExtensions.cpp instead. As a drive-by, changed the line endings for MicrosoftExtensions.c to be LF instead of CRLF.

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

10 years agoThis test case does not require -Wno-missing-declarations or -x objective-c++.
Aaron Ballman [Sun, 6 Jul 2014 19:44:38 +0000 (19:44 +0000)]
This test case does not require -Wno-missing-declarations or -x objective-c++.

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

10 years agoMove InterlockedBitTestAndSet into its own test file
Ehsan Akhgari [Sun, 6 Jul 2014 18:45:44 +0000 (18:45 +0000)]
Move InterlockedBitTestAndSet into its own test file

Summary:
This gives us back the test coverage we lost when I made
MicrosoftExtensions.c x86-only.

Reviewers: majnemer

Subscribers: cfe-commits

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

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

10 years agoUpdate for llvm api change.
Rafael Espindola [Sun, 6 Jul 2014 17:43:24 +0000 (17:43 +0000)]
Update for llvm api change.

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

10 years agoFix typo in comment.
Nick Lewycky [Sun, 6 Jul 2014 17:32:10 +0000 (17:32 +0000)]
Fix typo in comment.

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

10 years agoPlistSupport.h: avoid gcc 'defined but not used' warning
Alp Toker [Sun, 6 Jul 2014 07:59:14 +0000 (07:59 +0000)]
PlistSupport.h: avoid gcc 'defined but not used' warning

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

10 years agolibclang: make darwin pthread hacks conditional on LLVM_ENABLE_THREADS
Alp Toker [Sun, 6 Jul 2014 06:24:00 +0000 (06:24 +0000)]
libclang: make darwin pthread hacks conditional on LLVM_ENABLE_THREADS

Although these aren't strictly related to LLVM's core threading, it's
reasonable to avoid pthread usage in clang when building with
LLVM_ENABLE_THREADS disabled.

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

10 years agoModernize a couple of loops
Alp Toker [Sun, 6 Jul 2014 06:09:20 +0000 (06:09 +0000)]
Modernize a couple of loops

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

10 years agoFix the MicrosoftExtensions.c target
Ehsan Akhgari [Sun, 6 Jul 2014 05:58:55 +0000 (05:58 +0000)]
Fix the MicrosoftExtensions.c target

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

10 years agoEnable the InterlockedBitTestAndSet test
Ehsan Akhgari [Sun, 6 Jul 2014 05:50:19 +0000 (05:50 +0000)]
Enable the InterlockedBitTestAndSet test

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

10 years agoAdd support for nested blocks in Microsoft inline assembly
Ehsan Akhgari [Sun, 6 Jul 2014 05:26:54 +0000 (05:26 +0000)]
Add support for nested blocks in Microsoft inline assembly

This fixes http://llvm.org/PR20204.

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

10 years agoUse non-intrusive refcounting for TargetOptions
Alp Toker [Sun, 6 Jul 2014 05:26:44 +0000 (05:26 +0000)]
Use non-intrusive refcounting for TargetOptions

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

10 years agoUse non-intrusive refcounting for LangOptions
Alp Toker [Sun, 6 Jul 2014 05:26:07 +0000 (05:26 +0000)]
Use non-intrusive refcounting for LangOptions

This type is only refcounted in a couple of places so making ownership explicit
improves clarity.

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

10 years agoConstify a read-only parameter and give function a better name
Alp Toker [Sun, 6 Jul 2014 05:14:24 +0000 (05:14 +0000)]
Constify a read-only parameter and give function a better name

This makes it clear that TargetInfo doesn't capture the LangOptions object,
rather uses it to apply adjustments.

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

10 years agowriteARCDiagsToPlist(): make sure all diag levels get handled
Alp Toker [Sun, 6 Jul 2014 04:27:03 +0000 (04:27 +0000)]
writeARCDiagsToPlist(): make sure all diag levels get handled

Handle 'remark' level diagnostics as warnings instead of supplemental notes,
and use a covered switch to ensure the mapping is kept up to date.

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

10 years agoUse PlistSupport in a few more places
Alp Toker [Sun, 6 Jul 2014 04:26:52 +0000 (04:26 +0000)]
Use PlistSupport in a few more places

Switch over LogDiagnosticPrinter and introduce an integer helper.

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

10 years agoclang-cl: /showIncludes output should go to stdout, not stderr. Fixes PR20217.
Nico Weber [Sun, 6 Jul 2014 03:04:24 +0000 (03:04 +0000)]
clang-cl: /showIncludes output should go to stdout, not stderr. Fixes PR20217.

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

10 years agoRemove leftovers of '-arcmt-modify-in-memory' from r133315
Alp Toker [Sat, 5 Jul 2014 22:12:36 +0000 (22:12 +0000)]
Remove leftovers of '-arcmt-modify-in-memory' from r133315

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

10 years agoCodeGen: add support for a few MSVC ARM intrinsics
Saleem Abdulrasool [Sat, 5 Jul 2014 20:10:05 +0000 (20:10 +0000)]
CodeGen: add support for a few MSVC ARM intrinsics

This adds support for simple MSVC compatibility mode intrinsics.  These
intrinsics are simple in that they are either directly passed through to the
annotated MSBuiltin intrinsic or they mirror existing GCC builtins.

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

10 years agoAdd a test case for the tilde operator in Microsoft inline assembly
Ehsan Akhgari [Sat, 5 Jul 2014 15:04:06 +0000 (15:04 +0000)]
Add a test case for the tilde operator in Microsoft inline assembly

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

10 years agoTrack IntrusiveRefCntPtr::get() changes from LLVM r212366
Alp Toker [Sat, 5 Jul 2014 03:08:06 +0000 (03:08 +0000)]
Track IntrusiveRefCntPtr::get() changes from LLVM r212366

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

10 years agoCodeGen: add support for MSBuiltin aliases
Saleem Abdulrasool [Fri, 4 Jul 2014 21:49:39 +0000 (21:49 +0000)]
CodeGen: add support for MSBuiltin aliases

This completes the infrastructure for the new MSBuiltin aliases in the
instruction definitions.  These behave similar to the GCCBuiltin in that they
can be implicitly constructed without special handling unless needed.

With this change it is possible to annotate an LLVM intrinsic in the backend
instruction definitions and indicate it as a builtin in the Builtin*.def files
in clang via LANGBUILTIN.  That will automatically pass through the instruction
much as a GCCBuiltin.

Note that there is no need for the special handling for ensuring that the
compatibility flag is enabled since the filtering on the LANGBUILTIN will
automatically prevent the intrinsic from bleeding into non-MS compatible
compiler invocations.

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

10 years agoPrune some ignored warning options
Alp Toker [Fri, 4 Jul 2014 20:42:50 +0000 (20:42 +0000)]
Prune some ignored warning options

These are forms that have either slipped in without being requested for
compatibility or that GCC doesn't support in the first place.

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

10 years agoFix up the test that expects the failure fixed in r212352
Ehsan Akhgari [Fri, 4 Jul 2014 19:22:29 +0000 (19:22 +0000)]
Fix up the test that expects the failure fixed in r212352

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

10 years ago[Driver][Mips] Support one more MIPS CPU name - octeon.
Simon Atanasyan [Fri, 4 Jul 2014 12:37:04 +0000 (12:37 +0000)]
[Driver][Mips] Support one more MIPS CPU name - octeon.

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

10 years ago[Driver][Mips] Support more MIPS CPU names: mips1 - mips5.
Simon Atanasyan [Fri, 4 Jul 2014 12:36:56 +0000 (12:36 +0000)]
[Driver][Mips] Support more MIPS CPU names: mips1 - mips5.

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

10 years agogcc comptability: silent -fdefer-pop & -fno-defer-pop
Sylvestre Ledru [Fri, 4 Jul 2014 08:59:41 +0000 (08:59 +0000)]
gcc comptability: silent -fdefer-pop & -fno-defer-pop

Reviewers: rafael, rnk

Reviewed By: rnk

Subscribers: rnk, cfe-commits

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

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

10 years agoLet test/Unit/lit.cfg add config.shlibdir to $PATH on DLL platforms like cygming.
NAKAMURA Takumi [Fri, 4 Jul 2014 05:11:55 +0000 (05:11 +0000)]
Let test/Unit/lit.cfg add config.shlibdir to $PATH on DLL platforms like cygming.

This makes unittests run with BUILD_SHARED_LIBS on DLL platforms.

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

10 years agoTrailing linefeed
NAKAMURA Takumi [Fri, 4 Jul 2014 04:20:49 +0000 (04:20 +0000)]
Trailing linefeed

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

10 years agoFixed test CodeGen/captured-statements.c for powerpc64-linux.
Alexey Bataev [Fri, 4 Jul 2014 04:06:11 +0000 (04:06 +0000)]
Fixed test CodeGen/captured-statements.c for powerpc64-linux.

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

10 years agoMake a small crash preventing change.
Fariborz Jahanian [Thu, 3 Jul 2014 21:06:20 +0000 (21:06 +0000)]
Make a small crash preventing change.

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

10 years agoRestore global static array in test case
Gerolf Hoflehner [Thu, 3 Jul 2014 19:30:33 +0000 (19:30 +0000)]
Restore global static array in test case

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

10 years agoThe RTTI fallback is no more. Remove outdated diagnostic.
Benjamin Kramer [Thu, 3 Jul 2014 18:43:26 +0000 (18:43 +0000)]
The RTTI fallback is no more. Remove outdated diagnostic.

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

10 years ago[ARM] Implement ISB memory barrier intrinsic
Yi Kong [Thu, 3 Jul 2014 16:01:25 +0000 (16:01 +0000)]
[ARM] Implement ISB memory barrier intrinsic

Adds support for __builtin_arm_isb. Also corrects DSB and ISB instructions
modelling by adding has-side-effects property.

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

10 years agoAdd the __qdbl intrinsic to the arm_acle.h header
Renato Golin [Thu, 3 Jul 2014 10:14:52 +0000 (10:14 +0000)]
Add the __qdbl intrinsic to the arm_acle.h header

Patch by: Moritz Roth

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

10 years agoMove the calling of emitTargetMD() later.
Robert Lytton [Thu, 3 Jul 2014 09:30:33 +0000 (09:30 +0000)]
Move the calling of emitTargetMD() later.

Summary:
Because a global created by GetOrCreateLLVMGlobal() is not finalised until later viz:
  extern char a[];
  char f(){ return a[5];}
  char a[10];

Change MangledDeclNames to use a MapVector rather than a DenseMap so that the
Metadata is output in order of original declaration, so to make deterministic
and improve human readablity.

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

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

10 years agorefactor for-loop as range-loop before making changes.
Robert Lytton [Thu, 3 Jul 2014 09:30:29 +0000 (09:30 +0000)]
refactor for-loop as range-loop before making changes.

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

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

10 years agoARMEB: Fix function result return for composite types
Christian Pirker [Thu, 3 Jul 2014 09:28:12 +0000 (09:28 +0000)]
ARMEB: Fix function result return for composite types

Reviewed at http://reviews.llvm.org/D4364

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

10 years ago[Driver][Mips] Check MIPS CPU name provided to the Clang driver.
Simon Atanasyan [Thu, 3 Jul 2014 08:31:23 +0000 (08:31 +0000)]
[Driver][Mips] Check MIPS CPU name provided to the Clang driver.

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

10 years agoMS ABI: Get linkage of RTTI data correct
David Majnemer [Thu, 3 Jul 2014 05:51:27 +0000 (05:51 +0000)]
MS ABI: Get linkage of RTTI data correct

The Itanium rules are not appropriate for the MS ABI.  RTTI data is
_never_ imported and thus is never available_externally.  It is either
internal (if the type's linkage is internal) or linkonce_odr.

This also means that classes which inherit from dllimport'd bases force
their translation unit to duplicate the entirety of the RTTI data of
that base.

Interestingly, the complete object locator can never be referenced by
translation units which import the class.

This fixes PR20106.

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

10 years agoARM: rename ARM builtins to use __builtin_arm prefix
Saleem Abdulrasool [Thu, 3 Jul 2014 02:43:20 +0000 (02:43 +0000)]
ARM: rename ARM builtins to use __builtin_arm prefix

This corrects SVN r212196's naming change to use the proper prefix of
`__builtin_arm_` instead of `__builtin_`.

Thanks to Yi Kong for pointing out the incorrect naming!

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

10 years agoAddress review feedback for r212238.
Nico Weber [Thu, 3 Jul 2014 00:38:25 +0000 (00:38 +0000)]
Address review feedback for r212238.

Also, forgot to say in the commit message of r212238: Library authors will
see a warning about this issue if they build with -Wsystem-headers.

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

10 years agoEnable clang to continue to parse libstdc++4.6 and stlport after r210091.
Nico Weber [Wed, 2 Jul 2014 23:51:09 +0000 (23:51 +0000)]
Enable clang to continue to parse libstdc++4.6 and stlport after r210091.

r210091 made initialization checking more strict in c++11 mode. LWG2193 is
about changing standard libraries to still be valid under these new rules,
but older libstdc++ (e.g. libstdc++4.6 in -D_GLIBCXX_DEBUG=1 mode, or stlport)
do not implement that yet.  So fall back to the C++03 semantics for container
classes in system headers below the std namespace.

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

10 years agoUpdate the MSVC compatibilty document for class template parsing
Reid Kleckner [Wed, 2 Jul 2014 23:37:33 +0000 (23:37 +0000)]
Update the MSVC compatibilty document for class template parsing

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

10 years agoFix linkage bug that miscompiled variable templates instantiated from similarly named...
Larisse Voufo [Wed, 2 Jul 2014 23:08:34 +0000 (23:08 +0000)]
Fix linkage bug that miscompiled variable templates instantiated from similarly named local types. In essence, this bug ensures that the x<Foo> specialization in function foo() defined as follows differs between two distinct translation units.
    static int &foo() {
       struct Foo { };
       return x<Foo>;
    }

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

10 years agoMore editorial issues in MSVCCompatibility.rst
David Majnemer [Wed, 2 Jul 2014 22:14:34 +0000 (22:14 +0000)]
More editorial issues in MSVCCompatibility.rst

Make the status text for lambdas green.

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

10 years agoFix Typo in MSVCCompatibility.rst
Warren Hunt [Wed, 2 Jul 2014 21:46:03 +0000 (21:46 +0000)]
Fix Typo in MSVCCompatibility.rst
Also removed a sentance that was no longer relevant.

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

10 years agoFixup typo in MSVCCompatibility.rst
David Majnemer [Wed, 2 Jul 2014 21:09:33 +0000 (21:09 +0000)]
Fixup typo in MSVCCompatibility.rst

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

10 years agoCodeGen: make target builtins support languages
Saleem Abdulrasool [Wed, 2 Jul 2014 17:41:27 +0000 (17:41 +0000)]
CodeGen: make target builtins support languages

This extends the target builtin support to allow language specific annotations
(i.e. LANGBUILTIN).  This is to allow MSVC compatibility whilst retaining the
ability to have EABI targets use a __builtin_ prefix.  This is merely to allow
uniformity in the EABI case where the unprefixed name is provided as an alias in
the header.

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

10 years agoUpdate the MSVC Compatibility document
David Majnemer [Wed, 2 Jul 2014 17:26:04 +0000 (17:26 +0000)]
Update the MSVC Compatibility document

It hasn't been updated to reflect the progress we've made.  We've fuzz
tested VFTables, VBTables, layout, and RTTI data.  We support lambdas
that are compatible with their scheme.

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

10 years agoARCMigrate: simplify diagnostic handling
Alp Toker [Wed, 2 Jul 2014 17:08:00 +0000 (17:08 +0000)]
ARCMigrate: simplify diagnostic handling

Recent enhancements in the diagnostics engine mean that
TransformActions::report() no longer needs to duplicate this suppression logic.

That's great because the old code was flawed and would have attached notes to
the wrong primary diagnostic in non-trivial use.

With these changes it becomes safe to use reportNote() freely in the migration
tool.

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

10 years ago[ASan] Print exact source location of global variables in error reports.
Alexey Samsonov [Wed, 2 Jul 2014 16:54:41 +0000 (16:54 +0000)]
[ASan] Print exact source location of global variables in error reports.

See https://code.google.com/p/address-sanitizer/issues/detail?id=299 for the
original feature request.

Introduce llvm.asan.globals metadata, which Clang (or any other frontend)
may use to report extra information about global variables to ASan
instrumentation pass in the backend. This metadata replaces
llvm.asan.dynamically_initialized_globals that was used to detect init-order
bugs. llvm.asan.globals contains the following data for each global:
  1) source location (file/line/column info);
  2) whether it is dynamically initialized;
  3) whether it is blacklisted (shouldn't be instrumented).

Source location data is then emitted in the binary and can be picked up
by ASan runtime in case it needs to print error report involving some global.
For example:

  0x... is located 4 bytes to the right of global variable 'C::array' defined in '/path/to/file:17:8' (0x...) of size 40

These source locations are printed even if the binary doesn't have any
debug info.

This is an ABI-breaking change. ASan initialization is renamed to
__asan_init_v4(). Pre-built libraries compiled with older Clang will not work
with the fresh runtime.

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

10 years agoAdded standard macro guard. In case __GNUC_VA_LIST was not
Yaron Keren [Wed, 2 Jul 2014 15:25:03 +0000 (15:25 +0000)]
Added standard macro guard. In case __GNUC_VA_LIST was not
defined or defined identically before there will not be any
change in functionality.

MinGW-w64 defines __GNUC_VA_LIST as

  #define __GNUC_VA_LIST

which is different than the definition here, causing
a warning without the guard.

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

10 years ago[mips] Added additional test cases for passing -mabi to the assembler.
Daniel Sanders [Wed, 2 Jul 2014 15:21:50 +0000 (15:21 +0000)]
[mips] Added additional test cases for passing -mabi to the assembler.

Summary:
This patch adds minimal coverage for each -mcpu value to ensure that none of them can pass an empty string in -mabi.

Prior to r212176, many -mcpu values would trigger this.

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

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

10 years ago[mips] Make FileCheck prefixes match the CPU they check
Daniel Sanders [Wed, 2 Jul 2014 13:21:52 +0000 (13:21 +0000)]
[mips] Make FileCheck prefixes match the CPU they check

Summary:
For example: s/MIPS32-EB-AS/MIPS32R2-EB-AS/ since it is for MIPS32r2 not MIPS32.

This reduces the noise in my next Clang patch.

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

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

10 years ago[Driver][Mips] If ABI name is not provided deduce it from the target triple
Simon Atanasyan [Wed, 2 Jul 2014 13:20:36 +0000 (13:20 +0000)]
[Driver][Mips] If ABI name is not provided deduce it from the target triple
not from the CPU name. This approach is closer to the method used by gcc driver.

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

10 years agoARM: add support for v8 ldaex/stlex builtins.
Tim Northover [Wed, 2 Jul 2014 12:56:02 +0000 (12:56 +0000)]
ARM: add support for v8 ldaex/stlex builtins.

ARMv8 adds (to both AArch32 and AArch64) acquiring and releasing
variants of the exclusive operations, in line with the C++11 memory
model.

This adds support for two new intrinsics to expose them to C & C++
developers directly: __builtin_arm_ldaex and __builtin_arm_stlex, in
direct analogy with the versions with no implicit barrier.

rdar://problem/15885451

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

10 years agoMake FunctionDecl::getReturnTypeSourceRange() support non-builtin types
Alp Toker [Wed, 2 Jul 2014 12:55:58 +0000 (12:55 +0000)]
Make FunctionDecl::getReturnTypeSourceRange() support non-builtin types

Also document that the function is a "best-effort" facility to extract source
ranges from limited AST type location info.

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

10 years agoX86: inline all atomic operations up to 128-bits.
Tim Northover [Wed, 2 Jul 2014 10:25:45 +0000 (10:25 +0000)]
X86: inline all atomic operations up to 128-bits.

The backend *can* cope with all of these now, so Clang should give it the
chance. On CPUs without cmpxchg16b (e.g. the original athlon64) LLVM can reform
the libcalls.

rdar://problem/13496295

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

10 years agoDon't accept qualified 'int' main return types in C++ or standard C mode
Alp Toker [Wed, 2 Jul 2014 07:07:20 +0000 (07:07 +0000)]
Don't accept qualified 'int' main return types in C++ or standard C mode

C++ [basic.start.main]p1: "It shall have a return type of type int"

ISO C is also clear about this, so only accept 'int' with qualifiers in GNUMode
C.

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

10 years agoAdded test for capturing VLA types if the captured variable is a function parameter.
Alexey Bataev [Wed, 2 Jul 2014 07:05:22 +0000 (07:05 +0000)]
Added test for capturing VLA types if the captured variable is a function parameter.

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

10 years ago[OPENMP, C++11] Improve code of InitVLACaptures function.
Alexey Bataev [Wed, 2 Jul 2014 05:15:00 +0000 (05:15 +0000)]
[OPENMP, C++11] Improve code of InitVLACaptures function.

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

10 years agoPrevent Clang from crashing on template code.
Richard Trieu [Wed, 2 Jul 2014 04:39:38 +0000 (04:39 +0000)]
Prevent Clang from crashing on template code.

Fixes PR20110, where Clang hits an assertion failure when it expects that the
sub-expression of a bit cast to pointer to also be a pointer, but gets a value
instead.

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

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

10 years ago[OPENMP] Fixed error message reporting for nesting of regions
Alexey Bataev [Wed, 2 Jul 2014 03:04:53 +0000 (03:04 +0000)]
[OPENMP] Fixed error message reporting for nesting of regions

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

10 years agoIntroduce a FunctionDecl::getReturnTypeSourceRange() utility
Alp Toker [Wed, 2 Jul 2014 01:47:15 +0000 (01:47 +0000)]
Introduce a FunctionDecl::getReturnTypeSourceRange() utility

This source range is useful for all kinds of diagnostic QOI and refactoring
work, so let's make it more discoverable.

This commit also makes use of the new function to enhance various diagnostics
relating to return types and resolves an old FIXME.

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

10 years agoclang/test/CodeGenCXX/microsoft-no-rtti-data.cpp: Relax an expression for -Asserts.
NAKAMURA Takumi [Tue, 1 Jul 2014 23:33:03 +0000 (23:33 +0000)]
clang/test/CodeGenCXX/microsoft-no-rtti-data.cpp: Relax an expression for -Asserts.

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

10 years agoCodeGen: Add some comments describing VFTable CG
David Majnemer [Tue, 1 Jul 2014 22:37:08 +0000 (22:37 +0000)]
CodeGen: Add some comments describing VFTable CG

No functionality change, just some comments to describe what is going
on.

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

10 years agoCodeGenCXX: Add tests for RTTI in VFTables
David Majnemer [Tue, 1 Jul 2014 22:25:00 +0000 (22:25 +0000)]
CodeGenCXX: Add tests for RTTI in VFTables

This test was supposed to go in with r212125.

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

10 years agoDriver: Handle /GR- in a compatible way with MSVC
David Majnemer [Tue, 1 Jul 2014 22:24:56 +0000 (22:24 +0000)]
Driver: Handle /GR- in a compatible way with MSVC

There are slight differences between /GR- and -fno-rtti which made
mapping one to the other inappropriate.

-fno-rtti disables dynamic_cast, typeid, and does not emit RTTI related
information for the v-table.

/GR- does not generate complete object locators and thus will not
reference them in vftables.  However, constructs like dynamic_cast and
typeid are permitted.

This should bring our implementation of RTTI up to semantic parity with
MSVC modulo bugs.

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

10 years agoWin64: Disable uwtable until we fix .pdata emission in LLVM
Reid Kleckner [Tue, 1 Jul 2014 22:23:54 +0000 (22:23 +0000)]
Win64: Disable uwtable until we fix .pdata emission in LLVM

LLVM r211399 started emitting .pdata for win64 by default.
Unfortunately, it produces invalid object files.  I plan to fix that
Soon.  For now, don't request unwind tables.  This fixes the clang-cl
self-host on win64.

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

10 years agoAST: Small simplification in VTableBuilder
David Majnemer [Tue, 1 Jul 2014 21:10:07 +0000 (21:10 +0000)]
AST: Small simplification in VTableBuilder

Stash whether or not we have an RTTI component away instead of
recomputing it.

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

10 years agoMS ABI: Reference MSVC RTTI from the VFTable
David Majnemer [Tue, 1 Jul 2014 20:30:31 +0000 (20:30 +0000)]
MS ABI: Reference MSVC RTTI from the VFTable

The pointer for a class's RTTI data comes right before the VFTable but
has no name.  To be properly compatible with this, we do the following:
* Create a single GlobalVariable which holds the contents of the VFTable
  _and_ the pointer to the RTTI data.
* Create a GlobalAlias, with appropriate linkage/visibility, that points
  just after the RTTI data pointer.  This ensures that the VFTable
  symbol will always refer to VFTable data.
* Create a Comdat with a "Largest" SelectionKind and stick the private
  GlobalVariable in it.  By transitivity, the GlobalAlias will be a
  member of the Comdat group.  Using "Largest" ensures that foreign
  definitions without an RTTI data pointer will _not_ be chosen in the
  final linked image.

Whether or not we emit RTTI data depends on several things:
* The -fno-rtti flag implies that we should never not emit a pointer to
  RTTI data before the VFTable.
* __declspec(dllimport) brings in the VFTable from a remote DLL. Use an
  available_externally GlobalVariable to provide a local definition of
  the VFTable.  This means that we won't have any available_externally
  definitions of things like complete object locators.  This is
  acceptable because they are never directly referenced.

To my knowledge, this completes the implementation of MSVC RTTI code
generation.

Further semantic work should be done to properly support /GR-.

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

10 years agoclang-cl: Ignore /Zc:inline and /Zc:rvalueCast
Reid Kleckner [Tue, 1 Jul 2014 18:27:02 +0000 (18:27 +0000)]
clang-cl: Ignore /Zc:inline and /Zc:rvalueCast

These flags enable behavior in MSVC that Clang has by default.

/Zc:inline essentially marks all COMDATs as discardable.  In LLVM
parlance, this means using linkonce_odr linkage, which is what we
already do.

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

10 years agoGCC compatibility: Ignore -finput_charset=UTF-8 argument. It is the default in Clang.
Sylvestre Ledru [Tue, 1 Jul 2014 17:24:27 +0000 (17:24 +0000)]
GCC compatibility: Ignore -finput_charset=UTF-8 argument. It is the default in Clang.
Currently, we fail with an error.

Reviewers: rafael

Reviewed By: rafael

Subscribers: rnk, cfe-commits

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

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

10 years agoRemove CleanupHackLevel from CGException.
Logan Chien [Tue, 1 Jul 2014 11:47:10 +0000 (11:47 +0000)]
Remove CleanupHackLevel from CGException.

This patch removes the dead code, and refines the
getEHResumeBlock() slightly.

The CleanupHackLevel was a hack to the old exception
handling intrinsics, which have several issues with function
inliner.

Since LLVM 3.0, the new landingpad and resume instructions
are added to LLVM IR.  With the new exception handling
mechanism, most of the issues are fixed now.  We should
always use these instructions to implement the exception
handling code nowadays, and we don't need the hack any more.

Besides, the `CleanupHackLevel` is a compile-time constant,
thus other cases have been considered as dead code for a while.

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

10 years ago[Driver][Mips] MIPS ABI names "32" and "64" used as arguments of the "-mabi"
Simon Atanasyan [Tue, 1 Jul 2014 10:59:09 +0000 (10:59 +0000)]
[Driver][Mips] MIPS ABI names "32" and "64" used as arguments of the "-mabi"
command line option only. Internally we convert them to the "o32" and "n64"
respectively. So we do not need to refer them anywhere after that conversion.

No functional changes.

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

10 years agoEnable test/CodeGen/indirect-goto.c in 64b for local arrays
Gerolf Hoflehner [Tue, 1 Jul 2014 05:10:06 +0000 (05:10 +0000)]
Enable test/CodeGen/indirect-goto.c in 64b for local arrays

In 32b mode the reference count for block addresses
is not zero. This prevents inlining and constant
folding and causes the test to fail. Changing
the triple allows runnning the test in 64b mode.

The array in foo2 is now local instead of static until
at lower optimization levels the interprocedural constant
propagator is invoked before the global optimizer.

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

10 years agoTemporarily disable the indirect-goto.c test.
Bob Wilson [Tue, 1 Jul 2014 04:56:06 +0000 (04:56 +0000)]
Temporarily disable the indirect-goto.c test.

llvm r212077 causes this test to fail. We need to reorder some passes and
possibly make other changes to reenable the optimization being tested here.

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

10 years agoPR15677 - Crash in template diffing. Check that expression is evaluatable before...
Nikola Smiljanic [Tue, 1 Jul 2014 04:17:53 +0000 (04:17 +0000)]
PR15677 - Crash in template diffing. Check that expression is evaluatable before evaluating it.

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

10 years agoclang-interpreter: use LLVM interpreter if JIT is unavailable
Alp Toker [Tue, 1 Jul 2014 03:19:50 +0000 (03:19 +0000)]
clang-interpreter: use LLVM interpreter if JIT is unavailable

Update the strategy in r212083 to try JIT first and otherwise fall back to the
interpreter. This gives the best of both worlds and still builds fine with no
targets enabled.

Requires supporting changes from LLVM r212086.

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

10 years agodriver: add link dependency on CodeGen
Alp Toker [Tue, 1 Jul 2014 02:42:02 +0000 (02:42 +0000)]
driver: add link dependency on CodeGen

Fix the build when no targets are enabled. This dependency is incurred by two
unfortunate entries in LinkAllPasses.h included from cc1_main.cpp:

  llvm::createJumpInstrTablesPass();
  llvm::createCodeGenPreparePass();

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

10 years agoclang-interpreter: interpret instead of JITing
Alp Toker [Tue, 1 Jul 2014 02:41:55 +0000 (02:41 +0000)]
clang-interpreter: interpret instead of JITing

Fixes the build when no targets are selected, or no native target is built.

This also better matches up with the description/title of the example and
demonstrates how clang can be used to run C++ on constrained environments
without file IO or executable memory permissions (e.g. iOS apps).

A comment is added explaining how to extend the demo with JIT support as
needed.

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

10 years agoDo not define __STRICT_ANSI__ in clang-cl
Ehsan Akhgari [Mon, 30 Jun 2014 20:36:33 +0000 (20:36 +0000)]
Do not define __STRICT_ANSI__ in clang-cl

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

10 years ago[UBSan] Don't link UBSan runtime into shared libraries.
Alexey Samsonov [Mon, 30 Jun 2014 20:27:16 +0000 (20:27 +0000)]
[UBSan] Don't link UBSan runtime into shared libraries.

It used to be a feature of UBSan (it could sanitize a standalone
shared object instead of the whole program), but now it causes
more problems, like PR20165.

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

10 years agoConsider module depedencies when checking a preamble in libclang
Ben Langmuir [Mon, 30 Jun 2014 20:04:14 +0000 (20:04 +0000)]
Consider module depedencies when checking a preamble in libclang

Add module dependencies (header files, module map files) to the list of
files to check when deciding whether to rebuild a preamble. That fixes
using preambles with module imports so long as they are in
non-overridden files.

My intent is to use to unify the existing dependency collectors to the
new “DependencyCollectory” interface from this commit, starting with the
DependencyFileGenerator.

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

10 years agoUse the newly added FindInEnvPath helper in clang
Ehsan Akhgari [Mon, 30 Jun 2014 19:56:37 +0000 (19:56 +0000)]
Use the newly added FindInEnvPath helper in clang

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