summaryrefslogtreecommitdiffstats
path: root/test/CodeGenCXX/c-linkage.cpp
Commit message (Collapse)AuthorAgeFilesLines
* PR27549: fix bug that resulted in us giving a translation-unit-scope variable aRichard Smith2016-04-291-2/+2
| | | | | | | | | 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
* Account for calling convention specifiers in function definitions in IR test ↵David Blaikie2015-06-291-2/+2
| | | | | | | | | | | | | 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
* 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
* Switch to the new MingW ABI.Rafael Espindola2013-12-121-1/+1
| | | | | | | GCC 4.7 changed the MingW ABI. On the clang side this means that methods now have the thiscall calling convention by default. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197164 91177308-0d34-0410-b5e6-96231b3b80d8
* CHECK-LABEL-ify some code gen tests to improve diagnostic experience when ↵Stephen Lin2013-08-151-3/+3
| | | | | | tests fail. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188447 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove the hack that avoided mangling static functions in extern C contexts.Rafael Espindola2013-02-231-3/+5
| | | | | | | | | | | | | | | | | Weather we should give C language linkage to functions and variables with internal linkage probably depends on how much code assumes it. The standard says they should have no language linkage, but gcc and msvc assign them C language linkage. This commit removes the hack that was preventing the mangling on static functions declare in extern C contexts. It is an experiment to see if we can implement the rules in the standard. If it turns out that many users depend on these functions and variables having C language linkage, we should change isExternC instead and try to convince the CWG to change the standard. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175937 91177308-0d34-0410-b5e6-96231b3b80d8
* Mangle extern "C" functions whose names are not simple identifiers.Rafael Espindola2013-02-141-0/+7
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175166 91177308-0d34-0410-b5e6-96231b3b80d8
* Partially revert r175117 so that we don't break assumptions about howRafael Espindola2013-02-141-5/+3
| | | | | | | static functions in extern "C" contexts are mangled. Should fix the bootstrap. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175132 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a getLanguageLinkage method to VarDecls and FunctionDecls. Use it to fixRafael Espindola2013-02-141-0/+13
| | | | | | | | | | | | | | | some cases where functions with no language linkage were being treated as having C language linkage. In particular, don't warn in extern "C" { static NonPod foo(); } Since getLanguageLinkage checks the language linkage, the linkage computation cannot use the language linkage. Break the loop by checking just the context in the linkage computation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175117 91177308-0d34-0410-b5e6-96231b3b80d8
* Fixes a code gen. bug by removing an assert.Fariborz Jahanian2010-04-201-0/+13
It is ok to have c++-ness inside extern "C" block. Fixes pr6644. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101948 91177308-0d34-0410-b5e6-96231b3b80d8