[PATCH] D28538: [CodeGen] [CUDA] Add the ability set default attrs on functions in linked modules.
Mehdi AMINI via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 13 22:24:04 PST 2017
mehdi_amini added a comment.
Test?
Otherwise looks OK.
================
Comment at: clang/include/clang/Frontend/CodeGenOptions.h:139
+ /// ourselves.
+ bool PropagateAttrs = false;
+ /// Bitwise combination of llvm::Linker::Flags, passed to the LLVM linker.
----------------
Nit: I don't think "Propagate" is the right word, I feel something like "Override" would be better to describe what's happening.
================
Comment at: clang/lib/CodeGen/CGCall.cpp:1720
+ getLLVMContext(), llvm::AttributeSet::FunctionIndex, FuncAttrs);
+ F.addAttributes(llvm::AttributeSet::FunctionIndex, AS);
+}
----------------
Are we sure it always work? What if a function is annotated with an attribute incompatible with the attributes you're gonna add?
https://reviews.llvm.org/D28538
More information about the llvm-commits
mailing list