diff options
author | Douglas Gregor <dgregor@apple.com> | 2010-03-07 05:10:40 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2010-03-07 05:10:40 +0000 |
commit | 96df6cfd1220d629fca2ae4fec2aecfdf35ad847 (patch) | |
tree | cbd1d22c19c284fd3bdda333fe205e0b301cc315 | |
parent | 1dcd061f7209f227d785043bd4a75e427d851abe (diff) |
Don't turn off mangling in implicitly extern "C" system headers. GCC
doesn't do this on any of the major platforms, and we don't really
support any of the platforms that do (nor will we actually handle
those headers well). Fixes PR6217; see PR6530 for details on what we
would need to do to support these platforms.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97899 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/CodeGen/Mangle.cpp | 6 | ||||
-rw-r--r-- | test/CodeGenCXX/mangle-system-header.cpp | 4 |
2 files changed, 4 insertions, 6 deletions
diff --git a/lib/CodeGen/Mangle.cpp b/lib/CodeGen/Mangle.cpp index 20d54b3410..2e0580f5e7 100644 --- a/lib/CodeGen/Mangle.cpp +++ b/lib/CodeGen/Mangle.cpp @@ -214,12 +214,6 @@ bool MangleContext::shouldMangleDeclName(const NamedDecl *D) { if (!getASTContext().getLangOptions().CPlusPlus) return false; - // No mangling in an "implicit extern C" header. - if (D->getLocation().isValid() && - getASTContext().getSourceManager(). - isInExternCSystemHeader(D->getLocation())) - return false; - // Variables at global scope with non-internal linkage are not mangled if (!FD) { const DeclContext *DC = D->getDeclContext(); diff --git a/test/CodeGenCXX/mangle-system-header.cpp b/test/CodeGenCXX/mangle-system-header.cpp index cb68bc1976..6716b58926 100644 --- a/test/CodeGenCXX/mangle-system-header.cpp +++ b/test/CodeGenCXX/mangle-system-header.cpp @@ -5,3 +5,7 @@ # 1 "fake_system_header.h" 1 3 4 // CHECK: define void @_ZdlPvS_( void operator delete (void*, void*) {} + +// PR6217 +// CHECK: define void @_Z3barv() +void bar() { } |