summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* Revert "[opaque pointer type] update for LLVM API change"David Blaikie2015-09-145-10/+11
| | | | | | | | | | This was the wrong direction to take anyway (because ultimately the GlobalValue needed the pointee type again and /it/ used PointerType::getElementType eventually anyway)... let's go a different way. This reverts commit r236161. llvm-svn: 247586
* Test commitRachel Craik2015-09-141-2/+2
| | | | | | Remove some trailing whitespace llvm-svn: 247560
* [Sema] Reject value-initialization of function typesDavid Majnemer2015-09-141-0/+9
| | | | | | | | | T in the expression T() must be a non-array complete object type or the void type. Function types are neither. This fixes PR24798. llvm-svn: 247535
* [Static Analyzer] Remove a redundant file.Gabor Horvath2015-09-131-623/+0
| | | | llvm-svn: 247533
* [Static Analyzer] Merge the Objective-C Generics Checker into Dynamic Type ↵Gabor Horvath2015-09-133-20/+635
| | | | | | | | Propagation checker. Differential Revision: http://reviews.llvm.org/D12381 llvm-svn: 247532
* Test commit.Kelvin Li2015-09-121-1/+0
| | | | llvm-svn: 247503
* [CodeGen] Remove wrapper-free always_inline functions from COMDATsDavid Majnemer2015-09-121-1/+5
| | | | | | always_inline functions without a wrapper don't need to be in a COMDAT. llvm-svn: 247500
* Clean up trailing whitespace in the builtin headersSean Silva2015-09-1213-103/+103
| | | | llvm-svn: 247498
* Always_inline codegen rewrite.Evgeniy Stepanov2015-09-126-11/+123
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Current implementation may end up emitting an undefined reference for an "inline __attribute__((always_inline))" function by generating an "available_externally alwaysinline" IR function for it and then failing to inline all the calls. This happens when a call to such function is in dead code. As the inliner is an SCC pass, it does not process dead code. Libc++ relies on the compiler never emitting such undefined reference. With this patch, we emit a pair of 1. internal alwaysinline definition (called F.alwaysinline) 2a. A stub F() { musttail call F.alwaysinline } -- or, depending on the linkage -- 2b. A declaration of F. The frontend ensures that F.inlinefunction is only used for direct calls, and the stub is used for everything else (taking the address of the function, really). Declaration (2b) is emitted in the case when "inline" is meant for inlining only (like __gnu_inline__ and some other cases). This approach, among other nice properties, ensures that alwaysinline functions are always internal, making it impossible for a direct call to such function to produce an undefined symbol reference. This patch is based on ideas by Chandler Carruth and Richard Smith. llvm-svn: 247494
* Revert "Specify target triple in alwaysinline tests."Evgeniy Stepanov2015-09-116-117/+11
| | | | | | | | | Revert "Always_inline codegen rewrite." Breaks gdb & lldb tests. Breaks on Fedora 22 x86_64. llvm-svn: 247491
* [modules] When picking one of two template declarations as a lookup result,Richard Smith2015-09-111-1/+16
| | | | | | | | it's not sufficient to prefer the declaration with more default arguments, or the one that's visible; they might both be visible, but one of them might have a visible default argument where the other has a hidden default argument. llvm-svn: 247486
* When comparing two block captures for layout, don't crashJohn McCall2015-09-111-1/+1
| | | | | | | | if they have the same alignment and one was 'this'. Fixes PR24780. llvm-svn: 247482
* [Static Analyzer] Properly cash the configuration option for lambda support. Gabor Horvath2015-09-111-1/+3
| | | | llvm-svn: 247476
* [Shave]: pass -isystem dirs and "-Wa," args to moviAsmDouglas Katzman2015-09-111-4/+5
| | | | llvm-svn: 247474
* Simplify logic introduced in r247464.David Majnemer2015-09-111-3/+3
| | | | llvm-svn: 247472
* [tooling] In CompileCommand, Expose the 'file' that was associated with the ↵Argyrios Kyrtzidis2015-09-112-4/+9
| | | | | | command. llvm-svn: 247468
* Always_inline codegen rewrite.Evgeniy Stepanov2015-09-116-11/+117
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Current implementation may end up emitting an undefined reference for an "inline __attribute__((always_inline))" function by generating an "available_externally alwaysinline" IR function for it and then failing to inline all the calls. This happens when a call to such function is in dead code. As the inliner is an SCC pass, it does not process dead code. Libc++ relies on the compiler never emitting such undefined reference. With this patch, we emit a pair of 1. internal alwaysinline definition (called F.alwaysinline) 2a. A stub F() { musttail call F.alwaysinline } -- or, depending on the linkage -- 2b. A declaration of F. The frontend ensures that F.inlinefunction is only used for direct calls, and the stub is used for everything else (taking the address of the function, really). Declaration (2b) is emitted in the case when "inline" is meant for inlining only (like __gnu_inline__ and some other cases). This approach, among other nice properties, ensures that alwaysinline functions are always internal, making it impossible for a direct call to such function to produce an undefined symbol reference. This patch is based on ideas by Chandler Carruth and Richard Smith. llvm-svn: 247465
* [MS ABI] Select an inheritance model in template argumentsDavid Majnemer2015-09-111-3/+5
| | | | | | | | | | | | We used to only select an inheritance model if the pointer to member was nullptr. Instead, select a model regardless of the member pointer's value. N.B. This bug was exposed by making member pointers report true for isIncompleteType but has been latent since the member pointer scheme's inception. llvm-svn: 247464
* [analyzer] Add -analyzer-config option for function size the inliner ↵Devin Coughlin2015-09-112-1/+9
| | | | | | | | | | | | | | | | | | | considers as large Add an option (-analyzer-config min-blocks-for-inline-large=14) to control the function size the inliner considers as large, in relation to "max-times-inline-large". The option defaults to the original hard coded behaviour, which I believe should be adjustable with the other inlining settings. The analyzer-config test has been modified so that the analyzer will reach the getMinBlocksForInlineLarge() method and store the result in the ConfigTable, to ensure it is dumped by the debug checker. A patch by Sean Eveson! Differential Revision: http://reviews.llvm.org/D12406 llvm-svn: 247463
* [Edit] Fix issue with tracking what macro argument inputs have been edited.Argyrios Kyrtzidis2015-09-111-14/+66
| | | | | | This was not working correctly, leading to erroneously rejecting valid edits. llvm-svn: 247462
* Record function attribute "stackrealign" instead of using backend optionAkira Hatanaka2015-09-112-9/+3
| | | | | | | | | | | | -force-align-stack. Also, make changes to the driver so that -mno-stack-realign is no longer an option exposed to the end-user that disallows stack realignment in the backend. Differential Revision: http://reviews.llvm.org/D11815 llvm-svn: 247451
* Remove an unnecessary check. NFCAdrian Prantl2015-09-111-1/+1
| | | | llvm-svn: 247448
* Remove a redundant check from CGDebugInfo::shouldOmitDefinition() (NFC).Adrian Prantl2015-09-111-7/+1
| | | | llvm-svn: 247447
* Cleanup: Get rid of a bunch of unnecessary invocations of internString()Adrian Prantl2015-09-111-21/+14
| | | | | | in CGDebugInfo.cpp: MDString::get() copies its arguments. llvm-svn: 247445
* [Static Analyzer] Fixed a typo in a diagnostic message.Gabor Horvath2015-09-111-1/+1
| | | | llvm-svn: 247444
* Module Debugging: Emit forward declarations for types that are defined inAdrian Prantl2015-09-112-12/+59
| | | | | | | | | clang modules, if -dwarf-ext-refs (DebugTypesExtRefs) is specified. This reimplements r247369 in about a third of the amount of code. Thanks to David Blaikie pointing this out in post-commit review! llvm-svn: 247432
* Revert "Module Debugging: Emit forward declarations for types that are ↵Adrian Prantl2015-09-112-153/+10
| | | | | | | | defined in" This reverts commit r247369 to facilitate reviewing of the following patch. llvm-svn: 247431
* [Static Analyzer] Properly clean up the dynamic type information for dead ↵Gabor Horvath2015-09-115-43/+80
| | | | | | | | regions. Differential Revision: http://reviews.llvm.org/D12767 llvm-svn: 247430
* [Static Analyzer] Lambda support.Gabor Horvath2015-09-114-5/+92
| | | | | | Differential Revision: http://reviews.llvm.org/D12652 llvm-svn: 247426
* [Static Analyzer] Minor cleanups for the nullability checker.Gabor Horvath2015-09-111-46/+40
| | | | | | Differential Revision: http://reviews.llvm.org/D12619 llvm-svn: 247423
* [CodeGen] Teach SimplifyPersonality about the updated LandingPadInstVedant Kumar2015-09-111-28/+38
| | | | | | | | | | | | | | | When uses of personality functions were moved from LandingPadInst to Function, we forgot to update SimplifyPersonality(). This patch corrects that. Note: SimplifyPersonality() is an optimization which replaces personality functions with the default C++ personality when possible. Without this update, some ObjC++ projects fail to link against C++ libraries (seeing as the exception ABI had effectively changed). rdar://problem/22155434 llvm-svn: 247421
* Fixed HasDeclarationMatcher to properly convert all types into decls where ↵Aaron Ballman2015-09-111-0/+5
| | | | | | | | | | | | | | possible. Added objcObjectPointerType(), objcInterfaceDecl(), templateTypeParmType(), injectedClassNameType(), and unresolvedUsingTypenameDecl(). Updated documentation for pointerType() to call out that it does not match ObjCObjectPointerType types. Changed pointsTo() to handle ObjCObjectPointerType as well as PointerType. While this may seem like a lot of unrelated changes, they all relate back to fixing HasDeclarationMatcher. This now allows us to write a matcher like: varDecl(hasType(namedDecl(hasName("Foo")))) that matches code using typedefs, objc interfaces, template type parameters, injected class names, or unresolved using typenames. llvm-svn: 247404
* [OPENMP] Preserve alignment of the original variables for the captured ↵Alexey Bataev2015-09-113-9/+25
| | | | | | | | references. Patch makes codegen to preserve alignment of the shared variables captured and used in OpenMP regions. llvm-svn: 247401
* Fix \param in r247251. [-Wdocumentation]NAKAMURA Takumi2015-09-111-1/+1
| | | | llvm-svn: 247392
* [OPENMP] Fix printing of array section with single index.Alexey Bataev2015-09-111-3/+5
| | | | llvm-svn: 247389
* [modules] Don't load files specified by -fmodule-file= when modules areRichard Smith2015-09-111-1/+4
| | | | | | disabled. (We still allow this via -cc1 / -Xclang, primarily for testing.) llvm-svn: 247384
* [modules] Slightly defang an assert that produces false-positives on the ↵Richard Smith2015-09-111-12/+13
| | | | | | selfhost bot. llvm-svn: 247375
* [sema] Fix assertion hit when using libclang to index a particular C++ ↵Argyrios Kyrtzidis2015-09-111-2/+7
| | | | | | | | snippet involving templates. Assertion hit was in ClassTemplateSpecializationDecl::getSourceRange(). llvm-svn: 247373
* Module Debugging: Emit forward declarations for types that are defined inAdrian Prantl2015-09-112-10/+153
| | | | | | clang modules, if -dwarf-ext-refs (DebugTypesExtRefs) is specified. llvm-svn: 247369
* Cleanup: Let CGDebugInfo::ModuleRefCache use a TrackingMDNode (NFC).Adrian Prantl2015-09-112-7/+7
| | | | llvm-svn: 247368
* [MS ABI] Remove another call to RequireCompleteTypeDavid Majnemer2015-09-111-4/+0
| | | | | | | | I cannot come up with a testcase which would rely on this call to RequireCompleteType, I believe that it is superfluous given the current state of clang. llvm-svn: 247367
* [Driver] Use UniversalCRT on Windows if availableReid Kleckner2015-09-113-13/+99
| | | | | | | | | | | | | | | | | | | | Summary: With Visual Studio 2015 release, a part of runtime library was extracted and now comes with Windows Kits. This patch enables clang to use Universal CRT library if %INCLUDE or %LIB environment varaibles are not specified. See also https://llvm.org/bugs/show_bug.cgi?id=24741 Patch by Igor Kudrin Reviewers: zturner, hans, rnk Subscribers: ruiu, cfe-commits Differential Revision: http://reviews.llvm.org/D12695 llvm-svn: 247362
* Support noreturn in limited contexts on Objective-C message sends.John McCall2015-09-101-11/+60
| | | | | | rdar://6198039 llvm-svn: 247350
* [SEH] Use cleanupendpad so that WinEHPrepare gets the coloring rightReid Kleckner2015-09-104-31/+55
| | | | | | | Cleanupendpad is a lot like catchendpad, so we can reuse the same EHScopeStack type. llvm-svn: 247349
* [MS ABI] Make member pointers return true for isIncompleteTypeDavid Majnemer2015-09-109-43/+40
| | | | | | | The type of a member pointer is incomplete if it has no inheritance model. This lets us reuse more general logic already embedded in clang. llvm-svn: 247346
* Revert "Generating assumption loads of vptr after ctor call (fixed)"Piotr Padlewski2015-09-107-238/+124
| | | | | | | | It seems that there is small bug, and we can't generate assume loads when some virtual functions have internal visibiliy This reverts commit 982bb7d966947812d216489b3c519c9825cacbf2. llvm-svn: 247332
* Driver: Support cfi-icall on all OSs when targeting x86/x86_64.Peter Collingbourne2015-09-102-4/+7
| | | | llvm-svn: 247324
* Add a getDeclContextDescriptor() helper function to CGDebugInfo. (NFC)Adrian Prantl2015-09-102-27/+28
| | | | llvm-svn: 247319
* [SEH] Use catchret in the new EH IR like we do for C++Reid Kleckner2015-09-101-1/+13
| | | | | | Also add tests for SEH with the new IRGen. llvm-svn: 247318
* [CUDA] Postprocess bitcode linked in during device-side CUDA compilation.Artem Belevich2015-09-102-1/+9
| | | | | | | | Link in and internalize the symbols we need from supplied bitcode library. Differential Revision: http://reviews.llvm.org/D11664 llvm-svn: 247317
OpenPOWER on IntegriCloud