summaryrefslogtreecommitdiff
path: root/lib/CodeGen/CodeGenModule.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* CodeGen: address post-commit review commentsSaleem Abdulrasool2016-05-301-1/+1
| | | | | | David Majnemer pointed out that isOSBinFormatMachO is more compact. NFC. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@271221 91177308-0d34-0410-b5e6-96231b3b80d8
* CodeGen: tweak CFConstantStrings for COFF and ELFSaleem Abdulrasool2016-05-301-20/+31
| | | | | | | | Adjust the constant CFString emission to emit into more appropriate sections on ELF and COFF targets. It would previously try to use MachO section names irrespective of the file format. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@271211 91177308-0d34-0410-b5e6-96231b3b80d8
* Check for nullptr argument.Artem Belevich2016-05-191-2/+2
| | | | | | | | Addresses static analysis report in PR15492. Differential Revision: http://reviews.llvm.org/D20141 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@270086 91177308-0d34-0410-b5e6-96231b3b80d8
* Reapply^3 "[ProfileData] (clang) Use Error in InstrProf and Coverage, NFC"Vedant Kumar2016-05-191-3/+5
| | | | | | Sync up with "(llvm) Use Error in InstrProf and Coverage". git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@270021 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "Reapply^2 "[ProfileData] (clang) Use Error in InstrProf and ↵Vedant Kumar2016-05-161-5/+3
| | | | | | | | Coverage, NFC"" This reverts commit r269695. The llvm commit does not pass the MSVC bot. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@269701 91177308-0d34-0410-b5e6-96231b3b80d8
* Reapply^2 "[ProfileData] (clang) Use Error in InstrProf and Coverage, NFC"Vedant Kumar2016-05-161-3/+5
| | | | | | | | Sync up with "(llvm) Use Error in InstrProf and Coverage". Differential Revision: http://reviews.llvm.org/D19902 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@269695 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "Reapply "[ProfileData] (clang) Use Error in InstrProf and Coverage, ↵Chandler Carruth2016-05-141-5/+3
| | | | | | | | | | NFC"" This reverts commit r269492 as the corresponding LLVM commit was reverted due to lots of warnings. See the review thread for the original LLVM commit (r269491) for details. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@269549 91177308-0d34-0410-b5e6-96231b3b80d8
* Reapply "[ProfileData] (clang) Use Error in InstrProf and Coverage, NFC"Vedant Kumar2016-05-131-3/+5
| | | | | | | | Sync up with "(llvm) Use Error in InstrProf and Coverage". Differential Revision: http://reviews.llvm.org/D19902 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@269492 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "[ProfileData] (clang) Use Error in InstrProf and Coverage, NFC"Vedant Kumar2016-05-131-5/+3
| | | | | | This reverts commit r269463. It fails two llvm-profdata tests. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@269468 91177308-0d34-0410-b5e6-96231b3b80d8
* [ProfileData] (clang) Use Error in InstrProf and Coverage, NFCVedant Kumar2016-05-131-3/+5
| | | | | | Sync up with "(llvm) Use Error in InstrProf and Coverage". git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@269463 91177308-0d34-0410-b5e6-96231b3b80d8
* Differential Revision: http://reviews.llvm.org/D19687Sriraman Tallam2016-04-281-8/+6
| | | | | | Set module flag PIELevel. Simplify code that sets PICLevel flag. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@267948 91177308-0d34-0410-b5e6-96231b3b80d8
* Re-apply r267784, r267824 and r267830.Peter Collingbourne2016-04-281-3/+1
| | | | | | I have updated the compiler-rt tests. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@267903 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r267784, r267824 and r267830.Benjamin Kramer2016-04-281-1/+3
| | | | | | | | | | It makes compiler-rt tests fail if the gold plugin is enabled. Revert "Rework interface for bitset-using features to use a notion of LTO visibility." Revert "Driver: only produce CFI -fvisibility= error when compiling." Revert "clang/test/CodeGenCXX/cfi-blacklist.cpp: Exclude ms targets. They would be non-cfi." git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@267871 91177308-0d34-0410-b5e6-96231b3b80d8
* Rework interface for bitset-using features to use a notion of LTO visibility.Peter Collingbourne2016-04-271-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Bitsets, and the compiler features they rely on (vtable opt, CFI), only have visibility within the LTO'd part of the linkage unit. Therefore, only enable these features for classes with hidden LTO visibility. This notion is based on object file visibility or (on Windows) dllimport/dllexport attributes. We provide the [[clang::lto_visibility_public]] attribute to override the compiler's LTO visibility inference in cases where the class is defined in the non-LTO'd part of the linkage unit, or where the ABI supports calling classes derived from abstract base classes with hidden visibility in other linkage units (e.g. COM on Windows). If the cross-DSO CFI mode is enabled, bitset checks are emitted even for classes with public LTO visibility, as that mode uses a separate mechanism to cause bitsets to be exported. This mechanism replaces the whole-program-vtables blacklist, so remove the -fwhole-program-vtables-blacklist flag. Because __declspec(uuid()) now implies [[clang::lto_visibility_public]], the support for the special attr:uuid blacklist entry is removed. Differential Revision: http://reviews.llvm.org/D18635 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@267784 91177308-0d34-0410-b5e6-96231b3b80d8
* [CodeGen] Avoid ctor/dtor boilerplate with some C++11Reid Kleckner2016-04-131-31/+13
| | | | | | | | | | | | | | Non-owning pointers that cache LLVM types and constants can use 'nullptr' default member initializers so that we don't need to mention them in the constructor initializer list. Owning pointers should use std::unique_ptr so that we don't need to manually delete them in the destructor. They also don't need to be mentioned in the constructor at that point. NFC git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@266263 91177308-0d34-0410-b5e6-96231b3b80d8
* [GCC] Attribute ifunc support in clangDmitry Polukhin2016-04-111-21/+100
| | | | | | | | | | | This patch add support for GCC attribute((ifunc("resolver"))) for targets that use ELF as object file format. In general ifunc is a special kind of function alias with type @gnu_indirect_function. LLVM patch http://reviews.llvm.org/D15525 Differential Revision: http://reviews.llvm.org/D15524 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@265917 91177308-0d34-0410-b5e6-96231b3b80d8
* revert SVN r265702, r265640Saleem Abdulrasool2016-04-081-1/+1
| | | | | | | | | | | Revert the two changes to thread CodeGenOptions into the TargetInfo allocation and to fix the layering violation by moving CodeGenOptions into Basic. Code Generation is arguably not particularly "basic". This addresses Richard's post-commit review comments. This change purely does the mechanical revert and will be followed up with an alternate approach to thread the desired information into TargetInfo. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@265806 91177308-0d34-0410-b5e6-96231b3b80d8
* Adapt to LLVM API changeSanjoy Das2016-04-081-1/+1
| | | | | | Replace mayBeOverridden with isInterposable git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@265767 91177308-0d34-0410-b5e6-96231b3b80d8
* Replace Sema-level implementation of -fassume-sane-operator-new with aRichard Smith2016-04-071-3/+13
| | | | | | | | | | | | | | | CodeGen-level implementation. Instead of adding an attribute to clang's FunctionDecl, add the IR attribute directly. This means a module built with this flag is now compatible with code built without it and vice versa. This change also results in the 'noalias' attribute no longer being added to calls to operator new in the IR; it's now only added to the declaration. It also fixes a bug where we failed to add the attribute to the 'nothrow' versions (because we didn't implicitly declare them, there was no good time to inject a fake attribute). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@265728 91177308-0d34-0410-b5e6-96231b3b80d8
* Basic: move CodeGenOptions from FrontendSaleem Abdulrasool2016-04-071-1/+1
| | | | | | | | This is a mechanical move of CodeGenOptions from libFrontend to libBasic. This fixes the layering violation introduced earlier by threading CodeGenOptions into TargetInfo. It should also fix the modules based self-hosting builds. NFC. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@265702 91177308-0d34-0410-b5e6-96231b3b80d8
* [CUDA] Add -fcuda-flush-denormals-to-zero.Justin Lebar2016-04-051-0/+8
| | | | | | | | | | | | | | | | | | Summary: Setting this flag causes all functions are annotated with the "nvvm-f32ftz" = "true" attribute. In addition, we annotate the module with "nvvm-reflect-ftz" set to 0 or 1, depending on whether -cuda-flush-denormals-to-zero is set. This is read by the NVVMReflect pass. Reviewers: tra, rnk Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D18671 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@265435 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix serialization/deserialization for __uuidofDavid Majnemer2016-03-281-1/+1
| | | | | | | | I broke this back in r264529 because I forgot to serialize the UuidAttr member. Fix this by replacing the UuidAttr with a StringRef which is properly serialized and deserialized. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@264562 91177308-0d34-0410-b5e6-96231b3b80d8
* Use the correct alignment for uuid descriptorsDavid Majnemer2016-03-271-2/+2
| | | | | | | The _GUID_ descriptors emitted by MSVC have alignment 8 for 64-bit builds: we should do the same if the linker picks the "wrong" COMDAT. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@264530 91177308-0d34-0410-b5e6-96231b3b80d8
* Improve the representation of CXXUuidofExprDavid Majnemer2016-03-271-1/+1
| | | | | | | | Keep a pointer to the UuidAttr that the CXXUuidofExpr corresponds to. This makes translating from __uuidof to the underlying constant a lot more straightforward. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@264529 91177308-0d34-0410-b5e6-96231b3b80d8
* Attach profile summary information to Module.Easwaran Raman2016-03-241-0/+1
| | | | | | | | | Differential Revision: http://reviews.llvm.org/D18289 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@264342 91177308-0d34-0410-b5e6-96231b3b80d8
* CodeGen: Mark functions used in vtables as unnamed_addr.Peter Collingbourne2016-03-141-6/+6
| | | | | | | | | | | This marks virtual function declarations, as well as runtime library functions __cxa_pure_virtual, __cxa_deleted_virtual and _purecall, as unnamed_addr. This will allow us to correctly form relative references to them from vtables in the relative vtable ABI. Differential Revision: http://reviews.llvm.org/D18071 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@263464 91177308-0d34-0410-b5e6-96231b3b80d8
* [OPENMP 4.0] Codegen for 'declare reduction' construct.Alexey Bataev2016-03-041-4/+11
| | | | | | | Emit function for 'combiner' part of 'declare reduction' construct and 'initialilzer' part, if any. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@262699 91177308-0d34-0410-b5e6-96231b3b80d8
* [OPENMP 4.0] Initial support for 'omp declare reduction' construct.Alexey Bataev2016-03-031-0/+4
| | | | | | | | | | | | | | | | | | Add parsing, sema analysis and serialization/deserialization for 'declare reduction' construct. User-defined reductions are defined as #pragma omp declare reduction( reduction-identifier : typename-list : combiner ) [initializer ( initializer-expr )] These custom reductions may be used in 'reduction' clauses of OpenMP constructs. The combiner specifies how partial results can be combined into a single value. The combiner can use the special variable identifiers omp_in and omp_out that are of the type of the variables being reduced with this reduction-identifier. Each of them will denote one of the values to be combined before executing the combiner. It is assumed that the special omp_out identifier will refer to the storage that holds the resulting combined value after executing the combiner. As the initializer-expr value of a user-defined reduction is not known a priori the initializer-clause can be used to specify one. Then the contents of the initializer-clause will be used as the initializer for private copies of reduction list items where the omp_priv identifier will refer to the storage to be initialized. The special identifier omp_orig can also appear in the initializer-clause and it will refer to the storage of the original variable to be reduced. Differential Revision: http://reviews.llvm.org/D11182 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@262582 91177308-0d34-0410-b5e6-96231b3b80d8
* [PGO] Change profile use cc1 option to handle IR level profilesRong Xu2016-03-021-4/+4
| | | | | | | | | | | | | | | | | | | This patch changes cc1 option for PGO profile use from -fprofile-instr-use=<path> to -fprofile-instrument-use-path=<path>. -fprofile-instr-use=<path> is now a driver only option. In addition to decouple the cc1 option from the driver level option, this patch also enables IR level profile use. cc1 option handling now reads the profile header and sets CodeGenOpt ProfileUse (valid values are {None, Clang, LLVM} -- this is a common enum for -fprofile-instrument={}, for the profile instrumentation), and invoke the pipeline to enable the respective PGO use pass. Reviewers: silvas, davidxl Differential Revision: http://reviews.llvm.org/D17737 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@262515 91177308-0d34-0410-b5e6-96231b3b80d8
* Serialize `#pragma detect_mismatch`.Nico Weber2016-03-021-0/+6
| | | | | | | | This is like r262493, but for pragma detect_mismatch instead of pragma comment. The two pragmas have similar behavior, so use the same approach for both. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@262506 91177308-0d34-0410-b5e6-96231b3b80d8
* [CUDA] Emit host-side 'shadows' for device-side global variablesArtem Belevich2016-03-021-12/+52
| | | | | | | | | | | | | ... and register them with CUDA runtime. This is needed for commonly used cudaMemcpy*() APIs that use address of host-side shadow to access their counterparts on device side. Fixes PR26340 Differential Revision: http://reviews.llvm.org/D17779 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@262498 91177308-0d34-0410-b5e6-96231b3b80d8
* Serialize `#pragma comment`.Nico Weber2016-03-021-0/+19
| | | | | | | | | | | | | | | `#pragma comment` was handled by Sema calling a function on ASTConsumer, and CodeGen then implementing this function and writing things to its output. Instead, introduce a PragmaCommentDecl AST node and hang one off the TranslationUnitDecl for every `#pragma comment` line, and then use the regular serialization machinery. (Since PragmaCommentDecl has codegen relevance, it's eagerly deserialized.) http://reviews.llvm.org/D17799 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@262493 91177308-0d34-0410-b5e6-96231b3b80d8
* Add whole-program vtable optimization feature to Clang.Peter Collingbourne2016-02-241-1/+3
| | | | | | | | | This patch introduces the -fwhole-program-vtables flag, which enables the whole-program vtable optimization feature (D16795) in Clang. Differential Revision: http://reviews.llvm.org/D16821 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@261767 91177308-0d34-0410-b5e6-96231b3b80d8
* Re-apply for the 2nd-time r259977 - [OpenMP] Reorganize code to allow ↵Samuel Antao2016-02-081-1/+15
| | | | | | | | | | specialized code generation for different devices. This was reverted by r260036, but was not the cause of the problem in the buildbot. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@260106 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "Re-apply r259977 - [OpenMP] Reorganize code to allow specialized ↵Renato Golin2016-02-071-15/+1
| | | | | | | | code generation for different devices." This reverts commit r259985, as it still fails one buildbot. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@260036 91177308-0d34-0410-b5e6-96231b3b80d8
* Re-apply r259977 - [OpenMP] Reorganize code to allow specialized code ↵Samuel Antao2016-02-061-1/+15
| | | | | | | | | | generation for different devices. This was reverted due to a failure in a buildbot, but it turned out the failure was unrelated. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@259985 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r259977 - [OpenMP] Reorganize code to allow specialized code ↵Samuel Antao2016-02-061-15/+1
| | | | | | | | | | generation for different devices. It triggered some problem in the configuration related with zlib and exposed in the driver. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@259984 91177308-0d34-0410-b5e6-96231b3b80d8
* [OpenMP] Reorganize code to allow specialized code generation for different ↵Samuel Antao2016-02-061-1/+15
| | | | | | | | | | | | | | | | | | | | | | | devices. Summary: Different devices may in some cases require different code generation schemes in order to implement OpenMP. This is required not only for performance reasons, but also because it may not be possible to have the current (default) implementation working for these devices. E.g. GPU's cannot implement the same scheme a target such as powerpc or x86b would use, in the sense that it does not have the ability to fork threads, instead all the threads are always executing and need to be managed by the implementation. This patch proposes a reorganization of the code in the OpenMP code generation to pave the way to have specialized implementation of OpenMP support. More than a "real" patch this is more a request for comments in order to understand if what is proposed is acceptable or if there are better/easier ways to do it. In this patch part of the common OpenMP codegen infrastructure is moved to a new file under a new namespace (CGOpenMPCommon) so it can be shared between the default implementation and the specialized one. When CGOpenMPRuntime is created, an attempt to select a specialized implementation is done. In the patch a specialization for nvptx targets is done which currently checks if the target is an OpenMP device and trap if it is not. Let me know comments suggestions you may have. Reviewers: hfinkel, carlo.bertolli, arpith-jacob, kkwli0, ABataev Subscribers: Hahnfeld, cfe-commits, fraggamuffin, caomhin, jholewinski Differential Revision: http://reviews.llvm.org/D16784 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@259977 91177308-0d34-0410-b5e6-96231b3b80d8
* [cfi] Safe handling of unaddressable vtable pointers (clang).Evgeniy Stepanov2016-02-031-0/+25
| | | | | | | | | | | Avoid crashing when printing diagnostics for vtable-related CFI errors. In diagnostic mode, the frontend does an additional check of the vtable pointer against the set of all known vtable addresses and lets the runtime handler know if it is safe to inspect the vtable. http://reviews.llvm.org/D16823 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@259716 91177308-0d34-0410-b5e6-96231b3b80d8
* [CUDA] Do not allow dynamic initialization of global device side variables.Artem Belevich2016-02-021-11/+6
| | | | | | | | | | | | | | In general CUDA does not allow dynamic initialization of global device-side variables. One exception is that CUDA allows records with empty constructors as described in section E2.2.1 of CUDA 7.5 Programming guide. This patch applies initializer checks for all device-side variables. Empty constructors are accepted, but no code is generated for them. Differential Revision: http://reviews.llvm.org/D15305 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@259592 91177308-0d34-0410-b5e6-96231b3b80d8
* Move DebugInfoKind into its own header to cut the cyclic dependency edge ↵Benjamin Kramer2016-02-021-6/+5
| | | | | | from Driver to Frontend. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@259489 91177308-0d34-0410-b5e6-96231b3b80d8
* Use a consistent spelling for vtables.Eric Christopher2016-01-291-3/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@259137 91177308-0d34-0410-b5e6-96231b3b80d8
* [MS ABI] Allow a member pointers' converted type to changeDavid Majnemer2016-01-261-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | Member pointers in the MS ABI are tricky for a variety of reasons. The size of a member pointer is indeterminate until the program reaches a point where the representation is required to be known. However, *pointers* to member pointers may exist without knowing the pointee type's representation. In these cases, we synthesize an opaque LLVM type for the pointee type. However, we can be in a situation where the underlying member pointer's representation became known mid-way through the program. To account for this, we attempted to manicure CodeGen's type-cache so that we can replace the opaque member pointer type with the real deal while leaving the pointer types unperturbed. This, unfortunately, is a problematic approach to take as we will violate CodeGen's invariants. These violations are mostly harmless but let's do the right thing instead: invalidate the type-cache if a member pointer's LLVM representation changes. This fixes PR26313. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@258839 91177308-0d34-0410-b5e6-96231b3b80d8
* [cfi] Cross-DSO CFI diagnostic mode (clang part)Evgeniy Stepanov2016-01-251-0/+2
| | | | | | | | | | | | | | * Runtime diagnostic data for cfi-icall changed to match the rest of cfi checks * Layout of all CFI diagnostic data changed to put Kind at the beginning. There is no ABI stability promise yet. * Call cfi_slowpath_diag instead of cfi_slowpath when needed. * Emit __cfi_check_fail function, which dispatches a CFI check faliure according to trap/recover settings of the current module. * A tiny driver change to match the way the new handlers are done in compiler-rt. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@258745 91177308-0d34-0410-b5e6-96231b3b80d8
* [CUDA] Don't generate aliases for static extern "C" functions.Justin Lebar2016-01-251-0/+4
| | | | | | | | | | | | | | Summary: These aliases are done to support inline asm, but there's nothing we can do: NVPTX doesn't support aliases. Reviewers: tra Subscribers: cfe-commits, jhen, echristo Differential Revision: http://reviews.llvm.org/D16501 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@258734 91177308-0d34-0410-b5e6-96231b3b80d8
* Introduce -fsanitize-stats flag.Peter Collingbourne2016-01-161-0/+9
| | | | | | | | | This is part of a new statistics gathering feature for the sanitizers. See clang/docs/SanitizerStats.rst for further info and docs. Differential Revision: http://reviews.llvm.org/D16175 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@257971 91177308-0d34-0410-b5e6-96231b3b80d8
* PR25910: clang allows two var definitions with the same mangled nameAndrey Bokhanko2016-01-141-27/+86
| | | | | | | | | | | | Proper diagnostic and resolution of mangled names' conflicts in variables. When there is a declaration and a definition using the same name but different types, we emit what is in the definition. When there are two conflicting definitions, we issue an error. Differential Revision: http://reviews.llvm.org/D15686 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@257754 91177308-0d34-0410-b5e6-96231b3b80d8
* [MS ABI] Complete and base constructor GlobalDecls must have the same nameDavid Majnemer2016-01-081-1/+14
| | | | | | | | | | | | | | | | | Clang got itself into the situation where we mangled the same constructor twice with two different constructor types. After one of the constructors were utilized, the tag used for one of the types changed from class to struct because a class template became complete. This resulted in one of the constructor types varying from the other constructor. Instead, force "base" constructor types to "complete" if the ABI doesn't have constructor variants. This will ensure that GlobalDecls for both variants will get the same mangled name. This fixes PR26029. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@257205 91177308-0d34-0410-b5e6-96231b3b80d8
* [Driver] Add support for -fno-builtin-foo options.Chad Rosier2016-01-061-1/+2
| | | | | | | Addresses PR4941 and rdar://6756912. http://reviews.llvm.org/D15195 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@256937 91177308-0d34-0410-b5e6-96231b3b80d8
* [OpenMP] Reapply rL256842: [OpenMP] Offloading descriptor registration and ↵Samuel Antao2016-01-061-0/+12
| | | | | | | | | | | | | device codegen. This patch attempts to fix the regressions identified when the patch was committed initially. Thanks to Michael Liao for identifying the fix in the offloading metadata generation related with side effects in evaluation of function arguments. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@256933 91177308-0d34-0410-b5e6-96231b3b80d8