aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CodeGenModule.h
diff options
context:
space:
mode:
authorJuan Manuel MARTINEZ CAAMAÑO <juamarti@amd.com>2023-08-31 14:35:06 +0200
committerJuan Manuel MARTINEZ CAAMAÑO <juamarti@amd.com>2023-08-31 14:47:42 +0200
commit19550e79b50f0689404309a2c6091f0b53770e08 (patch)
treea1dc62c4846b6e67e325b460c9e03dd759b7ea66 /clang/lib/CodeGen/CodeGenModule.h
parent9536bbe464c8b53b75c485b2da607326dcd41929 (diff)
downloadllvm-19550e79b50f0689404309a2c6091f0b53770e08.zip
llvm-19550e79b50f0689404309a2c6091f0b53770e08.tar.gz
llvm-19550e79b50f0689404309a2c6091f0b53770e08.tar.bz2
[NFC][Clang] Remove redundant function definitions
There were 3 definitions of the mergeDefaultFunctionDefinitionAttributes function: A private implementation, a version exposed in CodeGen, a version exposed in CodeGenModule. This patch removes the private and the CodeGenModule versions and keeps a single definition in CodeGen. Reviewed By: jhuber6 Differential Revision: https://reviews.llvm.org/D159256
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.h')
-rw-r--r--clang/lib/CodeGen/CodeGenModule.h20
1 files changed, 0 insertions, 20 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.h b/clang/lib/CodeGen/CodeGenModule.h
index c8fc068..2dcaaac 100644
--- a/clang/lib/CodeGen/CodeGenModule.h
+++ b/clang/lib/CodeGen/CodeGenModule.h
@@ -1259,26 +1259,6 @@ public:
llvm::AttributeList &Attrs, unsigned &CallingConv,
bool AttrOnCallSite, bool IsThunk);
- /// Adds attributes to F according to our CodeGenOptions and LangOptions, as
- /// though we had emitted it ourselves. We remove any attributes on F that
- /// conflict with the attributes we add here.
- ///
- /// This is useful for adding attrs to bitcode modules that you want to link
- /// with but don't control, such as CUDA's libdevice. When linking with such
- /// a bitcode library, you might want to set e.g. its functions'
- /// "unsafe-fp-math" attribute to match the attr of the functions you're
- /// codegen'ing. Otherwise, LLVM will interpret the bitcode module's lack of
- /// unsafe-fp-math attrs as tantamount to unsafe-fp-math=false, and then LLVM
- /// will propagate unsafe-fp-math=false up to every transitive caller of a
- /// function in the bitcode library!
- ///
- /// With the exception of fast-math attrs, this will only make the attributes
- /// on the function more conservative. But it's unsafe to call this on a
- /// function which relies on particular fast-math attributes for correctness.
- /// It's up to you to ensure that this is safe.
- void mergeDefaultFunctionDefinitionAttributes(llvm::Function &F,
- bool WillInternalize);
-
/// Like the overload taking a `Function &`, but intended specifically
/// for frontends that want to build on Clang's target-configuration logic.
void addDefaultFunctionDefinitionAttributes(llvm::AttrBuilder &attrs);