From b0eee29c7415dfa1599e4a02018a7e99465d4253 Mon Sep 17 00:00:00 2001 From: Yaxun Liu Date: Thu, 29 Mar 2018 14:50:00 +0000 Subject: Disable emitting static extern C aliases for amdgcn target for CUDA Patch by Greg Rodgers. Revised and lit test added by Yaxun Liu. Differential Revision: https://reviews.llvm.org/D44987 llvm-svn: 328793 --- clang/lib/CodeGen/CodeGenModule.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'clang/lib/CodeGen/CodeGenModule.cpp') diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp index e1cb3242021..bc7ba9011ae 100644 --- a/clang/lib/CodeGen/CodeGenModule.cpp +++ b/clang/lib/CodeGen/CodeGenModule.cpp @@ -4677,9 +4677,7 @@ static void EmitGlobalDeclMetadata(CodeGenModule &CGM, /// to such functions with an unmangled name from inline assembly within the /// same translation unit. void CodeGenModule::EmitStaticExternCAliases() { - // Don't do anything if we're generating CUDA device code -- the NVPTX - // assembly target doesn't support aliases. - if (Context.getTargetInfo().getTriple().isNVPTX()) + if (!getTargetCodeGenInfo().shouldEmitStaticExternCAliases()) return; for (auto &I : StaticExternCValues) { IdentifierInfo *Name = I.first; -- cgit v1.2.3