mirror of
https://github.com/Gericom/teak-llvm.git
synced 2025-06-28 07:49:01 -04:00

Summary: In CUDA compilation, we call isInlineDefinitionExternallyVisible (via getGVALinkageForFunction) on functions while parsing their definitions. At the point in time when we call getGVALinkageForFunction, we haven't yet added the body to the function, so we trip this assert. But as far as I can tell, this is harmless. To work around this, we add a new flag to FunctionDecl, "WillHaveBody". There was other code that was working around the existing assert with a really awful hack -- this change lets us get rid of that hack. Reviewers: rsmith, tra Subscribers: aemerson, cfe-commits Differential Revision: https://reviews.llvm.org/D25640 llvm-svn: 285410
11 lines
247 B
Plaintext
11 lines
247 B
Plaintext
// RUN: %clang_cc1 -fsyntax-only -verify %s
|
|
|
|
#include "Inputs/cuda.h"
|
|
|
|
// expected-no-diagnostics
|
|
|
|
// Check that we can handle gnu_inline functions when compiling in CUDA mode.
|
|
|
|
void foo();
|
|
inline __attribute__((gnu_inline)) void bar() { foo(); }
|