mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-04 09:00:33 +03:00

When certain attributes are applied to the calling function, like "unsafe-fp-math", the inlined inlineIR function has to have the same attributes otherwise the calling function attribute will be reset to the safe merge of the two: "false". Because the same inlineIR function can be called in different functions using an alias definition, a new function (with possibly different attributes) has to be instantiated upon every call. Related GH issue #1438
30 lines
774 B
C++
30 lines
774 B
C++
//===-- gen/irstate.h - Inline IR implementation-----------------*- C++ -*-===//
|
||
//
|
||
// LDC – the LLVM D compiler
|
||
//
|
||
// This file is distributed under the BSD-style LDC license. See the LICENSE
|
||
// file for details.
|
||
//
|
||
//===----------------------------------------------------------------------===//
|
||
//
|
||
// Contains the implementation for the LDC-specific LLVM inline IR feature.
|
||
//
|
||
//===----------------------------------------------------------------------===//
|
||
|
||
#ifndef LDC_GEN_INLINEIR_H
|
||
#define LDC_GEN_INLINEIR_H
|
||
|
||
#include "ddmd/arraytypes.h"
|
||
|
||
class DValue;
|
||
class FuncDeclaration;
|
||
struct Loc;
|
||
|
||
namespace llvm {
|
||
class Function;
|
||
}
|
||
|
||
DValue *DtoInlineIRExpr(Loc &loc, FuncDeclaration *fdecl,
|
||
Expressions *arguments);
|
||
|
||
#endif
|