summaryrefslogtreecommitdiffstats
path: root/test/CodeGenCXX/extern-c.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Bring r325915 back.Rafael Espindola2018-02-231-8/+8
| | | | | | | | | | | | | | | The tests that failed on a windows host have been fixed. Original message: Start setting dso_local for COFF. With this there are still some GVs where we don't set dso_local because setGVProperties is never called. I intend to fix that in followup commits. This is just the bare minimum to teach shouldAssumeDSOLocal what it should do for COFF. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@325940 91177308-0d34-0410-b5e6-96231b3b80d8
* PR27549: fix bug that resulted in us giving a translation-unit-scope variable aRichard Smith2016-04-291-2/+17
| | | | | | | | | mangled name if it happened to be declared in an 'extern "C++"' context. This also causes us to use the '_ZL' mangling rather than the '_Z' mangling for internal-linkage entities that are wrapped in a language linkage construct. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@267969 91177308-0d34-0410-b5e6-96231b3b80d8
* [opaque pointer type] update test cases for explicit pointee types on global ↵David Blaikie2015-09-111-2/+2
| | | | | | aliases git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@247380 91177308-0d34-0410-b5e6-96231b3b80d8
* Account for calling convention specifiers in function definitions in IR test ↵David Blaikie2015-06-291-1/+1
| | | | | | | | | | | | | cases Several tests wouldn't pass when executed on an armv7a_pc_linux triple due to the non-default arm_aapcs calling convention produced on the function definitions in the IR output. Account for this with the application of a little regex. Patch by Ying Yi. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@240971 91177308-0d34-0410-b5e6-96231b3b80d8
* Update for llvm change.Rafael Espindola2014-07-301-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@214356 91177308-0d34-0410-b5e6-96231b3b80d8
* PR19411: Walk lexical parents, not semantic parents, when determining whether aRichard Smith2014-04-141-0/+7
| | | | | | | DeclContext is (lexically) within a C language linkage specification. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@206204 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix testcase to actually check what it was supposed to, and make it a bit ↵Richard Smith2014-02-181-3/+2
| | | | | | more robust. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@201591 91177308-0d34-0410-b5e6-96231b3b80d8
* PR18839: 'extern "C++"' also adds an implicit 'extern', not just 'extern "C"'.Richard Smith2014-02-171-3/+7
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@201537 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove the -cxx-abi command-line flag.Hans Wennborg2014-01-141-1/+1
| | | | | | | | | | | | | | | This makes the C++ ABI depend entirely on the target: MS ABI for -win32 triples, Itanium otherwise. It's no longer possible to do weird combinations. To be able to run a test with a specific ABI without constraining it to a specific triple, new substitutions are added to lit: %itanium_abi_triple and %ms_abi_triple can be used to get the current target triple adjusted to the desired ABI. For example, if the test suite is running with the i686-pc-win32 target, %itanium_abi_triple will expand to i686-pc-mingw32. Differential Revision: http://llvm-reviews.chandlerc.com/D2545 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@199250 91177308-0d34-0410-b5e6-96231b3b80d8
* Prepare for using MS ABI by default for Win32: update CodeGenCXX testsHans Wennborg2013-12-131-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197281 91177308-0d34-0410-b5e6-96231b3b80d8
* When an internal-linkage function or variable is declared within an extern "C"Richard Smith2013-04-061-0/+27
| | | | | | | | | | | linkage specification, and is marked as __attribute__((used)), try to also give it the unmangled name (by emitting an internal linkage alias) if nothing else within the translation unit would use that name. This allows inline asm in that translation unit to use the entity via its unmangled name, which people apparently rely on. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178950 91177308-0d34-0410-b5e6-96231b3b80d8
* Correctly compute linkage of decls forward declared extern C.Rafael Espindola2013-03-121-3/+13
| | | | | | | | | | | | | | This fixes a crash in namespace { struct X {}; } extern "C" X test2_b; X test2_b before we would assign different linkages to each of the test2_b decls. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176869 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove a bogus assert so we don't crash inRafael Espindola2013-03-121-5/+17
| | | | | | | | | | | namespace { struct X {}; } extern "C" { X b = X(); } git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176866 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix assertion failure when parsing linkage specifications (PR5921),Douglas Gregor2010-02-071-0/+3
| | | | | | | from Keir Mierle! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95516 91177308-0d34-0410-b5e6-96231b3b80d8
* Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'.Daniel Dunbar2009-12-151-1/+1
| | | | | | | | | - This is designed to make it obvious that %clang_cc1 is a "test variable" which is substituted. It is '%clang_cc1' instead of '%clang -cc1' because it can be useful to redefine what gets run as 'clang -cc1' (for example, to set a default target). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91446 91177308-0d34-0410-b5e6-96231b3b80d8
* Eliminate &&s in tests.Daniel Dunbar2009-11-081-3/+3
| | | | | | - 'for i in $(find . -type f); do sed -e 's#\(RUN:.*[^ ]\) *&& *$#\1#g' $i | FileUpdate $i; done', for the curious. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86430 91177308-0d34-0410-b5e6-96231b3b80d8
* extern "C" should preserve the 'extern' qualifier for VarDecls. Fixes 6853728.Anders Carlsson2009-05-161-0/+13
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71957 91177308-0d34-0410-b5e6-96231b3b80d8